0. Scaffold the app (create-urban-app) + lint/test conventions

#7 · closed · 0 comments

View on GitHub ↗

jwulf

Part of #1. ## 0. Scaffold the app (`create-urban-app`) + lint/test conventions > **Blocking prerequisite.** This is the first wave and must **converge on review and > merge** before any other sub-issue (#2–#5) starts. It is the **only** sub-issue that > scaffolds the app or sets up tooling — every later sub-issue builds on the merged > result and MUST NOT re-scaffold or change the lint/test configuration. Establish the project skeleton and the shared quality gates so the parallel wave of feature agents (#2–#5) can each add code and **write tests** against a stable, already-configured app. ### Deliverables - **Scaffold** the Urban app if it has not already If it's not already scaffolded with `npm create urban-app release-notes-concierge` (Node host; the app is host-agnostic Node + Deno per #2). Commit the generated layout: `nano.app.json`, `main.ts`, `db/`, `pages/`, `workers/`, `resources/`, `deno.json`, `package.json`, `tsconfig.json`. - **Lint/test/tooling conventions copied from [`camunda/c8ctl`](https://github.com/camunda/c8ctl):** - **Biome** (`@biomejs/biome`) with a `biome.json` mirroring c8ctl's `recommended` + strict ruleset (`noExplicitAny`, `noNonNullAssertion`, `noUnusedImports`/`noUnusedVariables`, `useImportType`/`useExportType`, `useConst`, `useNodejsImportProtocol`, `useTemplate`, …), scoped to `app/`, `workers/`, `pages/`, `actions/`, `tests/` and **excluding** generated dirs (`nano-generated/`, any `templates/`). - **Typecheck**: `tsc --noEmit -p tsconfig.check.json`. - **Tests**: the Node built-in runner, c8ctl-style — `node --experimental-strip-types --test tests/unit/*.test.ts` (unit) with room for `tests/integration/*.test.ts`. Include one sample passing test so `npm test` is green on a fresh clone, and document how feature sub-issues add their own. - **npm scripts**: `gen` (`urban gen`), `check` (`urban check`), `lint` (`biome check`), `typecheck`, `test`, plus a `verify` aggregate (`gen && lint && typecheck && test && check`). - **Git hooks** via a `.githooks/` dir + `core.hooksPath` (set from a `prepare` script, exactly like c8ctl) running `lint` + `typecheck` pre-commit and `verify` pre-push. - **CI**: a `.github/workflows/ci.yml` that on every PR runs `npm ci`, `npm run gen`, `npm run lint`, `npm run typecheck`, `npm run test`, `npm run check`, and `deno check` — so **all subsequent sub-issue PRs are gated by these same conventions**. - **README** section documenting the dev workflow (gen → lint → typecheck → test → check) and the "one scaffold, then feature waves" rule. ### Acceptance - Fresh clone: `npm ci && npm run gen && npm run lint && npm run typecheck && npm run test && npm run check` all pass, and `deno check` passes. - CI is green on this scaffolding PR. - The scaffolded app boots (`npm start` / `npx urban run`) and serves the (empty) home page. - PR body includes `Closes #<this issue>`. ### Why this must merge first Every feature sub-issue references `nano.app.json`, `db/migrations/`, `npm run gen`, `urban check`, and `deno check` and is expected to **add tests**. If the feature agents run in parallel before this lands, each would independently re-scaffold the app and invent its own (divergent, or absent) test/lint setup — producing conflicting, un-mergeable PRs. Merging this first gives them one canonical skeleton and one set of quality gates to build on.

Comments