Files
w-make-portfolio/services/updates-api
Jan Wagner 820a2f8241 feat: route alles unter w-make.com — admin/api ohne Subdomain
- Traefik-Routing: /admin und /v1/* auf updates-api (prioritaet 150/200)
- Portfolio fängt restliches w-make.com ab (prioritaet 100)
- Subdomain updates.w-make.com entfällt
- Admin-HTML: Kicker aktualisiert zu w-make.com
- deploy-vps.sh: updates-api wird jetzt auch gebaut und deployed
2026-08-22 18:05:59 +02:00
..

Updates API

Small public update feed for W-Make Batchmaker and Batchmaker Standalone.

Local

npm test
UPDATES_ADMIN_TOKEN='use-a-local-token' npm start

The service listens on PORT (default 8080) and stores SQLite data at UPDATES_DB_PATH (default ./data/updates.sqlite).

API

Public:

  • GET /healthz
  • GET /v1/updates?product=batchmaker|standalone&limit=3
  • GET /v1/updates/:slug
  • GET /feed.xml?product=batchmaker|standalone

Admin requests require Authorization: Bearer <token>:

curl -X POST http://127.0.0.1:8080/v1/admin/updates \
  -H 'Authorization: Bearer <token>' \
  -H 'Content-Type: application/json' \
  -d '{"product":"standalone","title":"Studio update","summary":"A new calculation workflow is available."}'

curl -X POST http://127.0.0.1:8080/v1/admin/updates/1/publish \
  -H 'Authorization: Bearer <token>'

Never commit the token or production data. In Docker, /data must be a persistent volume and UPDATES_ADMIN_TOKEN must be injected by the host secret/environment.

Operations

Before deployment, back up the SQLite database. A restart must preserve published updates. Test restore by copying the backup to a temporary SQLite path and opening it with Node's node:sqlite.

The service intentionally has no CMS, user system, comments, or direct access to Batchmaker databases in v1.

ponytail: Keep the API contract stable; migrate to PostgreSQL/OIDC only when measured write volume or multi-author editing justifies the additional operational surface.

Admin panel

Open https://updates.w-make.com/admin after Authelia login (auth.w-make.com). Traefik protects /admin and /v1/admin; public JSON and RSS stay open.

The editor accepts Authelia Remote-User or Authorization: Bearer <token> for scripted writes from the Docker network.

The portfolio is wired as the first client. Batchmaker and Standalone still need their own UI client changes in their canonical repositories after the runtime/deployment URLs are confirmed.

No production deployment is performed by this change.

License

Private project.