Skip to content
/ trvl Public

TRVL: Project 2 for [CS-1202] Advanced Programming 🌎✈️

Notifications You must be signed in to change notification settings

tanviroy/trvl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

81 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

TRVL - the Travel App 🌎✈️

Project 2 for [CS-1202] Advanced Programming. This is a MERN stack e-commerce (multi-purpose travel booking) platform. This project was built by Ruthu Rooparaghunath, Soham De, and Tanvi Roy.

Quick Start

Open up a CLI, and execute the following commands:

$ git clone https://github.com/tanviroy/trvl.git
$ cd approject2

$ cd backend 
$ npm install
$ npm start

$ cd frontend
$ npm install
$ npm start

This should get the server to run at localhost:5000 and frontend to run at localhost:3000

Project Details

This project was built using the MERN stack of technologies.

Major Technologies Used

techstack


Area Technology
Front-End React, React-Bootstrap, CSS3
Authentication Passport.js, bcrypt.js
Back-End Node.js, Express, Mongoose
Cookie/Database Management CookieParser, MongoDB, Mongoose

External APIs Used

We used the Amadeus API for getting real-time flight data and the Airhex API to render airline carrier logos.

Database

We used 2 databases - one for all users and another for the hotels.



Defined Schemas Schema fields
Users name: String,
googleId: String,
email: String,
password: String,
address: { type: String, default: "home" },
mobile: Number,
booked: [{ source: String, destination: String, dateto: String, datefrom: String, hotelId: String, hotelcost: Number, carcost: Number, flightcost: Number }],
bucketlist: [{ type: String }],
visited: [{ type: String }],
Hotels name: String,
location: String,
price: String,
desc: String,
imageurl: [{ type: String }],
amenities: [{ type: String }],
iata: [{ type: String }],
rating: [{ type: Number }],
reviews: [{ body: String, user: String, verified: String }],
bookers: [{ type: String }],
available: [{ date: Date, rooms: Number }],
bucketlisted: [{ type: String }],

Codebase Structure

.
β”œβ”€β”€ backend/
β”‚   β”œβ”€β”€ hotels.js
β”‚   β”œβ”€β”€ package.json
β”‚   β”œβ”€β”€ passportConfig.js
β”‚   β”œβ”€β”€ server.js
β”‚   └── user.js
β”œβ”€β”€ frontend/
β”‚   β”œβ”€β”€ public/
β”‚   β”‚   └── index.html
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ Pages/
β”‚   β”‚   β”œβ”€β”€ components/
β”‚   β”‚   β”œβ”€β”€ styles/
β”‚   β”‚   β”œβ”€β”€ App.css
β”‚   β”‚   β”œβ”€β”€ App.js
β”‚   β”‚   β”œβ”€β”€ index.css
β”‚   β”‚   └── index.js
β”‚   └── package.json
β”œβ”€β”€ airbnb-scraper github.py
β”œβ”€β”€ helper.txt
└── README.md

Code Documentation

For a more detailed documentation of our code and the complete list of project dependencies see helper.txt.

Design

The Figma wireframe for the project can be viewed here

Demo

Home Page

screenshot-2020-12-12-231124

Webp net-resizeimage

Explore - Search Flights, Hotels, and Cab Rentals

ezgif com-gif-maker (2)

Login Page - Register, Login with TRVL account or Google OAuth

ezgif com-gif-maker (1)

User Profile - Update Info, View User Insights

ezgif com-gif-maker (3)

Citations

Nearly all of the project code was written by us ourselves. We used documentation code for React Bootstrap, Express, MapBox, and Passportjs where needed.

  • We scraped the hotel data from Airbnb