frontend/— Vite + React SPA with TanStack Router (bun)backend/— Go HTTP API server
If this is the first time you are starting development on this repo OR a change was made to a Dockerfile and you need to rebuild, first do:
docker compose up -d --buildHowever, if you have already built the Docker environment, you can forego the --build:
docker compose up -dIf this doesn't work install the docker-compose plugin.
To enter the dev environment:
docker exec -it ambush-dev-container bashEnsure your pwd is the root ambush directory, and after performing
code .make sure you have Microsoft's Dev Containers extension installed. This should prompt to 'Rebuild and Reopen in Container'. If this is the first time building or rebuilding after a Dockerfile change, this may take some time. That's it after that!
- To exit the dev environment:
exit- To close all services:
docker compose downIn the dev shell: cd frontend then bun run dev (port 3000), bun run lint for lint, and bun run test for tests (test files need the suffix .test.ts).
For the backend: cd backend then go run . (see backend/db/README.md for the sqlc/goose/pgx database workflow).
| Service | Host port |
|---|---|
| frontend (vite) | 3000 |
| backend (go) | 8080 |
metadata Postgres (meta_ambush) |
5432 |
| SpiceDB (gRPC) | 50067 |
SpiceDB Postgres (spice_ambush) |
5467 |