Folio is an AI thinking partner for commercial real estate lawyers — grounded in the documents you trust. Drag legal files into a conversation (leases, title reports, environmental assessments, side letters, surveys — whatever a deal pulls in) and ask anything about them. Folio reasons through your sources, streams the reasoning so you can see how it got there, and cites every claim back to the original page so each answer is verifiable in one click.
The full reasoning behind each design decision lives in DECISIONS.md.
- Multi-document conversations. Drag-and-drop a PDF, DOCX, or Markdown file anywhere in the chat. Files are saved to the session and listed in a right-side workspace panel where they open in browser-like tabs.
@-mention any uploaded document to bring it into focus mid-thread. - Grounded answers with click-to-jump citations. The model is prompted to refuse rather than guess when grounding fails, and to say plainly when an answer isn't in the loaded documents. Every grounded claim carries an inline citation pill; clicking it jumps the workspace panel straight to the cited page.
- Live agent reasoning. A short reasoning summary streams above each answer so the user can see what the agent is doing before the answer arrives.
- Multi-format rendering. PDFs, Word documents, and Markdown all render in-browser with their original formatting preserved.
- Mobile-responsive. Works on a phone for quick lookups between meetings.
- Frontend: Vite + React + TypeScript, Tailwind, shadcn/Radix UI
- Backend: FastAPI (Python 3.12), SQLAlchemy, Alembic, PydanticAI
- Model: Claude Sonnet for chat, Haiku for short utility tasks
- Storage: PostgreSQL
- Runtime: Docker Compose
- Docker and Docker Compose
just— install viabrew install justorcargo install just
That's it. Everything else runs inside containers.
-
Clone the repo.
-
Run setup:
just setup
This copies .env.example to .env and builds the Docker images.
- Add your Anthropic API key to
.env:
ANTHROPIC_API_KEY=your_key_here
- Start everything:
just dev
Brings up PostgreSQL, the FastAPI backend (port 8000), and the React frontend (port 5173). Database migrations run automatically when the backend starts — no separate step.
- Open http://localhost:5173.
backend/src/ and frontend/src/ are bind-mounted into the containers, so edits hot-reload.
sample-docs/ contains three PDFs (commercial lease, title report, environmental assessment) for testing.
frontend/— React (Vite + Tailwind + shadcn/Radix UI)backend/— FastAPI (Python 3.12 + SQLAlchemy + PydanticAI)alembic/— database migrationsdata/— product analytics and customer feedback used to inform design decisionssample-docs/— sample PDFs
just dev— start full stackjust stop— stop servicesjust reset— stop everything and clear the databasejust check— run all linters and type checksjust fmt— format all codejust db-init— run database migrations (rarely needed; happens on backend startup)just db-shell— open a psql shelljust shell-backend— shell into backend containerjust logs-backend— tail backend logs
For architecture, conventions, and non-obvious gotchas see CLAUDE.md.
