A full-stack Twitter clone built with the MERN stack (MongoDB, Express.js, React, Node.js) that replicates core Twitter functionality including user authentication, posting, following, and notifications.
- User authentication (signup, login, logout)
- Create, read, update, and delete posts
- Like and comment on posts
- Follow/unfollow users
- Real-time notifications
- User profiles with profile picture and bio editing
- Responsive design for all device sizes
- Node.js - JavaScript runtime environment
- Express.js - Web application framework
- MongoDB - NoSQL database
- Mongoose - MongoDB object modeling tool
- JWT - JSON Web Tokens for authentication
- Bcrypt - Password hashing
- Cloudinary - Image hosting service
- Cookie-parser - Parsing cookie header
- React - JavaScript library for building user interfaces
- React Router - Declarative routing for React
- Tailwind CSS - Utility-first CSS framework
- DaisyUI - Tailwind CSS component library
- TanStack Query - Server state management
- React Icons - Popular icons as React components
- Vite - Frontend build tool
.
├── backend/
│ ├── controllers/ # Request handlers
│ ├── db/ # Database connection
│ ├── middleware/ # Custom middleware
│ ├── models/ # Mongoose models
│ ├── routes/ # API routes
│ └── server.js # Entry point
├── frontend/
│ ├── src/
│ │ ├── components/ # React components
│ │ ├── hooks/ # Custom React hooks
│ │ ├── pages/ # Page components
│ │ ├── utils/ # Utility functions
│ │ ├── App.jsx # Main App component
│ │ └── main.jsx # Entry point
│ └── vite.config.js # Vite configuration
POST /api/auth/signup- Register a new userPOST /api/auth/login- Login userPOST /api/auth/logout- Logout userGET /api/auth/me- Get authenticated user
GET /api/users/profile/:username- Get user profilePUT /api/users/follow/:id- Follow/unfollow userPUT /api/users/update- Update user profileGET /api/users/suggested- Get suggested users
POST /api/posts/create- Create a new postGET /api/posts/all- Get all postsGET /api/posts/liked/:id- Get posts liked by userGET /api/posts/following- Get posts from followed usersGET /api/posts/user/:username- Get user's postsDELETE /api/posts/:id- Delete a postPUT /api/posts/like/:id- Like/unlike a post
GET /api/notifications- Get user notificationsDELETE /api/notifications- Delete all notifications

