1.1 KiB
1.1 KiB
Unified API V2
This service exists so frontend can use one base URL without forcing backend into one codebase.
Base idea
Frontend talks to one service:
krow-api-v2
That gateway does two things:
- exposes auth/session endpoints
- forwards requests to the right internal v2 service
Route groups
Auth
POST /auth/client/sign-inPOST /auth/client/sign-upPOST /auth/sign-outPOST /auth/client/sign-outPOST /auth/staff/sign-outGET /auth/session
Proxy passthrough
/core/*->core-api-v2/commands/*->command-api-v2/query/*->query-api-v2
Mobile read models
These are served by query-api-v2 but frontend should still call them through the unified host:
/query/client/*/query/staff/*
Why this shape
- frontend gets one base URL
- backend keeps separate read, write, and service helpers
- we can scale or refactor internals later without breaking frontend paths
Current auth note
Client email/password auth is wrapped here.
Staff phone OTP is not wrapped here yet. That still needs its own proper provider-backed implementation rather than a fake backend OTP flow.