Skip to content

davidcm146/coach-route-system

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Phase 1 - Bus Booking

Rails version 7.2

Descriptions

  • Bus booking website help us to book ticket for a journey within 63 provinces in Vietnam
  • Provide tickets with reasonable price and services that meet our satisfication

Workflow

Workflow

Database Diagram

Diagram

Prerequisites

This project requires:

  • Ruby (see .ruby-version), preferably managed using rbenv or asdf
  • Node 20.9.0
  • Yarn 1.x (classic)
  • PostgreSQL must be installed and accepting connections

On Ubuntu

  sudo apt update
  sudo apt install -y rbenv git curl
  curl -fsSL https://deb.nodesource.com/setup_20.9 | sudo -E bash -
  sudo apt install -y nodejs
  sudo apt install -y postgresql postgresql-contrib
  sudo apt install -y redis-server

On macOS, these Homebrew packages are recommended:

  brew install rbenv
  brew install node 20.9.0
  brew install yarn
  brew install postgresql@16
  brew install redis

Getting started

Install - setup app

To setup a development environment (MacOS):

Clone the repo:

  git clone https://github.com/AlvinQuach1004/coach-route-system.git

Install Ruby:

This project currently uses Ruby 3.3.0, which is most easily managed through a version manager like asdf, rbenv

Install Nodejs:

This project user Node 20.9.0, which is most easily managed through a version manager like asdf, rvm

Install Ruby gems:

  • install bundle version 2.5.4 (or similar if you are using an older version on your development)

    gem install bundler
  • bundle

    bundle install

Install with npm.

  npm install

Personalise the app settings:

  • Copy config/database.yml.sample to config/database.yml and customise the values as needed.
  • Copy .env.sample to .env and customise the values as needed.

Create database:

  rails db:create

Migrate tables

  rails db:migrate

Run seed data:

  rails db:seed

Run server:

  • rails server:
  rails s
  • sidekiq
  bundle exec sidekiq
  • Vite
  vite dev

Development

FE references

Rspec

  • Run test by:

      bundle exec rspec
  • Check test coverage at coverage/index.html

ESLint

  • ESLint check:

      yarn lint
      npx eslint .
  • ESLint check & auto fix:

      yarn lint:fix
      npx eslint . --fix

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published