Local Setup — macOS¶
TL;DR — one command
If this completes without errors, you're done. Open http://localhost:5269/swagger.The steps below are for debugging the setup script or manual setup.
What the setup script does¶
The script is idempotent — safe to re-run at any time. Each step checks before acting.
| Step | What it does |
|---|---|
| 1 | Checks macOS + Homebrew |
| 2 | Installs .NET 6 SDK (if missing) |
| 3 | Fixes DOTNET_ROOT in ~/.zshrc (permanent PATH fix) |
| 4 | Installs dotnet-ef tool |
| 5 | Starts PostgreSQL 16 |
| 6 | Creates dms-layered database + msort + meesho schemas |
| 7 | Runs all 10 EF Core migrations |
| 8 | Starts Mock Partner API (Python Flask) |
| 9 | Starts ASP.NET Core backend |
| 10 | Runs smoke tests (10 assertions) |
Manual steps (if the script fails)¶
Step 1 — Install .NET 6 SDK¶
Add to ~/.zshrc (permanent):
Apply immediately:
Step 2 — Install EF Core CLI¶
Step 3 — PostgreSQL 16¶
Create the database and schemas:
PGPASSWORD='3edc#EDC' psql -U postgres \
-c "CREATE DATABASE \"dms-layered\";"
PGPASSWORD='3edc#EDC' psql -U postgres -d "dms-layered" <<'SQL'
CREATE SCHEMA IF NOT EXISTS msort;
CREATE SCHEMA IF NOT EXISTS meesho;
SQL
Step 4 — Run EF Migrations¶
Verify (expect 10 rows):
PGPASSWORD='3edc#EDC' psql -U postgres -d "dms-layered" \
-t -c 'SELECT "MigrationId" FROM public."__EFMigrationsHistory" ORDER BY 1;'
Step 5 — Seed Dev Data¶
Seeds API_Base_URL=http://localhost:5000 into meesho.customer_sorter_profile and 5 test AWBs (VL111111111 through VL555555555) into meesho.data_sync.
Step 6 — Start Mock Partner API¶
Verify: open http://localhost:5000 — you should see the dashboard.
Step 7 — Start Backend¶
make backend-bg # background (logs → /tmp/dms-backend.log)
# or:
make backend # foreground (Ctrl+C to stop)
Verify: - http://localhost:5269/health → {"status":"running"} - http://localhost:5269/swagger → Swagger UI
Step 8 — Smoke Tests¶
Expect: 10 passed, 0 failed
Daily workflow after setup¶
make dev # start everything + smoke test
make check # show live status of all services
make dev-stop # stop everything at end of day
See Daily Workflow for details.