My Boring Yet Modern Web Starter Stack

I like to use the same stack again and again. It makes me productive, makes code less buggy, and builds knowledge over time. Unless there is a real need like unmaintained software or a different kind of application or unless I am going to build a Facebook or Google, I rarely change things in this stack. Even if I am going to build Facebook, I would start here and then adjust as it grows, just like Facebook did with it's stack.

So currently, my stack looks like this. It's called "Boring" not because it's dull but because there are minimal unwanted surprises. You don't want surprises in your software stack. This stack is both "Modern" and "Boring".

Front end

  1. HTML
  2. CSS
  3. Javascript
  4. Vue - A Javascript framework to build web apps
  5. Bootstrap - front-end open source toolkit

Back end

  1. Python
  2. Flask - micro web framework
  3. Flask extensions for additional functionalities like REST API etc
  4. Jinja2 for any server side templating
  5. SQLAlchemy as ORM
  6. Celery for Jobs
  7. Redis as both cache and queue
  8. PostgreSQL or SQLite as RDBMS
  9. RESTful web services and OpenAPI

Servers

  1. Gunicorn as Python WSGI HTTP Server
  2. Gevent - To provide asychronous workers to Gunicorn when required. Specially for SSE.
  3. NGINX as reverse proxy and serve static content
  4. Ubuntu LTS - Linux as operating system

When I posted this diagram on twitter, there were some good suggestions. I am adding them below as you might find them interesting.

MariaDB - If you already use MariaDB, you can continue using it. SQLAlchemy should ideally make it easy to change if required unless you use DB-specific features.

RabbitMQ - Instead of Redis as Queue. I have used it before. It's rock solid. I would start with Redis. When you need RabbitMQ, you can transparently change in Celery. It should be just a settings change.

RQ - instead of Celery. Lesser overhead and less complicated. But it has fewer features than Celery. For me, the limitation is its dependency on Redis. Ideally, I would like to have an option to switch to a different Queue when required. That said. Migrating from RQ to Celery or vice versa doesn't look that complicated. So if you are new to jobs and want a simple system, you can start with RQ.

GraphQL - instead of RESTFul, sometimes along with RESTful. I have used them; I like them. But I use it on a case-by-case basis.

I have not added deployment, CI/CD, Dev Tools, monitoring and alerting tools here. I do have standard tools for these tasks too. I will probably write a different post about them. In the meantime send me your comments.

1 Response

  1. April 21, 2022

    […] See how difficult it is, given how unfriendly the internet is today. And suddenly how we will start appreciating the frameworks, we have today. That said, I still love the simplicity of […]

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.