BlogStack is a modern, full-stack blog application built with React for the frontend and Node.js with Express for the backend. It allows users to create, read, update, and delete blog posts, as well as authenticate and manage their accounts.
- User authentication (sign up, sign in, sign out)
- Create, read, update, and delete blog posts
- Responsive design for mobile and desktop
- Rich text editing for blog posts
- Image upload for blog post covers
- User profiles
- Frontend:
- React
- Redux for state management
- Material-UI for styling
- Axios for API requests
- Backend:
- Node.js
- Express.js
- MongoDB for database
- Mongoose as ODM
- JWT for authentication
Blog-App-Main/
├── client/ # Frontend React application
│ ├── public/
│ ├── src/
│ │ ├── components/ # React components
│ │ ├── pages/ # Page components
│ │ ├── redux/ # Redux store, actions, and reducers
│ │ ├── services/ # API services
│ │ ├── utils/ # Utility functions
│ │ ├── App.js # Main App component
│ │ └── index.js # Entry point
│ └── package.json
├── server/ # Backend Node.js/Express application
│ ├── controllers/ # Request handlers
│ ├── models/ # Mongoose models
│ ├── routes/ # Express routes
│ ├── middleware/ # Custom middleware
│ ├── utils/ # Utility functions
│ ├── app.js # Express app setup
│ └── server.js # Entry point for the server
├── .gitignore
├── package.json
└── README.md # This file
- Node.js (v14 or later)
- MongoDB
- Clone the repository:
git clone https://github.com/Dewang007/BlogStack-App.git
cd Blog-App-Main
- Install server dependencies:
cd server
npm install
- Install client dependencies:
cd ../client
npm install
- Create a
.envfile in the server directory with the following content:
PORT=8000
MONGODB_URI=your_mongodb_connection_string
JWT_SECRET=your_jwt_secret
- Start the server:
cd server
npm start
- In a new terminal, start the client:
cd client
npm start
- Open your browser and navigate to
http://localhost:3000
- POST /api/auth/signup - Register a new user
- POST /api/auth/signin - Authenticate a user
- GET /api/blogs - Get all blogs
- GET /api/blogs/:id - Get a specific blog
- POST /api/blogs - Create a new blog (authenticated)
- PUT /api/blogs/:id - Update a blog (authenticated)
- DELETE /api/blogs/:id - Delete a blog (authenticated)
This project is licensed under the MIT License.