Skip to content

Add local mode startup task and update development documentation#37

Open
GustavPersson wants to merge 2 commits intoeliasson:mainfrom
GustavPersson:feature/docs-updates
Open

Add local mode startup task and update development documentation#37
GustavPersson wants to merge 2 commits intoeliasson:mainfrom
GustavPersson:feature/docs-updates

Conversation

@GustavPersson
Copy link
Copy Markdown

This is the stuff I had to do in order to run locally, and then Claude going absolutely wild on a PR summary

Summary

  • Add a LocalUserStartupTask that automatically provisions a default user when running in local development mode
  • Overhaul all developer-facing documentation to reflect the current project structure and toolchain

Local Mode Startup Task

The backend now reads the LocalMode configuration flag and conditionally registers a new LocalUserStartupTask. This task runs at application startup when LocalMode is true, ensuring a default local user is available without requiring manual setup through the admin UI.

Changes:

  • LocalUserStartupTask.cs (new) — Implements IStartupTask to provision a default local user on startup
  • StartupTaskConfiguration.csRegisterStartupTasks() now accepts a bool localMode parameter; when true, it registers LocalUserStartupTask alongside the existing InitialUserStartupTask
  • Startup.cs — Reads LocalMode from IConfiguration and passes it into RegisterStartupTasks(localMode). Also removes the deprecated EnableEndpointRouting = false option from AddControllers()
  • StartupTaskConfigurationTest.cs — Adds a new test (ItShouldRegisterLocalUserStartupTaskInLocalMode) verifying that LocalUserStartupTask is registered when localMode is true, and updates the existing test to explicitly pass localMode: false

Documentation Updates

The existing developer documentation was outdated — it referenced old paths, deprecated CLI commands, and omitted critical setup steps (frontend build, symlink). These changes bring the docs in line with the current monorepo layout and toolchain.

docs/getting-started.md

  • Updated framework references from ".NET Core" to ".NET 9" and added "Lustre" as the frontend framework
  • Added a Prerequisites section listing all required tools and minimum versions (.NET SDK 9, Node.js 20, Gleam 1.14+, Erlang/OTP 28+, Docker)
  • Fixed all file paths to reflect the service/ and tools/ directory structure (e.g. src/Quarter/service/src/Quarter/, docker/tools/docker/)
  • Added new steps for building the frontend (npm ci && gleam build && npm run build) and creating the dist symlink (ln -s ../../dist service/src/Quarter/dist)
  • Mentioned npm run watch for development hot-reloading
  • Added a Configuration section pointing to appsettings.json and appsettings.Development.json
  • Fixed minor copy issues ("start register time" → "start registering time")

README.md

  • Replaced the outdated single docker-compose + dotnet quickstart with a complete step-by-step covering PostgreSQL, frontend build, symlink creation, and backend build/run
  • Updated docker-composedocker compose (modern Docker CLI syntax)

docs/authentication.md

  • Fixed configuration key references: Application.LocalModeLocalMode
  • Added explicit file path for the config file (service/src/Quarter/appsettings.json)

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