Skip to content

fix(scaffold): per-app volumes, init main, seed root admin on Aspire launch#1259

Merged
iammukeshm merged 3 commits into
mainfrom
fix/scaffold-dx
May 27, 2026
Merged

fix(scaffold): per-app volumes, init main, seed root admin on Aspire launch#1259
iammukeshm merged 3 commits into
mainfrom
fix/scaffold-dx

Conversation

@iammukeshm
Copy link
Copy Markdown
Member

Three scaffolded-app DX fixes found while validating fsh new end-to-end (a fresh DentalOS scaffold → run → log in → exercise APIs).

1. Seed the root admin on Aspire launch (the big one)

The AppHost ran the migrator with bare apply, which migrates schema but never seeds the root admin — so dotnet run AppHost came up with an empty identity.Users table and nobody could log in. (deploy/docker already used apply --seed; the Aspire path was inconsistent.) Now runs apply --seed + passes the dev-default Seed__DefaultAdminPassword (mirrors the API's appsettings.Development.json), so admin@root.com / 123Pa$$word! works out of the box.

2. Per-app Docker volume names

AppHost data volumes were literal (postgres-data, fsh-redis-data, fsh-minio-data), so every FSH-based app on a machine (and this repo) shared the same Docker volumes — one app's DB clobbered another's. Each volume is now prefixed with the AppHost name (e.g. dentalos-postgres-data).

3. Init git on main, not master

fsh new ran a bare git init, so the initial branch followed the user's init.defaultBranch (often master). Now forces main via symbolic-ref (works on every git version), matching the kit's single-main model.

Verified end-to-end on a fresh fsh new DentalOS

  • git branch = main; volumes = dentalos-postgres-data etc. (no clash with other apps)
  • Aspire stack boots, migrator seeds the admin, login succeeds
  • Major APIs exercised live: tenants, identity users, catalog (brand→category→product full CRUD), audits, /health/live+/health/ready — all green.

🤖 Generated with Claude Code

iammukeshm and others added 3 commits May 27, 2026 16:11
Two DX fixes for scaffolded apps:

1. AppHost data volumes were literal ("postgres-data", "fsh-redis-data",
   "fsh-minio-data"), so every FSH-based app on a machine (and this repo)
   shared the same Docker volumes — one app's DB clobbered another's. Prefix
   each volume with the AppHost name (e.g. "dentalos-postgres-data") so apps
   get isolated, namespaced, safe volume names.

2. `fsh new` ran a bare `git init`, so the initial branch followed the user's
   `init.defaultBranch` (often `master`). Force `main` via symbolic-ref on the
   unborn HEAD (works on every git version) — the kit standardized on `main`.
The Aspire AppHost ran the migrator with bare `apply`, which migrates schema
but never seeds the root admin user — so a freshly-run scaffolded app came up
with an empty Users table and nobody could log in (admin@root.com). deploy/docker
already used `apply --seed`; the Aspire dev path was inconsistent.

Run `apply --seed` and pass the dev-default Seed__DefaultAdminPassword (mirrors
the API's appsettings.Development.json) so `dotnet run AppHost` yields a working
login out of the box. Verified end-to-end: fresh scaffold -> run -> log in as
admin@root.com -> exercise tenants/users/catalog/audits APIs.
@iammukeshm iammukeshm merged commit 85d6dfc into main May 27, 2026
5 checks 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