A financial-services proof of concept that eliminates manual data entry from client onboarding. Clients upload a financial document; Claude classifies it and extracts every relevant field as structured data — no analyst opening PDFs and typing values by hand.
fshare-demo.mp4
(If the player doesn't load, download the demo.)
- Client uploads a financial document (PDF, JPEG, PNG, or WebP).
- Claude classifies the document type (W-2, Form 1040, brokerage statement, etc.).
- Claude extracts every advisor-relevant field using a type-specific Pydantic schema enforced at the API level — wages, AGI, account balances, holdings, withholdings, and more.
- Structured data is persisted to a per-client unified record (Income / Tax / Assets).
- The original file is not retained in production — only the extracted fields are stored.
Two Claude API calls are made per document (classify → extract). The full prompt, enforced JSON schema, raw response, latency, and token counts are logged to the LLM Activity page for complete auditability.
| Document | Unified record section |
|---|---|
| IRS Form W-2 | Income |
| Pay Stub | Income |
| IRS Form 1040 | Income + Tax |
| IRS Form 1099 (INT / DIV / R) | Tax |
| Brokerage Statement | Assets |
| 401k / IRA Statement | Assets |
| Route | Description |
|---|---|
/ |
Home — overview and navigation |
/upload |
Upload a document and watch it get classified and extracted in real time |
/records |
Unified client profile (Income, Tax, Assets) + per-document extraction history |
/data-model |
Live schema reference — every extractable field, typed and described |
/activity |
Full LLM audit log — prompt, schema, response, latency, token counts |
- Backend: FastAPI + SQLite (via
sqlite3) - AI: Anthropic Python SDK —
client.messages.parse()with Pydantic v2 structured output - Frontend: Vanilla HTML / CSS / JS (no build step)
- Tooling: uv
- Python ≥ 3.14
- uv
- An Anthropic API key
# 1. Install dependencies
uv sync
# 2. Set your API key
echo "ANTHROPIC_API_KEY=sk-ant-..." > .env
# 3. Start the server
uv run uvicorn app.main:app --reloadOpen http://localhost:8000.
By default the app runs in demo mode (FSHARE_RETAIN_FILES=1): uploaded files are kept
in a doc_files SQLite table so they can be previewed on the Records page.
Set FSHARE_RETAIN_FILES=0 to switch to production behavior: file bytes are held in memory
only for the duration of the request and are never written to disk.
The narrated demo video is produced by a Playwright script. It starts a local server, uploads
three sample documents, walks through every page, and muxes macOS say narration onto the
recording with ffmpeg.
Prerequisites: ffmpeg installed (brew install ffmpeg), macOS (for say TTS).
# Install Playwright browsers (one-time)
uv run playwright install chromium
# Generate sample documents (if not already present)
uv run scripts/gen_samples.py
# Record the demo → demo/fshare-demo.mp4
uv run scripts/record_demo.pyOptional env vars:
| Variable | Default | Description |
|---|---|---|
FSHARE_TTS_VOICE |
Daniel (English (UK)) |
macOS voice name (e.g. "Samantha") |
FSHARE_TTS_RATE |
175 |
Words per minute |
FSHARE_AUDIO_LEAD |
0.5 |
Seconds of audio lead before each caption |
Install a Premium or Siri voice in System Settings → Accessibility → Spoken Content for
higher-quality narration, then point FSHARE_TTS_VOICE at it.