The Car Website Project is a web application designed to facilitate the buying and selling of cars online. Users can register, browse listings, post listings, and interact with other users to complete transactions. This README provides instructions on how to set up and compile the project, as well as details on the division of work among team members.
- Python
- Flask
- Java Development Kit (JDK) version 8 or higher
- MySQL Database Server
- Maven (for Java dependency management)
- Clone the repository to your local machine:
https://github.com/jaredsoliven/cs157a-car-market.git
- Set up the MySQL database:
- Create a new database named
cars
. - Import the provided SQL schema file
CREATE.sql
to create the necessary tables.
- Populate Database:
- Import the project into your preferred Java IDE (e.g., IntelliJ IDEA, Eclipse).
- Configure MySQL Database:
- Create a MySQL database named
cars
. - Adjust the database connection details in the
Populate.java
file:- Set the
url
variable to your MySQL database URL. - Set the
mySQLuserName
andmySQLpassword
variables to your MySQL username and password.
- Set the
- Create a MySQL database named
- Compile and run the
Populate.java
file to populate the database. - Ensure that the necessary MySQL connector JAR file is included in your project's dependencies.
- Install Dependencies
Navigate to the project directory and install the required Python packages using pip:
pip install Flask jaydebeapi
To set up the Flask environment for the Car Website Project, follow these steps:
-
Create a virtual environment for your Flask project. Navigate to your project directory in the terminal and run the following command:
python -m venv venv
-
Activate the virtual environment. Depending on your operating system, the commands to activate the virtual environment may vary:
-
For Windows:
venv\Scripts\activate
-
For macOS/Linux:
source venv/bin/activate
-
-
Install Flask and other dependencies. While the virtual environment is activated, use pip to install Flask and any other required packages listed in your project's requirements.txt file:
pip install -r requirements.txt
-
Once the dependencies are installed, you can run the Flask application. Ensure that you are in the project directory and the virtual environment is activated, then execute the following command:
flask run
This command will start the Flask development server, and you should see output indicating that the server is running. By default, the Flask application will be accessible at http://localhost:5000 in your web browser.
-
You can now access the Car Website Project in your web browser and test its functionality.
The division of work among team members is as follows:
-
Frontend Development: Jared, Brian
-
Backend Development: Abel, Jugraj, Jared, Munkh-Erdene
-
Database Design, Normalization, DDL, Management: Munkh-Erdene
-
Database Population and Java Integration: Munkh-Erdene
-
Documentation: All team members