How bhaskatripathi/text2diagram works
Project type and purpose
• This is a full-stack web application built with Next.js (app directory) and TypeScript.
File structure
• Top-level folders:
• app/ – Next.js 13 “App Router” pages, layout, CSS, and an API route at app/api/openai/route.ts
• pages/ – legacy Next.js pages and an API endpoint at pages/api/chat.ts (likely for backward compatibility)
• components/ui/ – low-level UI primitives (button, input, label, popover, etc.)
• lib/ – state management (atom.ts) and utility functions (utils.ts)
• config/ and types/ – site configuration and TypeScript type definitions
• public/ – static assets; README, video demo, prompts file at root
• tailwind.config.js, postcss.config.js – style tooling
• next.config.js, tsconfig.json – Next.js and TypeScript config
• The core architectural choice is a single monolithic Next.js serverless application with clear separation between frontend (React) and backend (serverless API routes).
README for additional insights
• No database or long-term storage; state is ephemeral, kept in React/Jotai atoms.