Go API Architecture
Go API Architecture
Section titled “Go API Architecture”The active open-core backend lives in open-core/apps/api.
Responsibility split
Section titled “Responsibility split”- Chi handlers accept HTTP requests and preserve response shapes used by the frontend.
- Services hold validation, orchestration, response shaping, and pipeline coordination.
- SQLite repositories own SQL and transactions.
- Pipelines run in process and use
context.Contextfor cancellation. - App configuration reads runtime settings such as
PORT,SCOUT_DB_PATH, andSCOUT_FRONTEND_DIST.
Default runtime
Section titled “Default runtime”The Go API listens on 4749 when PORT is unset. In production Docker, it also serves the built web app from SCOUT_FRONTEND_DIST=/app/web/dist.