A modern, AI-powered Reddit clone built with Next.js 15, Sanity CMS, Clerk, and AI content moderation. Features real-time content updates, community management, and AI-assisted content filtering.
- 🏠 Browse posts from all communities on the homepage
- 🔍 Search for posts and communities
- 📝 Create and manage posts with rich text formatting
- 📊 Vote on posts and comments
- 💬 Participate in community discussions through comments
- 🖼️ Include images in posts for visual content
- 👤 User profiles with post history
- 🌐 Create and customize subreddits / communities
- 📋 Community-specific post feeds
- 🚫 Report inappropriate content
- 🤖 AI-powered content moderation
- 🛡️ Automatic detection and censoring of inappropriate content
- 🚩 User reporting system for violations
- 🔍 Smart content analysis for community standards enforcement
- 🚀 Server Components & Server Actions with Next.js 15
- 👤 Authentication with Clerk
- 📝 Content management with Sanity.io
- 🎨 Modern UI with Tailwind CSS and Radix UI
- 📱 Responsive design
- 🔄 Real-time content updates
- 🔒 Protected routes and content
- ⚡ Turbopack for fast development
- 🎯 Clean, Reddit-inspired interface
- 🎨 Consistent design system using Radix UI components
- ♿ Accessible components
- 📱 Responsive across all devices
- ⏱️ Time-ago timestamps for posts and comments
- 🔍 Intuitive search functionality
- 💫 Micro-interactions for better engagement
- Node.js 18+
- npm, yarn, or pnpm
- Clerk Account
- Sanity Account
- OpenAI API key (for AI moderation)
Create a .env.local file with:
# Sanity
NEXT_PUBLIC_SANITY_PROJECT_ID=your-project-id
NEXT_PUBLIC_SANITY_DATASET=production
SANITY_API_TOKEN=your-sanity-read-token
# Clerk
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=your-clerk-publishable-key
CLERK_SECRET_KEY=your-clerk-secret-key
# OpenAI (for AI moderation)
OPENAI_API_KEY=your-openai-api-key# Clone the repository
# Install dependencies using yarn
yarn or yarn install OR
npm install OR
pnpm install
OR YOUR PREFERRED PACKAGE MANAGER
# Start the development server with Turbopack
yarn dev
- Create a Sanity account
- Create a new project
- Install the Sanity CLI:
npm install -g @sanity/cli yarn add -g @sanity/cli pnpm i -g @sanity/cli OR YOUR PREFERRED PACKAGE MANAGER
- Initialize Sanity in your project:
sanity init
- Deploy Sanity Studio:
sanity deploy
- Create a Clerk application
- Configure authentication providers
- Set up redirect URLs
- Add environment variables
- Next.js 15
- TypeScript
- Sanity CMS
- Clerk Auth
- OpenAI API
- Tailwind CSS
- Radix UI
- Lucide Icons
This project is licensed under the MIT License - see the LICENSE.md file for details
Built with ❤️ using Next.js, Sanity, Clerk, and OpenAI