A ready-to-use, MIT-licensed SaaS application boilerplate combining Flask (Python) backend, PostgreSQL database and a ReactJS frontend. It provides user authentication (JWT + cookie tokens), modular project structure, demo components, DB scaffolding and deployment-friendly scripts so developers can quickly prototype and build production-ready SaaS applications.
Open-Source SaaS Boilerplate (Python / PostgreSQL / React)
A free starter for building a SaaS web application. This boilerplate combines a Flask backend, PostgreSQL database, and a React frontend to help you bootstrap a scalable SaaS product quickly.
- Tech stack: Python (Flask) backend, PostgreSQL database, ReactJS frontend, Webpack for building, and SCSS for styling.
- Goal: deliver a working, modular SaaS app architecture with authentication, API endpoints, and a responsive UI out of the box.
Why this boilerplate helps
- Jumpstart your SaaS project with a proven structure, so you can focus on domain logic rather than boilerplate.
- Frontend and backend are organized side-by-side in cohesive modules, making development and maintenance easier.
- Built-in UI patterns and components speed up the creation of dashboards, user management, and critical SaaS workflows.
Core architecture
- Backend
- Flask-based with blueprints to keep features decoupled.
- JWT-based authentication with server-side API support.
- Automatic API/module import: add a new API component and it’s registered automatically.
-
Essential server-side API endpoints for authentication and profile management.
-
Frontend
- React SPA with routes for register, login, finish registration, and confirmation flow.
- Responsive, mobile-friendly design with a dynamic left menu and header dropdowns.
- Lazy-loaded components to improve performance.
-
A single source of truth for routes and components, reducing boilerplate.
-
Data and models
- Core tables include User, Role, Account, and AccountHistory.
-
Role-based access and user management built in to support common SaaS use cases.
-
UI and UX
- Alerts, dropdown menus, and other UI blocks are componentized and customizable.
- Left navigation and top menus are driven by JSON-based data structures for flexibility.
- All styles live in one folder for fast theming and Theme swaps.
Key features
- User authentication
- Email verification and standard registration/login/logout flows.
- Session management via JWT with secure cookie handling.
-
Optional finish-registration flow and automatic redirects where appropriate.
-
API and modularity
- Backend and frontend features are split into modules (“blueprints”) that can be developed and tested independently.
-
Automatic API import and simple extension points for adding new functionality.
-
Front-end capabilities
- SPA routing with a responsive design.
- Lazy loading for performance optimization.
- JSON-driven navigation menus with optional icons and colors.
-
Reusable UI components (alerts, forms, profile views, etc.).
-
Error handling and reliability
- Graceful 404 and basic error pages to guide users when routes are missing.
-
Consistent error handling patterns across server and client.
-
Theming and customization
- All styles centralized to enable quick theme changes.
- Global aliases and ES6 features for modern JavaScript syntax.
-
A single framework for adding new components and features without breaking existing code.
-
Deployment and development convenience
- Docker/Docker-Compose ready for local and cloud deployments.
- AWS Beanstalk-friendly structure.
- Clear guidelines for environment variables and configuration.