| 1 |
# Technical Architecture |
| 2 |
|
| 3 |
## Overview |
| 4 |
|
| 5 |
Makenot.work is a monolith: a single deployable unit with clear internal boundaries, no microservices complexity. |
| 6 |
|
| 7 |
## Stack |
| 8 |
|
| 9 |
- **Language**: Rust |
| 10 |
- **Framework**: Axum |
| 11 |
- **Templates**: Askama (compile-time checked) |
| 12 |
- **Database**: PostgreSQL |
| 13 |
- **File Storage**: S3-compatible object storage |
| 14 |
- **Frontend**: HTMX for dynamic interactions |
| 15 |
- **Search**: PostgreSQL trigram similarity and substring matching (no Elasticsearch dependency) |
| 16 |
|
| 17 |
## Core Components |
| 18 |
|
| 19 |
``` |
| 20 |
┌─────────────────────────────────────────────────┐ |
| 21 |
│ Caddy (HTTPS) │ |
| 22 |
└─────────────────────┬───────────────────────────┘ |
| 23 |
│ |
| 24 |
┌─────────────────────▼───────────────────────────┐ |
| 25 |
│ Axum Application Server │ |
| 26 |
│ ┌───────────┐ ┌───────────┐ ┌───────────────┐ │ |
| 27 |
│ │ Page │ │ API │ │ Auth │ │ |
| 28 |
│ │ Routes │ │ Routes │ │ Middleware │ │ |
| 29 |
│ └───────────┘ └───────────┘ └───────────────┘ │ |
| 30 |
└──────┬──────────────────────────────┬───────────┘ |
| 31 |
│ │ |
| 32 |
┌──────▼──────┐ ┌──────▼──────┐ |
| 33 |
│ PostgreSQL │ │ S3 Storage │ |
| 34 |
│ (sessions) │ │ (files) │ |
| 35 |
└─────────────┘ └─────────────┘ |
| 36 |
``` |
| 37 |
|
| 38 |
## Data Flow |
| 39 |
|
| 40 |
1. **Upload**: Client > API > Temp storage > Processing worker > S3 > Database record |
| 41 |
2. **Playback**: Client > API > Signed URL generation > Direct S3 stream |
| 42 |
3. **Payment**: Client > API > Payment processor webhook > Database > Payout queue |
| 43 |
|
| 44 |
## Design Principles |
| 45 |
|
| 46 |
- **No vendor lock-in**: All components have open-source alternatives |
| 47 |
- **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. |
| 48 |
- **Data locality**: Keep related data together, minimize cross-service calls |
| 49 |
- **Fail gracefully**: If S3 is unavailable, streaming stops but the site stays up for browsing and purchases |
| 50 |
|
| 51 |
## See Also |
| 52 |
|
| 53 |
- [Infrastructure & Vendors](./infrastructure.md): specific providers we use |
| 54 |
- [Open Source](./open-source.md): License and source availability |
| 55 |
- [How We Work](../about/how-we-work.md): creator and fan workflows |
| 56 |
|