Platform
System architecture
Next.js frontend, FastAPI backend, MySQL primary store, Redis for Arq workers, nginx edge in production.
Production deployment
flowchart TB
User[Browser] --> Nginx[nginx]
Nginx -->|/api/*| API[FastAPI]
Nginx -->|/*| FE[Next.js]
FE --> API
API --> MySQL[(MySQL)]
API --> Redis[(Redis)]
Worker[Arq worker] --> MySQL
Worker --> Redis
Logical components
frontend/
Next.js App Router — public reading, editor, dashboard, admin.
backend/app/api/v1/
REST routers per domain under /api/v1.
backend/app/services/
Business logic — articles, auth, monetization, search, …
backend/app/ai/
Orchestration, providers, publishing pipeline (server-only).
backend/app/workers/
Scheduled publish cron, AI jobs, email rollups.
template/
Visual design reference (read-only).