Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/Renzo717/Aula-Virtual-Universidad-Radiolocucion/llms.txt

Use this file to discover all available pages before exploring further.

This guide walks you through cloning the NuestraVoz monorepo, wiring up your Supabase project credentials, seeding the database with demo data, and booting the full-stack development environment. By the end you will have the Astro frontend running at http://localhost:4321 and the Express API running at http://localhost:3001.

Prerequisites

Before you begin, make sure the following are available on your machine:
  • Node.js 20 or later — the root package.json enforces "node": ">=20" via the engines field.
  • pnpm 10 or later — the monorepo uses pnpm workspaces. Install it through Corepack (bundled with Node.js 16.9+) so the exact version pinned in package.json (pnpm@10.12.1) is automatically selected.
  • A Supabase project — create a free project at supabase.com. You need the project URL and the service-role secret key (not the anon key) to seed and run the API.
The API uses the service-role key, which bypasses all Row Level Security policies. Never expose this key in the browser or commit it to source control.

Setup Steps

1

Clone the repository and enable Corepack

Clone the monorepo and activate Corepack so pnpm is managed automatically:
git clone https://github.com/Renzo717/Aula-Virtual-Universidad-Radiolocucion.git
cd Aula-Virtual-Universidad-Radiolocucion
corepack enable
Corepack reads the "packageManager": "pnpm@10.12.1" field from the root package.json and ensures every subsequent pnpm call uses that exact version.
2

Install all workspace dependencies

A single command installs packages for every workspace (web, api, and shared):
pnpm install
pnpm resolves the workspace protocol (workspace:*) used by @nuestravoz/web and @nuestravoz/api to link the local @nuestravoz/shared package without any publishing step.
3

Configure the API environment variables

Create apps/api/.env by copying the example file and filling in your Supabase credentials:
cp apps/api/.env.example apps/api/.env
Then open apps/api/.env and set your values:
# apps/api/.env

# Your Supabase project URL — found in Project Settings → API
SUPABASE_URL=https://<your-project-ref>.supabase.co

# Service-role secret key — found in Project Settings → API → service_role
SUPABASE_SERVICE_ROLE_KEY=your_service_role_key_here

# Port the Express server will bind to
PORT=3001

# Node environment
NODE_ENV=development

# Allowed CORS origin — must match the Astro dev server
CORS_ORIGIN=http://localhost:4321

# Name of the HTTP-only session cookie issued on login
SESSION_COOKIE_NAME=nv_session
The frontend (@nuestravoz/web) does not use its own .env file for backend secrets. All backend configuration lives exclusively in apps/api/.env, and the Astro dev server proxies every /api request through to Express — so you only need to configure one file.
4

Apply database migrations

Push all versioned SQL migrations from supabase/migrations/ to your Supabase project using the Supabase CLI:
npx supabase db push
If you prefer to apply migrations manually, the files are numbered sequentially (001_initial_schema.sql019_preceptor_notas_finales_write.sql) and can be executed in order through the Supabase SQL editor.
5

Seed demo data

The API workspace includes a seed script that populates users, careers, courses, and sample activities. Run it using pnpm’s --filter flag to target only the API package:
pnpm --filter @nuestravoz/api seed
The seed script uses the SUPABASE_SERVICE_ROLE_KEY from apps/api/.env to bypass RLS and insert demo records directly. It is safe to re-run — existing records are upserted, not duplicated.
6

Start the development servers

The root dev script builds the shared package first (so both the web and API workspaces pick up the latest types), then starts both servers in parallel:
pnpm dev
You should see two processes start concurrently:
ServerURLPackage
Astro frontendhttp://localhost:4321@nuestravoz/web
Express APIhttp://localhost:3001@nuestravoz/api
The Astro Vite dev server is configured to proxy any request beginning with /api to http://localhost:3001, so the browser only ever speaks to one origin.
🚀 API NuestraVoz en http://localhost:3001
▶ Local  http://localhost:4321/
7

Log in with demo credentials

Open your browser and navigate to http://localhost:4321. Use the seeded admin account to explore the full platform:
FieldValue
Emailadmin@nuestravoz.edu
PasswordAdmin123!
The admin dashboard provides access to user management, career and course configuration, enrollment oversight, audit logs, and all classroom features. To test other roles, create additional users through the admin panel and assign the docente, estudiante, or preceptor role.

Verifying the API

You can confirm the Express server is healthy without a browser by hitting the health-check endpoint:
curl http://localhost:3001/api/health
{ "status": "ok", "service": "nuestravoz-api" }

How the Frontend Proxy Works

The Astro configuration at apps/web/astro.config.mjs registers a Vite proxy rule for local development:
vite: {
  server: {
    proxy: {
      '/api': {
        target: 'http://localhost:3001',
        changeOrigin: true,
      },
    },
  },
},
Any request the browser makes to http://localhost:4321/api/... is transparently forwarded to the Express server. This means the frontend never needs to know the API’s port — in production the same path prefix is handled by a reverse proxy (nginx, a cloud load balancer, etc.) pointing at the deployed API service.
When running pnpm dev, the @nuestravoz/shared package is compiled first (pnpm --filter @nuestravoz/shared build) before the parallel dev servers start. If you modify types or schemas in packages/shared/src, stop the dev process, run pnpm dev again (or manually rebuild shared with pnpm --filter @nuestravoz/shared build) to pick up the changes.

Build docs developers (and LLMs) love