langchain-reference-architecture
Installation
SKILL.md
LangChain Reference Architecture
Overview
Production architectural patterns for LangChain: layered project structure, provider abstraction for vendor flexibility, chain registry for dynamic management, RAG architecture, and multi-agent orchestration.
Layered Architecture
src/
├── api/ # HTTP layer (Express/Fastify/FastAPI)
│ ├── routes/
│ │ ├── chat.ts # POST /api/chat, /api/chat/stream
│ │ └── documents.ts # POST /api/documents/ingest
│ └── middleware/
│ ├── auth.ts # JWT/OAuth validation
│ └── rateLimit.ts # Per-user rate limiting
├── core/ # Business logic (pure, testable)
│ ├── chains/
│ │ ├── summarize.ts # Summarize chain factory
Related skills