It is recommended to use a Python virtual environment to isolate project dependencies.
Windows (PowerShell)
python -m venv .venv
.\.venv\Scripts\Activate.ps1macOS / Linux
python3 -m venv .venv
source .venv/bin/activateEnsure you have Python 3.10+ installed.
Windows (PowerShell)
pip install -r requirements.txtmacOS / Linux
pip install -r requirements.txtThe chatbot relies on a locally hosted Ollama server for inference.
- Download and install Ollama from https://ollama.com/.
- Start the Ollama server.
Windows (PowerShell)
ollama servemacOS / Linux
ollama serve- Pull the required model.
Windows (PowerShell)
ollama pull llama3.2:latestmacOS / Linux
ollama pull llama3.2:latestEnsure your target HTML document is placed at:
data/raw/ipcc_reference.html
Run the ingestion pipeline from the backend/ directory to parse, chunk, embed, and index the document into ChromaDB.
Windows (PowerShell)
cd backend
python -m ingest.ingestmacOS / Linux
cd backend
python3 -m ingest.ingestNote: During the first ingestion, the embedding model (
all-MiniLM-L6-v2) will be downloaded automatically. This may take a few minutes.
There are two ways to run the project during development.
If you only need to run the application locally on your machine:
Windows (PowerShell)
cd backend
python app.pymacOS / Linux
cd backend
python3 app.pyThe backend API will be be available at:
http://localhost:5000
Serve the frontend/ directory using Python's built-in HTTP server.
Windows (PowerShell)
cd frontend
python -m http.server 3000macOS / Linux
cd frontend
python3 -m http.server 3000Open your browser and navigate to:
http://localhost:3000
Before using the application locally, create a file named tunnel-base.txt directly inside the frontend/ directory (alongside index.html) with the following contents:
https://localhost:5000
This file tells the frontend to communicate with the locally running backend instead of using a Cloudflare Tunnel.
Serve the frontend/ directory using Python's built-in HTTP server.
Windows (PowerShell)
cd frontend
python -m http.server 3000macOS / Linux
cd frontend
python3 -m http.server 3000Open your browser and navigate to:
http://localhost:3000
To share or test the application externally, the project includes a Cloudflare Quick Tunnel utility. This is the only supported method for external access during development.
-
Install the
cloudflaredCLI and ensure it is available in your systemPATH. -
Start both services locally:
- Backend on
localhost:5000 - Frontend on
localhost:3000
- Backend on
-
Run the tunnel injection script from the project root.
Windows (PowerShell)
python scripts/inject-tunnel.pymacOS / Linux
python3 scripts/inject-tunnel.py-
The script will automatically:
- Request temporary public URLs from Cloudflare for ports
3000and5000. - Patch
frontend/js/api.jswith the active backend tunnel URL. - Display both public URLs in the terminal.
- Request temporary public URLs from Cloudflare for ports
-
Open the generated frontend URL in your browser.
-
When finished, press Ctrl+C to gracefully terminate the tunnels. The script will automatically restore
frontend/js/api.jsto uselocalhost.