¶ Scaffolding Environments and Deployment
| Service |
Repository default |
| Frontend |
http://localhost:3010 |
| Backend |
http://localhost:8082 |
| API base |
Backend /api/v1 |
Prerequisites are Node.js 20 or newer, the repository's package manager/lockfile, Docker for the backend stack, and access to the required Supabase/Core projects. The frontend package declares pnpm 9, while parts of the README use npm examples; follow the lockfile and team convention consistently.
Basic sequence:
- Obtain approved development environment values from the technical owner.
- Start the backend Docker services and run Laravel migrations against a disposable development database.
- Install frontend dependencies from the lockfile and start the Next.js development server on port 3010.
- Verify health/version, login, branch scope and one read-only API request before creating test data.
Do not invent .env values. The README refers to example environment files that are absent from the reviewed repository; this is a handover gap.
- Application URL, frontend URL and API base URL.
- Scaffolding PostgreSQL/Supabase connection.
- UtopiaSpace Core URL, keys and redirect/callback configuration.
- Session/cookie and trusted-origin settings.
- AppSheet/sheet-sync credentials and target identifiers.
- OE API/JWT credentials.
- File/object storage and upload configuration.
- Observability, mail/notification and deployment platform values where used.
Record variable names, owner and environment, but keep secret values in the approved secret manager.
¶ Build and deployment evidence
- Frontend configuration targets Vercel region
sin1.
- A GitHub workflow deploys frontend changes from
main; its Vercel project is configured with frontend as the root directory even when commands run from repository root.
- The backend has a production container using Nginx and PHP-FPM and listens on container port 8080.
- No backend deployment workflow was found. Comments suggest DigitalOcean App Platform, but the actual production platform, trigger and rollback procedure must be confirmed.
- The wiki-notification workflow reports merged/pushed source changes; it is not a deployment signal.
- Identify the exact commit and target environment.
- Review database migrations and take/verify a recoverable backup.
- Run backend tests and frontend checks/build.
- Deploy backend and run migrations according to the confirmed platform procedure.
- Deploy frontend with the matching API configuration.
- Smoke-test health, sign-in, branch access, quotation/order read and critical queues.
- Verify AppSheet/OE job logs and outbox backlog.
- Record deployer, commit, migration result, smoke evidence and rollback point.