Skip to content

Initialise the Dispatchlane Node/Fastify scaffold#1

Merged
gabedalmolin merged 5 commits intomainfrom
kopf/project-scaffold
Mar 20, 2026
Merged

Initialise the Dispatchlane Node/Fastify scaffold#1
gabedalmolin merged 5 commits intomainfrom
kopf/project-scaffold

Conversation

@gabedalmolin
Copy link
Copy Markdown
Owner

Summary

This pull request establishes the first executable application scaffold for Dispatchlane.

It adds the Node.js and TypeScript runtime baseline, introduces a minimal Fastify API with a GET /healthz endpoint, documents the local development workflow, aligns package metadata with the repository licence, and expands CI to validate install, typecheck, and build.

Recommended review path: review commit-by-commit.

Why

Dispatchlane is intended to be built in public with clear repository discipline and reviewable increments.

Before adding database state, workers, ingestion, or reliability logic, the repository needs a minimal runtime and delivery contract that can be executed locally and validated in CI.

This creates a clean foundation for subsequent pull requests without mixing infrastructure logic into the initial scaffold.

Implementation details

  • Initialise the project as a Node.js 20 + TypeScript application.
  • Use Fastify as the HTTP runtime baseline.
  • Add environment loading through dotenv.
  • Add a minimal API entrypoint in src/bin/api.ts.
  • Add buildApp() in src/app.ts with a single GET /healthz route.
  • Add typecheck, build, dev, and start scripts.
  • Update README.md to describe the current scaffold scope and local development flow.
  • Align package.json metadata with the repository licence and clean up unused defaults from npm init.
  • Expand GitHub Actions to run npm ci, npm run typecheck, and npm run build.

Behavioural impact

The repository now exposes a minimal executable API.

Running npm run dev starts a Fastify server and GET /healthz returns a successful health response.

No domain behaviour, persistence, authentication, or background processing is introduced in this pull request.

Risks and trade-offs

This pull request intentionally keeps the scope narrow.

That means some expected backend concerns are still absent, including readiness checks, tests, persistence, observability, worker processes, and runtime containerisation.

This is intentional to preserve reviewability and to avoid mixing project scaffolding with Dispatchlane's reliability model.

Validation

Validated locally with:

  • npm run typecheck
  • npm run build
  • npm run dev
  • curl http://localhost:3000/healthz

Out of scope

  • PostgreSQL integration
  • database migrations
  • worker and maintenance runtimes
  • authentication and tenant isolation
  • webhook ingestion
  • delivery, retry, dead-letter, and replay logic
  • Docker and Docker Compose
  • OpenTelemetry and metrics
  • automated tests beyond CI build validation

Follow-up work

  • Add the database and migration baseline.
  • Introduce the runtime role split (api, worker, maintenance) without adding domain logic yet.
  • Add initial test scaffolding once there is meaningful behaviour to cover.

@gabedalmolin gabedalmolin merged commit fb15b3a into main Mar 20, 2026
2 checks passed
@gabedalmolin gabedalmolin deleted the kopf/project-scaffold branch March 20, 2026 13:44
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