ποΈ Architecture (MVP)¶
Overview¶
Simple, pragmatic architecture for a 3-person startup building an MVP. No over-engineering, just proven patterns that work.
Key Documents¶
Core Technical Decisions¶
- Tech Stack - Technologies we're using and why
- Database Design - Simple PostgreSQL schema with RLS
- API Design - REST endpoints and patterns
- Authentication - Kinde Auth integration
- Deployment - Cloudflare Pages setup
Architecture Principles¶
1. Edge-First¶
- Deploy to Cloudflare's edge network
- Fast globally without complexity
- Workers for API, Pages for frontend
2. Monolith First¶
- Single React 19 SPA with Vite for frontend
- Supabase backend services
- Shared TypeScript types
- Split later if needed (probably won't)
3. Managed Services¶
- Supabase for database (PostgreSQL)
- Kinde for authentication
- Cloudflare for hosting
- Less to manage = more time to build
4. Security by Default¶
- HTTPS everywhere (Cloudflare)
- Row Level Security in database
- Authentication required for all data
- No shortcuts on security
System Overview¶
βββββββββββββββββββ βββββββββββββββββββ
β Cloudflare β β Kinde Auth β
β Pages ββββββΆβ (OAuth) β
β (React + Vite) β βββββββββββββββββββ
ββββββββββ¬βββββββββ
β
βΌ
βββββββββββββββββββ βββββββββββββββββββ
β Supabase β β SendGrid β
β (PostgreSQL) β β (Email) β
β + Edge Fns β βββββββββββββββββββ
βββββββββββββββββββ
Development Workflow¶
- Local Dev:
pnpm devwith hot reload - Test: Basic unit tests, no over-testing
- Deploy: Push to GitHub, auto-deploy
- Monitor: Cloudflare Analytics + Sentry
What We're NOT Building¶
- Microservices (monolith is fine)
- Kubernetes (Cloudflare handles scaling)
- Complex caching (CDN is enough)
- Custom authentication (Kinde works great)
- GraphQL (REST is simpler)
- Event sourcing (just use PostgreSQL)
Performance Targets¶
- Page load: < 3 seconds on 3G
- API response: < 500ms globally
- Uptime: 99.9% (Cloudflare SLA)
- Concurrent users: 1000+ (easy with edge)
Cost Estimates (Monthly)¶
- Cloudflare: $5-20 (Workers + Pages)
- Supabase: $0-25 (free tier β pro)
- Kinde: $0-75 (free β growth)
- Total: < $150/month for MVP
Next Steps¶
- Set up GitHub repo
- Initialize React 19 + Vite project
- Deploy hello world to Cloudflare Pages
- Add Supabase + Kinde Auth
- Build first feature
Keep it simple. Use managed services. Focus on product-market fit.