This guide walks you through running UniEvents on your local machine from scratch. By the end you’ll have a fully seeded PostgreSQL database, all environment variables configured, and the development server running with five ready-to-use test accounts — one for each role in the system.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Edfermachado/proyectoSistemas/llms.txt
Use this file to discover all available pages before exploring further.
Clone the repo and install dependencies
Clone the repository and install all dependencies using This installs all runtime and dev dependencies declared in
pnpm. UniEvents uses pnpm as its package manager — make sure it is installed before proceeding.package.json, including Next.js 16, Drizzle ORM, Supabase JS, jose, sharp, and Zod.Set up environment variables
Create a The table below summarises every variable:
.env.local file in the project root. All variables below are read at runtime by the application — none have defaults that are safe for production.| Variable | Required | Description |
|---|---|---|
DATABASE_URI | ✅ Yes | Full PostgreSQL connection string. Falls back to postgresql://postgres:postgres@127.0.0.1:54322/postgres in drizzle.config.ts only — always set explicitly. |
JWT_SECRET | ✅ Yes | Signing key for session JWTs. Defaults to uni-events-super-secret-key-32-chars!! in src/lib/auth.ts — change this in production. |
NEXT_PUBLIC_SUPABASE_URL | ⚠️ Optional | Supabase project URL. If omitted, the Supabase client is not initialised and file uploads fall back to local storage. |
NEXT_PUBLIC_SUPABASE_ANON_KEY | ⚠️ Optional | Supabase public anon key. Used as a fallback if SUPABASE_SERVICE_ROLE_KEY is not set. |
SUPABASE_SERVICE_ROLE_KEY | ⚠️ Optional | Supabase service role key for privileged server-side uploads. Takes precedence over the anon key. |
NODE_ENV | ✅ Yes | Set to development locally. In production the session cookie secure flag is automatically enabled. |
The default
JWT_SECRET value (uni-events-super-secret-key-32-chars!!) is public and must never be used in a production deployment. Generate a cryptographically random secret of at least 32 characters — for example:Run Drizzle migrations
Apply the database schema to your PostgreSQL instance using Drizzle Kit. Choose the command that matches your workflow:Drizzle Kit reads the connection string from
DATABASE_URI (via drizzle.config.ts) and creates all 10 tables: universities, categories, tenants, users, spaces, events, attendees, event_requests, system_settings, and scan_logs, along with all enum types and indexes.drizzle-kit push is non-destructive on existing data but will apply schema changes immediately. Use drizzle-kit migrate in staging and production environments where you want a reviewable migration history.Seed the database
Populate the database with demo universities, faculties, spaces, events, and test users by running the seed script:This executes
The seed script also pre-registers the student user in two events (one free with
src/db/seed.ts via tsx and creates the following data:Universities & Faculties- Universidad Central de Tecnología → Facultad de Ingeniería, Facultad de Ciencias de la Computación
- Universidad Nacional de Artes → Facultad de Bellas Artes
| Role | Password | Dashboard | |
|---|---|---|---|
| Super Admin | admin@gmail.com | admin | /admin |
| Faculty Admin (Decano) | decano@gmail.com | decano | /faculty-admin |
| Event Manager | gestor@gmail.com | gestor | /faculty-admin |
| Access Control | portero@gmail.com | portero123 | /faculty-admin |
| Regular User | estudiante@gmail.com | 123456 | / |
confirmado status, one paid with pago_pendiente status) and prints the corresponding QR ticket tokens to the console so you can test the scanner immediately.Start the development server
Launch the Next.js development server:The application is now available at http://localhost:3000.
Sign in with any of the seeded test accounts listed in Step 4 to explore the platform from each role’s perspective.
| URL | Description |
|---|---|
http://localhost:3000 | Public-facing app — browse universities and events |
http://localhost:3000/admin | Super Admin dashboard |
http://localhost:3000/faculty-admin | Faculty Admin / Event Manager dashboard |
http://localhost:3000/login | Login page for all roles |