Welcome to ideaWave, a full-featured blog website where users can create, edit, and delete their posts. This project is built using the MERN stack (MongoDB, Express.js, React, Node.js) with additional technologies for enhanced functionality and styling.
- Features
- Technologies Used
- Setup and Installation
- Backend Overview
- Frontend Overview
- Environment Variables
- Screenshots
- User Authentication (Register, Login, Logout)
- Create, Edit, and Delete Posts
- View a list of posts with pagination
- View individual post details
- Responsive design using Tailwind CSS
- Notifications using Toastify
- Node.js
- Express.js
- MongoDB
- Mongoose
- bcryptjs
- jsonwebtoken
- multer (for file uploads)
- cookie-parser
- dotenv
- React
- React Router
- Axios
- Tailwind CSS
- Toastify
- date-fns
Make sure you have the following installed on your local development environment:
- Node.js
- npm or yarn
- MongoDB
- Clone the repository:
git clone https://github.com/keshavkumar143/IdeaWave.git
cd MERN GRP
- Navigate to the
backend
directory and install dependencies:
cd api
npm install
node/nodemon index.js
- Create a
.env
file in theapi
directory and add the following environment variables:
MONGO_URI=mongodb://127.0.0.1:27017/Blogwebsite
JWT_SECRET=your_jwt_secret
PORT=4000
- Start the backend server:
npm start
- Navigate to the
frontend
directory and install dependencies:
cd client
npm i
- Start the frontend development server:
npm start
Open your browser and navigate to http://localhost:3000
.
The backend of ideaWave is built with Express.js and connects to a MongoDB database using Mongoose. It includes the following main features:
- User authentication with JWT
- CRUD operations for posts
- File uploads using multer
POST /register
: Register a new userPOST /login
: Log in a user and issue a JWTGET /profile
: Get the profile of the logged-in userPOST /logout
: Log out the current userPOST /post
: Create a new postPUT /post
: Edit an existing postDELETE /post/:id
: Delete a postGET /post
: Get a list of postsGET /post/:id
: Get a specific post by ID
The frontend of ideaWave is built with React and styled using Tailwind CSS. It includes the following main features:
- User authentication with JWT
- CRUD operations for posts
- Notifications using Toastify
- Routing with React Router
App.js
: Main application component with routingPost.js
: Component to display a single postPostList.js
: Component to display a list of postsCreatePost.js
: Component to create a new postEditPost.js
: Component to edit an existing postProfile.js
: Component to display user profile
The application uses the following environment variables:
MONGO_URI
: MongoDB connection stringJWT_SECRET
: Secret key for JWTPORT
: Port for the backend server