Skip to main content

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.

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.
1

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.
2

Clone and install

Clone the repository and install dependencies:
git clone https://github.com/Stivenz3/Nexu.git
cd Nexu
npm install
This installs all runtime and dev dependencies listed in package.json, including React 18, Firebase SDK 12, Tailwind CSS, jsPDF, and Vite.
3

Configure environment variables

Nexu reads its Firebase connection details from VITE_FIREBASE_* environment variables at build time. Copy the example file to create your local configuration:
cp .env.example .env.local
Open .env.local and fill in each value from your Firebase project settings (Firebase Console → Project Settings → Your apps → Web app config):
# .env.example — copy to .env.local and fill in your values
VITE_FIREBASE_API_KEY=
VITE_FIREBASE_AUTH_DOMAIN=
VITE_FIREBASE_PROJECT_ID=
VITE_FIREBASE_STORAGE_BUCKET=
VITE_FIREBASE_MESSAGING_SENDER_ID=
VITE_FIREBASE_APP_ID=
# URL pública de la app (opcional, para QR de certificados en build/SSR)
VITE_APP_URL=
A fully filled example using the shared dev project looks like this:
VITE_FIREBASE_API_KEY=AIzaSyDjFyLsiJzZSMHKTahuNNMKEnO4VnUKioY
VITE_FIREBASE_AUTH_DOMAIN=nexu-156ce.firebaseapp.com
VITE_FIREBASE_PROJECT_ID=nexu-156ce
VITE_FIREBASE_STORAGE_BUCKET=nexu-156ce.firebasestorage.app
VITE_FIREBASE_MESSAGING_SENDER_ID=661629916502
VITE_FIREBASE_APP_ID=1:661629916502:web:0ed25d517141c6030c72f7
# Optional — falls back to window.location.origin in the browser
VITE_APP_URL=http://localhost:5173
See the Environment Setup page for a full description of every variable.
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.
4

Start the development server

Start Vite’s local dev server:
npm run dev
Vite will print a local URL — typically http://localhost:5173. Open it in your browser. You should see the Nexu welcome page.
5

Test the full learner flow

Walk through the complete end-to-end journey to confirm everything is connected:
  1. Register — click Crear cuenta on the welcome page and fill in your name, email, and password. Firebase Auth creates your account.
  2. Learning path — after registration you land on /ruta, the list of available lessons. Lesson 1 (Higiene Personal) should be visible and unlocked.
  3. Start Lesson 1 — click the lesson card to enter /leccion/lesson_01_higiene_personal. Work through each block: video → theory → game.
  4. Take the exam — navigate to /leccion/lesson_01_higiene_personal/evaluacion and complete the multiple-choice questions. A score of 70 % or higher is required to pass.
  5. 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

CommandDescription
npm run devStart local dev server (Vite, http://localhost:5173)
npm run buildProduction build — same pipeline Vercel runs (tsc && vite build)
npm run seed:lesson1Upload / replace Lesson 1 content in Firestore
npm run seed:lesson2Upload Lesson 2 when firestore-seed/lesson_02/ has content
npm run firebase:deploy:rulesDeploy Firestore security rules and indexes to nexu-156ce
Vercel builds use pnpm, not npm. If you add or remove dependencies in package.json, run pnpm install --lockfile-only locally and commit the resulting pnpm-lock.yaml file — otherwise the Vercel build will fail.

Build docs developers (and LLMs) love