A full-stack social media web application inspired by LinkedIn, built as part of the AppDost Full Stack Developer Internship Assignment.
- Frontend: [Your Netlify/Vercel URL here]
- Backend: [Your Render/Railway URL here]
- ✅ User Authentication: Sign up and login with email and password
- ✅ Create Posts: Users can create text posts
- ✅ View Feed: Public feed displaying all users' posts (latest first)
- ✅ User Profile Display: Shows logged-in user's name in the header
- ✅ Like Posts: Users can like/unlike posts
- ✅ Comment on Posts: Add comments to any post
- ✅ Edit Posts: Users can edit their own posts
- ✅ Delete Posts: Users can delete their own posts
- ✅ Responsive Design: Mobile-friendly interface
- ✅ Real-time Updates: Feed updates after actions
|
|
linkedin-clone/
├── backend/
│ ├── server.js # Main server file
│ ├── package.json # Backend dependencies
│ └── .env # Environment variables
│
└── frontend/
├── src/
│ ├── App.js # Main React component
│ ├── App.css # Styles
│ └── index.js # Entry point
├── package.json # Frontend dependencies
└── public/
- Node.js (v14 or higher)
- MongoDB (local or MongoDB Atlas)
- npm or yarn
-
Navigate to backend directory
cd backend -
Install dependencies
npm install
-
Create
.envfileMONGODB_URI=mongodb://localhost:27017/linkedin-clone JWT_SECRET=your_secret_key_here PORT=5000
For MongoDB Atlas, use:
MONGODB_URI=mongodb+srv://username:password@cluster.mongodb.net/Linkedin-Clone
-
Start the backend server
npm start
For development with auto-restart:
npm run dev
Backend will run on
http://localhost:5000
-
Navigate to frontend directory
cd frontend -
Install dependencies
npm install
-
Create
.envfile (optional, for production)REACT_APP_API_URL=http://localhost:5000
-
Start the React app
npm start
Frontend will run on
http://localhost:3000
- Create a new Web Service on Render
- Connect your GitHub repository
- Set build command:
npm install - Set start command:
node server.js - Add environment variables:
MONGODB_URIJWT_SECRET
- Deploy!
- Create a new project on Railway
- Connect your GitHub repository
- Add MongoDB plugin
- Set environment variables
- Deploy!
- Create a new site on Netlify
- Connect your GitHub repository
- Set build command:
npm run build - Set publish directory:
build - Add environment variable:
REACT_APP_API_URL: Your backend URL
- Deploy!
- Install Vercel CLI:
npm i -g vercel - Run:
vercel - Follow the prompts
- Add environment variables in Vercel dashboard
POST /api/signup- Register new userPOST /api/login- Login userGET /api/me- Get current user (protected)
GET /api/posts- Get all postsPOST /api/posts- Create new post (protected)PUT /api/posts/:id- Update post (protected)DELETE /api/posts/:id- Delete post (protected)POST /api/posts/:id/like- Like/unlike post (protected)POST /api/posts/:id/comment- Add comment (protected)
- Sign Up: Create a new account
- Login: Login with your credentials
- Create Post: Write and post content
- Interact: Like, comment, edit, and delete posts
- Logout: Sign out securely
- Ensure MongoDB is running locally
- Check connection string in
.env - For Atlas, whitelist your IP address
- Ensure backend has CORS enabled
- Check API URL in frontend
.env
- Change PORT in backend
.env - Kill the process using the port:
lsof -ti:5000 | xargs kill
- Image upload for posts
- User profile pages
- Follow/Unfollow users
- Private messaging
- Notifications
- Search functionality
- Infinite scroll pagination
This project is created for the AppDost Full Stack Developer Internship Assignment.
- AppDost for the internship opportunity
- MongoDB documentation
- React documentation
- Express.js documentation
Assignment Submitted to: hr@appdost.in
Deadline: Within 3 days of receiving the assignment
Made with ❤️ by Akasha Sahu


