How wenkais196-gabriel/greenbean-study-assistant-personal works
GreenBean is a local-first study assistant that turns course files into page-addressable material for question answering. The main workflow is upload, asynchronous parsing and indexing, then chat retrieval and a cited answer; the workspace can display source units and restore chat history. Separate product branches cover analysis, sections, export, provider settings, traces, and MCP tools. The README documents these capabilities; sampled source confirms upload/job handling and provider configuration, while unsampled subsystem wiring is shown only where the README supports it.
Main entry points: main.py FastAPI app · apiClient.ts API client · WorkspacePage.tsx Workspace UI · document_ingest_service.py Document ingestion
Components 27
Study workspace
- Workspace UI
src/features/workspace/pages/WorkspacePage.tsx - File manager
src/features/workspace/components/left/FileManager.tsx - Chat interface
src/features/workspace/components/right/ChatPanel.tsx - Document viewer
src/features/workspace/components/center/DocumentViewer.tsx - Provider settings
src/features/provider/components/ProviderPanel.tsx - API client
src/lib/apiClient.ts
Backend API
- FastAPI app
backend-python/app/main.py - Document endpoints
backend-python/app/api/document_controller.py - Chat endpoint
backend-python/app/api/chat_controller.py - Provider endpoints
backend-python/app/api/provider_controller.py - Analysis endpoints
backend-python/app/api/analysis_controller.py - Export endpoints
backend-python/app/api/export_controller.py - Document queries
backend-python/app/services/document_query_service.py
Document pipeline
- Upload jobs
backend-python/app/services/ingest_job_service.py - Document ingestion
backend-python/app/services/document_ingest_service.py - Format parsers
backend-python/app/parsers/parser_factory.py - Chunking and embeddings
backend-python/app/services/chunk_service.py
AI capabilities
- Chat orchestration
backend-python/app/services/chat_service.py - Agent tools
backend-python/app/agents/chat_agent.py - RAG retrieval
backend-python/app/rag/retriever.py - Model providers
backend-python/app/providers/registry.py - MCP server
backend-python/app/mcp_server.py - Analysis service
backend-python/app/services/analysis_service.py - Export service
backend-python/app/services/export_service.py
Persistence
- SQLite data store
backend-python/app/db/models.py
Other components
- Student
- Configured LLM
Connections 32
- Student → Workspace UI: uses
- Workspace UI → File manager: presents
- Workspace UI → Chat interface: presents
- Workspace UI → Document viewer: presents
- File manager → API client: uploads and polls
- Chat interface → API client: sends questions
- Document viewer → API client: loads source units
- Provider settings → API client: manages providers
- API client → FastAPI app: calls API
- FastAPI app → Document endpoints: registers routes
- FastAPI app → Chat endpoint: registers routes
- FastAPI app → Provider endpoints: registers routes
- Document endpoints → Upload jobs: submits and queries
- Upload jobs → Document ingestion: runs ingestion
- Document ingestion → Format parsers: parses files
- Document ingestion → Chunking and embeddings: chunks and embeds
- Document ingestion → SQLite data store: persists records and vectors
- Document endpoints → Document queries: queries documents
- Document queries → SQLite data store: reads documents
- Chat endpoint → Chat orchestration: handles chat
- Chat orchestration → Agent tools: orchestrates tools
- Agent tools → RAG retrieval: retrieves context
- RAG retrieval → SQLite data store: searches indexed content
- Chat orchestration → Model providers: gets active model
- Model providers → Configured LLM: requests completions
- Provider endpoints → Model providers: configures and activates
- Chat orchestration → SQLite data store: persists sessions and messages
- FastAPI app → Analysis endpoints: registers routes
- Analysis endpoints → Analysis service: dispatches analysis
- FastAPI app → Export endpoints: registers routes
- Export endpoints → Export service: dispatches export
- MCP server → Agent tools: exposes tools