Skip to content

bruceJin0801/WatCarPool

Repository files navigation

WatCarPool

This is the group project for CS 348 Fall 2022 at University of Waterloo

Overview

WatCarPool is a full stack web application that provides an affordable carpooling platform in the Ontario region. In WatCarPool, users are grouped to be drivers and passengers. Drivers can post their upcoming carpool trips on the home page, and passengers can choose and join different carpool trips.

Contributor

Technologies Used

  • Database: MySQL
  • Backend: Python, Flask
  • Frontend: JavaScript, React

Project Setup

Install MySQL

Install MySQL on Mac: https://dev.mysql.com/downloads/mysql/

(Optional) If you want to visualize our database, please download MySQL Workbench: https://dev.mysql.com/downloads/workbench/

Clone and Configure

Clone the repository to your local machine:

git clone https://github.com/Fakevin0613/WatCarPool.git

Navigate to the root directory:

cd WatCarPool

Change the fields in mysqlConfig.json to your own MySQL configuration:

{
    "host": "localhost",
    "user": "root",
    "password": "12345678"
}

Install the required dependency:

bash setup.sh

Setup Database

Create the database including tables and triggers, and import sample/production data into the database:

Create the database and import sample data (default):

bash createdb.sh 

Create the database and import sample data:

bash createdb.sh sample

Create the database and import production data:

bash createdb.sh production

Update Database

Drop the current tables and triggers and re-import sample/production data into the database:

Update the database with sample data (default):

bash updatedb.sh 

Update the database with sample data:

bash updatedb.sh sample

Update the database with production data:

bash updatedb.sh production

Test Database with Sample Data

Navigate to the directory that stores the list of test-sample.sql and test-sample.out files:

cd server/database/test-sample

The SQL commands to test sample data for each feature R* are provided in the corresponding R*-test-sample.sql and the results are stored in R*-test-sample.out.

Run all SQL commands in once:

mysql -vvv -u root -p WCP_DB  < R*-test-sample.sql

Enter the password for MySQL and the query result will be displayed.

Reset the database when finish testing on each feature before testing other features:

bash reset.sh

Drop Database

Clean up the database:

bash cleanupdb.sh

Running the Application

Start the backend server:

bash runServer.sh 

Start the frontend server:

bash runClient.sh 

Backend server: http://127.0.0.1:5000

Frontend server: http://localhost:3000

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published