/aircnc

Primary LanguageJavaScript

Welcome to Aircnc!

Aircnc is a web application inspired by Airbnb that offers short-term rentals of various property types.

Please see below links to Project Wiki

This project is built with:

  • Express
  • Sequelize
  • PostgreSQL
  • React
  • Redux

Features Directions

Splash Page:

Authenticated and unauthenticated users can view listings on the splash page of Aircnc. You will be able to test the features without sign up by clicking on the "Log In" button, then Sign in with Demo User image

Log In:

You can log in using your credentials or as a demo user. image

Sign Up:

You can also create your own account by clicking on the "Sign Up" button and filling out the form. image

Create a listing

As a signed in user, you can create a new spot/listing by clicking the "Create a new listing" button and filling out the form. image

View your listings

As a signed in user, you can view your listings by clicking on the profile button on the top right. This opens a dropdown menu that has an option to click Your Listings. image image

Edit a listing

As a signed in user, you can edit your listing by clicking the "Edit Listing" button and filling out the form. image image

Delete a listing

As a signed in user, you can edit your listing by clicking the "Delete Listing" button. image

View a Spot/Listing's details and reviews

As a guest or logged in user, click on a spot/listing to view the spot/listing's details as well as available reviews image image

Write a Review

As a signed in user, you can write a review. The owner of the spot/location will not be able to write a review for their own spot/listing. image

Delete a Review

As a signed in user, you can delete a review that you wrote by clicking "Delete Review". Users cannot delete reviews belonging to another person. image

View and Delete your Bookings

As a signed in user, you can click on the drop down on the left hand side to navigate to your bookings as well as delete upcoming bookings. image image

Create a Booking

AS a signed in user, you can navigate to a spot and book the spot by picking from available dates on the calendar. image

Local Installation

To run this application locally, you will need Node.js and NPM. This root folder contains a backend and frontend directory.

Step 1: Download

Clone the project repository in your terminal

https://github.com/coucode/aircnc.git

Step 2: Backend Setup

Server Installation

Inside of the /backend directory, run the following command in the terminal to set up the necessary Node.js dependencies for running the backend server and database.

npm install

Database Creation

Create a .env file in the /backend directory based on the .env.example

PORT=
DB_FILE=
JWT_SECRET=
JWT_EXPIRES_IN=

Migrate and seed the database using the following commands. The seeder file is necessary in order to log in as a demo user.

npx dotenv sequelize db:create
npx dotenv sequelize db:migrate
npx dotenv sequelize db:seed:all

Run the server by executing the following command in the /backend directory.

npm start

Step 3: Frontend Setup

Navigate to the /frontend directory, run the following command to set up the necessary Node.js dependencies and then start the server

npm install
npm start