Repository navigation
The code for post 2: Repo structure and local dev setup.
https://mvmorten.com/projects/dashboard-starter/no-magic
What's in it:
- Solution layout: src/Api (ASP.NET Core, controllers), src/Db (migration runner), src/Web (React + TypeScript, Vite), and /sql for schema scripts
- SQL Server in Docker Compose, pinned to an exact image version, with Apple Silicon notes
dotnet run --project src/Db -- migrateand-- seed: idempotent scripts, a SchemaVersions journal with content hashes, and a hard stop if an applied migration is edited- First schema: Tenants, Users, TenantUsers, and the Row-Level Security predicate
- The API checks the schema at startup and refuses to run if migrations are pending; it never changes the schema itself
- A health page that proves the front end, API, and database are connected
- Warnings as errors (including code style), 2-space indentation, braces always, CA2254 for log messages
- CI on every pull request: build, migrate twice against a real SQL Server, seed twice, health check, edited-migration check, and front-end lint/format/build
Tested on Windows and in CI (Linux). Not yet tested on Apple Silicon Macs; reports welcome.
Also in this release (README and repo setup since v0.1):
- Switched from EF Core to Dapper with hand-written SQL
- Multi-tenancy in scope from day one: one shared database, one account across tenants
- GitHub flow with a protected main
- CLAUDE.md with the project's rules for AI assistants