Prerequisites
With Docker Compose v2 — runs Qdrant, Ollama and Postgres
Runs the API server and the web app
For the manual smoke checks below
Set up and run
-
Clone and check your Node versionbash
git clone https://github.com/Sekharendu/LocalCortex.git cd LocalCortex node --version # must be v26 or newer nvm use # if you use nvm -
Start the infrastructure containersbash
docker compose up -d docker compose psqdrant,ollamaandpostgresshould show(healthy)within about 30 seconds. Postgres is published on 5433, not 5432, so it won't collide with another local Postgres. -
Pull the two models
This downloads about 5 GB once. The models are kept in a Docker volume, so restarting the containers doesn't download them again.
bashdocker exec -it local-rag-ollama ollama pull nomic-embed-text # turns text into vectors docker exec -it local-rag-ollama ollama pull llama3 # writes the answers -
Install dependencies and apply migrationsbash
pnpm install pnpm db:migrate -
Start the API and the chat UIbash
pnpm dev # terminal 1: the API on :3000 pnpm dev:web # terminal 2: the UI on http://localhost:5173 -
Upload a file and ask it a question
Open http://localhost:5173 (the default port; if it's taken, the app uses the next free one and prints the address in terminal 2), open the Documents panel from the sidebar footer, drag in a
.txt,.md,.pdfor.docxfile, and ask a question about it once it finishes indexing.
Or exercise the API directly
curl -s localhost:3000/health | jq
curl -s -X POST localhost:3000/ingest \
-F "file=@data/sample.txt" \
-F "strategy=recursive" | jq
curl -s -X POST localhost:3000/query \
-H 'content-type: application/json' \
-d '{"question":"What does the sample say about a fox?"}' | jq
See the HTTP API reference for every route, and Using the app for a tour of the chat UI.