herringthecoder / judge-em-api Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
We should set up a project for testing (preferably with xUnit) and integrate it with some simple CI like Github Actions
Queries should stay inside repositories and stop returning IQueryable.
Users should be assigned to game not only by temporary membership, but also by a relationship, i.e. by intermediate "Players" table (id, nickname, user_id, game_id)
Response models should be independent of database entities, so there need to be some intermediate classes (maybe extensions?) mapping models to responses.
Automapper would be another solution, but I have to test whether it's necessary to bring reflection-heavy mechanism here.
We need to specify validation rules for incoming requests for creating and modifying entities.
Client should be able to authorize using JWT tokens provided by API
Logging into system should be possible in two ways:
On valid authorization, the API should response with token containing encoded user data and assigned custom roles.
Example role names:
Note: when issuing a token, it might be useful to provide standard Role Claim using built-in ClaimTypes
https://docs.microsoft.com/en-us/dotnet/api/system.security.claims.claimtypes.role?view=netcore-3.1
It will simplify role-based authorization on Controllers and Hubs.
All necessary services should be placed in Authorization project.
Database should contain following entities (with proposed field implementation):
Schema should be implemented by model-first approach in Storage project using Entity Framework Core.
We could use a seeder for local testing.
It needs to populate all database tables and attach relations between entities.
{
"room_name":"someName",
"items":[
{
"name":"someItemName",
"meanRating":"meanRatingValueForItem",
"ratings":[
{
"userName1":"ratingValue1"
},
{
"userName2":"ratingValue2"
}
]
}
]
}
Because overengineering is fun
We need to add endpoints for crud operations on:
Solution should be pushed to 'dev' branch containing at least 4 projects:
Note: Registering DI should be preferably self-contained (via ServiceCollectionExtension)
By the current service logic, the DateTime fields on Games table should be nullable.
.NET 5.0 Hub filters can simplify Hub methods code by checking gameId and returning early errors to clients if game was not found or is not active.
The categories should be directly assigned to a game by database relation.
Swagger should be implemented as api auto documentation
We should:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.