Sitelet https://github.com/SohailShabbir867/Daily_Blogs
Skip to content

Latest commit

 

History

100 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Daily Blogs

A full-stack MERN (MongoDB, Express, React, Node.js) blog platform with authentication, user management, and admin features.

✨ Features

User Features

  • 📝 Create, edit, and delete blog posts
  • 💬 Comment and reply to posts
  • ❤️ Like and save blogs
  • 👤 User profile management
  • 🔖 Bookmark favorite posts

Authentication

  • 🔐 Session-based authentication with cookies
  • 🔑 Secure password hashing with bcrypt
  • 📧 Email verification & password reset
  • 🛡️ Protected routes and API endpoints

Admin Features

  • 👥 User management (roles, status)
  • 📊 Dashboard with statistics
  • 🏷️ Featured blog management
  • 🔧 Comment moderation

🌐 Production Environment

  • Frontend: Deployed on Vercel (https://dailyblogs.me)
  • Backend API: Deployed on Azure App Service
  • Database: MongoDB Atlas
  • CI/CD: Fully automated deployment via GitHub Actions

🚀 Quick Start (Local Development)

Prerequisites

  • Node.js >= 18.0.0
  • MongoDB (local or Atlas)

Installation

# Clone the repository
git clone https://github.com/SohailShabbir867/Daily_Blogs.git
cd Daily_Blogs

# Install backend dependencies
cd backend
npm install

# Install frontend dependencies
cd ../frontend
npm install

Environment Setup

Backend (backend/.env):

NODE_ENV=development
PORT=5000
MONGODB_URI=your_mongodb_connection_string
SESSION_SECRET=your_super_secret_key
CLIENT_URL=http://localhost:5173
SUPER_ADMIN_EMAIL=your_admin_email@example.com

Frontend (frontend/.env):

VITE_API_URL=http://localhost:5000/api

Run the Application

# Terminal 1 - Backend
cd backend
npm run dev

# Terminal 2 - Frontend
cd frontend
npm run dev

🛡️ Security Features

  • Helmet security headers
  • CORS protection (allows custom production domains)
  • Rate limiting
  • NoSQL injection prevention
  • Session security with httpOnly cookies
  • Password hashing with bcrypt
  • Input validation

🧪 Tech Stack

Frontend Backend
React 19 Node.js
React Router 7 Express.js 4
Tailwind CSS 4 MongoDB + Mongoose 8
Axios express-session
Vite bcryptjs, nodemailer

📝 Scripts

Backend

npm start      # Production server
npm run dev    # Development with nodemon
npm run seed   # Seed database

Frontend

npm run dev    # Development server
npm run build  # Production build
npm run lint   # ESLint check

Made with ❤️ using MERN Stack

About

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages