Skip to content

chore: finalize MVP — health probe, structured logging, and CI - #13

Merged
lmoraesdev merged 3 commits into
mainfrom
chore/finalize-mvp
May 19, 2026
Merged

chore: finalize MVP — health probe, structured logging, and CI#13
lmoraesdev merged 3 commits into
mainfrom
chore/finalize-mvp

Conversation

@lmoraesdev

Copy link
Copy Markdown
Owner

What's in this PR

Closes the MVP scope with the last four shippable pieces:

  • GET /health — liveness probe returning { "status": "ok" }, wired into Docker Compose healthcheck so app only starts after db is healthy
  • Structured logging — 5W1H JSON logs with correlation ID propagated via AsyncLocalStorage (no NestJS request scope required)
  • Machine-readable error codes — every domain error includes a code field (CHARGE_NOT_FOUND, IDEMPOTENCY_CONFLICT, etc.)
  • CI pipeline — GitHub Actions runs lint, build, and tests on every push

Test plan

  • All 73 unit + e2e tests pass (npm test)
  • Happy-path e2e test covers charge creation → webhook → PAID transition
  • docker compose up --build starts cleanly with both services healthy

lmoraesdev and others added 3 commits May 19, 2026 08:17
tsconfig.build.json was including the root-level vitest.config.ts,
causing TypeScript to infer rootDir as '.' instead of 'src'.
This nested all compiled output under dist/src/ instead of dist/,
so the container could not find dist/main at startup.
Without a max constraint, values above PostgreSQL's integer limit
(2,147,483,647) passed Zod validation but crashed at the DB layer
with a 500. Now returns 400 at the validation boundary.
fix: resolve Docker startup crash and amount overflow 500
@lmoraesdev
lmoraesdev merged commit 3553f8b into main May 19, 2026
1 check passed
@lmoraesdev
lmoraesdev deleted the chore/finalize-mvp branch May 19, 2026 11:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant