# Technical Architecture ## Overview Makenot.work is a monolith: a single deployable unit with clear internal boundaries, no microservices complexity. ## Stack - **Language**: Rust - **Framework**: Axum - **Templates**: Askama (compile-time checked) - **Database**: PostgreSQL - **File Storage**: S3-compatible object storage - **Frontend**: HTMX for dynamic interactions - **Search**: PostgreSQL trigram similarity and substring matching (no Elasticsearch dependency) ## Core Components ``` ┌─────────────────────────────────────────────────┐ │ Caddy (HTTPS) │ └─────────────────────┬───────────────────────────┘ │ ┌─────────────────────▼───────────────────────────┐ │ Axum Application Server │ │ ┌───────────┐ ┌───────────┐ ┌───────────────┐ │ │ │ Page │ │ API │ │ Auth │ │ │ │ Routes │ │ Routes │ │ Middleware │ │ │ └───────────┘ └───────────┘ └───────────────┘ │ └──────┬──────────────────────────────┬───────────┘ │ │ ┌──────▼──────┐ ┌──────▼──────┐ │ PostgreSQL │ │ S3 Storage │ │ (sessions) │ │ (files) │ └─────────────┘ └─────────────┘ ``` ## Data Flow 1. **Upload**: Client > API > Temp storage > Processing worker > S3 > Database record 2. **Playback**: Client > API > Signed URL generation > Direct S3 stream 3. **Payment**: Client > API > Payment processor webhook > Database > Payout queue ## Design Principles - **No vendor lock-in**: All components have open-source alternatives - **Horizontal scaling ready, single-server today**: The application is written so a load balancer can sit in front of multiple stateless app servers, but production currently runs as a single VPS. The load-balanced topology is on the roadmap, not in production. See [Infrastructure & Vendors](./infrastructure.md) for the current deployment. - **Data locality**: Keep related data together, minimize cross-service calls - **Fail gracefully**: If S3 is unavailable, streaming stops but the site stays up for browsing and purchases ## See Also - [Infrastructure & Vendors](./infrastructure.md): specific providers we use - [Open Source](./open-source.md): License and source availability - [How We Work](../about/how-we-work.md): creator and fan workflows