SaaS Starter Architecture
Production-ready SaaS backend with authentication, user management, billing, and transactional email.
Services
- API Gateway (api_gateway) — Routes and rate-limits API requests — Express, Node.js
- Auth Service (service) — Handles authentication and token management — Node.js, Passport
- AWS Cognito (external) — Manages user identity pools — AWS Cognito
- User Service (service) — Manages user profiles and preferences — Node.js, TypeScript
- Billing Service (service) — Manages subscriptions and invoicing — Node.js, TypeScript
- Stripe (external) — Processes subscription payments — Stripe API
- Email Service (service) — Sends transactional and marketing emails — Python, SendGrid
- PostgreSQL (database) — Stores users, subscriptions, and app data — PostgreSQL
- Redis (database) — Caches sessions and rate-limit counters — Redis
Connections
- API Gateway → Auth Service (sync_http)
- API Gateway → User Service (sync_http)
- API Gateway → Billing Service (sync_http)
- Auth Service → AWS Cognito (sync_http)
- Billing Service → Stripe (sync_http)
- Billing Service → Email Service (async_event)
- Auth Service → Redis (db_access)
- User Service → PostgreSQL (db_access)
- Billing Service → PostgreSQL (db_access)