Welcome to the Quiz Game App!
This is .NET and Angular project designed to demonstrate a complete fullstack application with complex data relationships.
It allows users to play trivia based quiz games and record their scores. They can create, update and delete quizzes, and also visualise their previous games scores.
The web front end is delivered by Angular and utilise Angular Material components. The API back end is delivered by .NET and provides the endpoints to manage the database records.
[!NOTE] The
InitialCreatedatabase migration has been created.On start-up of the API application, any required database creation/migrations will be performed programmatically.
Clone the repository:
git clone https://github.com/chrisjamiecarter/quiz-game.gitNavigate to the API project directory:
cd src\QuizGame.ApiConfigure the application:
appsettings.json.<database-server><database-user><database-user-password>Build the application using the .NET CLI:
dotnet buildNavigate to the Web project directory:
cd src\QuizGame.WebInstall dependencies:
npm installOR
Run the API application using the .NET CLI in the API project directory:
cd src\QuizGame.Apidotnet runStart the development server in the Web project directory:
cd src\QuizGame.webnpm startYouTube Video Demonstration:
The Quiz Game API provides a set of versioned endpoints for managing quizzes, questions, answers, and games.
It uses ASP.Versioning to support API versioning, the current version is v1 and the version is specified in the URL path, e.g., /api/v1.
It uses OpenAPI for documentation, use the /swagger endpoint to view the API documentation in your browser. All responses follow RESTful standards with appropriate status codes.
Some endpoints require request validation. Example validation objects:
AnswerCreateRequest, AnswerUpdateRequestGameCreateRequestQuestionCreateRequest, QuestionUpdateRequestQuizCreateRequest, QuizUpdateRequest/api/v1/quizgame/answers
| Method | Endpoint | Description |
|---|---|---|
| GET | / |
Get all answers. |
| GET | /{id} |
Get an answer by ID. |
| POST | / |
Create a new answer. |
| PUT | /{id} |
Update an existing answer. |
| DELETE | /{id} |
Delete an existing answer. |
/api/v1/quizgame/games
| Method | Endpoint | Description |
|---|---|---|
| GET | / |
Get all games. |
| GET | /page |
Get a paginated list of games. |
| GET | /{id} |
Get a game by ID. |
| POST | / |
Create a new game. |
/api/v1/quizgame/questions
| Method | Endpoint | Description |
|---|---|---|
| GET | / |
Get all questions. |
| GET | /{id} |
Get a question by ID. |
| GET | /{id}/answers |
Get all answers for a specific question. |
| POST | / |
Create a new question. |
| PUT | /{id} |
Update an existing question. |
| DELETE | /{id} |
Delete an existing question. |
/api/v1/quizgame/quizzes
| Method | Endpoint | Description |
|---|---|---|
| GET | / |
Get all quizzes. |
| GET | /{id} |
Get a quiz by ID. |
| GET | /{id}/games |
Get all games for a specific quiz. |
| GET | /{id}/questions |
Get all questions for a specific quiz. |
| POST | / |
Create a new quiz. |
| PUT | /{id} |
Update an existing quiz. |
| DELETE | /{id} |
Delete an existing quiz. |
| DELETE | /{id}/questions |
Delete all questions for a specific quiz. |

This document applies to the QuizGame v1.0.0 release version.
Contributions are welcome! Please fork the repository and create a pull request with your changes. For major changes, please open an issue first to discuss what you would like to change.
This project is licensed under the MIT License. See the LICENSE file for details.
For any questions or feedback, please open an issue.
Happy Quiz Gaming!