Skip to content

feat: scaffold the demo repo and ACME Commerce Lenders - #1

Merged
tela merged 6 commits into
mainfrom
feat/acme-commerce-lenders-scaffold
Nov 4, 2026
Merged

tela merged 6 commits into
mainfrom
feat/acme-commerce-lenders-scaffold

Conversation

@tela

@tela tela commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

Motivation

The repo held a LICENSE and a one-line README. It needs a layout that holds many demo apps, a way to share code between them, and a rule that every demo works offline, before the first demo (ACME Commerce Lenders) is built on it.

Changes

  • docs(readme): explain what an app emulator is and describe ACME Commerce Lenders, the first demo, with its first scenario.
  • feat(shared): add shared/emulator, which starts an app emulator binary as a child process and waits for /admin/health to return exactly {"status":"ok"}, and shared/vendorcfg, which reads vendor base URLs from <VENDOR>_BASE_URL. URLs default to the real vendor host, and Require refuses an empty one so reset tooling cannot fall back to another demo's port. Neither package names a vendor.
  • feat(acme): scaffold apps/acme-commerce-lenders with the core interfaces both run modes share, an embedded placeholder UI, cmd/kit (the offline kit) and cmd/lambda (LocalStack mode, a stub). The Makefile builds every apps/<demo>/cmd/<name>, so later demos need no edits.
  • docs: add templates/demo-docs/ (Usage Guide, Demo Scenarios, Troubleshooting Guide), the app's copies, and the repo layout and offline kit sections of the README.
  • chore(web): add the pnpm workspace skeleton. UIs build as static assets that each demo's Go binary embeds.
  • ci: add .no-mistakes.yaml and a CI workflow that checks gofmt, vets and tests every module with -race, and builds every demo's offline kit. A demo with no cmd/kit fails.

This is structure only. There is no lender logic, UI or app emulator startup yet, and cmd/lambda exits with "not implemented".

Tests

Run on the final tree of this branch:

$ make vet          # exit 0
$ make test         # exit 0
ok  .../apps/acme-commerce-lenders/core           0.674s
ok  .../apps/acme-commerce-lenders/internal/ui    0.954s
ok  .../shared/emulator                           0.590s
ok  .../shared/vendorcfg                          0.534s
$ make check-kits   # exit 0
$ make build        # exit 0, builds bin/acme-commerce-lenders-kit and bin/acme-commerce-lenders-lambda
$ gofmt -l .        # no output

Each of the six commits was also checked out on its own and passes gofmt, go vet and go test -race (and make check-kits and make build from the third commit on). The shared/emulator tests start and stop a fake app emulator and check that Start fails fast when the process exits. A cmd/kit-less demo makes make check-kits fail. The built kit serves the placeholder page with HTTP 200.

The CI workflow runs for the first time on this PR.

Related

DOC-581

tela added 6 commits November 3, 2026 17:50
The repo held a one-line README. Say what an app emulator is and describe ACME Commerce Lenders, the first demo, with its first scenario.
The offline kit runs app emulators as child processes and needs one place to read vendor base URLs. The launcher waits for the /admin/health contract LocalStack's apps plugin uses. URLs default to the real vendor host, and reset tooling must pass one explicitly so it cannot hit another demo's port.
Adds the app module with the core interfaces both run modes share, an embedded placeholder UI, and entry points for the offline kit and LocalStack mode. The Makefile builds every apps/<demo>/cmd/<name>, so later demos need no edits.
Every demo carries a Usage Guide, Demo Scenarios and a Troubleshooting Guide. The template keeps them uniform, and the README now explains the layout and the offline kit rule.
UIs build as static assets that each demo's Go binary embeds, so Node stays a build-time tool and the offline kit needs no network.
Run vet, gofmt, tests with -race and a kit check on every PR. A demo with no cmd/kit fails, since every demo needs an offline kit.
@tela
tela merged commit f91b5dd into main Nov 4, 2026
1 check passed
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