A full-stack application for creating and managing quizzes, built with React, Express, Prisma, and PostgreSQL.
- Node.js 24+ and npm
- PostgreSQL
Clone the project:
git clone https://github.com/zrumyk/quiz-builder.git
cd quiz-builderStart PostgreSQL and create a database:
CREATE DATABASE quiz_builder;cd backend
npm ciCopy backend/.env.example to backend/.env and configure your PostgreSQL credentials:
PORT=3000
HOSTNAME=localhost
DATABASE_URL="postgresql://postgres:YOUR_PASSWORD@localhost:5432/quiz_builder?schema=public"Run migrations, generate the Prisma Client, and start the server:
npx prisma migrate deploy --config prisma7.config.ts
npx prisma generate --config prisma7.config.ts
npm run devBackend: http://localhost:3000
Open another terminal in the project root:
cd frontend
npm ciCopy frontend/.env.example to frontend/.env and set:
VITE_API_URL=http://localhost:3000Start the frontend:
npm run devFrontend: http://localhost:5173
From the backend directory, run:
npx prisma db seed --config prisma7.config.tsThe seed creates a JavaScript Basics quiz with BOOLEAN, INPUT, and CHECKBOX questions. Running it again will not create a duplicate.
Open http://localhost:5173/quizzes to view the sample quiz.