A mini LinkedIn-like community platform built with modern web technologies. This platform allows users to create profiles, share posts, follow other users, and interact through likes and comments.
- User Authentication: Register and login with email/password
- User Profiles: Complete profiles with name, email, bio, and avatar
- Public Post Feed: Create, read, and display text posts
- Profile Pages: View user profiles and their posts
- Follow System: Follow/unfollow other users
- Like & Comment: Interact with posts through likes and comments
- Search Users: Search for users by name
- Responsive Design: Mobile-first responsive UI
- Real-time Updates: Posts and interactions update in real-time
- Pagination: Load more posts with pagination
- Form Validation: Comprehensive client and server-side validation
- Toast Notifications: User-friendly notifications for actions
- Modern UI: Clean, professional design with Tailwind CSS
- Next.js 14 - React framework with App Router
- TypeScript - Type-safe JavaScript
- Tailwind CSS - Utility-first CSS framework
- React Hook Form - Form handling and validation
- Axios - HTTP client for API calls
- React Hot Toast - Toast notifications
- Lucide React - Icon library
- Node.js - JavaScript runtime
- Express.js - Web application framework
- MongoDB - NoSQL database
- Mongoose - MongoDB object modeling
- JWT - JSON Web Tokens for authentication
- bcryptjs - Password hashing
- Express Validator - Input validation
- MongoDB Atlas - Cloud database service
Before running this application, make sure you have:
- Node.js (v16 or higher)
- npm or yarn
- MongoDB database (local or Atlas)
git clone <repository-url>
cd linkedin-community-platform# Install backend dependencies
npm install
# Install frontend dependencies
cd client
npm install
cd ..Create a .env file in the root directory:
NODE_ENV=development
PORT=5000
MONGODB_URI=mongodb://localhost:27017/linkedin-community
JWT_SECRET=your-super-secret-jwt-key-change-this-in-production
CLIENT_URL=http://localhost:3000# Start both frontend and backend (recommended)
npm run dev
# Or start them separately:
# Backend only
npm run server
# Frontend only (in client directory)
cd client && npm run dev- Frontend: http://localhost:3000
- Backend API: http://localhost:5000
linkedin-community-platform/
βββ server/ # Backend code
β βββ index.js # Main server file
β βββ models/ # Database models
β β βββ User.js
β β βββ Post.js
β βββ routes/ # API routes
β β βββ auth.js
β β βββ posts.js
β β βββ users.js
β βββ middleware/ # Middleware
β βββ auth.js
βββ client/ # Frontend code
β βββ src/
β β βββ app/ # Next.js app directory
β β β βββ login/
β β β βββ register/
β β β βββ profile/
β β β βββ search/
β β β βββ globals.css
β β β βββ layout.tsx
β β β βββ page.tsx
β β βββ components/ # React components
β β β βββ Header.tsx
β β β βββ Feed.tsx
β β β βββ CreatePost.tsx
β β β βββ PostCard.tsx
β β βββ contexts/ # React contexts
β β β βββ AuthContext.tsx
β β βββ lib/ # Utilities
β β βββ api.ts
β βββ package.json
β βββ tailwind.config.ts
βββ package.json
βββ README.md
POST /api/auth/register- Register a new userPOST /api/auth/login- Login userGET /api/auth/me- Get current user
GET /api/posts- Get all posts (paginated)POST /api/posts- Create a new postGET /api/posts/:id- Get a specific postDELETE /api/posts/:id- Delete a postPUT /api/posts/:id/like- Like/unlike a postPOST /api/posts/:id/comment- Comment on a post
GET /api/users/profile/:id- Get user profilePUT /api/users/profile- Update user profileGET /api/users/search- Search usersPUT /api/users/follow/:id- Follow/unfollow userGET /api/users/:id/followers- Get user's followersGET /api/users/:id/following- Get user's following
You can create your own account or use these demo credentials:
Demo User 1:
- Email: [email protected]
- Password: password123
Demo User 2:
- Email: [email protected]
- Password: password123
- Push your code to GitHub
- Connect your repository to Vercel
- Set environment variables in Vercel dashboard
- Deploy
- Push your code to GitHub
- Create a new Web Service on Render
- Connect your GitHub repository
- Set environment variables:
MONGODB_URIJWT_SECRETNODE_ENV=production
- Deploy
- Create a MongoDB Atlas account
- Create a new cluster
- Get your connection string
- Update your environment variables
- Password hashing with bcrypt
- JWT token authentication
- Input validation and sanitization
- CORS protection
- Rate limiting (can be added)
- XSS protection
- Responsive design for all devices
- Modern, clean interface
- Loading states and animations
- Toast notifications
- Form validation with error messages
- Accessible design patterns
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
This project is licensed under the MIT License.
For support or questions, please contact:
- Email: [email protected]
- Email: [email protected]
- Frontend: [Vercel Deployment URL]
- Backend: [Render Deployment URL]
Note: This is a demo project for assessment purposes. In a production environment, additional security measures, error handling, and performance optimizations would be implemented.