Skip to content

AstmDesign/trips

 
 

Repository files navigation

Trips Task

Codacy Badge

Description Task

track ongoing bus trips and save full trip location history

Things you may want to cover:
  • Ruby version: 2.6.5
  • Rails Versiom: 6.0.2
  • Redis Version: 4.0.9
  • Database: Postgresql
  • Workers: Sidekiq

How To Run Project

$ git clone [email protected]:Abd-El-Rahman-HSN/trips.git
$ cd trips
$ bundle install

Create Data Base

$ rails db:create
$ rails db:migrate

Run Project

$ rails s
$ bundle exec sidekiq

I Have finished

  • CRUD for the trip
  • Update trip status: the status can be only changed in one direction. For example, the trip cannot be changed from completed to ongoing.
  • API full trip history
  • Write Unite Test whith Rspec
  • Serializing API
  • Optimization API Full Trip History Using sidekiq and Redis
  • Docker

Tabels

Digrame Data Base

Logic Task

  • Trip model for save trip bus that contain city, Enum of status (ongoing, completed) and driver_id and full_trip model for save full trip location history.
  • Default Status trip is ongoing and you can change status to completed but can't change completed status to ongoing.
  • I use Database Postgresql and use Redis in caching API full trip location history because if we used record in Postgresql only in this case we will have a big performance issue in reading
  • And Use Background jobs (Sidekiq) Because it's expected to be a large number of recordings.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Ruby 98.5%
  • Other 1.5%