Running locally¶
Requirements: Docker Desktop (or Docker Engine with Compose v2). The full
profile's real LLM additionally needs Docker Model Runner
(docker desktop enable model-runner). On Windows, read
Windows and WSL2 first.
Windows and WSL2¶
All services run in Linux containers, so the stacks run on Docker Desktop for
Windows with the WSL2 backend. The helper tooling is bash and zsh
(run-docker-compose.sh, scripts/chaos, everything else in scripts/, the
Makefile and ansible/), so it needs a Linux shell. Use WSL2 for all of it:
- Install WSL2 with a distribution such as Ubuntu (
wsl --install), then Docker Desktop. In Settings → Resources → WSL integration, turn on integration for that distribution. - Inside the WSL2 shell, install the tools the docs use:
sudo apt install git jq make zsh python3. - Clone the repository inside the WSL2 filesystem (for example
~/awesome-localstack), not under/mnt/c/.... Bind mounts from the WSL2 filesystem are much faster, and Git there checks files out with LF line endings. - Run every command on this page from that WSL2 shell. The URLs open in the
Windows browser as usual, because Docker Desktop forwards
localhost.
Plain docker compose ... up -d also works from PowerShell or cmd in a
Windows clone. Keep *.sh files with LF line endings: .gitattributes forces
that, so don't override it with your own Git settings. In PowerShell use
curl.exe instead of curl, which can be an alias for Invoke-WebRequest.
Known Windows issues:
| Symptom | Cause and fix |
|---|---|
bind: An attempt was made to access a socket in a way forbidden by its access permissions when the full profile starts activemq |
Port 61616 is in the Windows dynamic port range, where Hyper-V/WinNAT may reserve blocks. Check with netsh interface ipv4 show excludedportrange protocol=tcp. Restarting the NAT service (net stop winnat then net start winnat, as administrator) usually releases the reservation. The services reach the broker over the Compose network, so the host port only matters for clients you run on Windows. |
port is already allocated on 11434 |
A locally installed Ollama. Find the owner with netstat -ano \| findstr 11434. |
| The full profile's real LLM does not start | Docker Model Runner on Windows depends on your Docker Desktop version and GPU. Use the lightweight profile or add -f docker-compose.model-mock.yml. |
| Clock skew errors (JWT, MFA codes) | See Troubleshooting. |
The monitoring overlay's cAdvisor and node-exporter report the Docker Desktop
VM, as on macOS. docker-compose.server.yml is the production profile
(network_mode: host) and is for Linux servers only.
Lightweight (recommended)¶
docker compose -f lightweight-docker-compose.yml up -d
docker compose -f lightweight-docker-compose.yml ps -a
Long-running containers should be Up; the one-shots postgres-roles and
db-tester-role show Exited (0). Stop with
docker compose -f lightweight-docker-compose.yml down. Data lives in tmpfs
and is gone after the stack is recreated.
| URL | What |
|---|---|
http://localhost:8081/login |
The shop |
http://localhost:8081/docs/ |
This wiki |
http://localhost:8081/db/ |
Read-only database UI (pgweb); clients connect to 127.0.0.1:15432 (Database for testers) |
http://localhost:8081/swagger-ui/index.html |
Swagger UI (backend, payment, warehouse, notification and delivery definitions) |
http://localhost:8081/v3/api-docs |
Backend OpenAPI |
http://localhost:8081/warehouse/v3/api-docs |
warehouse-service OpenAPI |
http://localhost:8081/payment/v3/api-docs |
payment-service OpenAPI |
http://localhost:8081/notification/v3/api-docs |
notification-service OpenAPI |
http://localhost:8081/delivery/v3/api-docs |
delivery-service OpenAPI |
http://localhost:8081/orders/{id}/delivery |
Courier delivery of an order (micro-frontend from delivery-service) |
http://localhost:8081/api/v1/local/notifications/outbox |
Commerce emails (lightweight profile) |
http://localhost:8081/api/v1/graphiql |
GraphiQL |
http://localhost:8081/api/v1/tracking/{number} |
Public parcel tracking |
http://localhost:8081/api/v1/local/email/outbox |
Emails (local outbox, Bearer token required) |
http://localhost:11434/api/generate |
LLM mock (raw Ollama API; the app calls it through llm-service) |
Full¶
Adds, on top of the URLs above:
| URL | What |
|---|---|
http://localhost:8025/ |
Mailpit inbox |
http://localhost:8161 |
ActiveMQ Artemis console |
http://localhost:4002/actuator/prometheus |
Consumer metrics |
localhost:5432 |
PostgreSQL testdb, postgres / postgres |
Refresh seeded data with docker compose down -v && docker compose up -d.
Use docker compose -f docker-compose.yml -f docker-compose.model-mock.yml up -d
on machines without Docker Model Runner.
Fault injection and tracing (opt-in, either profile)¶
| Command | What | URL |
|---|---|---|
scripts/chaos up (make chaos-up) |
Fault-injection lab: Toxiproxy between the services, scripts/chaos <scenario> |
Toxiproxy API http://127.0.0.1:8474 |
make tracing-up |
Jaeger with OTLP export from the backend, warehouse-, payment-, notification- and llm-service | http://127.0.0.1:16686 |
scripts/chaos up lightweight broker tracing starts the chaos, broker and tracing overlays together.
Training stack with planted bugs (opt-in, either profile)¶
docker compose -f lightweight-docker-compose.yml -f docker-compose.bugs.yml up -d runs the same
images with about fifty planted defects switched on, for manual-testing practice; the shop shows a
"Training mode" badge. Never in production. See
Training stack with planted bugs.
Demo users¶
| Username | Password | Role | Where |
|---|---|---|---|
admin |
LocalDemoAdmin123! |
admin | lightweight, full |
client |
client |
client | lightweight, full |
client2 |
client2 |
client | lightweight, full |
client3 |
client3 |
client | lightweight, full |
warehouse |
warehouse |
warehouse | lightweight, full |
Production has no demo users; sign up your own account. The sandbox
aitesters.byst.re is reseeded every night.
Demo data¶
- Sample products in several categories, sample orders.
- Coupons
WELCOME10,SAVE50,EXPIRED20,SPRING25(see Cart). - Suppliers "Nordic Electronics" and "Baltic Gadgets".
- Currencies USD, EUR, GBP, CHF, PLN and the VAT table (migrations, every profile).
A first API session¶
TOKEN=$(curl -s http://localhost:8081/api/v1/users/signin \
-H 'Content-Type: application/json' \
-d '{"username":"client","password":"client"}' | jq -r .token)
curl -s "http://localhost:8081/api/v1/products/search?q=phone&sort=price_asc" \
-H "Authorization: Bearer $TOKEN" | jq '.facets'
Continue with the order journey.
Running services from source¶
Each application repository is a Rust (Cargo) project, except the frontend
(npm), and runs with cargo run next to a local PostgreSQL on
localhost:5432: backend on 4001, warehouse-service on 4003, payment-service
on 4004, notification-service on 4005, delivery-service on 4006 and
llm-service on 4007. Each repository's README lists its environment variables
and local tokens.