finalize Go + SQLite stack decisions for Synology NAS deployment
This commit is contained in:
@@ -1,8 +1,44 @@
|
||||
# Milestone 2: Web Stack Selection
|
||||
|
||||
**Status**: Planning
|
||||
**Status**: Decided
|
||||
**Goal**: Choose backend technologies for the developer portal and app store API.
|
||||
|
||||
## Decision
|
||||
|
||||
**Go** with the following stack:
|
||||
|
||||
```
|
||||
Language: Go 1.22+
|
||||
Framework: Chi (lightweight, idiomatic)
|
||||
Database: SQLite via modernc.org/sqlite (pure Go, no CGO)
|
||||
Migrations: golang-migrate
|
||||
Validation: go-playground/validator
|
||||
Auth: Custom JWT + OAuth2
|
||||
Deployment: Single Docker container on Synology NAS
|
||||
```
|
||||
|
||||
### Rationale
|
||||
|
||||
1. **NAS-friendly** - Tiny Docker image (~15MB), low RAM (~30-50MB)
|
||||
2. **Cross-compilation** - Easy build for ARM64 or AMD64 Synology models
|
||||
3. **Pure Go SQLite** - `modernc.org/sqlite` requires no CGO, cross-compiles easily
|
||||
4. **Single container** - Go binary + SQLite + Litestream in one image
|
||||
5. **Standard library** - HTTP, JSON, crypto all built-in
|
||||
|
||||
### Target Deployment
|
||||
|
||||
```
|
||||
Synology NAS (Docker)
|
||||
├── mosis-portal container (~15MB image)
|
||||
│ ├── Go binary
|
||||
│ ├── SQLite database (WAL mode)
|
||||
│ └── Litestream backup
|
||||
└── Volumes
|
||||
├── /volume1/mosis/data/portal.db
|
||||
├── /volume1/mosis/backups/
|
||||
└── /volume1/mosis/packages/
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Overview
|
||||
@@ -308,12 +344,10 @@ Based on:
|
||||
|
||||
## Deliverables
|
||||
|
||||
- [ ] Prototype API in Go
|
||||
- [ ] Prototype API in Node.js (if needed)
|
||||
- [ ] Benchmark comparison document
|
||||
- [ ] Final selection with rationale
|
||||
- [x] Final selection with rationale
|
||||
- [ ] Project structure template
|
||||
- [ ] Development environment setup guide
|
||||
- [ ] Base Go project scaffolding
|
||||
|
||||
---
|
||||
|
||||
|
||||
Reference in New Issue
Block a user