Practising TypeScript with a project idea from ChatGPT
TypeScript Quiz App
You are tasked with building a small web application that allows users to take a quiz. The app should have the following features:
-
Quiz Setup: The app should allow an admin to set up quizzes. Each quiz can have multiple-choice questions with four options and one correct answer. Admins should be able to add, edit, and delete questions.
-
User Authentication: The app should support user registration and login. Only logged-in users should be able to attempt the quizzes.
-
Quiz Taking: Logged-in users should be able to see the available quizzes and attempt them. The app should display one question at a time and provide feedback after each question is answered. Users should be able to see their score at the end of the quiz.
-
Leaderboard: The app should display a leaderboard that shows the top users based on their quiz scores.
-
Styling and User Experience: Make the app user-friendly and visually appealing with responsive design.
- Use TypeScript for the entire project.
- Use Node.js and Express.js for the backend.
- Use a relational database (e.g., PostgreSQL) to store quiz data, user information, and quiz results.
- Use a frontend framework like React or Angular to build the user interface.
- Implement user authentication using JWT (JSON Web Tokens) or any other secure authentication method.
- Ensure proper error handling and validation throughout the application.