How zzz395/researchweave works
ResearchWeave is a collaborative research workspace. Users authenticate, work in authorized Research Spaces, discover and save arXiv papers, ingest documents for cited Knowledge answers, and optionally run bounded research agents; collaboration includes chat and realtime updates. The graph preserves those distinct workflows and major comparison, summary, membership, and activity features. README documents the system boundaries; some backend wiring is represented at domain level because its service and application source was not sampled.
Main entry points: app.ts Express application · router.tsx React application · client.ts API client · schema.ts PostgreSQL + pgvector
Components 34
Web workspace
- React application
src/app/router.tsx - API client
src/services/api/client.ts - Authentication UI
src/features/auth/pages/login-page.tsx - Spaces UI
src/features/spaces/pages/spaces-page.tsx - Research UI
src/features/research/pages/research-page.tsx - Knowledge UI
src/features/knowledge/pages/knowledge-page.tsx - Agent UI
src/features/agents/pages/agents-page.tsx - Space chat UI
src/features/chat/pages/space-chat-page.tsx - Realtime client
src/services/realtime/realtime-provider.tsx
Application API
- Express application
server/app.ts - Authentication
server/modules/auth/routes.ts - Spaces and members
server/modules/spaces/routes.ts - Connections
server/modules/connections/routes.ts - Activity and overview
server/modules/activity/routes.ts - Chat API
server/modules/chat/routes.ts - Realtime gateway
server/realtime/gateway.ts
Knowledge workflows
- Document ingestion
server/modules/documents/routes.ts - Indexing pipeline
server/modules/documents/document-indexing-worker.ts - Knowledge retrieval
server/modules/retrieval/routes.ts - Grounded answers
server/modules/grounded-answer/routes.ts - Bounded Agent runtime
server/modules/agents/runtime.ts - Durable Agent worker
server/modules/agents/worker.ts
Research workflows
- Research discovery
server/modules/research/routes.ts - Paper comparison
server/modules/paper-comparison/routes.ts - Paper summaries
server/modules/research/summary-repository.ts
Persistence and integrations
- arXiv service
server/integrations/arxiv/client.ts - Model providers
server/integrations/grounded-answer/openai-compatible-generator.ts - Embedding provider
server/integrations/document-embedding/openai-compatible-document-embedding-generator.ts - Document storage
server/integrations/document-storage/local-filesystem-storage.ts - PostgreSQL + pgvector
server/db/schema.ts
Other components
- Workspace user
- arXiv
- Configured model service
- Local filesystem
Connections 48
- Workspace user → React application: uses
- React application → Authentication UI: renders
- React application → Spaces UI: renders
- React application → Research UI: renders
- React application → Knowledge UI: renders
- React application → Agent UI: renders
- React application → Space chat UI: renders
- Authentication UI → API client: requests
- Spaces UI → API client: requests
- Research UI → API client: requests
- Knowledge UI → API client: requests
- Agent UI → API client: requests
- Space chat UI → API client: requests
- API client → Express application: HTTP requests
- Realtime client → Realtime gateway: WebSocket events
- Express application → Authentication: dispatches
- Express application → Spaces and members: dispatches
- Express application → Connections: dispatches
- Express application → Activity and overview: dispatches
- Express application → Document ingestion: dispatches
- Express application → Knowledge retrieval: dispatches
- Express application → Grounded answers: dispatches
- Express application → Bounded Agent runtime: dispatches
- Express application → Research discovery: dispatches
- Express application → Paper comparison: dispatches
- Express application → Chat API: dispatches
- Document ingestion → Document storage: stores sources
- Document ingestion → Indexing pipeline: queues indexing
- Indexing pipeline → Document storage: reads sources
- Indexing pipeline → Embedding provider: generates vectors
- Indexing pipeline → PostgreSQL + pgvector: writes indexes
- Knowledge retrieval → PostgreSQL + pgvector: searches authorized chunks
- Grounded answers → Knowledge retrieval: retrieves evidence
- Grounded answers → Model providers: generates answer
- Bounded Agent runtime → Durable Agent worker: submits execution
- Durable Agent worker → Knowledge retrieval: uses Knowledge tool
- Durable Agent worker → Research discovery: uses arXiv tool
- Durable Agent worker → Model providers: requests decisions
- Durable Agent worker → PostgreSQL + pgvector: persists runs and evidence
- Research discovery → arXiv service: searches metadata
- arXiv service → arXiv: queries
- Paper comparison → Model providers: generates comparison
- Paper summaries → Model providers: generates summary
- Research discovery → PostgreSQL + pgvector: stores papers
- Chat API → PostgreSQL + pgvector: persists messages
- Chat API → Realtime gateway: broadcasts updates
- Realtime gateway → Realtime client: sends events
- Authentication → PostgreSQL + pgvector: reads and writes sessions