A beautiful, modern blog platform built with Next.js 15, featuring a sleek glass-morphism design, dark/light theme support, and seamless content management.
- Glass-morphism UI with backdrop blur effects
- Dark/Light theme with smooth transitions
- Responsive design that works on all devices
- Animated components with smooth hover effects
- Gradient backgrounds and modern typography
- Rich text editor with formatting toolbar
- Image upload with Cloudinary integration
- Category management with emoji support
- Post drafts and publishing workflow
- Comment system with real-time interactions
- Google OAuth integration via NextAuth.js
- User profiles with avatar support
- Secure sessions with JWT tokens
- HTTPS support for production deployment
- MongoDB with Prisma ORM
- Image storage via Cloudinary
- Database migrations and schema management
- Optimized queries for performance
- Next.js 15 - React framework with App Router
- TypeScript - Type-safe development
- Tailwind CSS - Utility-first styling
- React Icons - Beautiful icon library
- Next.js API Routes - Serverless functions
- NextAuth.js - Authentication solution
- Prisma - Database ORM
- MongoDB - NoSQL database
- Cloudinary - Image storage and optimization
- Google OAuth - Social authentication
- Vercel - Deployment platform (recommended)
- Node.js 18+
- MongoDB database
- Google OAuth credentials
- Cloudinary account
git clone https://github.com/NishantRaj278/Inklet.git
cd Inkletnpm installCreate a .env.local file:
# Database
DATABASE_URL="mongodb+srv://username:password@cluster.mongodb.net/inklet"
# NextAuth
NEXTAUTH_URL=http://localhost:3000
NEXTAUTH_SECRET=your_secret_key_here
# Google OAuth
AUTH_GOOGLE_ID=your_google_client_id
AUTH_GOOGLE_SECRET=your_google_client_secret
# Cloudinary
CLOUDINARY_CLOUD_NAME=your_cloud_name
CLOUDINARY_API_KEY=your_api_key
CLOUDINARY_API_SECRET=your_api_secretnpx prisma generate
npx prisma db pushnpm run devVisit http://localhost:3000 to see your blog!
inklet/
βββ src/
β βββ app/ # Next.js App Router
β β βββ api/ # API routes
β β βββ blog/ # Blog listing page
β β βββ login/ # Authentication page
β β βββ posts/ # Individual post pages
β β βββ write/ # Post creation page
β βββ components/ # Reusable components
β β βββ AuthProvider.tsx
β β βββ card.tsx
β β βββ comments.tsx
β β βββ navbar.tsx
β β βββ ...
β βββ context/ # React contexts
β β βββ ThemeContext.tsx
β βββ hooks/ # Custom hooks
β β βββ useImageUpload.ts
β βββ auth.ts # NextAuth configuration
βββ prisma/
β βββ schema.prisma # Database schema
βββ public/ # Static assets
βββ ...
- Custom contentEditable implementation
- Formatting toolbar (Bold, Italic, Underline, Headings, Lists)
- Word count tracking
- Theme-aware styling
- Drag & drop image upload
- Cloudinary integration for optimization
- Image preview with remove functionality
- Automatic image resizing
- React Context-based theme management
- localStorage persistence
- Smooth transitions between themes
- Component-level theme awareness
- Google OAuth integration
- Automatic user profile creation
- Protected routes for writing posts
- Session management with NextAuth.js
- Push your code to GitHub
- Connect your repository to Vercel
- Add environment variables in Vercel dashboard
- Deploy automatically on push
DATABASE_URL=your_production_mongodb_url
NEXTAUTH_URL=https://yourdomain.com
NEXTAUTH_SECRET=your_production_secret
AUTH_GOOGLE_ID=your_google_client_id
AUTH_GOOGLE_SECRET=your_google_client_secret
CLOUDINARY_CLOUD_NAME=your_cloud_name
CLOUDINARY_API_KEY=your_api_key
CLOUDINARY_API_SECRET=your_api_secret
NODE_ENV=production- Go to Google Cloud Console
- Create a new project or select existing
- Enable Google+ API
- Create OAuth 2.0 credentials
- Add authorized redirect URIs:
http://localhost:3000/api/auth/callback/google(development)https://yourdomain.com/api/auth/callback/google(production)
Edit src/context/ThemeContext.tsx to customize theme colors and default theme.
Modify the categories array in src/app/write/page.tsx to add/remove blog categories.
Update Tailwind classes throughout components to customize the appearance.
Modify prisma/schema.prisma and run migrations to change the data structure.
- Modern, clean interface with subtle shadows
- Blue and purple gradient accents
- Glass-morphism effects
- Sleek dark interface with slate colors
- Consistent branding colors
- Enhanced readability in low light
- Optimized layouts for all screen sizes
- Touch-friendly interactions
- Responsive navigation
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Next.js - The React framework
- Tailwind CSS - For beautiful styling
- NextAuth.js - Authentication made simple
- Prisma - Modern database toolkit
- Cloudinary - Image and video management
Nishant Raj - GitHub
Project Link: https://github.com/NishantRaj278/Inklet
Made with β€οΈ by Nishant Raj
