This project consists of a backend developed in Python using Flask, PyMySQL, and Flask-CORS, and a frontend developed with HTML, CSS, and vanilla JavaScript.
To start using this project, follow the steps below:
- Open the
database.sqlfile located in thedatabasefolder. - Execute the SQL commands in your MySQL database management tool (e.g., phpMyAdmin) to create the necessary database structure.
- Once the database is created, execute the following command to create a user with email 'gg@gg.com' and password '12345':
INSERT INTO users (email, password) VALUES ('gg@gg.com', '12345');- Open the
backend/main.pyfile. - Modify the
DATABASE_NAMEandDATABASE_PASSWORDvariables with the appropriate values for your MySQL database connection. - Save the changes.
- Open a terminal or command prompt.
- Navigate to the root directory of the project.
- Run the following command to install the required Python packages:
pip install FLASK
pip install pymysql
pip install flask_cors- Open a terminal or command prompt.
- Navigate to the
backenddirectory. - Run the following command to start the backend server:
python main.py- Open the
frontend/app.htmlfile in your web browser.
Voilà! You should now be able to see the frontend of the project and interact with it.
- Make sure you have Python and MySQL installed on your system before starting the backend.
- For the frontend, no additional setup is required as it runs directly in the web browser.