Note: This project is currently on hold. The backend is mostly complete, and the frontend will be finalized soon.
A modern blog content management system built with Next.js 15, TypeScript, MongoDB, and NextAuth.js. Features an admin panel for managing blogs, categories, and AI-Powered Content Creation using the Gemini API.
- Modern Tech Stack: Next.js 15, TypeScript, Tailwind CSS
- Authentication: NextAuth.js with GitHub OAuth and credentials
- Content Management: Full CRUD for blogs and categories
- AI-Powered Content Creation: Generate blog content using Gemini API by providing title, summary, and category
- Image Upload: Cloudinary integration for image hosting
- Responsive Design: Mobile-first responsive UI
- SEO Optimized: Meta tags, Schema.org structured data
- Rich Text Editor: Markdown support for blog content
- Frontend: Next.js 15, React 19, TypeScript, Tailwind CSS
- Backend: Next.js API Routes, MongoDB, Mongoose
- Authentication: NextAuth.js (GitHub OAuth + Credentials)
- Image Storage: Cloudinary
- AI Integration: Google Gemini API
- Styling: Tailwind CSS with custom components
- Icons: React Icons
- Notifications: React Toastify
- Node.js (v18+)
- npm or yarn
- MongoDB (local or cloud)
- Cloudinary account
- GitHub OAuth app
- Google Gemini API key
-
Clone Repository
git clone https://github.com/emrhngngr/nextblog.git cd nextblog -
Install Dependencies
npm install # or yarn install -
Set Up Environment Variables Create a
.env.localfile:MONGODB_URI=mongodb://localhost:27017/nextblog NEXTAUTH_URL=http://localhost:3000 NEXTAUTH_SECRET=your-super-secret-key NEXTAUTH_GITHUB_ID=your-github-client-id NEXTAUTH_GITHUB_SECRET=your-github-client-secret CLOUDINARY_CLOUD_NAME=your-cloudinary-cloud-name CLOUDINARY_API_KEY=your-cloudinary-api-key CLOUDINARY_API_SECRET=your-cloudinary-api-secret GEMINI_API_KEY=your-gemini-api-key OWNER_PASSWORD=random123
-
Database Setup
- Local MongoDB: Install and start MongoDB, use
mongodb://localhost:27017/nextblog. - MongoDB Atlas: Create a cluster at MongoDB Atlas, get connection string, update
.env.local.
- Local MongoDB: Install and start MongoDB, use
-
GitHub OAuth Setup
- Create OAuth app at GitHub Developer Settings.
- Set Homepage URL:
http://localhost:3000, Callback URL:http://localhost:3000/api/auth/callback/github. - Add Client ID and Secret to
.env.local.
-
Cloudinary Setup
- Sign up at Cloudinary.
- Add Cloud Name, API Key, and API Secret to
.env.local.
-
Gemini API Setup
- Obtain a Gemini API key from Google Cloud.
- Add to
.env.localasGEMINI_API_KEY.
-
Run Development Server
npm run dev # or yarn dev
- User: Authentication, permissions
- Blog: Title, summary, content, author, category, visibility
- Category: Name, slug, description
/api/auth/*: NextAuth authentication/api/blog: Blog CRUD operations/api/categories: Category management/api/ai/generate-content: Generate content via Gemini API (input: title, summary, category)
- Push code to GitHub.
- Connect to Vercel.
- Add environment variables in Vercel dashboard.
- Update
NEXTAUTH_URLto production domain.
| Metric | Score | Description |
|---|---|---|
| Performance | 100/100 | β‘ Optimized loading and rendering |
| Accessibility | 100/100 | βΏ WCAG compliance and screen reader support |
| Best Practices | 100/100 | π Security and modern web standards |
| SEO | 100/100 | π Search engine optimization |
- Environment variable validation
- Input validation and sanitization
- Secure password hashing with bcrypt
- JWT token management
- Fork the repository.
- Create a feature branch (
git checkout -b feature/new-feature). - Commit changes (
git commit -m 'Add new feature'). - Push to branch (
git push origin feature/new-feature). - Open a Pull Request.
MIT License - see LICENSE for details.
Emirhan GΓΌngΓΆr
- GitHub: @emrhngngr
- LinkedIn: Emirhan GΓΌngΓΆr





