Keep /api/error-monitoring/recent-errors reachable for Paperclip error loop (including path variants) so central hub returns JSON instead of 307 /login.
Register the same handler as /v1/paperclip/recent-errors so NPM and direct
API probes (e.g. :3200) match Paperclip default PAPERCLIP_ERROR_API_QUERY.
Admin UI proxy now calls the Fastify path for a single contract end-to-end.
Paperclip-Agent: David Santos (urlKey david-santos; id 0b1fcf92-5fe3-4ac0-9f29-df4ab72f5376)
Paperclip-Issue: BIT-702
Paperclip-Run: 4ba525c4-3929-475c-a845-400c49eda817
Made-with: Cursor
Add Fastify GET /v1/paperclip/recent-errors returning CRM-compatible JSON (data
envelope, project_slug per row, status open for open/investigating incidents).
Admin UI proxies the public path /api/error-monitoring/recent-errors to the API
base; middleware bypasses the session redirect for that path only.
Auth matches CRM env names: ERROR_RESOLVE_API_KEY or ERROR_REPORTING_API_KEY for
?api_key=, DEBUG_VIEW_ERRORS_KEY for ?view_errors=.
Paperclip-Agent: David Santos (urlKey david-santos; id 0b1fcf92-5fe3-4ac0-9f29-df4ab72f5376)
Paperclip-Issue: BIT-684
Paperclip-Run: cf7cb964-6953-4476-af09-3feb5d10da17
Made-with: Cursor
Next build inlines bare process.env.* as undefined without .env at build time.
Use Reflect.get for admin API base and demo flag; add .env.production default for LXC.
- Middleware: require development+demo or SKIP_LOGIN for unauthenticated access.
- Document SKIP_LOGIN and stricter demo in .env.example.
- Ship bitreport-error-reporting-api.service (PORT via ExecStart env; shared env has PORT for ingest).
- Add middleware redirecting unauthenticated users to /login unless dev+demo
- Disable demo incident data when NODE_ENV=production
- Forward __Host-access cookie on SSR fetches to admin API
- Document NPM /admin/ proxy to Fastify api (§14.2.2)
Co-Authored-By: Paperclip <[email protected]>
Expose Velzon admin dashboard in docker-compose with ERROR_REPORTING_UI_DEMO=1
by default until admin API serves /v1/incidents. Document env vars in .env.example.
Co-Authored-By: Paperclip <[email protected]>