A sample ASP.NET Core MVC application that is an online HTML web games site. It is made following CQRS and Clean Architecture design.
It uses:
- EntityFramework for ORM
- AutoMapper for mapping
- Xunit and FluentAssertions for testing
- FluentValidation for validations
- MediatR for CQRS
- ASP.NET Core Identity for users, roles etc.
- toastr.js for notifications
- screenfull for cross-browser fullscreen
It is currently running ASP.NET Core 8.0.
The web app supports both uploading Game
files to the web environment, and embedding games from other websites. The same goes for game thumbnails.
Each game can have multiple Genres
(many to many), that the games can be filtered by.
When playing the game, there is a Fullscreen button that works regardless of the game supporting the feature.
Users' ability to modify the website content depends on their role (admins and moderators can add, edit and delete games).
The repositories support caching results to optimize performance.
There are unit and integration tests written for critical functionality.
By default, the app ships with a sample game, several user roles and an admin account that are seeded to the database.
Default admin credentials:
- email: admin@admin.com
- password: Admin#21
Default roles:
- admin
- moderator
- user
- If you haven't already, install
dotnet-ef
CLI tool using the following command:
dotnet tool install --global dotnet-ef
-
Ensure your connection strings in appsettings.json point to a local SQL Server instance.
-
Update the database by using the following command in the main
WebGames
folder:
dotnet ef database update --project ".\WebGames.Infrastructure\" --startup-project ".\WebGames.MVC\"
- You should be able to run the app now.