Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Clover

image image

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/

Project Structure

clover_workflow
  • backend/ FastAPI server
  • frontend/ React app (Vite)
  • fine_tuning/ QLoRA + Unsloth training notebooks and dataset assets
  • requirements.txt root Python dependency list (same as backend requirements)

Prerequisites

  • Python 3.11+
  • Node.js 18+ and npm
  • Ollama installed and available in PATH (ollama command)

1) Clone Repository

git clone https://github.com/MrunalTalikoti/Clover.git
cd Clover

2) Backend Setup

From the project root:

python -m venv venv

Activate virtual environment:

  • Windows PowerShell
.\venv\Scripts\Activate.ps1
  • macOS/Linux
source venv/bin/activate

Install backend dependencies:

pip install -r backend/requirements.txt

Create 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.1 is intentionally pinned for passlib compatibility.
  • Backend default URL runs on http://localhost:8000.

3) Frontend Setup

cd frontend
npm install

Start frontend dev server:

npm run dev

Frontend default URL: http://localhost:5173

4) Start Ollama

In a separate terminal:

ollama serve

Pull required models (one-time):

ollama pull llama3:8b
ollama pull mistral:latest

5) Run Backend

In another terminal from backend/ (with venv active):

uvicorn main:app --reload --port 8000

6) Open the App

  • Open http://localhost:5173
  • Sign up or sign in
  • Start a session and chat with your selected model

Environment Variables

Backend requires:

  • SUPABASE_URL
  • SUPABASE_SERVICE_KEY

Backend also supports these optional values:

  • OLLAMA_URL (default http://127.0.0.1:11434)
  • COLAB_URL (default empty)
  • UPLOAD_DIR (default uploads)
  • JWT_SECRET (default local dev secret; change for production)
  • ANTHROPIC_API_KEY (optional)

Common Troubleshooting

  • Ollama offline in UI:

    • Verify ollama serve is running.
    • Confirm backend can reach OLLAMA_URL.
  • Auth/login bcrypt warning/error:

    • Ensure dependencies are installed from backend/requirements.txt.
    • Keep bcrypt==4.0.1 installed in the active backend environment.
  • Frontend cannot call backend:

    • Ensure backend is on http://localhost:8000.
    • Ensure frontend is on http://localhost:5173.

Production Notes

  • Replace default JWT_SECRET with a strong secret.
  • Restrict CORS origins in backend.
  • Use HTTPS and a proper process manager/reverse proxy.
  • Keep SUPABASE_SERVICE_KEY server-side only and never expose it to the frontend.

About

A no-code browser-based tool that enables domain experts to fine-tune AI language models using their own knowledge with nothing more than a CSV file.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages