A Modern Full-Stack Blogging Platform
This project is a robust, full-featured blogging platform designed for modern content creators and readers. It features a secure backend built with Node.js and Express, and a responsive, user-friendly frontend powered by React. The platform supports user authentication, post management, commenting, media uploads, and more, making it suitable for personal blogs, multi-author publications, or educational use.
- User Authentication: Secure registration, login, and profile management
- Post Management: Create, edit, delete, and draft blog posts
- Commenting System: Engage with posts through threaded comments
- Likes: Like posts and comments to show appreciation
- Media Uploads: Attach images and media to posts
- Featured Posts: Highlight selected posts in a carousel
- Search Functionality: Quickly find posts by keywords
- Responsive Design: Optimized for all devices
- Performance: Caching with Redis for improved speed (optional)
- Event Streaming: Kafka event publishing for async workflows (optional)
blogging-platform/
backend/ # Node.js/Express REST API
frontend/ # React single-page application
- Node.js (v14 or higher)
- npm
- Supabase PostgreSQL
- Redis (optional, for caching)
- Install Dependencies
cd backend npm install - Environment Configuration
- Copy
.env.exampleto.envand update the variables. - Set
DB_PROVIDER=supabase. - Set
SUPABASE_URLandSUPABASE_SERVICE_ROLE_KEY. - Set
JWT_SECRETfor token signing.
- Copy
- Start the Server
For development with auto-reload:
npm start
npm run dev
- Install Dependencies
cd frontend npm install - Start the Application
The app will be available at http://localhost:3000 by default.
npm start
- Backend:
- Refer to
backend/.env.examplefor all required environment variables. - To enable Kafka events, set
KAFKA_ENABLED=trueand provideKAFKA_BROKERS.
- Refer to
- Frontend:
- Ensure the API base URL is correctly set in
frontend/src/services/api.jsif you change backend ports or deploy separately. - For direct media upload (faster than backend multer relay), set in
frontend/.env:REACT_APP_SUPABASE_URLREACT_APP_SUPABASE_ANON_KEYREACT_APP_SUPABASE_STORAGE_BUCKET(default:blogsy-media)
- Ensure the API base URL is correctly set in
Media upload strategy:
- If frontend Supabase env vars are configured, media uploads go directly to Supabase Storage and post APIs receive media URLs.
- If not configured, the app falls back to existing backend multer + Cloudinary upload flow.
npm start— Launches the production servernpm run dev— Starts the server with hot-reloading (nodemon)npm run worker:notifications— Runs Kafka notifications consumer workernpm run worker:analytics— Runs Kafka analytics consumer worker
npm start— Runs the React development server
Supabase migration and setup notes are available in backend/SUPABASE_MIGRATION.md.
The backend emits Kafka events for:
user.registereduser.logged_inpost.created
Default topics:
- Main topic:
blogsy.events - Dead-letter topic:
blogsy.events.dlt
To run locally with Docker Compose:
docker compose up -d kafka zookeeper- Set
KAFKA_ENABLED=trueinbackend/.env - Start backend:
cd backend && npm start - Start worker:
cd backend && npm run worker:notifications - Start analytics worker:
cd backend && npm run worker:analytics
Analytics counters are tracked under cache keys like:
analytics:events:totalanalytics:events:type:<eventType>analytics:events:daily:<YYYY-MM-DD>:totalanalytics:events:daily:<YYYY-MM-DD>:type:<eventType>
Analytics API endpoint:
GET /api/analytics/summary?date=YYYY-MM-DD(requires auth token)
This project is licensed under the MIT License. You are free to use, modify, and distribute this software as permitted under the license terms.
- Express — Backend framework
- React — Frontend library
- Supabase — Database platform
- Redis — Caching
- Quill.js — Rich text editor
For questions, suggestions, or contributions, please open an issue or submit a pull request.