How nishita786/lexicon-gate works
Lexicon Gate is a research desk centered on evidence-grounded Q&A over a user’s library. Its main workflow is sign-in, add sources, then ask: the backend retrieves evidence, gates its sufficiency, drafts, verifies claims, and returns a supported answer or abstains. The product also supports paper discovery, manuscript writing and review, collaboration, paper comparison, and events. The README documents the answer loop and optional services; sampled excerpts do not expose every route-to-service call, so uncertain wiring is omitted.
Main entry points: main.py FastAPI app · runner.py Answer pipeline · routes.py Core API routes · projects.py Projects API
Components 34
Web client
- Research desk UI
frontend/src/App.jsx - HTTP client
frontend/src/api.js - Sign-in UI
frontend/src/Auth.jsx - Write interface
frontend/src/Write.jsx
API and identity
- FastAPI app
backend/app/main.py - Authentication API
backend/app/api/auth.py - Auth middleware
backend/app/api/auth_gate.py - Core API routes
backend/app/api/routes.py - Auth services
backend/app/services/auth/sessions.py - Supabase persistence
backend/app/services/supabase/client.py
Grounded answers
- Answer pipeline
backend/app/pipelines/runner.py - Query analysis
backend/app/retrieval/query_analysis.py - Hybrid retrieval
backend/app/retrieval/hybrid.py - Evidence gate
backend/app/verification/evidence_gate.py - Answer generation
backend/app/services/llm/registry.py - Extractive generator
backend/app/services/llm/extractive_engine.py - Claim verification
backend/app/verification/claim_verifier.py
Library and discovery
- Knowledge base
backend/app/services/store/knowledge_base.py - Vector store
backend/app/services/vectorstore/registry.py - Source ingestion
backend/app/services/ingestion/loaders.py - Paper discovery
backend/app/services/papers/search.py - Paper import
backend/app/services/papers/import_paper.py
Research workspace
- Projects API
backend/app/api/projects.py - Manuscript tools
backend/app/services/projects/manuscript_ai.py - Manuscript review
backend/app/services/projects/manuscript_review.py - Project storage
backend/app/services/projects/store.py - Stories API
backend/app/api/stories.py - Story storage
backend/app/services/stories/store.py - Workspace API
backend/app/api/workspace.py - Events API
backend/app/api/events.py - Event catalog
backend/app/services/events/catalog.py - Paper comparison
backend/app/services/extraction/paper_structure.py
Other components
- Researcher
- Paper indexes
Connections 35
- Researcher → Research desk UI: uses
- Research desk UI → HTTP client: requests
- Sign-in UI → HTTP client: signs in
- HTTP client → FastAPI app: calls API
- FastAPI app → Authentication API: dispatches
- FastAPI app → Core API routes: dispatches
- FastAPI app → Projects API: dispatches
- FastAPI app → Stories API: dispatches
- FastAPI app → Workspace API: dispatches
- FastAPI app → Events API: dispatches
- Authentication API → Auth services: manages sessions
- Auth middleware → Auth services: checks sessions
- Auth services → Supabase persistence: persists optionally
- Core API routes → Answer pipeline: runs queries
- Answer pipeline → Query analysis: analyzes query
- Answer pipeline → Hybrid retrieval: retrieves evidence
- Hybrid retrieval → Knowledge base: searches library
- Knowledge base → Vector store: uses index
- Answer pipeline → Evidence gate: assesses evidence
- Answer pipeline → Answer generation: requests draft
- Answer generation → Extractive generator: selects provider
- Answer pipeline → Claim verification: checks claims
- Core API routes → Source ingestion: loads sources
- Source ingestion → Knowledge base: indexes chunks
- Core API routes → Paper discovery: searches papers
- Paper discovery → Paper indexes: queries indexes
- Core API routes → Paper import: imports papers
- Paper import → Source ingestion: loads source
- Write interface → HTTP client: requests
- Projects API → Manuscript tools: supports drafting
- Projects API → Manuscript review: reviews evidence
- Projects API → Project storage: reads and writes
- Stories API → Story storage: reads and writes
- Workspace API → Paper comparison: compares papers
- Events API → Event catalog: browses events