DEV Community

Alin Climente
Alin Climente

Posted on • Updated on

My current prefered way of building web apps

My default "factory settings" for creating apps are Python/FastAPI/Jinja2 with a sprinkle of AlpineJS for interactivity (toggles etc).

If the app is way too interactive I prefer to use Svelte+Typescript on the frontend. As a CSS framework by default I go with BulmaCSS.

I prefer MongoDB as a database because it speaks the language of the web (JSON) and I hate migrations.

If the web app needs to be extremely performant or it needs to be a cross-platform CLI I will switch to GO/Fiber with Sqlite, Postgres, MongoDB depending on the case.

VSCode, Docker and Docker Compose are indispensabile from my web application development process.

When it comes to deploying the web app I usually start with a simple VPS and use Caddy2 as a load balancer/reverse-proxy (super easy to configure). With this setup if data is important I would make sure backups are in place. I would throw more resources at the VPS if needed even go with a bare metal option.

1VPS

Here is an estimate on what resources you can get for ~900$ per month for a bare metal server:

bare-metal-server

I selected a Compute server with 48 cores that's enormous! There are options with more RAM or GPU depending on the type of requests the web app handles. For example, if you have a video editing app choose a server with a lot of GPU, if you have an app that processes a lot of data take one with more CPU and RAM and so on.

This will work for 90% of cases 100% of the time.

If the app becomes an unicorn and the bare metal is not enough anymore then I will delegate that complexity to as many managed services as possible. There is EC2 with auto-scalling feature you can limit the number of instances it creates so you don't go homeless. You have managed databases like MongoDB Atlas, PlanetScale etc. external storage options like AWS S3, external authentification from AWS Cognito or Firebase Auth, managed kubernetes services and so on.

IMO the app should work the same on a laptop with you as a single user the same as it work online with milions of users.

Just posting this here to see if my stack/habits/view changes in a few years.

Top comments (0)