Files
pos-system/.claude/LOCAL_DEV_STATE.md
Ho Ngoc Hai 368a660e5f
All checks were successful
Build & Deploy to K8s / build-and-deploy (push) Successful in 23s
docs: add known issues, review checklist updates, and local dev investigation
Add Known Issues & Gotchas section to CLAUDE.md covering role PascalCase
requirement, EF migration enforcement, and browser token cache behavior.
Update Tech Lead review checklist and naming conventions accordingly.
Include local development setup investigation and quick reference docs.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-15 11:29:54 +07:00

3.8 KiB

Local Dev Environment State

Setup Info

  • Date: 2026-04-12
  • Machine: MacBook M-series, 64GB RAM
  • Docker: Docker Desktop 4.55, Engine 29.1.3 (darwin/arm64)
  • Compose file: deployments/local/docker-compose.yml
  • Env file: deployments/local/.env

Database

  • Type: Remote Neon PostgreSQL
  • Host: 212.28.186.239:30992
  • User: cloud_admin
  • Databases: 23 per-service databases (iam_service, merchant_service, etc.)
  • Note: Shared with staging — changes here affect staging data

Running Services (36 containers)

Infrastructure

Service Port Status
PostgreSQL 16 5432 healthy (local container, but services use remote Neon)
Redis 7 6379 healthy
RabbitMQ 3 5672 / 15672 (UI) healthy
MinIO 9000 / 9001 (Console) healthy
Traefik v3.3 80 / 8080 (Dashboard) running

Microservices

Service Port Status
iam-service 5001 healthy
merchant-service 5005 healthy
catalog-service 5016 healthy
order-service 5017 healthy
inventory-service 5018 healthy
fnb-engine 5019 healthy
booking-service 5020 healthy
wallet-service 5004 healthy
storage-service 5002 healthy
membership-service 5003 healthy
chat-service 5006 healthy
social-service 5007 healthy
promotion-service 5008 healthy
mining-service 5009 healthy
mission-service 5010 healthy
ads-manager-service 5011 healthy
ads-serving-service 5012 healthy
ads-billing-service 5013 healthy
ads-tracking-service 5014 healthy
ads-analytics-service 5015 healthy
mkt-facebook-service 5021 healthy
mkt-whatsapp-service 5022 healthy
mkt-x-service 5023 healthy
mkt-zalo-service 5024 healthy

Frontend

Service Port Status
pos-web (Blazor WASM) 3001 healthy

Observability

Service Port Status
Prometheus 9090 healthy
Grafana 3002 healthy
Loki 3100 running
Promtail running
Alertmanager 9093 healthy

Access Points

URL Purpose
http://localhost:3001 POS App (Blazor WASM)
http://localhost:8080 Traefik Dashboard
http://localhost:15672 RabbitMQ Management (guest / goodgo-rabbitmq-local)
http://localhost:9001 MinIO Console (minioadmin / minioadmin123)
http://localhost:9090 Prometheus
http://localhost:3002 Grafana
http://localhost:5001/swagger IAM API Swagger
http://localhost:5005/swagger Merchant API Swagger

Dev Workflow

Rebuild a service after code changes

cd deployments/local
docker compose build <service-name>
docker compose up -d <service-name>
# Stop Docker container for the service
docker compose stop iam-service-net-local

# Run locally with hot-reload
cd services/iam-service-net
dotnet watch run --project src/IamService.API

View logs

docker compose logs -f <service-name> --tail=50

Restart all

docker compose restart

Stop all

docker compose down

Git → CI/CD Flow

  1. Edit code locally
  2. Test on http://localhost:3001
  3. git add && git commit && git push origin master
  4. GitHub → Gitea sync (5 min cronjob)
  5. Gitea Actions → Kaniko build → Harbor → K8s deploy
  6. Verify on https://platform.techbi.org

Known Issues

  • PostgreSQL container runs locally but all services point to remote Neon DB
  • Homebrew postgres/redis must be stopped before starting Docker (they grab ports 5432/6379)
    • brew services stop postgresql@17 && brew services stop redis

Last Updated

2026-04-12 — Initial setup, 36 containers running healthy