Files
w-make-portfolio/services/updates-api
Jan Wagner 97944875ca feat: Phase 1 - Admin CMS with Links Management
Backend (updates-api):
- Add links table schema with categories, visibility, sorting
- Implement full CRUD API for links (/v1/links, /v1/admin/links)
- Create admin UI for links management (/admin/links)
- Add navigation between Updates and Links admin pages
- Add comprehensive tests for links API (7/7 passing)

Frontend (Next.js):
- Create API client for fetching links from updates-api
- Add LinksSection component with category icons
- Integrate links into homepage (between Notes and CTA)
- Add i18n entries for links section (DE/EN)
- ISR caching: 60s for links, 5min for updates

Features:
- Links organized by category (external/internal/resource/tool)
- Visibility toggle (show/hide on homepage)
- Sort order support
- Optional icons and descriptions
- Responsive grid layout (1/2/3 columns)

Testing:
- All existing tests pass
- New links API tests cover CRUD + validation
- Production build successful

Phase 1 Complete: Links management ready for deployment
Next: Phase 2 (Markdown editor + media upload)
2026-08-22 16:56:00 +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.