You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If something went wrong - connect to me via HR or commit message, open issue - I open for feedback
P.S. I really wanted to implement docker compose however I had no time for it so it stayed empty as generated :(
!!!! To run integration tests - Docker Desktop must be installed at your machine
!!!! To run solution - PostgreSQL db server must be installed at your machine.
!!!! Also you need provide connection string in appsetting.Development.json or appsetting.json with name "DefaultConnection" or pass it via environment variables like "CONNECTIONSTRINGS__DEFAULTCONNECTION":"ConnectionString"
Setup
Architecture - Onion Architecture
Storage - EF Core (Code First) via PostgreSQL
Application - CQRS with MediatoR
Real-time communication - SignalR hubs
Implemented:
Cross-cuttings:
Structured logging
Validation pipelines
Errors and exceptions handlers/filters
Main functionallity
Quering users/chats with dynamic ordering and pagination, search by name has been implemented as well.
User entity can be ordered with providing PropertyName == "username" or "fullname" or "birthdate"
Chat entity can be ordered with providing PropertyName == "name" or "ownerName"
Creating chat with initial system message
Deleting chat with validating access rights
Updating chat with validating access rights and passing ownership if necessary
Join/Left chat with adding to chat messages(not confuse with connect to chat e.g. when user connect via WS to hub and open chat window)
Creating user/Updating user
Deleting user with passing ownership from owned chats to another connected user from chat. If such doesn't exists chat is removed
Connecting to chat with receiving previous chat messages
Disconnecting from chat
Sending messages
Storage seeding with Bogus fakers
A lot of other actions to handle edge-cases related to tasks and domain area
Mocks
Auth mock with taking user id from custom header and creating claims identity based on this value
Chat connections cache(will be better to replace with Reddis distributed cache)
Testing
Integration testing using docker containers for database per every test class and seeding.
Unit testing using InMemory DbContext and Moq Mocks.
About
Backend part of the realtime chat application with focus on a correct usage of the architecture and the infrastructure (job challenge)