Skip to content

Saurabhtbj1201/BuildNotes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

19 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ“ BuildNotes - MERN Blog Application

A Modern Full-Stack Blogging Platform

Made with MERN License: MIT PRs Welcome

A feature-rich blog application built with MongoDB, Express.js, React, and Node.js

Features โ€ข Demo โ€ข Installation โ€ข Tech Stack โ€ข Contributing


โœจ New Features (Latest Update)

๐ŸŽ‰ Four Major Features Added!

Feature Description
๐Ÿ“ Blog Post Summaries Auto-generated summaries for blog posts displayed in previews
๐Ÿ† Author Badges System Gamification badges that reward authors for achievements (FIXED: Now awards properly!)
๐ŸŽฏ Milestones System Track long-term progress with 20+ milestones
๐Ÿ‘‘ Admin Dashboard Complete admin panel to manage users, roles, and view statistics

๐Ÿ“‹ Prerequisites

Before you begin, ensure you have the following installed:

  • Node.js Node.js (v14 or higher)
  • MongoDB MongoDB (local or Atlas account)
  • Cloudinary Cloudinary account (for image uploads)

๐Ÿš€ Installation

1๏ธโƒฃ Clone the repository

git clone https://github.com/yourusername/MERN-Blog.git
cd MERN-Blog

2๏ธโƒฃ Backend Setup

cd backend
npm install

Create a .env file in the backend directory:

PORT=5000
MONGO_URI=your_mongodb_connection_string
SECRET_KEY=your_jwt_secret_key
CLOUDINARY_CLOUD_NAME=your_cloudinary_cloud_name
CLOUDINARY_API_KEY=your_cloudinary_api_key
CLOUDINARY_API_SECRET=your_cloudinary_api_secret
FRONTEND_URL=http://localhost:5173

3๏ธโƒฃ Frontend Setup

cd ../frontend
npm install

Create a .env file in the frontend directory:

VITE_API_URL=http://localhost:5000/api

๐Ÿƒ Running the Application

Start Backend Server

cd backend
npm start

Backend will run on http://localhost:5000

Start Frontend Development Server

cd frontend
npm run dev

Frontend will run on http://localhost:5173


๐Ÿ” Environment Variables Explanation

Backend Environment Variables
Variable Description
PORT Port number for backend server
MONGO_URI MongoDB connection string
SECRET_KEY Secret key for JWT token generation
CLOUDINARY_CLOUD_NAME Your Cloudinary cloud name
CLOUDINARY_API_KEY Your Cloudinary API key
CLOUDINARY_API_SECRET Your Cloudinary API secret
FRONTEND_URL Frontend URL for CORS configuration
Frontend Environment Variables
Variable Description
VITE_API_URL Backend API base URL

๐ŸŽฎ Initialize New Features (One-Time Setup)

After starting both servers:

  1. Visit http://localhost:5173/setup
  2. Click "Initialize All" button
  3. Wait for success confirmation โœ…
  4. Navigate to /dashboard/achievements to see badges and milestones

๐ŸŽฏ Features

๐ŸŒŸ Core Features

  • โœ… User authentication (register/login)
  • โœ… Create, edit, delete blog posts
  • โœ… Publish/unpublish blogs
  • โœ… Comment on blogs
  • โœ… Like blogs and comments
  • โœ… User profiles with social links
  • โœ… Image uploads via Cloudinary

๐Ÿ†• Advanced Features

  • ๐Ÿ“ Auto-generated blog summaries - Concise previews on blog cards
  • ๐Ÿ† Author badges system - 8 achievement badges (First Post, Trending, Top Rated, etc.) โœ… Fixed awarding!
  • ๐ŸŽฏ Milestones tracking - 20+ milestones across 5 categories
  • ๐Ÿ‘๏ธ View tracking - Track total and unique blog views
  • ๐Ÿ“Š Author statistics - Automatic tracking of blogs, views, likes, comments
  • ๐Ÿ“ˆ Progress visualization - Progress bars and completion indicators
  • ๐ŸŽฎ Gamification dashboard - Unified view of achievements

๐Ÿ‘‘ Admin Features

  • ๐Ÿ”ง Make Admin - Promote any user to admin role
  • โฌ‡๏ธ Remove Admin - Demote admin back to user
  • ๐Ÿ‘ฅ View All Users - Complete user list with blog/comment statistics
  • ๐Ÿ“Š Dashboard Stats - Real-time platform metrics
  • ๐Ÿ”’ Protected Routes - Admin-only access control
  • โšก Easy Setup - Simple script to make first admin:
    node backend/makeAdmin.js your-email@gmail.com

๐Ÿ› ๏ธ Tech Stack

Frontend

React Redux Vite TailwindCSS

Backend

Node.js Express.js MongoDB JWT

Tools & Services

Cloudinary Bcrypt

๐Ÿ“ฆ Complete Tech Stack

Frontend:

  • React - UI library
  • Redux Toolkit - State management
  • Vite - Build tool
  • Radix UI - Component library
  • TailwindCSS - Styling
  • Lucide React Icons - Icons

Backend:

  • Node.js - Runtime environment
  • Express - Web framework
  • MongoDB & Mongoose - Database
  • JWT Authentication - Security
  • Cloudinary - Image storage
  • Bcrypt - Password hashing

๐Ÿ† Badge System

Unlock Amazing Achievements! ๐ŸŽ‰

Authors can earn these badges:

Badge Name Requirement
๐Ÿ… First Post Publish your first blog
๐Ÿ”ฅ Trending Author Get 100+ views
๐Ÿš€ Viral Creator Get 1000+ views
โœ๏ธ Consistent Writer Maintain a 4-week streak
๐Ÿ“ Dedicated Writer Maintain a 12-week streak
โญ Top Rated Receive 50 total likes
๐ŸŒŸ Highly Acclaimed Receive 200 total likes
๐Ÿง  Expert Contributor Publish 10 posts in one category

๐ŸŽฏ Milestone Categories

Track Your Progress Across Multiple Categories! ๐Ÿ“Š

Category Milestones
๐Ÿ“Œ Blogs Published 10, 20, 50, 100 posts
๐Ÿ‘๏ธ Total Views 100, 500, 1K, 10K, 100K views
๐Ÿ’ฌ Comments Received 10, 50, 100, 500 comments
๐Ÿ“… Active Time 1, 3, 6, 12 months
๐ŸŒ Global Reach 10, 50, 100, 500 unique readers

๐Ÿค Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

How to Contribute

  1. Fork the repository

    git clone https://github.com/Saurabhtbj1201/BuildNotes.git
  2. Create your feature branch

    git checkout -b feature/AmazingFeature
  3. Commit your changes

    git commit -m 'Add some AmazingFeature'
  4. Push to the branch

    git push origin feature/AmazingFeature
  5. Open a Pull Request


๐Ÿ“ License

This project is open source and available under the MIT License.


๐Ÿ‘จโ€๐Ÿ’ป About Me

Hi! I'm Saurabh Kumar ๐Ÿ‘‹

A passionate developer focused on automation, AI, and building scalable solutions for real-world problems.

This project represents my commitment to leveraging modern technologies to streamline e-commerce operations and enhance customer experiences.

๐Ÿ’ผ Skills

Full-Stack Development โ€ข MERN Stack โ€ข API Integration โ€ข Cloud Services โ€ข UI/UX Design โ€ข Database Management โ€ข DevOps โ€ข AI & Automation


ยฉ Made with โค๏ธ by Saurabh Kumar. All Rights Reserved 2025

Saurabh Profile GitHub Follow

๐Ÿ”— Connect With Me

LinkedIn Twitter Instagram Facebook Portfolio WhatsApp


Made with โค๏ธ by Saurabh Kumar
โญ Star this repo if you find it helpful!

Profile Views Repo Views

About

A full-stack blog application built with MongoDB, Express, React, and Node.js.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published