Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/profjordanov/famousquotequiz

Famous quote quiz game where system will ask questions and user should try to pick a correct answer. Depending on selected mode user will have to choose correct answer from a list of answers, or simply to answer with Yes/No to the question.
https://github.com/profjordanov/famousquotequiz

api-rest dotnercore entity-framework-core jquery microsoft-sql-server

Last synced: 3 days ago
JSON representation

Famous quote quiz game where system will ask questions and user should try to pick a correct answer. Depending on selected mode user will have to choose correct answer from a list of answers, or simply to answer with Yes/No to the question.

Awesome Lists containing this project

README

        

# FamousQuoteQuiz
Quiz game system asks questions and user should try to pick a correct answer.
Depending on selected mode user will have to choose correct answer from a list of
answers, or simply to answer with Yes/No to the question.

![alt text](https://raw.githubusercontent.com/profjordanov/FamousQuoteQuiz/master/resources/settings-screen.PNG)

## Getting Started
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

### Prerequisites
1. You'll need version `3.1.0` of the [`.NET Core SDK`](https://dotnet.microsoft.com/download).

2. If not, you'll need to have [SQLServer](https://www.microsoft.com/en-us/sql-server/sql-server-downloads) either installed locally or at least have some instance available to set up the connection strings.

### Running Using Visual Studio

1. Download it via `CLONE OR DOWNLOAD BUTTON`
2. Unzip the project
3. Open the `.sln` file using Visual Studio
4. Set up the connection strings inside `FamousQuoteQuiz.Api/appsettings.Development.json` (or leave the set)
5. Execute `Update-Database` inside the `Package Manager Console`
6. Run the FamousQuoteQuiz.Api
7. Go to src/client/jQuery.Client/index.html
8. Have FUN!!!

#### Using Docker

1. Execute `docker-compose up`

## Technology Stack:
- [x] C#
- [x] .NET Core Web API v3.1
- [x] EntityFramework Core with SQL Server and ASP.NET Identity
- [x] jQuery v3.1
- [x] jQuery Fancybox
- [x] Bootstrap v3.3
![alt text](https://raw.githubusercontent.com/profjordanov/FamousQuoteQuiz/master/resources/database-diagram.PNG)

### Test Suite
- [x] SQL Database Integration Testing
- [x] Arrange Act Assert Pattern
- [x] xUnit
- [x] Autofixture
- [x] Moq
- [x] Shouldly

## Features:

### Web API
- [x] AutoMapper
- [x] File logging with Serilog
- [x] JWT authentication/authorization
- [x] Stylecop
- [x] Neat folder structure
```
├───src
| |___clients
| | ├───jQuery.Client
| | ├───cordova.Client
│ ├───configuration
│ └───server
│ ├───FamousQuoteQuiz.Api
│ ├───FamousQuoteQuiz.Business
│ ├───FamousQuoteQuiz.Core
│ ├───FamousQuoteQuiz.Data
│ └───FamousQuoteQuiz.Data.EntityFramework
└───tests
└───FamousQuoteQuiz.Business.Tests

```

- [x] Swagger UI + Fully Documented Controllers

```csharp
///
/// Gets BinaryChoiceQuestion whose ID is bigger the one received.
///
///
/// ID of BinaryChoiceQuestion which has to be surpassed.
///
///
/// If such question exists.
/// No existing questions or no more than received.
[HttpGet]
[Route("binary-choice-question")]
[ProducesResponseType(typeof(BinaryChoiceQuestionViewModel), (int)HttpStatusCode.OK)]
[ProducesResponseType(typeof(Error), (int)HttpStatusCode.BadRequest)]
public async Task GetBinaryChoiceQuestion([FromQuery] long initialId) =>
(await _quizQuestionService.GetBinaryChoiceQuestionAsync(initialId))
.Match(Ok, Error);
```
- [x] Global Model Errors Handler

- [x] Global Environment-Dependent Exception Handler

- [x] Neatly organized solution structure

- [x] Thin Controllers

- [x] Robust service layer using the [Either](http://optional-github.com) monad.

### jQuery Client
- [x] Mobile-First Responsive Design
- [x] Works correctly in the latest HTML5-compatible browsers: Chrome, Firefox, Edge, Opera, Safari
- [x] Followed the best practices for high-quality HTML and CSS: good formatting, good code structure, consistent naming, semantic HTML, correct usage of classes, etc.