How anthozb3x/promptchef works
Project type and purpose
• This is a full-stack Next.js web application (bootstrapped with create-next-app) whose primary function is to let authenticated users generate “prompts” (via an API route) and view/manage their prompt history. Authentication and data storage are handled through Supabase.
File structure
• Top-level:
• public/ – static assets
• src/app/ – Next.js App Router directory (server and client entrypoints, layouts, pages, API routes)
• src/components/ – reusable React UI components (Auth, Navbar, PromptForm, PromptHistorySidebar, etc.)
• src/lib/ – shared libraries (PromptService for business logic, supabase client)
• next.config.ts, tsconfig.json, ESLint and PostCSS configs, package.json – build and lint/dependency configs
• Under src/app:
• api/generate-prompt/route.ts – serverless API route for prompt generation
• auth/page.tsx – sign-in/up UI
• layout.tsx, globals.css, metadata.ts – site-wide layout, global styles, SEO metadata
• page.tsx – home page UI
• Patterns:
• Next.js App Router (React Server Components + Client Components)
• Serverless function for “generate prompt” logic
• Supabase integration for Auth and Realtime/Database
README for additional insights
• Confirms Next.js, next/font usage for font optimization, standard create-next-app structure.