A fully-featured Pinterest clone built with the MERN stack (MongoDB, Express, React, Node.js), featuring user authentication, image uploads, interactive pins, comments, like/unlike, follow/unfollow and user profiles.
- Secure user registration and login system
- Password encryption with bcryptJS
- JWT token-based authentication
- Protected routes for authenticated users
- Responsive design that works on all devices
- Complete Pinterest-style landing page for non-authenticated users
- Complete Explore page where users can view all pins and also based on different categories
- Intuitive navigation with dynamic navbar based on user authentication status
- Masonry layout for pins display
- Create pins with image uploads (via Cloudinary)
- View all pins on the home feed
- Search functionality to find specific pins
- Detailed individual pin pages
- Edit and delete pins (for pin owners)
- Like and unline pins
- Comment on pins
- Delete your own comments
- Follow/unfollow other users
- View user profiles
- React.js
- React Router for navigation
- Context API for state management
- Axios for API requests
- Tailwind CSS for styling
- Node.js
- Express.js
- MongoDB (with Mongoose)
- JWT for authentication
- bcryptJS for password hashing
- Cloudinary for image uploads and storage
- Implement notifications system
- Add pin collections/boards
- Add save and unsave pin
- Add social sharing options
- Implement infinite scrolling for pins
- Node.js
- MongoDB
- Cloudinary account
- Clone the repository
git clone https://github.com/yourusername/pinspire.git
cd pinspire- Install dependencies for both frontend and backend
# Install backend dependencies
cd backend
npm install
# Install frontend dependencies
cd ../frontend
npm install- Create a
.envfile in the backend directory with the following variables
PORT=5000
MONGODB_URI=your_mongodb_connection_string
JWT_SECRET=your_jwt_secret
JWT_EXPIRE=jwt expiry period i,e 1d, 7d etc
NODE_ENV=production
CLOUDINARY_CLOUD_NAME=your_cloudinary_cloud_name
CLOUDINARY_API_KEY=your_cloudinary_api_key
CLOUDINARY_API_SECRET=your_cloudinary_api_secret
- Start the development servers
# Start backend server (from backend directory)
npm run dev
# Start frontend server (from frontend directory)
npm start- Open your browser and go to
http://localhost:3000
POST /api/auth/register- Register a new userPOST /api/auth/login- Login userPOST /api/auth/logout- Logout user
GET /api/auth/me- Get user profileGET /api/auth/user/:id- Get user profile by idPUT /api/auth/profile- Update user profilePOST /api/auth/follow/:id- Follow or Unfollow a user by ID
GET /api/pins- Get all pinsGET /api/pins/:id- Get a specific pinPOST /api/pins/create- Create a new pinPUT /api/pins/:id- Update a pinDELETE /api/pins/:id- Delete a pinPUT /api/pins/:id/toggleLike- Like and Unlike a pin
GET /api/pins/:pinId/comments- Get All commentsGET /api/pins/:pinId/comments/:id- Get a single commentPOST /api/pins/:pinId/comments/create- Add/Create a commentPUT /api/pins/:pinId/comments/:id- Update a commentDELETE /api/pins/:pinId/comments/:id- Delete a comment
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.
- GitHub: @faisal-din
- LinkedIn: Faisal Din
β If you find this project helpful, please give it a star on GitHub! β









