This guide walks you through getting Nexu running on your local machine and completing the full learner journey — from registration all the way to a downloaded certificate — so you can develop and test with confidence before touching production.Documentation 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.
Prerequisites
Before you begin, make sure you have the following installed and available:
- Node.js 18 or later — Nexu’s seed scripts and Vite dev server both require Node 18+. Check your version with
node -v. - npm — bundled with Node.js; used for all local commands.
- A Firebase project — you can use the shared team project
nexu-156ce(ask a teammate with Owner/Editor access to add you), or create your own project in the Firebase Console.
Lesson 1 is already seeded in the shared Firebase project
nexu-156ce. If you use that project you can skip all seed commands and immediately test the full lesson flow as a learner on day one.Clone and install
Clone the repository and install dependencies:This installs all runtime and dev dependencies listed in
package.json, including React 18, Firebase SDK 12, Tailwind CSS, jsPDF, and Vite.Configure environment variables
Nexu reads its Firebase connection details from Open A fully filled example using the shared dev project looks like this:See the Environment Setup page for a full description of every variable.
VITE_FIREBASE_* environment variables at build time. Copy the example file to create your local configuration:.env.local and fill in each value from your Firebase project settings (Firebase Console → Project Settings → Your apps → Web app config):If you skip this step entirely,
src/firebase/config.ts automatically falls back to the shared nexu-156ce credentials when running in development mode — so the dev server will still work without a .env.local file if you have network access to the shared project.Start the development server
Start Vite’s local dev server:Vite will print a local URL — typically http://localhost:5173. Open it in your browser. You should see the Nexu welcome page.
Test the full learner flow
Walk through the complete end-to-end journey to confirm everything is connected:
- Register — click Crear cuenta on the welcome page and fill in your name, email, and password. Firebase Auth creates your account.
- Learning path — after registration you land on
/ruta, the list of available lessons. Lesson 1 (Higiene Personal) should be visible and unlocked. - Start Lesson 1 — click the lesson card to enter
/leccion/lesson_01_higiene_personal. Work through each block: video → theory → game. - Take the exam — navigate to
/leccion/lesson_01_higiene_personal/evaluacionand complete the multiple-choice questions. A score of 70 % or higher is required to pass. - View your certificate — on passing, the app issues your certificate to Firestore and redirects you to
/certificado. Click Ver documento to open the PDF view at/certificado/documento, then download it. The embedded QR code points to/verificar/:code— a public URL anyone can visit to confirm authenticity without logging in.
npm Scripts Reference
| Command | Description |
|---|---|
npm run dev | Start local dev server (Vite, http://localhost:5173) |
npm run build | Production build — same pipeline Vercel runs (tsc && vite build) |
npm run seed:lesson1 | Upload / replace Lesson 1 content in Firestore |
npm run seed:lesson2 | Upload Lesson 2 when firestore-seed/lesson_02/ has content |
npm run firebase:deploy:rules | Deploy Firestore security rules and indexes to nexu-156ce |