Skip to main content

Hot reload

Backend: The API container runs dotnet watch run. Save any .cs file and the application rebuilds incrementally. Changes typically take 2–5 seconds to take effect. You do not need to restart Docker. Frontend: Vite HMR (Hot Module Replacement) is active in the frontend container. Save any .tsx, .ts, or .css file and the browser updates without a full page reload. React state is preserved for components that are not directly modified.

Makefile reference

All development commands go through make. Run any of these from the project root.

Adding an EF Core migration

When you modify an entity or add a new one, you need to create a migration and apply it. Step 1: Make sure the database container is running:
Step 2: Open a shell in the API container:
Step 3: Create the migration from inside the container:
Step 4: Exit the container and apply the migration:
The migration file is created in src/Acme.Infrastructure/Migrations/. Commit it to git alongside the entity changes.
If you need to roll back a migration in development, run make shell-api and then dotnet ef database update <PreviousMigrationName> inside the container. Then delete the unwanted migration file.

Viewing database contents

Open a psql session directly:
This drops you into an interactive psql session connected to the development database. Use standard psql commands:

Viewing API logs

AspFox uses Serilog with structured logging. Every request logs a correlation ID, method, path, status code, and duration. Example:
The correlation ID appears in every log line for a request, making it easy to trace a request through the logs.

Running tests

Backend tests use TestContainers — they spin up a real PostgreSQL instance in Docker for integration tests. The first run downloads the container image; subsequent runs are fast.