This Website

trevphil.com has come a long way. It was built using:

trevphil.com debuted from Adobe Muse, but that's a GUI cop-out. A programmer should code his own website right? Eventually I switched to a statically-served Angular application with file hosting and domain provisioning from GoDaddy.

After my time working in Slovakia, I became more comfortable with Angular, Javascript, and backend design. So I rewrote the Angular app with better practices this time, as well as a CRUD Rails application to service the app and easily update the website content. Both are hosted on an Amazon EC2 instance (the backend on a different subdomain), so then I could ditch the somewhat expensive GoDaddy file hosting.

trevphil_be

The Rails application is JSON API-only (it does not have templates or HTML) and works with Active Model Serializers and basic token authentication. It was deployed via Capistrano 3 (boy was it a pain to deploy for me and my novice server setup skills) and uses nginx connected to a Puma socket on the server-side, plus PostgreSQL.

trevphil_fe

The Angular application relies heavily on flexbox layout, Material Design (which is awesome by the way), and the Angular CLI. Techniques used include:

  • Modular design
  • HTTP interception (to insert auth tokens on API calls)
  • Auth guards (so you can't access the admin panel!)
  • Reactive forms
  • Pipes

Hosting a combined backend + frontend allowed me to create my own CMS (content-management system) in fact. Originally for the admin panel I used the Rich Text Editor Quill shown below:

quill

However in 2018 I made further overhauls to the website, adding support for a Blog and other optimizations:

And by the way, holy crap, switching to markdown was the best decision ever. I highly recommend.