The in-progress v2 Lovat API, structured as a Hono modular monolith.
- Bun is used for local development and tests.
- SST packages the same Hono application for AWS Lambda.
- PostgreSQL is accessed through Drizzle.
-
Install dependencies:
bun install
-
Copy
.env.exampleto.envand provide local values. -
Start the local API:
bun run dev
The health endpoint is available at GET /v2/health.
GET /v2/accounts/meandDELETE /v2/accounts/meGET /v2/api-keysandPOST /v2/api-keysPATCH /v2/api-keys/{uuid}andDELETE /v2/api-keys/{uuid}GET /v2/openapi.json
Dashboard routes require an Auth0 bearer token. API-key management additionally requires membership in an email-verified team; analysts manage their own keys, while scouting leads can manage keys belonging to members of their team.
bun run typecheck
bun run lint
bun run format:check
bun run testThe TypeScript schema in src/platform/database/schema is the intended source of truth.
bun run db:generate
bun run db:migrateThe existing migration predates the restarted implementation and must not be applied to production until its compatibility with the current Lovat database has been reviewed.
Each business capability owns its routes, contracts, service, repository, policies, and
tests under src/modules. Shared runtime concerns live under src/platform, while
external systems live under src/integrations.