How ericciarla/mind-map works
Main Components
A. Client-Side (Frontend) Layer:
• Main Application UI (Next.js App Router structure)
• PDF Upload Component
• Mind Map Visualization (React Flow)
• Interactive Controls
B. Server-Side Layer:
• API Routes (/api/chat and /api/generate-quiz)
• PDF Processing Service
• AI Integration Layer
C. External Services:
• Google Gemini Pro AI
• Vercel AI SDK
• PDF Processing Services
[Client Layer]
• ↕
[Server Layer]
• ↕
[External Services]
Detailed Component Breakdown
Client Layer (Top):
• PDF Uploader Component
• Mind Map Viewer (React Flow)
• Interactive Controls
Server Layer (Middle):
• Next.js API Routes
• PDF Processing Logic
• AI Integration Handler
• Request/response flows
External Services (Bottom):
• Google Gemini Pro AI
• Vercel AI SDK
• Any other external services
Data Flow Representation
• File processing (thick lines)
Important Elements to Highlight
• PDF Upload Flow:
• [Upload Component] → [PDF Processor] → [AI Analysis] → [Mind Map Generation]
• AI Integration Flow:
• [Server] → [Gemini Pro API] → [Process Response] → [Update Mind Map]
Technical Details
• Next.js 14 App Router structure
• React Flow integration points
• API endpoint locations
• Environment variable dependencies
• State management flow