┌─────────────┐ ┌─────────────┐ ┌─────────────┐
│ Nginx │────▶│ Flask App │────▶│ MySQL │
│ (Reverse │ │ (Gunicorn) │ │ Database │
│ Proxy) │ └──────┬──────┘ └─────────────┘
└─────────────┘ │
│
┌──────▼──────┐ ┌─────────────┐
│ Celery │────▶│ Redis │
│ Worker │ │ (Broker) │
└─────────────┘ └─────────────┘
| Component |
Purpose |
| Nginx |
Reverse proxy, static files, SSL termination |
| Flask App |
REST API, business logic, authentication |
| Celery Worker |
Background tasks, scheduled jobs |
| Redis |
Task queue broker, caching |
| MySQL |
Primary data store |
| OnlyOffice |
Document editing (external service) |
rapid-pm/
├── app/
│ ├── controllers/ # API endpoints (routes)
│ ├── services/ # Business logic
│ ├── models/ # SQLAlchemy models
│ └── serde/ # Serialization schemas
├── rpm-ui/ # Angular frontend
├── migrations/ # Flyway database migrations
└── tests/ # Unit and integration tests
- Controllers receive HTTP requests and validate input
- Services contain business logic and orchestrate operations
- Models handle database interactions
- Serde schemas serialize responses