A fun AI-powered explainer app built with Next.js.
You enter a topic (for example, "Black Holes" or "Blockchain"), choose a style, and the app generates a simple explanation using a Groq-compatible OpenAI API endpoint.
- Multiple explanation modes:
- Kid Mode
- Normal
- Gen Z Chaos
- Bhojpuri Mode
- Example topic chips for quick prompts
- Markdown-rendered responses
- One-click copy for generated explanation
- Lightweight animation for result reveal
- Next.js 16 (App Router)
- React 19 + TypeScript
- Tailwind CSS 4
- OpenAI SDK (pointed to Groq base URL)
react-markdown,framer-motion,lucide-react
app/
page.tsx # Main UI
api/explain/route.ts # AI explain API route
layout.tsx # App metadata + layout
Create a .env.local file in the project root:
GROQ_API_KEY=your_groq_api_key_hereThe API route uses:
baseURL:https://api.groq.com/openai/v1model:openai/gpt-oss-20b
Install dependencies:
npm installRun the dev server:
npm run devOpen http://localhost:3000.
npm run dev- start local dev servernpm run build- create production buildnpm run start- run production servernpm run lint- run ESLint
- Explanations are generated by an LLM and may occasionally be inaccurate.
- For best results, use clear topics and keep prompts concise.