Skip to content

Resort Booking: Your gateway to dream resorts. Discover, book, and manage your ideal getaway effortlessly with our user-friendly web app. Access comprehensive resort details, amenities, and real-time availability to plan memorable journeys hassle-free

License

Notifications You must be signed in to change notification settings

raihan2bd/resort-booking-back-end

Β 
Β 

Repository files navigation

Resort Booking

πŸ“— Table of Contents

Rails Blog

Resort Booking is an innovative web application designed to empower travelers in finding and booking their dream resorts effortlessly. With an extensive collection of resorts and comprehensive details, users can explore diverse destinations, hand-picking their ideal getaway. The platform provides valuable insights into resort amenities, room types, and real-time availability, ensuring informed decision-making. Seamlessly managing bookings, users experience a hassle-free reservation process, making their vacation planning a breeze. With a user-friendly interface and an array of options, Resort Booking promises to redefine the way travelers embark on their next memorable journey. This is the back-end part, if you want to see the front-end part, you can click here

πŸ›  Built With

Tech Stack

Front End
  • React
  • Redux
  • JAVASCRIPT
  • Html
  • CSS
Back End
  • Ruby
  • Rails
  • PostgreSQL

πŸš€ Live Demo

Visit our webpage here.

(back to top)

Key Features

  • Create/remove a booking for a resort
  • See a list of all possible resorts
  • Admins are able to add resorts to the list

(back to top)

Kanban Board

Hi there, we are a five-member team, @Thinus01, @raihan2bd , @edubew , @MichealKith , @lawrahkonwea.

We are dividing the project between front-end and back-end We also created two kanban boards together for the projects Front-end: https://github.com/users/Thinus01/projects/11 Back-end: https://github.com/users/Thinus01/projects/10

Screenshot 2023-07-12 163157 Screenshot 2023-07-12 163226

(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:

  • First of all to see this project's graphical interface make sure you run the front-end part
  • Before running this repo on your local machine make sure you have installed Ruby, Rails, and PostgreSQL

Setup

  • Clone this repository to your desired folder:
  cd your-folder
  https://github.com/Thinus01/Resort_Booking_Back-end
  • Before running the project please make sure you create a .env file to your project root directory and add DATABASE_USER_NAME, DATABASE_PASSWORD, and JWT_SECRET_KEY environment variables to the file. For example:
DATABASE_USER_NAME=place_your_postgres_database_username
DATABASE_PASSWORD=place_your_database_password

JWT_SECRET_KEY=place_your_jwt_secret_key

back-end-env

  • After that make sure you change cors. To change the cors open the project with your favorite editor then click config folder then click initializers folder and open cors.rb file and after that change the origins to your front-end URL to solve the cross-origins request error. For example:
origins 'http://localhost:3000'

cors

  • To generate the JWT_SECRET_KEY as a secure and random hash using Ruby's SecureRandom module. You can do this in a Ruby script or in your Rails console:
require 'securerandom'

jwt_secret_key = SecureRandom.hex(64)
puts jwt_secret_key

This will generate a random string of 128 characters (64 bytes in hexadecimal representation) and print it to the console. Then you can copy it from the console and paste it into your .env file as a value of JWT_SECRET_KEY.

Install

Install this project with:

  • Install the required gems with:
bundle install
npm install

Database

  • Create the databases and run migrations with:
rails db:create
rails db:migrate
rails db:seed

Usage

  • To run the development server, execute the following command:
rails server

Note: For more information about this back-end API end-points run the server and visit project_base_url/api-docs For example: http://localhost:4000/api-docs.

Testing

  • To run tests, run the following command:
rspec spec 

Deployment

You can visit the app using Render

(back to top)

πŸ‘₯ Authors

πŸ‘€ Abu Raihan

πŸ‘€ Amaka Konwea:

πŸ‘€ Thinus Van De Venter

πŸ‘€ Winnie Edube

πŸ‘€ Michale Kithinji

(back to top)

πŸ”­ Future Features

  • Improve user experience

(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, please leave a ⭐️

(back to top)

πŸ™ Acknowledgments

We want to give a big thanks to Microverse for giving us the chance to achieve this milestone We also want to thank Murat Korkmaz for his design, that our project is based on.

(back to top)

πŸ“ License

This project is MIT licensed.

(back to top)

About

Resort Booking: Your gateway to dream resorts. Discover, book, and manage your ideal getaway effortlessly with our user-friendly web app. Access comprehensive resort details, amenities, and real-time availability to plan memorable journeys hassle-free

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Ruby 94.2%
  • Batchfile 3.8%
  • Other 2.0%