How danish26-dev/crosslens works
CrossLens is a courtroom-memory application: attorneys ingest case documents, build persistent case context, then use live testimony, grounded questions, and case views to retrieve evidence and surface contradictions. The graph combines the documented product workflow and capabilities with relationships visible in the sampled sources. Several domain implementations were not sampled, so README-described links are cited to the README; unsampled internal call details are not inferred.
Main entry points: case.server.ts Case operations · client.ts OpenRouter reasoning · dashboard.tsx Attorney dashboard · dashboard.live.tsx Live testimony
Components 23
Case workflow
- Legal documents
- Document ingestion
src/routes/dashboard.ingest.tsx - Document parser
src/lib/documents/parser.ts - Server RPC API
src/lib/api/index.ts - Case operations
src/lib/api/case.server.ts - Live testimony
src/routes/dashboard.live.tsx
Memory and reasoning
- Cognee client
src/lib/cognee/client.ts - Cognee workflows
src/lib/cognee/demo.server.ts - Cognee memory graph
- OpenRouter reasoning
src/lib/openrouter/client.ts
Case records
- Postgres case store
src/lib/db/pg.ts - Demo case data
src/lib/db/seed.ts - Case domain types
src/lib/types/case.ts
Attorney experience
- Attorney dashboard
src/routes/dashboard.tsx - Grounded questions
src/routes/dashboard.ask.tsx - Contradiction review
src/routes/dashboard.contradictions.tsx - Evidence view
src/routes/dashboard.evidence.tsx - Timeline view
src/routes/dashboard.timeline.tsx - Knowledge graph view
src/components/witness-graph.tsx - Memory lifecycle view
src/routes/dashboard.memory.tsx - Shared UI components
src/components/ui - Mobile layout hook
src/hooks/use-mobile.tsx
Other components
- Attorney
Connections 24
- Attorney → Legal documents: provides
README.md - Legal documents → Document ingestion: uploads
README.md - Document ingestion → Server RPC API: requests document listing
src/routes/dashboard.ingest.tsx - Server RPC API → Case operations: delegates operations
src/lib/api/index.ts - Legal documents → Document parser: extracts text
README.md - Case operations → Postgres case store: reads and writes case records
- Case operations → Cognee client: uses memory service
- Cognee workflows → Cognee client: uses primitives
- Cognee client → Cognee memory graph: adds and searches
src/lib/cognee/client.ts - Attorney → Live testimony: enters testimony
README.md - Live testimony → OpenRouter reasoning: requests analysis
README.md - OpenRouter reasoning → Cognee memory graph: recalls context
README.md - OpenRouter reasoning → Live testimony: returns citations
README.md - Cognee memory graph → Contradiction review: provides prior context
README.md - Cognee memory graph → Knowledge graph view: provides graph data
README.md - Cognee memory graph → Timeline view: provides event context
README.md - Attorney → Grounded questions: asks questions
README.md - Grounded questions → Cognee memory graph: retrieves memories
- Attorney → Memory lifecycle view: manages memory
README.md - Demo case data → Postgres case store: seeds records
src/lib/db/seed.ts - Attorney dashboard → Shared UI components: uses shared controls
- Shared UI components → Mobile layout hook: checks viewport
src/components/ui/sidebar.tsx - Attorney → Attorney dashboard: views case workspace
README.md - Attorney dashboard → Evidence view: opens evidence
README.md