This guide provides instructions for setting up your development environment to contribute to Gofannon.
Before you begin, ensure you have the following installed:
npm install -g pnpm).We follow a fork-based workflow.
Fork the repository on GitHub to your own account.
Clone your fork locally:
git clone https://github.com/YOUR_USERNAME/gofannon.git cd gofannon
Add the upstream remote to keep your fork in sync:
git remote add upstream https://github.com/the-ai-alliance/gofannon.git
The project is a monorepo containing a Python backend and a React frontend. You will need to set up both.
Navigate to the user service directory:
cd webapp/packages/api/user-service
Create a virtual environment:
python3.10 -m venv venv
Activate the virtual environment:
source venv/bin/activate
.\venv\Scripts\Activate.ps1
Install dependencies:
pip install -r requirements.txt
Navigate to the gofannon/webapp directory:
cd ../../../../../ # Assuming you were in the api directory
Install dependencies using pnpm:
pnpm install
The recommended workflow is ./dev-tail.sh from the repo root, which runs the full dev stack — CouchDB, MinIO, the api in docker-compose, and the frontend on the host via vite — and tails the logs in one terminal:
./dev-tail.sh
The API will be at http://localhost:8000, the web UI at http://localhost:3000. Auth uses the dev_stub session-auth provider; pick alice, bob, or site_admin_1 from the picker on first visit. See docs/developers/local-auth.md for the auth fixture details.
If you want to run only the backend or only the frontend (e.g., to debug one in isolation):
Backend. Ensure your virtual environment is activated, then:
cd webapp/packages/api/user-service uvicorn main:app --reload
API at http://localhost:8000.
Frontend. Vite is host-based and doesn't need a container:
cd webapp pnpm --filter webui dev
Web UI at http://localhost:3000.
We strongly encourage running tests locally before opening a Pull Request.
From the webapp directory (or root), with your virtual environment from the previous step activated:
# Run backend unit tests pnpm test:unit:backend # Or directly from the user-service directory with active venv cd webapp/packages/api/user-service python -m pytest tests/unit -v
From the webapp directory:
# Run frontend unit tests pnpm test:unit:frontend
To run all unit tests:
cd webapp pnpm test:unit
To ensure a smooth collaboration process, please adhere to the following conventions:
XXX-short-desc (e.g., 123-fix-login-bug).feature/ or fix/ prefixes if no issue exists.git commit -s to certify the Developer Certificate of Origin (DCO).pnpm test:unit passes before submitting a PR.Thank you for contributing!