How jasonhedman/the-hive works
Main System Components
The system should be represented with these key components:
a) Frontend Layer:
• Next.js App Router structure (app/ directory)
• UI Components (components/ui/)
• Client-side Hooks (hooks/)
• Context Providers (app/_contexts/)
b) API Layer:
• Next.js API Routes (app/api/)
• External Service Integrations (services/)
• Database Operations (db/)
c) AI/Agent System:
• AI Agents (ai/agents/)
• Actions System (ai/cdp/, ai/invoke/, ai/knowledge/, ai/solana/, ai/twitter/)
d) Blockchain Integration:
• Solana Integration
• Multiple DeFi Protocol Integrations (Jupiter, Raydium, Orca)
• Wallet Management
Component Relationships
[Frontend Layer]
• [UI Components]
• Components UI Library
• [Page Routes]
• Chat Interface
• Portfolio View
• Token Explorer
• [Client Hooks]
• Data Fetching
• Blockchain Integration
• Authentication
[API Layer]
• [External Services]
• Birdeye
• Helius
• Jupiter
• [Database]
• Chats
• Knowledge
• Tokens
[AI System]
• [Agents]
• Knowledge
• Liquidity
• Market
• Social
• Staking
• Trading
• [Actions]
• CDP Actions
• Invoke Actions
• Knowledge Actions
• Solana Actions
Important Design Elements to Highlight
a) Architecture Patterns:
• Next.js App Router pattern
• Feature-based folder structure
• Service-oriented architecture for external integrations
b) Key Integration Points:
• AI agent system with blockchain operations
• External service connections
• Database interactions
c) Data Flow:
• User interactions → Frontend → AI Agents → Blockchain
• External data aggregation → API Layer → Frontend
• Chat system → AI processing → Action execution
Technical Stack Indicators
• Next.js 13+ (App Router)
• TypeScript
• Cosmos DB
• Solana Web3
• Multiple DeFi protocols
• AI/ML integration