CodeFlow is a community-driven Q&A platform designed for developers to share knowledge, solve problems, and build reputation.
Unlike standard forums, CodeFlow leverages an intelligent recommendation engine. By tracking user interactions and tag engagement, the system learns your tech stack (e.g., React, Docker, Rust) to curate a personalized feed. Whether you're debugging a complex distributed system or centering a div, CodeFlow surfaces the most relevant solutions for you.
CodeFlow is built on a modern, server-first architecture using Next.js 15 Server Actions for robust data mutations and Clerk for secure identity management.
graph TD
User((User)) -->|Auth| Clerk
User -->|HTTP/HTTPS| Next[Next.js 15 App]
Next -->|Server Actions| Prisma[Prisma ORM]
Prisma -->|SQL Query| DB[(NeonDB Postgres)]
Clerk -->|Webhook Sync| Next
Next -->|Validation| Zod
A custom-built engine analyzes your reading history and interaction patterns to suggest questions that match your expertise.
- Global Search: Query the entire database for questions, users, or tags.
- Local Filters: Sort results dynamically by Newest, Most Frequent, Unanswered, or Recommended.
- Markdown Editor: Rich text support with syntax highlighting for code blocks.
- Voting System: Reputation-based upvote/downvote mechanism.
- Views & Stats: Real-time engagement metrics for every question.
- Portfolio Showcase: Display your bio, location, and links.
- Gamification: Earn badges (Bronze, Silver, Gold) and reputation points based on community validation of your answers.
| Category | Technology | Description |
|---|---|---|
| Frontend | Next.js 15 (App Router) | Server Components & Client Components |
| Styling | Tailwind CSS & Shadcn UI | Responsive, accessible UI components |
| Backend | Server Actions | Server-side mutations without API routes |
| Database | PostgreSQL (NeonDB) | Serverless SQL database |
| DevOps | Docker | Multi-stage build containerization |
| ORM | Prisma | Type-safe database access |
| Auth | Clerk | Authentication & User Management |
You can run CodeFlow locally using standard Node.js or via Docker.
- Node.js
v18+ - Docker (Optional)
- PostgreSQL database URL
- Clerk account keys
Create a .env file in the root directory:
# Clerk Auth
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=pk_test_...
CLERK_SECRET_KEY=sk_test_...
NEXT_PUBLIC_CLERK_SIGN_IN_URL=/sign-in
NEXT_PUBLIC_CLERK_SIGN_UP_URL=/sign-up
# Database
DATABASE_URL="postgresql://..."
# TinyMCE (Optional)
NEXT_PUBLIC_TINY_EDITOR_API_KEY=...
- Install dependencies
npm install
- Initialize Database
npx prisma db push
npx prisma db seed
- Run the server
npm run dev
CodeFlow includes a multi-stage Dockerfile optimized for production performance.
- Build the image
docker build -t codeflow .
- Run the container
docker run -p 3000:3000 --env-file .env codeflow
Open http://localhost:3000 to view the app.
Contributions are welcomed! Please follow these steps:
- Fork the repository.
- Create a new branch:
git checkout -b feature/your-feature-name. - Make your changes and commit them:
git commit -m 'Add some feature'. - Push to the branch:
git push origin feature/your-feature-name. - Submit a pull request.
