Copy .env.example to .env.local before starting the dev server. Set VITE_GSM_CLIENT_ID to the DataGSM client ID. For local backend development, set ECOGUARD_SERVER_URL to the server address; Vite proxies /api/v1 requests to it. The example defaults to localhost:8080.
- Set the build-time variable
VITE_API_BASE_URL=https://ecoguard.https.gsmsv.site/api/v1for production. - Set
VITE_GSM_AUTHORIZATION_URLto the DataGSM authorization endpoint andVITE_GSM_CLIENT_IDto the web app's client ID. - Register
https://ecoguard-web.https.gsmsv.siteas the DataGSM web redirect URI and use that exact URI for both authorizationredirect_uriand/auth/loginredirectUri. Do not add a trailing slash or callback path. The app readscodeandstatefrom the root page and sends the same URI asredirectUrito/auth/login. - On the EcoGuard server, set
GSM_OAUTH_ALLOWED_REDIRECT_URIS=https://ecoguard-web.https.gsmsv.site(the same string, with no trailing slash) and restart the server. This server setting is separate from the web client's build-time variables. - Run
npm ciandnpm run dev.
The teacher web uses the server's /api/v1 API with bearer access tokens, refreshes access tokens through /auth/refresh, and clears the session on logout. Access and refresh tokens are kept in the current browser tab's session storage. No mock data is used for operational screens. OAuth and API variables are embedded at build time; configure them in the deployment environment before building.
The server currently does not expose a teacher endpoint for the complete per-student today roster. The dashboard therefore shows the live review queue, pending appeals, recruitment list, and area configuration available from the current API. Add a dedicated dashboard endpoint before showing daily submitted / approved / rejected / missing totals.