{"id":49713746,"url":"https://github.com/brandonperfetti/next-stack-overflow","last_synced_at":"2026-05-08T18:36:25.582Z","repository":{"id":250476044,"uuid":"834274690","full_name":"brandonperfetti/next-stack-overflow","owner":"brandonperfetti","description":"Dev Flow — A full-stack Stack Overflow clone with AI-generated answers, built with Next.js 14, MongoDB, Clerk, and OpenAI.","archived":false,"fork":false,"pushed_at":"2026-03-26T04:56:01.000Z","size":3140,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-03-27T01:12:22.609Z","etag":null,"topics":["clerk","mongodb","mongoose","nextjs","openai","qa-platform","react","shadcn-ui","tailwindcss","typescript"],"latest_commit_sha":null,"homepage":"https://devflow-coral2.vercel.app/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/brandonperfetti.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-07-26T20:23:51.000Z","updated_at":"2026-03-26T04:56:34.000Z","dependencies_parsed_at":"2024-08-10T19:59:47.931Z","dependency_job_id":"c5fac304-1ee7-4c38-924b-a432aaa531ac","html_url":"https://github.com/brandonperfetti/next-stack-overflow","commit_stats":null,"previous_names":["brandonperfetti/next-stack-overflow"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/brandonperfetti/next-stack-overflow","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brandonperfetti%2Fnext-stack-overflow","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brandonperfetti%2Fnext-stack-overflow/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brandonperfetti%2Fnext-stack-overflow/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brandonperfetti%2Fnext-stack-overflow/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/brandonperfetti","download_url":"https://codeload.github.com/brandonperfetti/next-stack-overflow/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brandonperfetti%2Fnext-stack-overflow/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32792485,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-08T08:22:46.396Z","status":"ssl_error","status_checked_at":"2026-05-08T08:22:45.650Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["clerk","mongodb","mongoose","nextjs","openai","qa-platform","react","shadcn-ui","tailwindcss","typescript"],"created_at":"2026-05-08T18:36:22.140Z","updated_at":"2026-05-08T18:36:25.554Z","avatar_url":"https://github.com/brandonperfetti.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Dev Flow — Stack Overflow Clone\n\n\u003cdiv align=\"center\"\u003e\n\n\u003cimg src=\"https://img.shields.io/badge/Next.js_14-000000?style=for-the-badge\u0026logo=next.js\u0026logoColor=white\" /\u003e\n\u003cimg src=\"https://img.shields.io/badge/TypeScript-3178C6?style=for-the-badge\u0026logo=typescript\u0026logoColor=white\" /\u003e\n\u003cimg src=\"https://img.shields.io/badge/MongoDB-47A248?style=for-the-badge\u0026logo=mongodb\u0026logoColor=white\" /\u003e\n\u003cimg src=\"https://img.shields.io/badge/Clerk-6C47FF?style=for-the-badge\u0026logo=clerk\u0026logoColor=white\" /\u003e\n\u003cimg src=\"https://img.shields.io/badge/Tailwind_CSS-06B6D4?style=for-the-badge\u0026logo=tailwindcss\u0026logoColor=white\" /\u003e\n\u003cimg src=\"https://img.shields.io/badge/OpenAI-412991?style=for-the-badge\u0026logo=openai\u0026logoColor=white\" /\u003e\n\n**A full-stack Stack Overflow-style Q\u0026A platform with AI-generated answers.**\n\n[Live Demo](https://devflow-coral2.vercel.app) · [Report Bug](https://github.com/brandonperfetti/next-stack-overflow/issues)\n\n\u003c/div\u003e\n\n---\n\n## Overview\n\n**Dev Flow** is a production-grade Stack Overflow clone built with the **Next.js 14 App Router**. It features a complete developer Q\u0026A experience — from posting questions and writing rich-text answers to voting, tagging, reputation tracking, and AI-assisted answers powered by OpenAI.\n\nThis project demonstrates advanced Next.js patterns including server actions, route handlers, dynamic OG images, and Clerk webhooks for user sync.\n\n---\n\n## Features\n\n- ❓ **Ask Questions** — Rich text editor (TinyMCE) with code blocks, formatting, and tag support\n- 💬 **Answer System** — Write, edit, and delete answers with full rich text\n- 👍 **Voting** — Upvote/downvote questions and answers; reputation system updates accordingly\n- 🏷️ **Tagging** — Browse and filter by tags; tag detail pages show related questions\n- 🔍 **Global Search** — Search across questions, answers, users, and tags simultaneously\n- 🤖 **AI Answers** — Generate AI-powered answers via OpenAI integration\n- 👤 **User Profiles** — Public profiles with stats, top questions, and top answers\n- 🏆 **Reputation \u0026 Badges** — Earn reputation through community engagement\n- 🌙 **Dark / Light Mode** — Persistent theme preference\n- 🔐 **Authentication** — Clerk-powered auth with webhook-based user sync to MongoDB\n\n---\n\n## Tech Stack\n\n| Technology | Purpose |\n|---|---|\n| [Next.js 14](https://nextjs.org/) (App Router) | Full-stack React framework |\n| [TypeScript](https://www.typescriptlang.org/) | Type safety |\n| [MongoDB](https://www.mongodb.com/) + [Mongoose](https://mongoosejs.com/) | Database and ODM |\n| [Clerk](https://clerk.com/) | Authentication and user management |\n| [OpenAI API](https://platform.openai.com/docs/) | AI-generated answer feature |\n| [TinyMCE](https://www.tiny.cloud/) | Rich text question/answer editor |\n| [Tailwind CSS](https://tailwindcss.com/) | Utility-first styling |\n| [shadcn/ui](https://ui.shadcn.com/) | Accessible component library |\n| [Radix UI](https://www.radix-ui.com/) | Headless UI primitives |\n| [Zod](https://zod.dev/) | Schema validation |\n| [React Hook Form](https://react-hook-form.com/) | Form state management |\n| [Svix](https://svix.com/) | Webhook verification for Clerk events |\n\n---\n\n## Getting Started\n\n### Prerequisites\n\n- [Node.js](https://nodejs.org/) v18+\n- [npm](https://www.npmjs.com/)\n- A [MongoDB Atlas](https://www.mongodb.com/atlas) cluster\n- A [Clerk](https://clerk.com/) application\n- An [OpenAI](https://platform.openai.com/) API key\n- A [TinyMCE](https://www.tiny.cloud/) API key\n\n### Installation\n\n```bash\ngit clone https://github.com/brandonperfetti/next-stack-overflow.git\ncd next-stack-overflow\nnpm install\n```\n\n### Environment Variables\n\nCreate a `.env.local` file in the project root:\n\n```env\n# Clerk Authentication\nNEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=pk_...\nCLERK_SECRET_KEY=sk_...\nNEXT_PUBLIC_CLERK_SIGN_IN_URL=/sign-in\nNEXT_PUBLIC_CLERK_SIGN_UP_URL=/sign-up\nNEXT_PUBLIC_CLERK_AFTER_SIGN_IN_URL=/\nNEXT_PUBLIC_CLERK_AFTER_SIGN_UP_URL=/\n\n# Clerk Webhook (for user sync)\nCLERK_WEBHOOK_SECRET=whsec_...\n\n# MongoDB\nMONGODB_URL=mongodb+srv://...\n\n# OpenAI\nOPENAI_API_KEY=sk-...\n\n# TinyMCE\nNEXT_PUBLIC_TINY_EDITOR_API_KEY=your_tinymce_api_key\n\n# App\nNEXT_PUBLIC_SERVER_URL=http://localhost:3000\n```\n\n### Development\n\n```bash\nnpm run dev\n```\n\nOpen [http://localhost:3000](http://localhost:3000) in your browser.\n\n### Production Build\n\n```bash\nnpm run build\nnpm run start\n```\n\n### Linting\n\n```bash\nnpm run lint\n```\n\n---\n\n## Project Structure\n\n```\nnext-stack-overflow/\n├── app/\n│   ├── (auth)/           # Sign-in / Sign-up routes\n│   ├── (root)/           # Main app routes\n│   │   ├── Home/         # Home feed\n│   │   ├── jobs/         # Job board\n│   │   └── ...\n│   └── api/              # Route handlers (webhooks, AI)\n├── components/\n│   ├── cards/            # Question, answer, user cards\n│   ├── forms/            # Ask question, answer forms\n│   ├── shared/           # Navbar, sidebar, search\n│   └── ui/               # shadcn/ui base components\n├── database/             # Mongoose models and schemas\n├── lib/                  # Server actions, utilities, validations\n├── context/              # Theme provider\n├── types/                # TypeScript type definitions\n└── constants/            # App-wide constants\n```\n\n---\n\n## Deployment\n\nDeploy to [Vercel](https://vercel.com/). Add all environment variables in your Vercel project settings. Configure Clerk webhooks to point to `https://your-domain.com/api/webhooks/clerk`.\n\n[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https://github.com/brandonperfetti/next-stack-overflow)\n\n---\n\n## License\n\nMIT © [Brandon Perfetti](https://brandonperfetti.com)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrandonperfetti%2Fnext-stack-overflow","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbrandonperfetti%2Fnext-stack-overflow","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrandonperfetti%2Fnext-stack-overflow/lists"}