Getting Eme2App running on your local machine takes less than ten minutes. The repo ships with a React + Vite frontend and a Node.js + Express backend that you configure independently via environment files, then start either in separate terminals or with the convenience scripts at the repo root. All you need is Node.js and a reachable PostgreSQL database — local or a free Supabase project both work out of the box.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/eme2dev/Eme2App/llms.txt
Use this file to discover all available pages before exploring further.
Verify prerequisites
Before you begin, make sure the following are available in your environment:
Check your Node.js version:
| Requirement | Minimum version |
|---|---|
| Node.js | >= 20.19.0 |
| npm | bundled with Node.js |
| PostgreSQL | Local instance or a Supabase project |
Eme2App uses native ES Modules (
"type": "module") in both the frontend and backend. Versions of Node.js below 20.19.0 are not supported.Clone the repo and install dependencies
Clone the repository and install dependencies for both sub-projects. The backend’s Install frontend dependencies:Install backend dependencies (Prisma Client is generated automatically):
postinstall hook runs prisma generate automatically after npm install.Configure the frontend environment
Create
frontend/.env.local and set the backend API base URL:Do not add a trailing slash. The frontend appends route paths directly to this value (e.g.
${VITE_API_URL}/auth/login).Configure the backend environment
Create Database URL priority order (highest to lowest):
backend/.env. The backend resolves your database connection using a strict priority order — set one of the URL variables or fall back to individual host/port variables.SUPABASE_POOLER_URLSUPABASE_DB_URLDATABASE_URLDB_URL- Individual
DB_HOST/DB_PORT/DB_NAME/DB_USER/DB_PASSWORDvars
Setting
DB_SSL_REJECT_UNAUTHORIZED=false is useful for self-signed certificates in local development. In that case the backend automatically adjusts sslmode=no-verify in the resolved connection URL.Start the backend
Open a terminal in the On startup the backend:Verify the backend is healthy:Expected response:
backend/ directory and start the development server. Nodemon watches for file changes and restarts automatically.- Connects to PostgreSQL using the priority-resolved connection config
- Auto-bootstraps the PostgreSQL schema — all tables and indexes are created if they do not exist
- Runs a version check via
verificarVersion() - Begins listening on
http://localhost:3001
Start the frontend
Open a second terminal in the Vite starts at
frontend/ directory and start Vite’s development server:http://localhost:5173 with Hot Module Replacement enabled.Or use the convenience scripts (optional)
Instead of managing two terminals manually, use the cross-platform scripts at the repo root to start both servers simultaneously:To stop both servers:
Open the app
Navigate to http://localhost:5173 in your browser. You will be greeted by the Eme2App login screen.
Useful backend scripts
Beyondnpm run dev, the backend package.json ships several utility scripts:
| Script | Description |
|---|---|
npm run start | Start the server without Nodemon (production-style) |
npm run test | Run backend tests with Vitest |
npm run db:local:init | Quick-init a local PostgreSQL database via scripts/setupLocalDb.js |
npm run prisma:pull | Introspect the live schema into prisma/schema.prisma |
npm run prisma:generate | Regenerate the Prisma Client from the schema |
npm run prisma:smoke | Run the Prisma smoke test |
npm run prisma:validate | Validate the Prisma schema without generating |
npm run prisma:studio | Open Prisma Studio for visual data browsing |
CORS behaviour
The backend allows cross-origin requests from these origins by default:FRONTEND_URL(value frombackend/.env)http://localhost:5173http://localhost:5174
FRONTEND_URL in the backend environment and the server restarted (or redeployed on Vercel).