Skip to content

Yacht Rental is the react client of a full stack yacht reservation web application built on the rails API.The main function of the app is to allow users to book reservations for renting a yacht.

License

Notifications You must be signed in to change notification settings

K0ppai/yacht-rental-backend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

69 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Yacht Rental

πŸ“— Table of Contents

πŸ“– Yacht Rental

Yacht Rental is the react client of a full stack yacht reservation web application built on the rails API.The main function of the app is to allow users to book reservations for renting a yacht.

=> Here is the Yacht Rental frontend

πŸ›  Built With

Tech Stack

Server
Database

Key Features

  • The user can signup and login to the website to make reservation.
  • The user can see links to: Yachts, Reserve, My Reservations, Add Yacht and Delete Yacht
  • The user can see a list of yachts
  • The user can select the item and see details of the item
  • The user clicks the "Add yacht" link in the navigation panel they can see a form for adding a new yacht.
  • When the user clicks the "Delete yacht" link in the navigation panel they can see a list of all items with title and "Delete" button.
  • When the user clicks the "My reservations" link in the navigation panel they can see a list of their reservations (with information about item name, date and city).

(back to top)

πŸš€ Live Demo

Kanban Board

ERD Diagram

logo

(back to top)

Kanban Board

A Team of 3 Members worked on this project - See list of authors

(back to top)

πŸ’» Getting Started

To get a local copy up and running, follow these steps.

Prerequisites

In order to run this project you need:

  • React
  • Redux
  • Rails
  • Tailwind CSS and HTML
  • Code editor (VSCode)

Setup

Clone this repository to your desired folder:

  git clone https://github.com/K0ppai/yacht-rental-backend.git

Install

Install this project run these commands in order:

  cd my-project
  bundle install
  rails db:create
  rails db:migrate
  rails db:seed

Usage

To run the project, execute the following command:

  rails server

To run tests for controllers(request) and for API Documentation, run the following command:

Install the gem - Add the gem 'rswag' and gem 'rswag-ui' in your gem file and run bundle install

Run

  rails generate rswag:install

If you're trying to run the app on local, kindly set up the following,

  • You need to delete config/credentials.yml.enc first.
  • Generate a secret by typing this cmd in the terminal:
 bundle exec rake secret
 EDITOR='code --wait' rails credentials:edit 
  • and once the encrypted .yml is opened
  • Copy this devise_jwt_secret_key: (copy and paste the generated secret here)
  • After copying the secret key in the encrypted .yml file, close it to save. For further information, kindly visit this link.

Update CORS

  • config/initializers/cors.rb
Rails.application.config.middleware.insert_before 0, Rack::Cors do
  allow do
    origins 'https://localhost:5173'
    resource '*',
             headers: :any,
             methods: %i[get post put patch delete options head],
             expose: [:Authorization]
  end

  allow do
    origins '*' # Your frontend app deploy link
    resource '*',
             headers: :any,
             methods: %i[get post put patch delete options head],
             expose: [:Authorization]
  end
end
  • If you want to run in local dev kindly update origins to your frontend app url.

Deployment

You can deploy this project using your own deployment solution

(back to top)

πŸ‘₯ Authors

πŸ‘€ Htet Wai Yan

πŸ‘€ Paing Soe Thu

πŸ‘€ Than Myo Htet

(back to top)

πŸ”­ Future Features

  • Add an option to buy new yacht
  • Implement Edit button in the Delete yacht section
  • Redirect the email confirmation link to login page

(back to top)

🀝 Contributing

Contributions, issues, and feature requests are welcome!

Feel free to check the issues page.

(back to top)

⭐️ Show your support

If you like this project consider adding a ⭐️

(back to top)

πŸ™ Acknowledgments

Original design idea by Murat Korkmaz on Behance.

We would like to thank Microverse.

(back to top)

πŸ“ License

This project is MIT licensed.

(back to top)

About

Yacht Rental is the react client of a full stack yacht reservation web application built on the rails API.The main function of the app is to allow users to book reservations for renting a yacht.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages