A modern, feature-rich blogging platform built with React and Node.js, featuring user authentication, image uploads, social interactions, and a clean, responsive design.
- Secure Registration & Login - JWT-based authentication
- Password Reset - Email-based password recovery system
- Profile Management - Edit profile with image upload support
- Protected Routes - Secure access to authenticated features
- Role-based Access - User and admin role support
- Create Blogs - Rich blog creation with image upload
- View Blogs - Browse all blogs with pagination
- Blog Details - Individual blog post view
- User-specific Blogs - View blogs by specific users
- Search Functionality - Search blogs by username
- Like/Unlike Posts - Interactive blog engagement
- View Likes - See who liked specific posts
- User Interactions - Track and display social engagement
- Responsive Design - Mobile-first approach with Tailwind CSS
- Modern Interface - Clean and intuitive user experience
- Real-time Notifications - Toast notifications for user feedback
- Modal Dialogs - Enhanced user interactions
- React 18 - Modern React with hooks
- Vite - Fast build tool and dev server
- React Router DOM - Client-side routing
- Tailwind CSS - Utility-first CSS framework
- Axios - HTTP client for API requests
- React Hot Toast - Notification system
- React Modal - Modal components
- Node.js - JavaScript runtime
- Express.js - Web application framework
- MongoDB - NoSQL database
- Mongoose - MongoDB object modeling
- JWT - JSON Web Token authentication
- bcryptjs - Password hashing
- Cloudinary - Cloud image storage
- Multer - File upload middleware
- Nodemailer - Email sending capability
- CORS - Cross-origin resource sharing
βββ Client/ # React Frontend
β βββ src/
β β βββ components/ # Reusable UI components
β β βββ pages/ # Page components
β β βββ routes/ # Route protection
β β βββ assets/ # Static assets
β βββ public/ # Public assets
β βββ package.json # Frontend dependencies
β
βββ Server/ # Node.js Backend
β βββ controllers/ # Business logic
β βββ models/ # Database schemas
β βββ routes/ # API routes
β βββ middlewares/ # Custom middleware
β βββ configs/ # Configuration files
β βββ package.json # Backend dependencies
- Node.js (v16 or higher)
- MongoDB (local or cloud)
- Cloudinary account (for image storage)
-
Clone the repository
git clone git@github.com:samiulhasansiam556/FullStack-Project-1.git cd blog-application -
Install Backend Dependencies
cd Server npm install -
Install Frontend Dependencies
cd ../Client npm install -
Environment Setup
Create
.envfile in theServerdirectory:DATABASE_URL=your_mongodb_connection_string JWT_SECRET=your_jwt_secret PORT=4000 CLOUDINARY_CLOUD_NAME=your_cloudinary_cloud_name CLOUDINARY_API_KEY=your_cloudinary_api_key CLOUDINARY_API_SECRET=your_cloudinary_api_secret EMAIL_USER=your_email@gmail.com EMAIL_PASS=your_email_password
Create
.envfile in theClientdirectory:VITE_SERVER_URL=http://localhost:4000
-
Start the Backend Server
cd Server npm run dev -
Start the Frontend Development Server
cd Client npm run dev -
Access the Application
- Frontend:
http://localhost:5173 - Backend API:
http://localhost:4000
- Frontend:
POST /api/user/register- User registrationPOST /api/user/login- User loginPOST /api/user/reset-password- Password reset requestPUT /api/user/reset-password/:id/:token- Reset password
GET /api/user/profile- Get user profilePUT /api/user/profile- Update user profilePUT /api/user/change-password- Change password
POST /api/blog/createblog- Create new blogGET /api/blog/userblogs- Get user's blogsGET /api/blog/allblogs- Get all blogsGET /api/blog/:id- Get specific blogPOST /api/blog/like/:id- Like/unlike blogGET /api/blog/likes/:id- Get blog likes
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
Samiul Hasan Siam 01704479730 samiulhasansiam556@gmail.com
- React team for the amazing framework
- Express.js for the robust backend framework
- MongoDB for the flexible database solution
- Cloudinary for image storage and management
- All other open-source libraries used in this project
β Star this repository if you found it helpful!