A modern, full-featured CMS built with Next.js, Supabase, and TypeScript. Perfect for news publishers, bloggers, and content creators.
- Complete Dashboard: Overview of stats, posts, pages, and system health
- Post Management: Create, edit, publish, and delete posts with featured images
- Page Management: Build static pages for About, Contact, Terms, etc.
- Bulk Importer: Import multiple posts from CSV files
- Trending Topics: Auto-publish from Google Trends every hour
- Settings Panel: Configure site details, AdSense, meta tags, and custom code
- Modern Homepage: Beautiful grid layout showcasing published posts
- Post Pages: Full article view with related articles, sharing, and print functionality
- WhatsApp Integration: One-click sharing to WhatsApp
- Responsive Design: Mobile-first, works perfectly on all devices
- Dynamic Header & Footer: Customizable navigation and branding
- Category & Tag System: Organize and filter content
- Multi-Status Posts: Draft, Published, and Scheduled states
- SEO Friendly: Meta tags, Open Graph, and custom header/footer code
- AdSense Ready: Built-in AdSense slot configuration
- View Tracking: Track post views and engagement
- Auto-Publishing: Hourly auto-publish from trending topics
- Node.js 18+ and pnpm
- Supabase account (free tier available at supabase.com)
- Create a new Supabase project at https://supabase.com
- Go to SQL Editor and run the scripts in order:
- First, run
/scripts/01-init-database.sql - Then run
/scripts/02-rls-policies.sql
- First, run
Default admin credentials:
- Email:
admin@example.com - Password:
admin123
Create a .env.local file in the root directory:
NEXT_PUBLIC_SUPABASE_URL=your_supabase_url
NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_keyGet these from Supabase Project Settings → API → Keys
# Install dependencies
pnpm install
# Start development server
pnpm devVisit http://localhost:3000 to see the frontend.
Access the admin dashboard at /admin or /login
Login with:
- Email:
admin@example.com - Password:
admin123
Change these credentials immediately in the database for security!
- Go to Posts → Create Post
- Fill in title, content, excerpt, featured image
- Add category and tags
- Choose status (Draft/Published/Scheduled)
- Click Save Post
- Go to Bulk Import
- Prepare a CSV file with columns:
title,content,excerpt,featured_image_url,category,tags - Upload the CSV or paste the data
- Click Import Posts
- Go to Trending
- Click Enable Auto-Publishing (runs every hour)
- Click Refresh to fetch latest trends
- Manually publish any topic with the Publish button
Configure in Admin → Settings:
- Site name and description
- Logo and favicon
- AdSense Client ID and slot IDs
- Custom header code (meta tags, analytics)
- Custom footer code (scripts, trackers)
- Google Analytics ID
- users: Admin and editor accounts
- posts: Blog posts with status, views, categories
- pages: Static pages (About, Contact, etc.)
- settings: Site configuration and AdSense setup
- menu_items: Navigation menu items
- import_queue: Bulk import jobs
- trending_topics: Google Trends data
- meta_tags: SEO meta tags per post/page
GET /api/posts- List posts (supports pagination)POST /api/posts- Create postGET /api/posts/[id]- Get single postPUT /api/posts/[id]- Update postDELETE /api/posts/[id]- Delete post
GET /api/pages- List pagesPOST /api/pages- Create pageGET /api/pages/[id]- Get single pagePUT /api/pages/[id]- Update pageDELETE /api/pages/[id]- Delete page
GET /api/settings- Get site settingsPUT /api/settings- Update settings (admin only)
GET /api/menu- Get navigation menuPOST /api/trending- Fetch and save trending topicsPOST /api/import- Start bulk importPOST /api/auth/login- Admin login
The trending topics feature automatically:
- Fetches top trending topics every hour
- Creates posts with the trending topic as title
- Sets them to published status
- Marks them as trending posts for special display
You can manually control this in the Trending Topics admin page.
title,content,excerpt,featured_image_url,category,tags
Breaking News,Full article content here,Short excerpt,https://example.com/image.jpg,News,breaking,urgent
Tech Update,Article about new technology,Tech news,https://example.com/tech.jpg,Technology,tech,updateUsers can share articles to WhatsApp directly from:
- Homepage post cards (green Share button)
- Individual post page
- WhatsApp link:
https://wa.me/?text=...
- Get your Client ID from Google AdSense
- Add to Settings → AdSense Client ID
- Add slot IDs in JSON format
- Ads will display in header banner and sidebar
Add custom HTML in Settings for:
- Meta tags (SEO, Open Graph, Twitter Card)
- Analytics scripts (Google Analytics, Matomo)
- Custom CSS or JavaScript
- Change default admin password immediately
- Enable Row Level Security (RLS) policies in database
- Use environment variables for all sensitive data
- Implement CORS restrictions
- Validate and sanitize all user inputs
- Use HTTPS in production
- Regular backups of Supabase database
- Push code to GitHub
- Connect to Vercel
- Add environment variables
- Deploy with one click
The app is compatible with:
- Netlify
- AWS Amplify
- Railway
- Render
- Any Node.js hosting
- Check if posts are set to "published" status
- Verify database connection in Supabase
- Check browser console for errors
- Ensure user exists in database
- Check password hash matches bcrypt format
- Clear browser cookies and try again
- Verify CSV format matches documentation
- Check for special characters in content
- Ensure content column has valid text
- Verify Client ID is correct in settings
- Check if slot IDs are in valid JSON format
- Allow 24 hours for ads to appear
Open source - feel free to use and modify
For issues or feature requests, please contact support or check documentation.
Built with ❤️ for news publishers and content creators