The Quiz Application is a full-stack web platform that allows users to create, manage, and participate in quizzes. Users can register and log in using JWT authentication. The platform supports customizable quizzes with multiple question types, leaderboards, bonuses, and privacy controls. The app also features a dashboard displaying the latest and most popular quizzes.
- Frontend: React
- Backend: Node.js, Express
- Database: PostgreSQL (via Prisma ORM)
- Authentication: JWT
- User registration & login with JWT authentication.
- Users can create quizzes with:
- Title, Description, and Cover Image
- Custom Questions (with support for images and multiple answer types: input, radio, or checkbox for multiple correct answers)
- Question Settings:
- ✅ Maximum points per question
- ⏳ Quiz duration
- 🔒 Public or Private access
- 📅 End Date for quiz availability
- 🎁 Bonus System: Additional points awarded for completing the quiz before a specified time.
- Users can play quizzes multiple times.
- Each quiz has a 🏆 Leaderboard that records the best attempts.
- Quiz creators can:
- ❌ Close quizzes
- 📩 Invite friends (for private quizzes)
- 🗑️ Delete quizzes
- 🔄 Reset the leaderboard
- The dashboard displays:
- 🆕 Latest quizzes
- 🔥 Most popular quizzes
- A separate page lists all quizzes with a 🔍 search function to filter by name.
Ensure you have the following installed:
- 🟢 Node.js (>=14.x)
- 🗄️ PostgreSQL (latest version recommended)
- Clone the repository:
git clone https://github.com/codeReturn/Quiz-App.git cd quiz-application
- Install dependencies:
cd backend npm install
- Configure the database:
- Create a
.env
file in thebackend
directory and add:DATABASE_URL="postgresql://user:password@localhost:5432/quizdb" JWT_SECRET="your_secret_key"
- Run Prisma migrations:
npx prisma migrate dev
- Create a
- Start the backend server:
npm run dev
- Navigate to the
frontend
folder:cd ../frontend
- Install dependencies:
npm install
- Create a
.env
file and specify the backend API URL:VITE_BACKEND_URL=http://localhost:5000
- Start the frontend:
npm start
- 📝 Sign up or log in to access the quiz functionalities.
- 🎨 Create and customize quizzes.
- 🏅 Play quizzes and appear on leaderboards.
- ⚙️ Manage quizzes (invite, close, delete, reset leaderboard).
- 🔍 Discover new quizzes via the dashboard or search feature.
Feel free to submit pull requests or report issues.
MIT License