Skip to content

Daily Workflow

The 5 commands you use every day

make dev        # start mock API + backend + run smoke tests
make check      # show live status of all services
make smoke      # re-run smoke tests against running stack
make logs-backend  # tail backend log
make dev-stop   # stop everything at end of day

Morning start

git switch main && git pull --rebase              # sync trunk
git switch -c feature/TASK-123-your-slug          # start work

make dev                                          # start stack
# → starts mock API in background
# → starts backend in background
# → runs 10 smoke tests
# → prints URLs on success

Open http://localhost:5269/swagger for the API explorer.


Iterating on backend code

The backend must be restarted to pick up code changes (no hot-reload for .NET in development mode):

make backend-stop   # kill running backend
make backend        # start foreground (Ctrl+C to stop)
# or:
make backend-bg     # start background

In VS Code: press F5 — it stops the previous run, rebuilds, and relaunches automatically.


Running tests

make test             # run full unit test suite (38 stories / 95 cases)
make smoke            # smoke test running stack (10 integration assertions)

Database schema change

# 1. Modify entity (add property, new entity, relation)
#    Edit files in src/.../Core/Persistence/Models/ or Meesho/...

# 2. Generate migration (creates both .cs AND .Designer.cs — both must be committed)
export DOTNET_ROOT="$HOME/.dotnet" && export PATH="$DOTNET_ROOT:$DOTNET_ROOT/tools:$PATH"
dotnet ef migrations add DescriptiveMigrationName \
  --context CoreDbContext \
  --project src/distribution-management-server-layered

# 3. Apply
make migrate

# 4. Commit both files
git add src/.../Migrations/YourMigration.cs
git add src/.../Migrations/YourMigration.Designer.cs

See EF Migrations for full details and the Designer.cs requirement.


Testing a specific API endpoint

# Quick curl
curl http://localhost:5269/health

# Swagger UI (best for exploration)
open http://localhost:5269/swagger

# VS Code REST Client (if using .http files in tools/)
# Install: humao.rest-client extension

Checking all service health

make check

Output:

  Backend  : ✅ http://localhost:5269 (status=running)
  Mock API : ✅ http://localhost:5000 (status=running)
  Database : ✅ postgres:5432 (10 migrations applied)


End of day

make dev-stop    # stops backend + mock API
# PostgreSQL keeps running (it starts with the OS)
# If you want to stop postgres too:
sudo /Library/PostgreSQL/16/bin/pg_ctl stop -D /Library/PostgreSQL/16/data

Logs

Log Command File
Backend make logs-backend /tmp/dms-backend.log
Mock API make logs-mock /tmp/dms-mock.log
Docker all make docker-logs stdout (streamed)
Docker backend docker compose logs -f backend stdout