Updated the API server to bind loopback by default, serve the built frontend same-origin, and use collision-safe IDs for new records. Loopback checks showed correct public root, unauthorized API denial, and expected database-layer behavior.
- What worked
- Middleware, static serving, and auth gating were simple to adjust with minimal code changes.