TreeBnb is a fictional treehouse rental platform inspired by Airbnb. It is built using JavaScript, Node.js, Express, React/Redux, and vanilla CSS and features a fully functional Express REST API and React front end.
To install and run the TreeBnb app locally, follow these steps:
Clone the repository: git clone https://github.com/andrew-bierman/Airbnb-Clone-Deployment
Navigate to the project directory in the terminal
Install dependencies: npm install
in both backend and frontend folders
Run the app:
- Backend folder:
Create a .env
file to define environment variables
PORT=8000
DB_FILE=db/dev.db
JWT_SECRET=«generate_strong_secret_here»
JWT_EXPIRES_IN=604800
SCHEMA=«custom_schema_name_here»
Run openssl rand -base64 10
to generate a random JWT secret.
openssl rand -base64 10
Run the migrations and seed files to create models and populate demo data into the database. Then npm start
to run the API.
npx dotenv sequelize-cli db:migrate
npx dotenv sequelize-cli db:seed:all
npm start
- Frontend folder:
npm start
The app will be available at http://localhost:3000/.
To use the TreeBnb app, simply visit the URL listed above in your web browser. From there, you can browse the available treehouses and make reservations. Additionally you can visit the public deployment [here].(https://bierman-bnb.onrender.com/)
The TreeBnb API is built using Express and has numerous endpoints relating to Users, Spots, Reviews, Images, and Bookings.
See the full API documentation and Database Schema in the Wiki section of this repo.
We welcome contributions to the TreeBnb project! If you have an idea for a new feature or spot a bug that needs fixing, please follow these steps to submit a pull request:
- Fork the repository.
- Create a new branch for your changes.
- Make your changes and commit them to your branch.
- Push your branch to your fork on GitHub.
- Submit a pull request to the main repository.
Please note that all contributions must adhere to the project's code of conduct.
TreeBnb is licensed under the MIT License. This means that you are free to use, modify, and distribute the code as you see fit, as long as you include the original copyright and license notice.