A full stack web application (Svelte + Flask) designed as a buy-and-sell portal, developed as a course project to showcase real-world applications of database management principles
-
Clone the repository:
git clone https://github.com/Naman-Dharmani/CS432-Databases-Assignment.git
-
Navigate to the project directory:
cd CS432-Databases-Assignment
-
Create a virtual environment and make sure to activate it:
python -m venv .venv source .venv/bin/activate # Linux .\.venv\Scripts\activate # Windows CMD .\.venv\Scripts\Activate.ps1 # Windows PowerShell
-
Install the server dependencies in virtual environment:
pip install -r server/requirements.txt # pip3 in Linux
-
Install Nodejs v18:
-
Now, open the terminal/MySQL workbench and create a mysql database:
CREATE DATABASE buy_sell;
-
Change the config.yaml file inside server directory:
mysql_host: "localhost" mysql_user: <mysql_username> mysql_password: <user_password> mysql_db: "buy_sell"
-
Install the client dependencies:
cd client npm install
-
Go to the project dir and start the server, and wait until it starts
cd .. python server/run.py
-
In a new terminal, start the client:
cd client npm run dev
-
Now, visit the url shown in the terminal.
NOTE: The frontend is not available for some of the routes. For this we have created a api_test.rest file inside server directory that covers all the methods used in the routes file. Therefore, to test it out install a VSCode extension named REST Client by Huachao Mao. Inorder to test it use the send request option that appears before each of the routes in the api_test.rest file itself.