How shobrook/adrenaline works
File structure
• Top-level:
• .github/ISSUE_TEMPLATE/ – issue templates for bugs and feature requests
• README.md – project overview & features
README for additional insights
• Features listed: general programming Q&A, GitHub repo Q&A, doc-site Q&A, code snippets
• Implies these architectural pieces:
• Web frontend (UI)
• API / orchestration layer
• Retrieval service (internet / knowledge-base search)
• LLM inference service
• Supporting data stores (vector DB, logs, metrics)
Main components
a. Frontend UI
• A React/Next.js app served via CDN
b. API Gateway / Orchestrator
• Receives user requests, routes them to appropriate backend subsystems
c. Retrieval Service
• Internet search API (e.g., Bing or Google Custom Search)
• Vector database (e.g., Pinecone/Chroma) for semantic search of past answers or docs
d. LLM Inference Service
• Large-language-model endpoint (OpenAI, Anthropic, local model)
• Prompts assembled by orchestrator
f. Data Stores & Observability
• Vector DB for embeddings
• Document store (MongoDB, PostgreSQL) for session history
• Logging & monitoring (ELK / Prometheus)
g. External Services
• Web search APIs
• Code-snippet sandbox (optional)
Relationships and interactions between components
• User → Frontend UI: HTTP(S) or WebSocket
• Frontend → API Gateway: REST or GraphQL
• API Gateway → Retrieval Service: synchronous call to search APIs & vector DB
• API Gateway → LLM Inference: sends combined context + user query
• LLM Inference → API Gateway: returns answer text
• All services → Logging/Monitoring
Architectural patterns and design principles
• Microservices or modular services (each responsibility in its own bounded context)
• API-driven design (clear separation of UI vs. backend)
• Use of RAG (Retrieval-Augmented Generation) pattern: retrieval service + LLM
Technologies, frameworks, and libraries
• Frontend: React / Next.js, Tailwind CSS
• API: Node.js / Express or Python / FastAPI, GraphQL
• Retrieval: Pinecone, Elasticsearch, or Chroma DB; integration with Google/Bing search
• LLM Inference: OpenAI API, LangChain, or local GPU cluster
• Observability: Prometheus & Grafana, ELK stack
• Component names match actual service names in code/config repos