How glindsays/bizsop-workspace works
BizSOP Flow is an internal SOP knowledge and workflow assistant. Users upload PDFs for indexing, ask document-grounded questions with citations and conversation history, and generate SOP flowcharts with role-based checklists. The backend exposes these capabilities through FastAPI routers and uses Supabase for document/conversation data and Gemini for embeddings and generated responses. Frontend components and pages are included as product surfaces, but their wiring to the API is not established by the available relationship evidence; the README is empty.
Main entry points: database.py Supabase and Gemini clients · main.py FastAPI application · upload.py PDF upload and lifecycle · rag_engine.py Retrieval and answering
Components 21
User Interface
- Document workspace
frontend/src/app/page.tsx - Chat interface
frontend/src/components/ChatInterface.tsx - Conversation list
frontend/src/components/ConversationList.tsx - PDF uploader
frontend/src/components/PdfUploader.tsx - Document picker
frontend/src/components/DocumentPicker.tsx - Flowchart view
frontend/src/app/flowchart/page.tsx - Diagram visualizer
frontend/src/components/MermaidVisualizer.tsx - Task checklist
frontend/src/components/TaskChecklist.tsx
API Workflows
- FastAPI application
backend/app/main.py - PDF upload and lifecycle
backend/app/routers/upload.py - Chat and citations
backend/app/routers/chat.py - Conversation management
backend/app/routers/conversations.py - Flowchart endpoint
backend/app/routers/flowchart.py
Document Intelligence
- PDF parsing and chunking
backend/app/services/pdf_parser.py - Chunk embedding
backend/app/services/embedding.py - Retrieval and answering
backend/app/services/rag_engine.py - Diagram generation
backend/app/services/generator.py
Persistence and Models
- Supabase and Gemini clients
backend/app/core/database.py
Other components
- SOP user
- Supabase
- Gemini API
Connections 19
- SOP user → Document workspace: uses
- FastAPI application → PDF upload and lifecycle: registers route
backend/app/main.py - FastAPI application → Chat and citations: registers route
backend/app/main.py - FastAPI application → Flowchart endpoint: registers route
backend/app/main.py - FastAPI application → Conversation management: registers route
backend/app/main.py - PDF upload and lifecycle → PDF parsing and chunking: parses PDF
backend/app/routers/upload.py - PDF upload and lifecycle → Chunk embedding: queues indexing
backend/app/routers/upload.py - PDF upload and lifecycle → Supabase and Gemini clients: stores metadata
backend/app/routers/upload.py - Chunk embedding → Supabase and Gemini clients: stores vectors
backend/app/services/embedding.py - Chunk embedding → Gemini API: creates embeddings
backend/app/services/embedding.py - Chat and citations → Retrieval and answering: retrieves and answers
backend/app/routers/chat.py - Chat and citations → Supabase and Gemini clients: loads chat state
backend/app/routers/chat.py - Conversation management → Supabase and Gemini clients: manages records
backend/app/routers/conversations.py - Flowchart endpoint → Supabase and Gemini clients: loads SOP chunks
backend/app/routers/flowchart.py - Flowchart endpoint → Diagram generation: requests diagram
backend/app/routers/flowchart.py - Diagram generation → Retrieval and answering: uses model fallback
backend/app/services/generator.py - Supabase and Gemini clients → Supabase: connects
backend/app/core/database.py - Retrieval and answering → Supabase and Gemini clients: retrieves chunks
backend/app/services/rag_engine.py - Retrieval and answering → Gemini API: generates response
backend/app/services/rag_engine.py