Hi everyone! π
I'm Mehdi, a Full Stack Dev & DevSecOps enthusiast.
We all know the feeling: You have a great SaaS idea on a Friday night. You open your IDE, ready to code... and then you spend the entire weekend configuring Docker, fighting with CORS errors, setting up Authentication, and trying to verify Stripe Webhooks.
By Sunday evening, the infrastructure is ready, but your motivation for the actual product is gone. π
I got tired of this cycle. So, I spent the last few weeks building the ultimate opinionated boilerplate to solve this once and for all.
Here is the architecture I built to go from "Idea" to "Production" in minutes.
π The Tech Stack
I chose this stack for one reason: Speed & Scalability.
1. The Backend: FastAPI (Async) β‘οΈ
I moved away from Flask/Django for FastAPI.
-
Fully Async: Leveraging Python's
async/awaitfor high performance. - Type Safety: Uses Pydantic for validation (fewer bugs in prod).
- Auto Documentation: Swagger UI is generated automatically.
2. The Frontend: React + Vite + TailwindCSS π¨
- Vite: Because waiting for Webpack is so 2020. Instant server start.
- TailwindCSS: For rapid UI development without leaving your HTML.
- Context API: Managed global state for Auth/User data simple and clean.
3. The Infrastructure: Docker & Supabase π³
-
Docker Compose: The whole app (Frontend + Backend + Celery + Redis) spins up with a single
docker-compose upcommand. - Supabase: I use it for the PostgreSQL database and Authentication handling. It saves tons of backend logic.
4. The Painful Stuff (Solved) π
The hardest part of any SaaS is usually the "boring" integrations. I pre-configured:
- Stripe: Complete implementation with Webhook handling (secure signature verification).
- Celery + Redis: For background tasks (sending emails, processing data) without blocking the main API.
- Protected Routes: Custom middleware to lock down endpoints based on user roles.
π The Structure
I tried to keep the folder structure clean and modular:
βββ backend
β βββ app
β β βββ api (endpoints)
β β βββ core (config, security)
β β βββ models (DB schemas)
β β βββ services (Stripe, Email logic)
β βββ Dockerfile
β βββ main.py
βββ frontend
β βββ src
β β βββ components
β β βββ hooks
β β βββ pages
β βββ Dockerfile
βββ docker-compose.yml
π Why I built this
I built this primarily for myself, to stop reinventing the wheel. But I realized other developers might want to save those 50+ hours of setup time too.
You can definitely build this stack yourself using the list above (it's a great learning exercise!).
But if you want to skip the headache and start coding your product features right now, I packaged the whole code into a clean, documented Starter Kit.
π You can check it out here: Production-Ready SaaS Starter Kit
(Note: It's a paid template to support the maintenance, but it costs less than one hour of your billable time.)
π¬ Discussion
What is your go-to stack for Side Projects in 2026? Are you Team Next.js or Team Vite + Python? Let me know in the comments!
Happy Coding! π»
Top comments (0)