Skip to content

Latest commit

 

History

History
67 lines (51 loc) · 1.64 KB

File metadata and controls

67 lines (51 loc) · 1.64 KB

CodeSnap Backend

This repository contains the backend code for the CodeSnap project. The backend is built using Flask, a lightweight WSGI web application framework in Python.

Requirements

  • Python
  • Flask
  • Flask SQLAlchemy
  • Flask Marshmallow
  • Flask Restfull
  • Flask CORS

Technologies

Python Flask Uv MySQL PyCharm PyCharm

🚀 Backend Setup Guide (Using uv)

🧩 Configuration Steps

  1. Step into the backend folder
  cd backend
  1. Create and activate a virtual environment (Python 3.12 via uv)
  uv venv --python 3.12
  source .venv/bin/activate
  1. Install all dependencies
  uv sync
  1. Copy the environment file
  cp .env.example .env
  1. Configure your database in .env
SQLALCHEMY_DATABASE_URI="mysql+mysqlconnector://DB_USERNAME:DB_PASSWORD@127.0.0.1:3306/DB_DATABASE"
  1. Run database migrations
  flask db upgrade
  1. Run the seeders
  flask seeders all
  1. Start the Flask development server
  flask run