How natantavares-plank/chatbot works
Project Type and Purpose
• This is a full-stack monorepo application: a web-based AI Character Chatbot.
• Frontend: Next.js 15 (App Router), React 19, TypeScript, Tailwind CSS, Framer Motion.
• AI Engine: LangGraph (LangChain + LangSmith) implementing a multi-agent system.
• Backend/Persistence: Supabase (PostgreSQL + Auth + RLS).
• External Services: OpenAI GPT, OpenWeather API, NewsAPI.
File Structure Analysis
• Top Level:
• pnpm-workspace.yaml, turbo.json, package.json – monorepo orchestration.
• apps/web – Next.js application.
• apps/web/src:
• /app – App Router directories (api/chat, auth, chat, layout, pages).
• /components – Reusable UI (animation, ui/*).
• /hooks – Custom React hooks (useChat).
• /lib/langgraph – AI graph configuration, agent factory, agents, tools, memory manager.
• /lib/supabase – Supabase middleware, server client, service functions.
• apps/web/supabase – database migrations and config.
• Config: next.config.ts, tailwind.config.ts, tsconfig.json, .env_example.
• Deployment/build: Turbo, pnpm, Supabase CLI.
README Insights
• Detailed sections on multi-agent router, weather/news/chat agents, memory management with summarization.
• Database schema: chats, messages, summaries with RLS.
• API endpoints: /api/chat, auth endpoints.
• External API integrations and performance optimizations (Edge Runtime, lazy loading, streaming support).