Skip to content

[codex] docs(dev): local bootstrap script for backend#270

Open
shinzoxD wants to merge 1 commit into
Creditra:mainfrom
shinzoxD:codex/local-dev-bootstrap
Open

[codex] docs(dev): local bootstrap script for backend#270
shinzoxD wants to merge 1 commit into
Creditra:mainfrom
shinzoxD:codex/local-dev-bootstrap

Conversation

@shinzoxD

Copy link
Copy Markdown

Closes #205.

Summary

  • Adds scripts/dev-bootstrap.sh as a single local onboarding entrypoint for dependency install, Docker Compose Postgres startup, DB readiness, migrations, schema validation, and seed loading.
  • Adds deterministic local-only seed data in scripts/dev-seed.sql without committing real secrets.
  • Updates .env.example to match the Compose host database default and placeholder local API key.
  • Documents the bootstrap flow and Bash prerequisite in the README.
  • Adds a focused .gitattributes rule so shell scripts stay LF, and fixes migration 005's fresh-DB index target so bootstrap migrations do not reference the non-existent credit_lines.wallet_address column.

Validation

  • npm ci passes.
  • C:\Program Files\Git\bin\bash.exe -n scripts/dev-bootstrap.sh passes.
  • npm run dev:bootstrap -- --skip-install --skip-compose --skip-migrate --skip-seed passes with Git Bash on PATH.
  • npm run validate:spec passes.
  • Full Docker-backed bootstrap was not run locally because docker is not installed or not on PATH in this environment.
  • npm run typecheck still fails on existing baseline errors unrelated to this PR, including missing recordRequest, maintenanceModeGuard, dashboardSummaryService, and log symbols.

Copilot AI review requested due to automatic review settings June 30, 2026 00:54

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@shinzoxD

Copy link
Copy Markdown
Author

CI note: the fork push workflow failed in the existing \
pm run typecheck\ step before exercising the bootstrap flow. The log matches the current baseline failures also seen on #269: missing symbols such as \
ecordRequest\, \maintenanceModeGuard\, \dashboardSummaryService\, and \log\ in unrelated TypeScript files. Branch-specific checks passed locally: \
pm ci\, \�ash -n scripts/dev-bootstrap.sh\, light-mode \
pm run dev:bootstrap -- --skip-install --skip-compose --skip-migrate --skip-seed\, and \
pm run validate:spec\.

@shinzoxD

shinzoxD commented Jul 1, 2026

Copy link
Copy Markdown
Author

Documenting the CI failure for visibility:

The npm run typecheck step fails with 27 pre-existing TypeScript errors that exist identically on main. This PR touches only non-src/**/*.ts files (.env.example, README.md, scripts/dev-bootstrap.sh, migrations/, package.json) — zero source TypeScript files.

The root cause is an incomplete refactor on main: Container.ts is missing dashboardSummaryService/getCreditService getters, app.ts is missing imports (recordRequest, maintenanceModeGuard, maintenanceRouter, metricsRouter), and drawWebhookService.ts is missing a log import.

This PR's own content (bootstrap script, seed SQL, docs) is fine. Would maintainers prefer a separate baseline-fix PR to resolve the typecheck errors, or should this PR be merged as-is since it doesn't affect CI?

@shinzoxD

shinzoxD commented Jul 8, 2026

Copy link
Copy Markdown
Author

The pre-existing TypeScript baseline errors blocking CI have been fixed in #271 (fix/baseline-typescript-errors). Once that merges, this PR's CI should pass cleanly.

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.

Backend: Add reproducible local dev environment bootstrap script (db + env + seed)

2 participants