Clover is a full-stack local AI compliance assistant studio with:
- A FastAPI backend for auth, chat/session APIs, and model orchestration
- A Vite + React frontend for chat, profile/settings, and model controls
- Supabase-backed user auth/storage integration in the backend
- Base SLM fine-tuned using QLoRA + Unsloth on Google Colab T4 GPU within VS Code
- Fine-tuning artifacts and notebooks under
fine_tuning/
backend/FastAPI serverfrontend/React app (Vite)fine_tuning/QLoRA + Unsloth training notebooks and dataset assetsrequirements.txtroot Python dependency list (same as backend requirements)
- Python
3.11+ - Node.js
18+and npm - Ollama installed and available in PATH (
ollamacommand)
git clone https://github.com/MrunalTalikoti/Clover.git
cd CloverFrom the project root:
python -m venv venvActivate virtual environment:
- Windows PowerShell
.\venv\Scripts\Activate.ps1- macOS/Linux
source venv/bin/activateInstall backend dependencies:
pip install -r backend/requirements.txtCreate backend/.env with at least:
SUPABASE_URL=your_supabase_project_url
SUPABASE_SERVICE_KEY=your_supabase_service_role_key
COLAB_URL=Notes:
bcrypt==4.0.1is intentionally pinned for passlib compatibility.- Backend default URL runs on
http://localhost:8000.
cd frontend
npm installStart frontend dev server:
npm run devFrontend default URL: http://localhost:5173
In a separate terminal:
ollama servePull required models (one-time):
ollama pull llama3:8b
ollama pull mistral:latestIn another terminal from backend/ (with venv active):
uvicorn main:app --reload --port 8000- Open
http://localhost:5173 - Sign up or sign in
- Start a session and chat with your selected model
Backend requires:
SUPABASE_URLSUPABASE_SERVICE_KEY
Backend also supports these optional values:
OLLAMA_URL(defaulthttp://127.0.0.1:11434)COLAB_URL(default empty)UPLOAD_DIR(defaultuploads)JWT_SECRET(default local dev secret; change for production)ANTHROPIC_API_KEY(optional)
-
Ollama offline in UI:
- Verify
ollama serveis running. - Confirm backend can reach
OLLAMA_URL.
- Verify
-
Auth/login bcrypt warning/error:
- Ensure dependencies are installed from
backend/requirements.txt. - Keep
bcrypt==4.0.1installed in the active backend environment.
- Ensure dependencies are installed from
-
Frontend cannot call backend:
- Ensure backend is on
http://localhost:8000. - Ensure frontend is on
http://localhost:5173.
- Ensure backend is on
- Replace default
JWT_SECRETwith a strong secret. - Restrict CORS origins in backend.
- Use HTTPS and a proper process manager/reverse proxy.
- Keep
SUPABASE_SERVICE_KEYserver-side only and never expose it to the frontend.