Skip to content

techpearls/TrainScheduleManagementSystem

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TrainScheduleManagementSystem lets you easily create custom train schedule for a given station via friendly APIs.

Contents

Design

The project is organized into Api, Services and Tests.

  • The trains API allows to create and manage train schedules.
  • The services layer contains the core business logic and interacts with the database.
  • The tests consists of unit tests for API, services and the database.

Installation

  1. Install Visual Studio
  2. Clone git repo locally using $ git clone https://github.com/techpearls/TrainScheduleManagementSystem.git
  3. Open the solution in Visual Studio
  4. Set Trains.Api as the Startup Project by right clicking on the Trains.Api and selecting Set As Startup Project
  5. Build the solution by choosing Build -> Rebuild All (or Build All) from the menu bar
  6. Run using the Run -> Start Without Debugging from the menu bar
  7. Use a tool like Curl or Postman to send requests to the API at endpoint:http://localhost:5000/api/v1/

Assumptions

  1. All times in the APIs are in UTC timezone.
  2. Since POST requests are non-idempotent, if one of the values to create train schedule is invalid ([0-2359]) the entire request is rejected.

Usage

  1. Creating a new schedule

Screen Shot 2022-02-18 at 8 55 51 PM

  1. Getting a train schedule

Screen Shot 2022-02-18 at 9 49 35 PM

  1. Getting all schedules

Screen Shot 2022-02-18 at 10 01 31 PM

  1. Get next time when 2 or more trains are at the station

Screen Shot 2022-02-18 at 10 16 02 PM

Future Considerations

  • The project is extensible to hold specific station data. It can also be extended to add many-to-many train schedule and station data.
  • We can also add local time handling capabilities.
  • We can also add PUT, PATCH and DELETE endpoints to manage train schedules.
  • We can additionally add authentication and authorization capabilities to the APIs.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages