🏗️ System Layers
Pattern: Controller-Service-Repository + DI.
Boot: PuterServer instantiates sequentially, downward injection.
🥞 Stack
- Controllers: HTTP entry. Auth gates, validation -> Service.
- Drivers: RPC (
/drivers/*). Val -> Service. - Services: Biz logic (assumes auth).
- Stores: Persistence wrappers.
- Clients: Infra adapters (SQL, Valkey, S3).
- Config: Singleton
IConfig.
🔌 Extensions
- Hook via global
extension. - Rule: Non-critical only (thumbnails, telemetry). No load-bearing features.
🛡️ Conventions
- State:
AsyncLocalStorage(req/actor) used sparingly. - Flow: Strict downward isolation. Controllers NEVER invoke Clients directly.