Run the entire stack with a single command using .NET Aspire.
- Docker Desktop running
- .NET 10 SDK installed
# Clone repository
git clone https://github.com/suxrobgm/logistics-app.git
cd logistics-app
# Run everything
dotnet run --project src/Aspire/Logistics.Aspire.AppHostThat's it! Aspire will:
- Start PostgreSQL in a container
- Run database migrations
- Start all .NET services
- Start the Angular app
- Open the Aspire dashboard
Access the dashboard at http://localhost:7100
The dashboard provides:
- Resources: All running services and their status
- Console: Live console output from each service
- Traces: Distributed tracing across services
- Metrics: Performance metrics
Once running, access:
| Service | URL |
|---|---|
| Aspire Dashboard | http://localhost:7100 |
| API (Swagger) | https://localhost:7000/swagger |
| Identity Server | https://localhost:7001 |
| Admin App | https://localhost:7002 |
| Office App | https://localhost:7003 |
| pgAdmin | http://localhost:5050 |
From src/Aspire/Logistics.Aspire.AppHost/Program.cs:
┌─────────────────────────────────────────────────────────────┐
│ Aspire AppHost │
├─────────────────────────────────────────────────────────────┤
│ PostgreSQL Container (port 5432) │
│ ├── master_logisticsx database │
│ └── default_logisticsx database │
│ │
│ pgAdmin Container (port 5050) │
│ │
│ Logistics.DbMigrator (runs migrations, then exits) │
│ │
│ Logistics.IdentityServer (port 7001) │
│ │
│ Logistics.API (port 7000) │
│ └── Depends on: IdentityServer, PostgreSQL │
│ │
│ Logistics.AdminApp (port 7002) │
│ └── Depends on: API, IdentityServer │
│ │
│ Logistics.OfficeApp via Bun (port 7003) │
│ └── Depends on: API, IdentityServer │
│ │
│ Stripe CLI (optional, webhook listener) │
└─────────────────────────────────────────────────────────────┘
To enable payment testing:
-
Update
src/Aspire/Logistics.Aspire.AppHost/appsettings.json:{ "Stripe": { "SecretKey": "sk_test_..." } } -
Update
src/Presentation/Logistics.API/appsettings.jsonwith your Stripe keys -
Restart Aspire - it will automatically run Stripe CLI
Changes to .NET code trigger automatic hot reload. For Angular:
# Angular watches for changes automatically
# If you need to restart just the Angular app:
cd src/Client/Logistics.OfficeApp
bun run start- Run Aspire normally
- Use "Attach to Process" and select the service you want to debug
- Open the solution
- Set
Logistics.Aspire.AppHostas startup project - Press F5 to debug
In the Aspire dashboard, click on any service to see its console output.
Or via CLI:
docker logs logistics-postgres -fPress Ctrl+C in the terminal running Aspire.
To clean up Docker resources:
docker compose down -vIf ports are in use, stop conflicting services or modify ports in Program.cs.
Ensure Docker Desktop is running before starting Aspire.
Aspire uses WaitFor() to ensure PostgreSQL is ready before starting dependent services. If issues persist:
# Check PostgreSQL container
docker ps | grep postgres
docker logs logistics-postgres# Stop all containers
docker stop $(docker ps -aq)
# Remove logistics containers
docker rm $(docker ps -aq --filter "name=logistics")
# Remove volumes
docker volume rm $(docker volume ls -q --filter "name=logistics")
# Restart
dotnet run --project src/Aspire/Logistics.Aspire.AppHost- Test Credentials - Login credentials for testing
- Local Development - Manual setup without Docker