A fully-featured Medium clone built with Next.js 15, Sanity CMS, and NextAuth.
- 📝 Rich Content Creation - Write and publish articles with rich text formatting
- 👤 User Authentication - Sign in with Google via NextAuth
- 💬 Nested Comments - Engage with threaded comment discussions
- ❤️ Likes & Saves - Like posts and comments, bookmark articles for later
- 👥 Social Features - Follow authors, view profiles
- 🌓 Dark Mode - Beautiful light and dark themes
- 📱 Responsive Design - Works seamlessly on all devices
- Framework: Next.js 15 (App Router)
- Styling: Tailwind CSS 4
- CMS: Sanity
- Auth: NextAuth.js
- Language: TypeScript
- Icons: Lucide React
- Node.js 18+ installed
- A Sanity account and project
- Google OAuth credentials
- Clone the repository
git clone <your-repo-url>
cd Verse- Install dependencies
npm install- Set up environment variables
cp .env.example .env.localFill in your Sanity project ID, NextAuth secret, and Google OAuth credentials.
- Run the development server
npm run devOpen http://localhost:3000 to see the app.
- Install Sanity CLI globally
npm install -g @sanity/cli- Initialize Sanity studio (if not already done)
sanity init-
Import the schemas from
sanity/schemas/into your Sanity studio -
Deploy your studio
sanity deployVerse/
├── src/ # Source code
│ ├── app/ # Next.js App Router
│ │ ├── api/ # API routes
│ │ │ ├── auth/ # NextAuth configuration
│ │ │ ├── comment/ # Comment API
│ │ │ ├── like/ # Like API
│ │ │ └── save/ # Save API
│ │ ├── post/[slug]/ # Post detail page
│ │ ├── layout.tsx # Root layout
│ │ ├── page.tsx # Home page
│ │ └── globals.css # Global styles
│ ├── components/ # React components
│ │ ├── Navbar.tsx
│ │ ├── PostCard.tsx
│ │ ├── PostInteractions.tsx
│ │ ├── CommentSection.tsx
│ │ ├── ThemeToggle.tsx
│ │ └── Providers.tsx
│ ├── lib/ # Utility functions
│ │ └── sanity.ts # Sanity client config
│ └── types/ # TypeScript types
│ └── index.ts
├── sanity/ # Sanity schemas
│ └── schemas/
│ ├── author.ts
│ ├── post.ts
│ ├── comment.ts
│ ├── like.ts
│ ├── save.ts
│ └── category.ts
├── public/ # Static assets
├── .env.example # Environment variables template
├── next.config.js # Next.js configuration
├── tailwind.config.js # Tailwind configuration
└── tsconfig.json # TypeScript configuration
See .env.example for required environment variables.
- Push your code to GitHub
- Import your repository in Vercel
- Add environment variables
- Deploy!
This is a standard Next.js app and can be deployed to any platform that supports Next.js 15.
Contributions are welcome! Please feel free to submit a Pull Request.
MIT