Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

EcoGuard teacher web

Local setup

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.

  1. Set the build-time variable VITE_API_BASE_URL=https://ecoguard.https.gsmsv.site/api/v1 for production.
  2. Set VITE_GSM_AUTHORIZATION_URL to the DataGSM authorization endpoint and VITE_GSM_CLIENT_ID to the web app's client ID.
  3. Register https://ecoguard-web.https.gsmsv.site as the DataGSM web redirect URI and use that exact URI for both authorization redirect_uri and /auth/login redirectUri. Do not add a trailing slash or callback path. The app reads code and state from the root page and sends the same URI as redirectUri to /auth/login.
  4. 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.
  5. Run npm ci and npm 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.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages