https://github.com/shahadat3669/rent-home-now-api
Rent Home Now API is RESTful API that facilitates the connection between property owners interested in renting out their properties and potential renters. The API allows for the creation of reservations on selected properties. It has been developed using the Ruby on Rails framework and uses a PostgreSQL database.
https://github.com/shahadat3669/rent-home-now-api
devise devise-token-auth rails-api rails7 restful-api rspec-rails rubocop-rails ruby-on-rails ruby-on-rails-api
Last synced: 21 days ago
JSON representation
Rent Home Now API is RESTful API that facilitates the connection between property owners interested in renting out their properties and potential renters. The API allows for the creation of reservations on selected properties. It has been developed using the Ruby on Rails framework and uses a PostgreSQL database.
- Host: GitHub
- URL: https://github.com/shahadat3669/rent-home-now-api
- Owner: shahadat3669
- License: mit
- Created: 2023-05-03T19:01:38.000Z (about 2 years ago)
- Default Branch: dev
- Last Pushed: 2023-05-29T15:34:56.000Z (almost 2 years ago)
- Last Synced: 2024-10-03T12:29:50.562Z (7 months ago)
- Topics: devise, devise-token-auth, rails-api, rails7, restful-api, rspec-rails, rubocop-rails, ruby-on-rails, ruby-on-rails-api
- Language: Ruby
- Homepage:
- Size: 163 KB
- Stars: 5
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
![]()
Rent Home Now API
# ๐ Table of Contents
- [๐ About the Project](#about-project)
- [๐ Frontend Repository](#frontend)
- [๐ Built With](#built-with)
- [Tech Stack](#tech-stack)
- [Key Features](#key-features)
- [๐ Live Demo](#live-demo)
- [๐งฎ Kanban Board](#kanban-bord)
- [๐ป Getting Started](#getting-started)
- [Setup](#setup)
- [Prerequisites](#prerequisites)
- [Install](#install)
- [Usage](#usage)
- [Run tests](#run-tests)
- [Deployment](#triangular_flag_on_post-deployment)
- [๐ฅ Authors](#authors)
- [๐ญ Future Features](#future-features)
- [๐ค Contributing](#contributing)
- [โญ๏ธ Show your support](#support)
- [๐ญ Acknowledgements](#acknowledgements)
- [โ FAQ](#faq)
- [๐ License](#license)Rent Home Now API is the final capstone project for the Full Stack Developer Program at Microverse.
Rent Home Now API is RESTful API that facilitates the connection between property owners interested in renting out their properties and potential renters. The API allows for the creation of reservations on selected properties. It has been developed using the Ruby on Rails framework and uses a PostgreSQL database.
The app was built with a Ruby on Rails backend and a React/Redux frontend, located on separate repositories.
To visit the frontend repository, please [click here](https://github.com/shahadat3669/rent-home-now.git).
Technology
- Ruby
- Rails
- PostgresSQL
Tools
- VS Code
- GIT
- GITHUB
Main functionalities which the app will have:
- **User registration:** Allow new users to register an account with the API by providing their personal information and creating a username and password.
- **Property listing:** Allow property owners to list their properties with the API by providing information such as property type, location, price, and availability.
- **Reservation creation:** Allow renters to create reservations for selected properties by providing the desired dates of the reservation and the number of occupants.
- **Reservation management:** Allow both property owners and renters to view, edit, and cancel existing reservations.
- **API documentation:** Provide comprehensive documentation for the API, including endpoints, parameters, responses, and error messages, to facilitate integration with external clients and applications.
Sorry, Currently no active link available.
- [Kanban Board link.](https://github.com/users/shahadat3669/projects/9)
- [Kanban Board initial state.](https://user-images.githubusercontent.com/55840999/236042261-3f31ae1b-e926-482f-b679-621648fe009a.png)
- Number of team members at start and finish: 3 Team members.
To get a local copy up and running follow these simple example steps.
### Prerequisites
you have to those tools in your local machine.
- [ ] Ruby
- [ ] Rails
- [ ] PostgresSQL
- [ ] GIT & GITHUB
- [ ] Any Code Editor (VS Code, Brackets, etc)
### Clone Repository
Clone the repository using the following bash command in an appropriate location.
```bash
git clone [email protected]:shahadat3669/rent-home-now-api.git
```
Go to the project directory.
```bash
cd rent-home-now-api
```
### Adding credentials
Rails stores secrets in `config/credentials.yml.enc`, which is encrypted and hence cannot be edited directly. Rails uses `config/master.key`. If you have the master key, to add or change credentials in your terminal, run this command (change the name of you editor if you need for example code for VS Code)
```bash
EDITOR="code" rails credentials:edit
```
This command will create the credentials file if it does not exist. Additionally, this command will create config/master.key if no master key is defined.
Here pass the --wait flag to make sure the encryption happens after the edits have been saved and the editor closed.
```bash
EDITOR="code --wait" rails credentials:edit
```
The scaffolded credentials.yml.enc looks like below:
```bash
postgres_password: Database User Password
smtp_user_name: SMTP User name
smtp_password: SMTP User password
```
To learn more [check Custom Credentials](https://edgeguides.rubyonrails.org/security.html#custom-credentials) documentation.
### Add necessary packages
For installing necessary packages, run the following bash command:
```bash
bundle install
```
### Setup Database locally
For setup database locally, run the following bash commands:
- Create a database in your local machine
```bash
rails db:create
```
- Run necessary migrations
```bash
rails db:migrate
```
- To insert seeds in the database, you can run:
```bash
rails db:seed
```
### Run the server in development mode
In the project directory, you can run the project by using following bash command:
```bash
./bin/dev
```
And now you can visit the site with the URL http://localhost:4000
### Run the test
Before running the test command, please make sure you have run `rails db:seed`.
For testing you can run following bash command:
```bash
bundle exec rspec --exclude-pattern "spec/requests/api/**/*"
```
### First Author:
**Shahadat Hossain**
[](https://github.com/shahadat3669) [](www.linkedin.com/in/shahadat-cseng) [](https://twitter.com/shahadat3669)
### Second Author:
**Sandro Hernandez**
[](https://sambeck87.github.io/setup_and_mobile_first) [](www.linkedin.com/in/sandro-israel-hernรกndez-zamora-899386a4) [](https://twitter.com/sambeck4488)
### Third Author:
**Sandro Hernandez**
[](https://gutemag.github.io/) [](www.linkedin.com/in/birhanugudisa-899386a4) [](https://twitter.com/birhanugudisa3)
- [ ] **Payment integration:** Allow renters to pay for their reservations through the API using a secure payment gateway.
- [ ] **Rating and review system:** Allow renters to rate and review properties they have rented through the API, and allow property owners to view and respond to these reviews.
Contributions, issues, and feature requests are welcome!
Feel free to check the [issues page](../../../issues/).
Give a โญ๏ธ if you like this project!
- My Family.
- [Microverse](microverse.org)
- **Can I use this project for personal use?**
- Yes, you can use it.
This project is [MIT](./LICENSE) licensed.