Skip to main content

Getting Started

Prerequisitesโ€‹

  • Docker Desktop installed and running
  • .env file with credentials (copy values from appsettings.Example.json)
  • .NET 10 SDK (for local development without Docker)

Quick Startโ€‹

# From the InventoryManagementSystem/ directory:
docker compose up --build
ServiceURLNotes
APIhttp://localhost:8080Swagger at /swagger
UIhttp://localhost:3000Next.js frontend
Hangfire Dashboardhttp://localhost:8080/hangfireAdmin only
Seq Logshttp://localhost:5341Structured log viewer
PostgreSQLlocalhost:5433Internal port 5432
DynamoDB/SQSlocalhost:5000Moto emulator
Redislocalhost:6379Cache + dedup
Wiki (local)http://localhost:3001Docusaurus dev server

Seed Credentialsโ€‹

UsernamePasswordRole
adminpasswordAdmin
user1passwordUser

Common Commands Cheat Sheetโ€‹

Dockerโ€‹

docker compose up --build # Full rebuild and start
docker compose up -d # Start in background (detached)
docker compose down # Stop all containers
docker compose down -v # Stop + wipe all volumes (clears DB!)
docker compose logs -f api # Tail API logs live
docker compose logs worker # View worker container logs
docker compose ps # List running containers and health status
docker compose up -d --build api # Rebuild and restart only the API container
docker exec -it <container> sh # Open a shell inside a container

.NET APIโ€‹

dotnet build
dotnet run --project InventoryAlert.Api

# EF Core Migrations (run from InventoryManagementSystem/)
dotnet ef migrations add <MigrationName> \
--project InventoryAlert.Api \
--startup-project InventoryAlert.Api

dotnet ef database update \
--project InventoryAlert.Api \
--startup-project InventoryAlert.Api

Running Testsโ€‹

# All tests
dotnet test

# Unit tests only
dotnet test --filter "FullyQualifiedName~InventoryAlert.UnitTests"

# E2E tests (requires running Docker stack)
dotnet test --filter "FullyQualifiedName~InventoryAlert.E2ETests"

# Integration tests
dotnet test --filter "FullyQualifiedName~InventoryAlert.IntegrationTests"

Next.js UIโ€‹

cd InventoryAlert.UI
npm install
npm run dev # Dev server โ†’ http://localhost:3000
npm run build # Production build

Docusaurus Wikiโ€‹

cd InventoryAlert.Wiki
npm run start # Dev server โ†’ http://localhost:3001
npm run build # Static production build
npm run deploy # Deploy to GitHub Pages

Force Rebuild Docker from Scratchโ€‹

docker compose down -v
docker compose build --no-cache
docker compose up