Nexu’s frontend is deployed on Vercel and auto-deploys from theDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/Stivenz3/Nexu/llms.txt
Use this file to discover all available pages before exploring further.
main branch whenever a new commit is pushed. Vercel handles the build (tsc && vite build) and serves the compiled output as a single-page application (SPA). Beyond environment variables and the vercel.json configuration already committed to the repository, no additional Vercel project setup is required for routine deploys.
vercel.json
Thevercel.json at the repository root configures the SPA catch-all rewrite needed by React Router, as well as Content-Type and cache headers for the Unity WebGL game assets served from public/games/cocina-infectada/:
/leccion/lesson_01_higiene_personal/evaluacion — is served by index.html so React Router can take over client-side routing.
Build command
Vercel runs the following build command as defined inpackage.json:
tsc), then Vite bundles the output. If TypeScript reports errors, the build fails and the deploy is aborted — fixing type errors locally with npm run build before pushing is recommended.
Required environment variables
All variables below must be added in Vercel Project → Settings → Environment Variables. TheVITE_ prefix makes them available at build time through Vite’s import.meta.env mechanism — they are inlined into the compiled bundle and are not secret.
| Variable | Example value |
|---|---|
VITE_FIREBASE_API_KEY | AIza... |
VITE_FIREBASE_AUTH_DOMAIN | nexu-156ce.firebaseapp.com |
VITE_FIREBASE_PROJECT_ID | nexu-156ce |
VITE_FIREBASE_STORAGE_BUCKET | nexu-156ce.appspot.com |
VITE_FIREBASE_MESSAGING_SENDER_ID | 123456789 |
VITE_FIREBASE_APP_ID | 1:123... |
VITE_APP_URL | https://nexu.vercel.app (optional — used to build QR code URLs on certificates) |
VITE_FIREBASE_* variables come from Firebase Console → Project Settings → Your apps → SDK setup and configuration for project nexu-156ce.
All team members develop and test against the same Firebase project
nexu-156ce. There is no separate production or staging Firebase project. The same Firestore database and Auth tenant power local development, Vercel previews, and the production URL.Serverless functions (api/)
The api/ directory at the repository root is automatically detected by Vercel as serverless functions and deployed alongside the frontend. Currently it contains one function:
api/verify-recaptcha.ts— validates reCAPTCHA tokens server-side usingRECAPTCHA_SECRET_KEY. Because this variable does not start withVITE_, it is never exposed to the browser.
Seed scripts and Vercel
Seed scripts (npm run seed:lesson1, npm run seed:lesson2) are developer tools that run locally on a developer’s machine. Vercel does not run them during the build or deploy pipeline. All lesson content lives in Firestore and is fetched at runtime by the React app. See Seed Commands for details on running seeds.
Keeping the pnpm lockfile in sync
Vercel uses pnpm to install dependencies during CI builds. It readspnpm-lock.yaml from the repository to ensure reproducible installs.