Local Development Setup¶
Prerequisites¶
- macOS, Linux, or Windows with WSL2
- Docker Desktop
- Python 3.12+
- Node.js 20+
- AWS CLI
- Terraform 1.7+
- 1Password access (credentials in the shared vault)
Steps¶
1. Clone¶
2. Install dependencies¶
3. Start local services¶
Verify:
4. Migrate and seed¶
Seeds two test tenants (acme, beta) with fixture data.
5. Environment variables¶
Values are in 1Password under Construo — Shared → Local Dev Credentials.
6. Run¶
7. Verify¶
Add to /etc/hosts:
http://acme.local.test:5173— log in asalice@acme.testhttp://beta.local.test:5173— log in asbob@beta.test
Confirm the data is isolated between tenants.
Troubleshooting¶
Postgres port conflict
Port 5432 is in use by another Postgres instance. Stop it or change the port in docker-compose.yml.
Alembic migration fails
Check Docker is running. Confirm DATABASE_URL in .env matches docker-compose.yml.
Frontend CORS error
BACKEND_CORS_ORIGINS in apps/api/.env must include http://acme.local.test:5173.
Tenant not found
/etc/hosts is not set. The middleware reads the subdomain from the Host header — localhost won't resolve to a tenant.