A full-stack programming quiz application built with React (frontend) and Node.js/Express (backend) with SQLite database.
- ✅ Start page to begin the programming quiz
- ✅ 20 programming-related questions covering various topics
- ✅ Question navigation with Next/Previous buttons
- ✅ Submit quiz and get score
- ✅ Results page showing final score
- ✅ Timer functionality (15 minutes)
- ✅ Detailed results showing correct/incorrect answers
- ✅ Backend tests for scoring logic
- JavaScript: Data types, functions, async operations
- Web Development: HTML, CSS, HTTP, DOM, JSON
- Python: Frameworks (Django), exception handling
- Databases: SQL, NoSQL (MongoDB)
- General Programming: Time complexity, paradigms, Git
- APIs: REST concepts and status codes
Frontend:
- React 18
- React Router for navigation
- Axios for API calls
- CSS3 for styling
Backend:
- Node.js
- Express.js
- SQLite3 database
- Jest for testing
-
Install backend dependencies:
cd server npm install
-
Start backend server:
cd server node src/index.js
-
Open the demo:
- Open
demo.html
in your web browser - The demo connects to the backend API at http://localhost:5000
- Open
-
Run tests:
cd server npm test
The React frontend currently has dependency compatibility issues with the latest Node.js version. To try the React version:
-
Install all dependencies:
npm run install-deps
-
Start development servers:
npm run dev
This should start:
- Backend server on http://localhost:5000
- Frontend server on http://localhost:3000
quiz-app/
├── client/ # React frontend
│ ├── public/
│ ├── src/
│ │ ├── components/ # React components
│ │ ├── pages/ # Page components
│ │ ├── services/ # API services
│ │ └── styles/ # CSS files
│ └── package.json
├── server/ # Node.js backend
│ ├── src/
│ │ ├── controllers/ # Route controllers
│ │ ├── models/ # Database models
│ │ ├── routes/ # API routes
│ │ └── utils/ # Utility functions
│ ├── tests/ # Test files
│ ├── database.db # SQLite database
│ └── package.json
└── package.json # Root package.json
GET /api/quiz/questions
- Fetch all quiz questions (without correct answers)POST /api/quiz/submit
- Submit quiz answers and get score
The SQLite database contains a questions
table with:
id
(INTEGER PRIMARY KEY)question_text
(TEXT)option_a
(TEXT)option_b
(TEXT)option_c
(TEXT)option_d
(TEXT)correct_option
(TEXT)
- Open the application in your browser
- Click "Start Quiz" to begin
- Answer questions using the provided options
- Navigate between questions using Next/Previous buttons
- Submit your answers on the final question
- View your score and detailed results
- Configurable quiz timer (default: 10 minutes)
- Visual countdown display
- Auto-submit when time expires
- Question counter (e.g., "Question 1 of 10")
- Previous button (disabled on first question)
- Next button (changes to Submit on last question)
- Overall score percentage
- Total correct/incorrect count
- Question-by-question breakdown
- Correct answer reveals for missed questions


