- Docker Desktop on Apple Silicon
- Node 22+
- Python 3.12+
pnpmuv
- CPUs:
2 - Memory:
4 GBor as close as possible without hurting the rest of your machine - Disk image: leave the default unless Docker reports space pressure
This repo assumes an M1 MacBook Pro with 8 GB RAM may be memory-constrained. The default local stack is intentionally lightweight.
- Copy
.env.exampleto.env. If.envalready exists from an older setup attempt, refresh it from the latest example or add the newTRACE_MODEL_*andTRACE_OCR_*variables manually. - Run
make phase0-verify. - Run
make upfor the lightweight core stack. - API docs:
http://localhost:8000/docs - API readiness:
http://localhost:8000/health/ready - Web shell:
http://localhost:3000 - MinIO console:
http://localhost:9001
- Model endpoint add-on:
make up-model
- OCR add-on:
make up-ocr
- Full local topology:
make up-full
The core stack does not require local model serving or local OCR services.
Trace defaults to TRACE_EMBEDDING_PROVIDER=hash, which uses deterministic 384-dimensional
hash embeddings. This keeps local development, CI, and the default Docker stack lightweight and
does not download model weights.
To enable true semantic embeddings for local or private deployment experiments:
- Install the semantic extra in the API and worker environments:
cd apps/api && uv sync --extra semanticcd apps/worker && uv sync --extra semantic
- Set
TRACE_EMBEDDING_PROVIDER=sentence_transformerin.env. - Keep
TRACE_EMBEDDING_MODEL=sentence-transformers/all-MiniLM-L6-v2unless you are testing another 384-dimensional model. - Re-run
make seed-rawor re-ingest uploaded documents so stored chunk vectors are generated by the selected provider.
all-MiniLM-L6-v2 is a practical CPU-friendly baseline, not a fine-tuned legal embedding model.
The provider boundary is intentionally pluggable so stronger self-hosted embedding models can be
introduced later without changing routes, schemas, or the pgvector column.
The default Compose images intentionally do not install the semantic extra. If semantic mode is
needed inside containers, build a semantic-enabled image or install the extra in the target runtime
before setting TRACE_EMBEDDING_PROVIDER=sentence_transformer.
make apimake webmake workermake testmake seed
- The repo standardizes on
docker compose. - The default local model provider is a retrieval-derived
MockModelClient. OpenAICompatibleModelClientis available for later self-hosted integration and optional local add-on use.- OCR remains part of the product architecture, but it is not in the default startup path.
- The API container runs Alembic migrations at startup.
- The MinIO bucket is initialized automatically by a one-shot
minio-initservice.
Seeded by python -m app.scripts.seed_demo:
admin@trace.localattorney@trace.localreviewer@trace.local
Default password:
trace-demo-password