1.4 KiB
1.4 KiB
EventQR (NestJS + React)
A unified EventQR project with a NestJS backend and React frontend.
Prerequisites
- Node.js
- PostgreSQL Database
Setup
-
Configure Database: Update
.envwith your PostgreSQL connection string.DATABASE_URL="postgresql://user:password@localhost:5432/eventqr" JWT_SECRET="your-secret" PASSWORD="your-login-password" -
Install Dependencies:
npm install -
Setup Database:
npx prisma migrate dev --name init -
Build Frontend:
npm run build:client -
Start Server:
npm run start:devThe application will be available at
http://localhost:3000. API endpoints are athttp://localhost:3000/api.
Features
- Auth: JWT-based authentication with a simple password check (configured in
.env). - Events: Create and list events.
- Tickets: Generate tickets (Types: "Klassenbester", "1er Schüler", "Partyborner"). Scan and validate tickets.
- Frontend: React app served statically by NestJS.
Development
- Backend:
src/ - Frontend:
client/
To work on the frontend, you can run cd client && npm run dev for hot-reloading, but you need to ensure it can proxy to the backend (configured in vite.config.ts to proxy /api to http://localhost:3000).