- Latest NextJS Update: 13.5.6
This Next.js application provides an interactive quiz platform designed for OA Robotics team members. It allows users to test their knowledge through a series of questions with multiple answers per question.
- User identification via username storage in localStorage
- Admin detection and special privileges for authorized users
- Multiple test types available for different topics
- Team and category selection functionality
- Multi-answer question format where users can select all applicable answers
- Navigation between questions with previous and next buttons
- Progress tracking through the test
- Real-time score display for admin users
- Automatic scoring for admin users
- Score calculation based on correct answers
- Pass/fail determination
- Results storage and submission
- Clean, modern interface with custom styling
- Google Fonts integration (Work Sans 300/500)
- Responsive design for various devices
- Built with React and Next.js
- TypeScript for type safety
- SCSS modules for component-specific styling
- Font optimization using
next/font
- React hooks for local state management
useStatefor handling quiz flow and user selectionsuseEffectfor data fetching and side effects
- RESTful API endpoints for:
- Fetching quiz settings
- Submitting answers
- Retrieving admin information
- Storing test results
- JSON data structure for questions and answers
- Local storage for preserving user information across sessions
- Error handling with try/catch blocks
The application follows Next.js conventions with:
/pages: Route components including the test interface/styles: SCSS modules for component styling- API routes for backend functionality
- Clone the repository
- Install dependencies with
npm install - Run the development server with
npm run dev - Access the application at http://localhost:3000
- User enters their name and selects a team/category
- User selects a test type
- Questions are presented one by one with multiple-choice answers
- User navigates through questions and submits answers
- Upon completion, results are displayed and stored
- Admin users receive additional features including automatic scoring
- Next.js
- React
- TypeScript
- SCSS
- localStorage API
- Fetch API
- User authentication with secure login
- Expanded question bank and test categories
- Detailed analytics for test performance
- Timed quiz options
- Mobile-optimized interface
Contributions to improve the application are welcome. Please follow the standard fork and pull request workflow.