Skip to content

chrisb588/Tarnished

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

295 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Freshlast

Freshlast is a project developed by Team Tarnished. Freshlast is developed as a partial requirement for the course CMSC 129: Software Engineering II.

Dev Setup

Backend

Create a virtual environment using uv. This requires uv to be installed in your system by running pip install uv

uv venv .venv

Alternatively, you can create a virtual environment using venv

python -m venv .venv

Then 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/activate

Windows (using Powershell)

.venv\Scripts\Activate.ps1

Install dependencies from requirements.txt

Using uv

uv pip install -r requirements.txt

Using venv

pip install -r requirements.txt

Create 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-key

Finally, run the FastAPI app

uvicorn main:app --reload

After developing, make sure to deactivate your virtual environment

deactivate

Test Setup

Backend

NOTE: 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.json

Ensure that your virtual environment is activated

Mac/Linux

# cd backend if not yet already
source .venv/bin/activate

Windows (using Powershell)

# cd backend if not yet already
.venv\Scripts\Activate.ps1

Run the local Supabase instance

npx supabase start

Create 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-key

Finally, execute all testcases

pytest