Kamyab7 / optime

Optime is a repository created for a technical interview assignment.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Optime

Optime is a repository created for a technical interview assignment. It implements the Clean Architecture, Command Query Responsibility Segregation (CQRS), Domain-Driven Design (DDD), and Vertical Slice patterns.

For more details about Clean Architecture, CQRS, DDD, and Vertical Slice.

⚠️ Note: Since this project is an interview assignment, I've intentionally avoided some complexities. For example, authentication is implemented using API keys, and there is no hashing mechanism. The admin API key is adminkey.

⚠️ Note: While I intended to write tests for this project, due to time constraints, testing has not been implemented yet.

Project Initialization

When the project started, the ApplicationDbContextInitializer class was created to be responsible for creating the database and seeding some mock driver data. Additionally, it registers some cronjobs for mocking the mechanisms of the whole system. These jobs can be seen and managed in the Hangfire URL: /hangfire.

Twenty missions will be seeded every twenty seconds.

The AutoAssignerService is responsible for automatically assigning missions to drivers every 5 seconds.

The AddMockDriverArrivedCronJob is responsible for mocking driver arrivals.

Libraries Used

  • MediatR: A simple mediator implementation in .NET
  • Bogus: A simple and sane fake data generator for .NET
  • FluentValidation: A popular .NET library for building strongly-typed validation rules
  • Hangfire: An easy way to perform background processing in .NET and .NET Core applications
  • AutoMapper: A convention-based object-to-object mapper
  • NetTopologySuite: A .NET library for spatial data types and operations

About

Optime is a repository created for a technical interview assignment.


Languages

Language:C# 97.9%Language:Dockerfile 2.1%