Architecture¶
This section covers the system architecture for the SaaS-Courier platform.
Contents¶
- System Overview - High-level architecture, key design decisions
- Backend Modules - Clean Architecture modules in the backend
- Frontend Modules - Flet module structure and design system
- Database Schema - PostgreSQL tables and RLS
- Multi-Tenancy - Tenant isolation and RLS context manager
Tech Stack¶
Backend¶
- Framework: FastAPI (Python)
- ORM: SQLModel (SQLAlchemy + Pydantic)
- Database: PostgreSQL with Row Level Security
- Auth: JWT with refresh token rotation
- Real-time: WebSocket + Redis pub/sub
Frontend¶
- Framework: Flet (Python) - cross-platform
- HTTP: httpx for async API calls
- Design: Kinetic Courier (custom design system)
Infrastructure¶
- Hosting: Cloudflare Workers Sites
- API Domain:
api.saas-courier.com - Documentation: https://saas-courier-docs.juanant0ni0.workers.dev/