A modern, full-stack blog application built with Next.js 15, Strapi CMS, and TypeScript. Features a beautiful UI, multi-language support, real-time interactions, and comprehensive content management.
- β Multi-language Support - English & Bengali (বাΰ¦ΰ¦²ΰ¦Ύ)
- β Rich Text - Markdown support with image uploads
- β Authentication - Google OAuth integration
- β Comments System - Nested replies with role-based permissions
- β Reactions - Like, Love, Haha, Sad, Angry
- β User Roles - User & Author with different permissions
- β Responsive Design - Mobile-first approach with Tailwind CSS
- β Dark Mode - System-based theme switching
- β Category Filtering - Browse blogs by categories
- β Search Functionality - Real-time blog search
- β Pagination - Efficient content loading
- β SEO Optimized - Meta tags and structured data
- π Real-time Notifications
- π WebSocket Integration
- π Live Comment Updates
- π Push Notifications
- Framework: Next.js 15 (App Router)
- Language: TypeScript
- Styling: Tailwind CSS
- UI Components: shadcn/ui
- State Management: Redux Toolkit
- Markdown: ReactMarkdown, remark-gfm, rehype-raw
- Date Formatting: date-fns
- Notifications: Sonner
- CMS: Strapi 5
- Database: SQLite (development) / PostgreSQL (production)
- Authentication: JWT
- File Upload: Local storage / Cloud storage
- Node.js 18.x or higher
- npm or yarn
- Git
git clone https://github.com/asynctushar/tushar-insights.git
cd tushar-insightscd cms
npm installCreate a .env file in the cms directory:
# Server
HOST=0.0.0.0
PORT=1337
# Secrets (IMPORTANT: Generate new keys for production)
APP_KEYS=YOUR_APP_KEYS_HERE
API_TOKEN_SALT=YOUR_API_TOKEN_SALT_HERE
ADMIN_JWT_SECRET=YOUR_ADMIN_JWT_SECRET_HERE
TRANSFER_TOKEN_SALT=YOUR_TRANSFER_TOKEN_SALT_HERE
ENCRYPTION_KEY=YOUR_ENCRYPTION_KEY_HERE
JWT_SECRET=YOUR_JWT_SECRET_HERE
# Database
DATABASE_CLIENT=sqlite
DATABASE_FILENAME=.tmp/data.db# Run this inside cms directory
node -e "console.log(require('crypto').randomBytes(16).toString('base64'))"The repository includes pre-configured content types. After setting up:
- Start Strapi:
npm run develop-
Create admin account at
http://localhost:1337/admin -
The following content types are already configured:
- Blog - Main blog posts
- Category - Blog categories
- Comment - Comments and replies
- Reaction - Blog reactions
- Policy - Privacy policies
- Term - Terms & conditions
- About - About page content
- User - Extended user profiles
-
Important: Configure API permissions:
- Go to Settings β Users & Permissions Plugin β Roles
- For Public role: Enable search, findBySlug, find/findOne for blogs and find/findOne for categories, policies, terms, about.
- For Authenticated role: Enable createComment, deleteComment, reactBlog, updateBlogReaction, deleteBlogReaction, for blogs.
- For Author role: Enable reply, delete for comments. Note:
- Authenticated role should have all other permissions of Public role.
- Author role should have all other permissions of Public and Authenticated role.
cd ../client
npm installCreate a .env.local file in the client directory:
# Strapi API URL
NEXT_PUBLIC_STRAPI_API_URL=http://localhost:1337
# For production, use your deployed Strapi URL:
# NEXT_PUBLIC_STRAPI_API_URL=https://your-strapi-domain.comDevelopment Mode:
# Terminal 1 - Run Strapi CMS
cd cms
npm run develop
# Terminal 2 - Run Next.js Client
cd client
npm run devAccess the application:
- Frontend:
http://localhost:3000 - Strapi Admin:
http://localhost:1337/admin
tushar-insights/
βββ cms/ # Strapi CMS Backend
β βββ config/ # Strapi configuration
β βββ src/
β β βββ api/ # API routes and controllers
β β βββ extensions/ # Custom extensions
β β βββ index.js # Entry point
β βββ .env # Environment variables
β
βββ client/ # Next.js Frontend
β βββ src/
β β βββ app/ # App router pages
β β β βββ blogs/ # Blog pages
β β β βββ about/ # About page
β β β βββ api/ # API routes
β β β βββ error.tsx # Error boundary
β β β βββ loading.tsx # Loading state
β β β βββ not-found.tsx # 404 page
β β β βββ page.tsx # Home page
β β β βββ layout.tsx # Root layout
β β βββ components/ # React components
β β β βββ blog/ # Blog components
β β β βββ comment/ # Comment components
β β β βββ layout/ # Layout components
β β β βββ ui/ # shadcn/ui components
β β β βββ providers/ # Context providers
β β βββ lib/ # Utilities
β β βββ redux/ # Redux store
β β βββ services/ # API services
β β βββ types/ # TypeScript types
β βββ .env.local # Environment variables
β
βββ README.md # This file
- User clicks "Login with Google"
- OAuth flow redirects to Google
- After successful auth, JWT token is stored in cookies
- Token is used for authenticated API requests
- Normal users: Can comment and delete their own comments
- Authors: Can reply to comments, delete any comment, ban/unban users
- Users can react to blogs with 5 emotion types
- One reaction per user per blog
- Click same reaction to remove it
- Change reaction by clicking different emotion
- Content is available in English and Bengali
- Language switcher in header
- URL parameter:
?lang=bnfor Bengali
We welcome contributions! Here's how you can help with V2 development:
main- Stable production branchv1- V1 release branch (current)v2- Development branch for V2 features
-
Fork the repository
-
Clone your fork
git clone https://github.com/your-username/tushar-insights.git
cd tushar-insights- Create a feature branch from v2
git checkout v2
git pull origin v2
git checkout -b feature/your-feature-name-
Make your changes
- Follow existing code style
- Write meaningful commit messages
- Add comments for complex logic
-
Test your changes
npm run build
npm run start- Commit and push
git add .
git commit -m "feat: add your feature description"
git push origin feature/your-feature-name- Create a Pull Request
- Base branch:
v2 - Describe your changes clearly
- Reference any related issues
- Base branch:
-
Real-time Notifications
- WebSocket integration
- Notification bell with count
- Mark as read functionality
-
Live Updates
- Real-time comment updates
- Live reaction counts
- Online user indicators
-
Performance
- Optimize image loading
- Implement infinite scroll
- Cache improvements
- Use TypeScript for type safety
- Follow Prettier formatting
- Use meaningful variable names
- Write descriptive comments
- Keep components small and focused
- Use custom hooks for reusable logic
- Search suggestions need optimization
- Mobile menu needs smoother animation
- Image optimization for better performance
This project is licensed under the MIT License - see the LICENSE file for details.
Tushar Biswas
- Website: tushar-insights.vercel.app
- GitHub: @asynctushar
- Next.js - React framework
- Strapi - Headless CMS
- shadcn/ui - UI components
- Tailwind CSS - Styling
For support, email [email protected] or open an issue on GitHub.
β If you find this project useful, please give it a star!