My Stack

The project stack has several different components, and all of them change over time. I’m documenting the current stack as of March 2023. The following packages, components, and services are what I would use to start a new project. Now depending on the project some of these could change, but for a simple web deployment I’m just going to list it out.


Back End

The backend pieces will cover the server side architecture, backend language/framework, database, and hosting provider.

Hosting

For the past several years, I have launched all of my applications on Digital Ocean droplets. These droplets do come preconfigured, but for some reason I always pull down a current barebone Ubuntu LTS droplet and build it with the services I need myself. They probably make this much easier than how I approach it, but I usually get my droplet, generate some SSH keys, and go in through the terminal building the system I want one package at a time.

Web Server

When I started out with web development, I always went with Apache 2. But for at least the past 6 or 7 years I’ve used nginx. nginx installation is done with the apt package manager found on Debian/Ubuntu systems.

I set up a virtual host in the /etc/nginx/sites-available directory and link it to the /etc/nginx/sites-enabled folder. In the config I set up the SSL certificates and point to my web application. The web application setups I use are either pointing to a PHP configuration or NodeJS proxy server. If I have a domain already but recently got it, I usually need to point it to the ip in the /etc/hosts folder while waiting for DNS to propagate.

Database

My current database of choice is MariaDB. I chose this system because it’s the open source salvage remains from when Oracle took MySQL in it’s own direction. The package is being well maintained, and it’s an easy swap in my framework. I’m a huge proponent of the OSS community and want to support it in every way.

Language / Framework

I started web development with PHP and Code Igniter back in 2014. The tutorials I was finding were by Jeffrey Way, who eventually found his way in to the Laravel framework. So I continued on that path, and today I do most of my backend coding with the current PHP 8.2 release using the Laravel framework.

I am a huge supporter of Laravel. I’ve been to several Laracon conferences in Louisville, Chicago, and New York City. I’ve met several of the PHP contributors there and at Sunshine PHP conference in Miami, FL.

While I do dabble in other backend languages and frameworks for experimenting, I believe that I will continue to produce backend code using PHP and Laravel far into the foreseeable future. I do love the community, and I find the progress that this stack is making is very impressive.

Authentication

While using the Laravel framework, there are several different options to use for authentication. If I am building an API that I want to work with a web application and mobile application, I use Laravel Sanctum.

Sanctum provides web authentication with cookies, and a token based authentication for mobile apps. Using this package, I can use the same routes with middleware to

SSL Certificates

For https encryption, I use Let’s Encrypt. These are free certificates. With SSH access into my droplet, I use Certbot to install certificates in just a few commands.


Front End

For front end web development, I use several different packages that I mention here.

Build Process

The front end package manager that I am using is Vite for my builds. Vite is developed by Evan You the creator of VueJS. He does provide support for other front end packages as well. With Vite, I use it to bundle all of my assets and run a development server. With Vite I can pull in Tailwind and Typescript and whatever other front end libraries I need for development.

Javascript / Typescript

I’m using a few different options for front end web development currently. If I’m developing an API to be used with several clients, I’ve built front ends with both React/NextJS and Vue. For applications that do not require a separate API, I find that building Inertia components with VueJS are great to work with.

CSS Styling

For styling, I am using Tailwind CSS. I’ve purchased a license to use the Tailwind components library, but I’ve also pulled in the free Daisy UI components built with Tailwind as well.

When I do not require interactive pages, Blade templating is still a great choice.

Leave a Reply

Your email address will not be published. Required fields are marked *