This project is a comprehensive implementation of a blog system, developed to manage various blogging operations efficiently. The system focuses on robust backend architecture and effective data management, utilizing modern web technologies.
- Clone into your local file system. Make sure to have git install beforehand.
git clone https://github.com/yourusername/blog-project.git
- Navigate to the backend directory and install the necessary Node.js modules. Make sure to have Node.js installed beforehand.
cd backend
npm install
- Create a .env file in the backend directory and fill it with your environment variables.
DB_HOST = your_database_host
DB_USER = your_database_user
DB_PASS = your_database_password
DB_NAME = your_database_name
JWT_SECRET = your_jwt_secret
CLOUD_NAME = your_cloudinary_cloud_name
CLOUD_API_KEY = your_cloudinary_api_key
CLOUD_API_SECRET = your_cloudinary_api_secret
- Start the backend server using the following command:
npm run start
- Navigate to the frontend directory and install the necessary Node.js modules.
cd frontend
npm install
- Start the frontend development server using the following command:
npm run dev
- Start the backend server as described in the installation steps.
- Start the frontend development server as described in the installation steps.
- Access the application via
http://localhost:5173in your web browser.
For detailed information about the API endpoints, please refer to the API Overview documentation.
- Node.js: JavaScript runtime for server-side development.
- Express.js: Web framework for Node.js.
- MongoDB: NoSQL database for storing blog data.
- Mongoose: ODM for MongoDB.
- React.js: JavaScript library for building user interfaces.
- Cloudinary: Cloud service for managing images.
- Multer: Middleware for handling multipart/form-data.
- bcryptjs: Library for hashing passwords.
- jsonwebtoken: Library for generating and verifying JWT tokens.
- dotenv: Module for loading environment variables.
- User Authentication and Authorization: Secure login, registration, and role-based access control.
- Post Management: Create, retrieve, update, and delete blog posts.
- Image Upload and Management: Upload and manage images using Cloudinary.
- Responsive Design: Mobile-friendly layout.
- Environment Configuration: Securely manage environment variables with dotenv.
- Middleware and Templating: Use Express, body-parser, and cookie-parser for routing and views.