This repository contains the backend code for the CodeSnap project. The backend is built using Flask, a lightweight WSGI web application framework in Python.
- Python
- Flask
- Flask SQLAlchemy
- Flask Marshmallow
- Flask Restfull
- Flask CORS
- Step into the backend folder
cd backend- Create and activate a virtual environment (Python 3.12 via uv)
uv venv --python 3.12
source .venv/bin/activate- Install all dependencies
uv sync- Copy the environment file
cp .env.example .env- Configure your database in .env
SQLALCHEMY_DATABASE_URI="mysql+mysqlconnector://DB_USERNAME:DB_PASSWORD@127.0.0.1:3306/DB_DATABASE"- Run database migrations
flask db upgrade- Run the seeders
flask seeders all- Start the Flask development server
flask run