Giter Site home page Giter Site logo

melmasry / vehicles Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 1.0 1.6 MB

Vehicles project to handle customers with connected vehicles

Batchfile 0.03% C# 22.44% CSS 0.28% JavaScript 77.25%
connected-vehicles netcore microservices dependency-injection repository-pattern unitofwork-pattern single-responsibility-principle single-page-applications swagger-ui dapper

vehicles's Introduction

Welcome to Vehicles project to handle customers with connected vehicles Web APIs help user to setup environment of customers and each customer has number of connected vehicles. The apis are used to do all required CRUD operations for two main entities of the system Cutomer and Vehicle taking into consideration all refrential integrity and validation rules. Swagger UI are used to expose all these apis. System includes a web interface to display all customers with vehicles and filter by customer and vehicle's connection status. Ping is one of the apis that will be exposed by the vehicle once connected and call this method every one minute, this api stores last ping time on the database for this vehicle and on the database side there is a job running every minute to check if there is any vehicle system does not receive any ping pulse from time more than one minute then it will update vehicle's status into InActive until new pulse comes.

Technologies used in the project are as following:

  • .NET Core 1.1 WebAPI with Visual Studio 2017
  • ASP.NET Core 1.1 interface to monitor vehicles status
  • xUnit and Moq for unit testing and integration testing
  • SQL Server 2016 for saving customers/vehicles data into database
  • Dapper as very fast ORM
  • Swagger for view/expose Web APIs

Architectures and Patterns

  • Full architecture with responsibility separation concerns, SOLID and Clean Code
  • Microservices architecure
  • .NET Core Native DI
  • Repository Pattern
  • Unit of Work pattern

alt text

How To Run:

  • Install Database
    • Make sure that SQL Server Agent is up and running (system is adding a job to update vehicle status according to received ping requests)
    • Inside \Database folder, run CreateDatabase.bat
    • Check [Output.txt] file created beside batch file
  • Start WebAPI
    • Run project \Vehicles.Api
  • Start Simulator
    • Run console project \Simulator\Vehicles.Simulator and enter URL of WebAPI [http://localhost:9711/api]
  • Start Monitoring Web Site
  • (optional) Add/Update/Delete Customers/Vehicles using Swagger.UI

Future Work:

  • Use Azure or AWS for hosting
  • Replace SQL Server database with NoSQL option like MongoDB or Azure Table Storage
  • Replace SQL Job with Azure WebJob
  • Convert Ping service that is used to keep vehicles alive into a serverless function since it will be heavily called by large amount of vehicles
  • Use CI
  • Handle authentication and authorization on the system
  • Apply token based technique in communication between service and vehicle using JWT
  • Create better user interface for updating data, monitoring status and displaying reports

vehicles's People

Contributors

melmasry avatar

Watchers

 avatar

Forkers

bamarfo1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.