Nexu is a client-side React application built with Vite. All configuration it needs at runtime is injected at build time through environment variables prefixed withDocumentation 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.
VITE_. These variables tell the app which Firebase project to connect to and, optionally, what public URL to embed in certificate QR codes. This page documents every variable, where to find its value, and how to set it in both local development and Vercel production.
Environment Variables
The Web API key for your Firebase project. Used by the Firebase SDK to identify the application when making requests to Firebase services.Where to find it: Firebase Console → Project Settings → General → Your apps → Web app →
apiKey.Example: AIzaSyDjFyLsiJzZSMHKTahuNNMKEnO4VnUKioYThe OAuth/Auth domain for your Firebase project. Used by Firebase Auth when handling sign-in flows and redirects.Where to find it: Firebase Console → Project Settings → General → Your apps → Web app →
authDomain.Example: nexu-156ce.firebaseapp.comThe unique identifier for your Firebase project. Used to construct Firestore document paths and other Firebase service URLs.Where to find it: Firebase Console → Project Settings → General →
Project ID.Example: nexu-156ceThe default Cloud Storage bucket for your Firebase project. Nexu does not currently upload files to Storage, but the Firebase SDK requires this value to initialise correctly.Where to find it: Firebase Console → Project Settings → General → Your apps → Web app →
storageBucket.Example: nexu-156ce.firebasestorage.appThe numeric sender ID for Firebase Cloud Messaging. Required by the Firebase SDK initialisation even if the app does not use push notifications.Where to find it: Firebase Console → Project Settings → General → Your apps → Web app →
messagingSenderId.Example: 661629916502The unique identifier for the specific Web app registration within your Firebase project. Used by the SDK to bind the client to the correct app configuration.Where to find it: Firebase Console → Project Settings → General → Your apps → Web app →
appId.Example: 1:661629916502:web:0ed25d517141c6030c72f7Optional. The public base URL of the deployed application. Used to construct the full verification URL (
VITE_APP_URL/verificar/:code) that is embedded as a QR code in certificate PDFs.If this variable is not set, the certificate service falls back to window.location.origin in the browser — which works correctly in most cases. Set it explicitly when doing a production build where the origin may not be available at generation time (e.g. SSR or pre-rendering pipelines).Example: https://nexu.vercel.appFinding Your Firebase Config
All six required values live in a single place in the Firebase Console:- Open console.firebase.google.com and select your project.
- Click the gear icon next to Project Overview → Project settings.
- Scroll to the Your apps section and select your Web app registration (the
</>icon). - Under SDK setup and configuration, choose the Config radio button.
- Firebase displays the full
firebaseConfigobject — copy each field to the correspondingVITE_FIREBASE_*variable.
Local Development: .env.local
For local development, create a file named .env.local at the root of the repository (next to package.json). Vite automatically loads this file and makes every VITE_* variable available via import.meta.env.
.env.example. Run cp .env.example .env.local and fill in the values to get started.
Dev Fallback (no .env.local)
If .env.local is absent — or if any required variable is empty — src/firebase/config.ts falls back to hardcoded credentials for the shared nexu-156ce project when running in development mode (import.meta.env.PROD === false). This means the dev server works out of the box for teammates who have access to the shared project, without any configuration at all.
In production mode (npm run build), the fallback is disabled. If the VITE_FIREBASE_* variables are not set, the build will throw an error at runtime:
Production: Vercel Environment Variables
For the live deployment on Vercel, environment variables are set through the Vercel dashboard — they are never in a file in the repository.- Open your project in the Vercel Dashboard.
- Go to Settings → Environment Variables.
- Add each
VITE_FIREBASE_*variable (and optionallyVITE_APP_URL) for the Production environment. - Redeploy the project (or trigger a new deployment) for the variables to take effect in the build.
Variables set in Vercel are available during
vite build as import.meta.env.VITE_*. They are not secret at runtime — Vite inlines them as string literals in the JavaScript bundle. Do not put server-side secrets (like Firebase Admin SDK credentials or reCAPTCHA secret keys) in VITE_* variables. Those belong in non-prefixed Vercel environment variables consumed only by Vercel serverless functions (e.g. api/verify-recaptcha.ts).Shared Development Project: nexu-156ce
The entire Nexu team shares a single Firebase project for both local development and production: nexu-156ce. This means:
- All developers with Owner or Editor access point their local
.env.local(or use the built-in fallback) to the same Firestore database. - Lesson 1 is already seeded in this project — no seed commands are needed to test the learner flow.
- Running
npm run seed:lesson1overwrites Lesson 1 content for everyone. Always notify the team before running seed commands against the shared project. - Firestore security rules are deployed with
npm run firebase:deploy:rulesand affect all environments immediately.
.env.local at it.