This is a full-stack web application built using the MERN (MongoDB, Express.js, React.js, Node.js) stack. It's a blogging platform where users can create, read, update, and delete blog posts. Users can also leave comments on posts and like/dislike comments.
- User authentication (sign up, sign in, sign out)
- Create, read, update, and delete blog posts
- Leave comments on blog posts
- Like/dislike comments
- Admin panel to manage users and posts
- Responsive design
- React.js
- React Router
- Redux Toolkit
- Tailwind CSS
- Flowbite React
- Firebase (for authentication)
- Node.js
- Express.js
- MongoDB (with Mongoose)
- JSON Web Tokens (JWT) for authentication
- bcryptjs for password hashing
- Node.js and npm installed on your machine
- MongoDB installed and running locally or a MongoDB Atlas account
-
Clone the repository:
git clone https://github.com/AvishkaGihan/insight-blog.git
-
Install dependencies for the server:
cd insight-blog npm install -
Install dependencies for the client:
cd client npm install -
Create a
.envfile in the root directory and add the following environment variables:MONGO=your-mongodb-connection-string JWT_SECRET=your-jwt-secret VITE_FIREBASE_API_KEY=your-firebase-api-key
-
Start the server:
npm run dev
-
Start the client in a separate terminal:
cd client npm run dev
The application should now be running at http://localhost:5173.
Contributions are welcome! If you find any issues or have suggestions for improvements, please open an issue or submit a pull request.
