How anthozb3x/planifyai works
Project type and purpose
• This is a full-stack, monorepo JavaScript/TypeScript application called PlanifyAI.
• Purpose: provide a modern calendar UI plus an AI-driven conversational interface for creating, editing, deleting, and listing events in natural language.
File structure
• Top-level
• agent.ts, index.ts: backend entry points and orchestration
• package.json, tsconfig.json: root configuration
• frontend directory
• package.json, vite.config.ts: React + Vite app
• src/: UI code (components, context, assets)
• public/: static assets (index.html, favicon, etc.)
• No explicit database folder—events likely held in memory or in an external store (could be added later)
• Configuration files (.env, .gitignore, ESLint, tsconfigs) suggest standard Node/React setup
README insights
• Frontend: React, TypeScript, Material-UI, Vite
• Backend: Node.js, Express, LangChain, Langraphs, OpenAI GPT-4
• Two services run in dev:
• Frontend on port 5173
• Backend on port 3000
Main components & relationships
a. Components
1. Frontend UI
– React + Vite
– Calendar view (Calendar.tsx)
– Chat view (Chat.tsx)
– Shared state via CalendarContext
2. Backend API
– Express server (index.ts)
– Agent module (agent.ts) orchestrating LangChain workflows
3. External AI Service
– OpenAI GPT-4 endpoint (via LangChain + Langraphs)
4. (Optional) Persistence layer
b. Data flows / interactions
• UI → HTTP REST or WebSocket → Express API
• Express → LangChain agent → OpenAI GPT-4 (requests & responses)
• Express → persistence (CRUD events) → Express → UI
c. Architectural patterns & principles
• Separation of concerns: UI vs. API vs. external AI
• Context/Provider pattern in frontend for shared state
• Pipeline pattern in backend (LangChain chains)
d. Key technologies to annotate
• React, TypeScript, Vite, MUI
• Node.js, Express, LangChain, Langraphs
• OpenAI GPT-4 (external service)
• Ports: 5173 (frontend), 3000 (backend)