Freshlast is a project developed by Team Tarnished. Freshlast is developed as a partial requirement for the course CMSC 129: Software Engineering II.
Create a virtual environment using uv. This requires uv to be installed in your system
by running pip install uv
uv venv .venvAlternatively, you can create a virtual environment using venv
python -m venv .venvThen activate the virtual environment. Make sure that you are in
backend directory by running cd backend from the project root directory.
Mac/Linux
source .venv/bin/activateWindows (using Powershell)
.venv\Scripts\Activate.ps1Install dependencies from requirements.txt
Using uv
uv pip install -r requirements.txtUsing venv
pip install -r requirements.txtCreate an app/.env file from app/.env.example. Further details are explained in app/.env.example
DATABASE_URL=https://xxxx.supabase.co
SECRET_KEY=your-secret-keyFinally, run the FastAPI app
uvicorn main:app --reloadAfter developing, make sure to deactivate your virtual environment
deactivateNOTE: Ensure that you have already configured the FastAPI project before proceeding. Refer to Dev Setup for details on configuring the FastAPI project.
Install Supabase CLI using npm
npm i # supabase CLI already listed in root package.jsonEnsure that your virtual environment is activated
Mac/Linux
# cd backend if not yet already
source .venv/bin/activateWindows (using Powershell)
# cd backend if not yet already
.venv\Scripts\Activate.ps1Run the local Supabase instance
npx supabase startCreate a tests/.env.test file from tests/.env.test.example. Further details are explained in tests/.env.test.example
DATABASE_URL=http://127.0.0.1:54321
SECRET_KEY=your-secret-keyFinally, execute all testcases
pytest