BlogShot is a full-stack web application designed for creating and managing blog posts. It features user authentication, post creation, and category management. The application is built using Node.js, Express, MongoDB for the backend, and React for the frontend.
- User Authentication: Register, login, and logout functionalities.
- Post Management: Create, update, delete, and view blog posts.
- Category Management: Organize posts into categories.
- File Upload: Upload images for blog posts.
- Responsive Design: Works on various devices and screen sizes.
- Frontend: React, HTML, CSS
- Backend: Node.js, Express.js
- Database: MongoDB
- Authentication: JWT (JSON Web Tokens)
- File Upload: Multer
- Environment Variables: dotenv
- CORS: Enabled for cross-origin requests
- Node.js (v14 or later)
- MongoDB
- npm (Node Package Manager)
-
Clone the repository:
git clone https://github.com/yourusername/blogFullstack.git cd blogFullstack
-
Backend Setup:
- Navigate to the
api
directory:cd api
- Install dependencies:
npm install
- Create a
.env
file in theapi
directory and add your MongoDB URI and JWT secret:MONGO_URL=your_mongo_db_uri JWT_SECRET=your_jwt_secret
- Navigate to the
-
Frontend Setup:
- Navigate to the
client
directory:cd ../client
- Install dependencies:
npm install
- Navigate to the
-
Start the Backend Server:
- In the
api
directory, run:npm start
- The backend server will run on
http://localhost:3003
.
- In the
-
Start the Frontend Server:
- In the
client
directory, run:npm start
- The frontend server will run on
http://localhost:5173
.
- In the
- Visit
http://localhost:5173
in your browser to access the application. - Register a new account or log in with existing credentials.
- Create, edit, and delete blog posts.
- Organize posts into categories.
Contributions are welcome! Please follow these steps:
- Fork the repository.
- Create a new branch (
git checkout -b feature/YourFeature
). - Commit your changes (
git commit -m 'Add some feature'
). - Push to the branch (
git push origin feature/YourFeature
). - Open a pull request.
This project is licensed under the MIT License. See the LICENSE file for details.
For any inquiries or feedback, please contact [email protected].