How bhagat2678/bedrock works
Bedrock turns industrial documents into searchable vector and graph knowledge, then serves cited answers, graph exploration, and failure-risk alerts through an operator portal. The graph follows the sampled ingestion and query orchestrators; the README documents graph exploration and scheduled failure scanning, but their internal wiring is not fully sampled, so those links are kept at documented subsystem boundaries.
Main entry points: services.ts API services · main.py REST application · ingestion_agent.py Ingestion workflow · query_interface.py Query interface
Components 28
Operator portal
- Document workspace
frontend/src/routes/documents.tsx - Document upload
frontend/src/routes/upload.tsx - Knowledge query UI
frontend/src/routes/query.tsx - Graph explorer UI
frontend/src/routes/graph.tsx - Alerts workspace
frontend/src/routes/alerts.tsx - API services
frontend/src/api/services.ts
API services
- REST application
backend/app/main.py - Documents API
backend/app/api/documents.py - Query API
backend/app/api/query.py - Graph API
backend/app/api/graph.py - Alerts API
backend/app/api/alerts.py - Ingestion service
backend/app/services/ingestion_service.py - Query service
backend/app/services/query_service.py - Risk scheduler
backend/app/services/scheduler.py
Knowledge engine
- Ingestion interface
ai_ml/interfaces/ingestion_interface.py - Ingestion workflow
ai_ml/agents/ingestion_agent.py - Document loader
ai_ml/ingestion/loader.py - Knowledge extractor
ai_ml/extraction/gemini_extractor.py - Graph builder
ai_ml/graph/graph_builder.py - Chunk embedding index
ai_ml/embeddings/vector_store.py - Query interface
ai_ml/interfaces/query_interface.py - Hybrid retrieval
ai_ml/retrieval/hybrid_retriever.py - LLM model router
ai_ml/llm/model_router.py
Knowledge stores
- PostgreSQL pgvector
- Neo4j graph
Failure intelligence
- Failure scanner
ai_ml/agents/failure_intelligence_agent.py - Alert service
backend/app/services/alert_service.py
Other components
- Industrial operator
Connections 33
- Industrial operator → Document upload: uploads document
- Industrial operator → Knowledge query UI: asks question
- Industrial operator → Graph explorer UI: explores graph
- Industrial operator → Alerts workspace: reviews alerts
- Document upload → API services: submits file
- Knowledge query UI → API services: submits query
- Document workspace → API services: requests documents
- Graph explorer UI → API services: requests graph
- Alerts workspace → API services: requests alerts
- API services → REST application: REST requests
- REST application → Documents API: dispatches
- REST application → Query API: dispatches
- REST application → Graph API: dispatches
- REST application → Alerts API: dispatches
- Documents API → Ingestion service: starts ingestion
- Ingestion service → Ingestion interface: ingests file
- Ingestion interface → Ingestion workflow: invokes workflow
- Ingestion workflow → Document loader: loads document
- Ingestion workflow → Knowledge extractor: extracts knowledge
- Ingestion workflow → Graph builder: writes entities
- Ingestion workflow → Chunk embedding index: indexes chunks
- Graph builder → Neo4j graph: writes graph
- Chunk embedding index → PostgreSQL pgvector: writes vectors
- Query API → Query service: executes query
- Query service → Query interface: queries knowledge
- Query interface → Hybrid retrieval: retrieves context
- Hybrid retrieval → PostgreSQL pgvector: searches vectors
- Hybrid retrieval → Neo4j graph: traverses graph
- Query interface → LLM model router: synthesizes answer
- Risk scheduler → Failure scanner: runs scan
- Failure scanner → Alert service: creates alerts
- Alerts API → Alert service: serves alerts
- Graph API → Neo4j graph: serves graph data