server: zone-labels API (Fastify + SQLite) — Phase A
New server/ service classifying zones as free_2h/3h/4h street vs pay_immediate lots. Public reads; writes require the admin bearer token (timing-safe compare). @fastify/rate-limit (120/min global, 20/min writes), manual IP denylist + auto-block on repeated auth failures. SQLite via better-sqlite3. Dockerfile + compose (loopback-only, mem/cpu capped) + nginx block + README. 9 tests pass. Deployed live at https://bigbrainparking.mowden.top (behind nginx + certbot). Not an npm workspace — kept out of the app/CI install to avoid the native dep. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
2434879804
commit
c14081d85f
14 changed files with 2306 additions and 0 deletions
7
server/.env.example
Normal file
7
server/.env.example
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
# Copy to .env and set a long random secret (>= 16 chars). This is the admin
|
||||
# password you paste into the app's Settings → Admin. Generate one with:
|
||||
# openssl rand -base64 32
|
||||
BBP_ADMIN_TOKEN=change-me-to-a-long-random-secret
|
||||
|
||||
# Optional: comma-separated IPs to reject outright.
|
||||
# BBP_BLOCKED_IPS=1.2.3.4,5.6.7.8
|
||||
Loading…
Add table
Add a link
Reference in a new issue