bun installto install dependenciesbun run startto run the server locally at localhost:3000
bun run lintto check that there are no linter errors, otherwise the site will not compilebun run buildto create a new production build in thebuildfolder
Clone the backend repository and follow its README
Connect two Vercel projects to UWFlow/uwflow_frontend, both using the repository
root and the build settings in vercel.json:
| Vercel project | REACT_APP_BACKEND_PATH (Preview environment) |
|---|---|
uwflow-frontend (existing) |
/prod |
uwflow-frontend-staging (new) |
/staging |
Import the same repository again in Vercel to create the staging project. Set
each value for all Preview branches, and remove any branch-specific overrides
that would select a different backend. Leave REACT_APP_BACKEND_ENDPOINT and
REACT_APP_GRAPHQL_ENDPOINT unset in Preview, since they override this setting.
If the new project's main-branch deployment should also use staging, set
REACT_APP_BACKEND_PATH=/staging in its Production environment too.
Every PR branch push will build both projects. Vercel's GitHub integration lists both deployments and preview links on the PR; no GitHub Actions or labels are needed. See Vercel's multiple-project Git integration. Redeploy existing previews after changing environment variables.
Both previews make same-origin requests: vercel.json proxies /prod/api/...
and /prod/graphql to https://uwflow.com, and /staging/api/... and
/staging/graphql to https://jerryzhou.ca/staging. Production-backed previews
read and write live production data.
Leave the setting unset for the production site behind its existing reverse proxy. Local development continues to use localhost endpoints.