| Metric | Value |
|---|---|
| Total SLOC | 11,095 |
| Source Files | 62 |
| .ts | 5,736 |
| .tsx | 3,013 |
| .md | 1,845 |
| .sql | 249 |
| .json | 124 |
A simplified LinkedIn-like platform demonstrating professional social graphs, connection recommendations, feed ranking, and job matching algorithms. This educational project focuses on building a professional networking system with sophisticated recommendation engines.
- Work history and education
- Skills and endorsements
- Profile completeness scoring
- First, second, third-degree connections
- Connection requests and acceptance
- Mutual connections display
- "People You May Know" (PYMK) recommendations
- Professional posts with rich content
- Engagement (likes, comments)
- Feed ranking algorithm based on engagement, recency, and relationship
- Job listings with requirements and salary ranges
- Candidate-job matching score based on skills, experience, location
- Application tracking
- Recommended jobs for users
- Company profiles with industry and size
- Job postings per company
- Frontend: TypeScript + Vite + React 19 + TanStack Router + Zustand + Tailwind CSS
- Backend: Node.js + Express + TypeScript
- Database: PostgreSQL
- Cache: Redis
- Search: Elasticsearch
- Containerization: Docker Compose
- Node.js 18+
- Docker and Docker Compose
- npm or yarn
# Start PostgreSQL, Redis, and Elasticsearch
docker-compose up -d
# Wait for services to be healthy (about 30 seconds)
docker-compose pscd backend
# Install dependencies
npm install
# Seed the database with test data
npm run seed
# Start the development server
npm run devThe backend will be available at http://localhost:3001
cd frontend
# Install dependencies
npm install
# Start the development server
npm run devThe frontend will be available at http://localhost:5173
All demo accounts use the password: password123
| Role | Description | |
|---|---|---|
| alice@example.com | Admin | Senior Software Engineer at TechCorp |
| bob@example.com | User | Product Manager at DataFlow |
| carol@example.com | User | Data Scientist at CloudScale |
| david@example.com | User | Engineering Lead at TechCorp |
| emma@example.com | User | Frontend Developer at StartupXYZ |
| frank@example.com | User | Backend Engineer at CloudScale |
| grace@example.com | User | DevOps Engineer at DataFlow |
| henry@example.com | User | Solutions Architect at GlobalBank |
POST /api/auth/register- Register new userPOST /api/auth/login- LoginPOST /api/auth/logout- LogoutGET /api/auth/me- Get current user
GET /api/users/:id- Get user profile with experience, education, skillsPATCH /api/users/me- Update own profileGET /api/users?q=query- Search usersPOST /api/users/me/experiences- Add experiencePOST /api/users/me/education- Add educationPOST /api/users/me/skills- Add skillPOST /api/users/:id/skills/:skillId/endorse- Endorse a skill
GET /api/connections- Get my connectionsGET /api/connections/requests- Get pending requestsPOST /api/connections/request- Send connection requestPOST /api/connections/requests/:id/accept- Accept requestPOST /api/connections/requests/:id/reject- Reject requestDELETE /api/connections/:userId- Remove connectionGET /api/connections/degree/:userId- Get connection degreeGET /api/connections/mutual/:userId- Get mutual connectionsGET /api/connections/second-degree- Get 2nd degree connectionsGET /api/connections/pymk- Get People You May Know recommendations
GET /api/feed- Get feed (posts from connections)POST /api/feed- Create postGET /api/feed/:id- Get single postDELETE /api/feed/:id- Delete postPOST /api/feed/:id/like- Like postDELETE /api/feed/:id/like- Unlike postGET /api/feed/:id/comments- Get commentsPOST /api/feed/:id/comments- Add commentGET /api/feed/user/:userId- Get user's posts
GET /api/jobs- List/search jobsGET /api/jobs/recommended- Get recommended jobsGET /api/jobs/:id- Get job detailsPOST /api/jobs/:id/apply- Apply for jobGET /api/jobs/my/applications- Get my applicationsGET /api/jobs/companies- List companiesPOST /api/jobs- Create job (admin only)POST /api/jobs/companies- Create company (admin only)
See architecture.md for detailed system design documentation.
# Terminal 1
npm run dev:server1 # Port 3001
# Terminal 2
npm run dev:server2 # Port 3002
# Terminal 3
npm run dev:server3 # Port 3003Create a .env file in the backend directory:
# Database
DB_HOST=localhost
DB_PORT=5432
DB_NAME=linkedin
DB_USER=linkedin
DB_PASSWORD=linkedin_password
# Redis
REDIS_HOST=localhost
REDIS_PORT=6379
# Elasticsearch
ELASTICSEARCH_URL=http://localhost:9200
# Session
SESSION_SECRET=your-secret-key
# Frontend URL (for CORS)
FRONTEND_URL=http://localhost:5173- Connection Degrees: Efficiently computing 2nd and 3rd degree connections using recursive CTEs
- People You May Know: Multi-factor scoring based on mutual connections, shared companies, schools, skills, and location
- Feed Ranking: Balancing recency, relevance (connection degree), and engagement signals
- Job Matching: Multi-factor scoring based on skill match, experience level, location, and company connections
See claude.md for development insights and design decisions.
- LinkedIn Engineering Blog - Official engineering blog with deep dives into LinkedIn's infrastructure
- Building the LinkedIn Economic Graph - How LinkedIn models the global economy as a graph
- People You May Know: A Social Network Friend Recommendation System - ACM paper on friend recommendation algorithms used at LinkedIn
- Whom to Follow on Twitter - Research paper on recommendation systems applicable to professional networks
- LinkedIn's Real-time Graph Partitioning - Scaling graph processing for billions of connections
- Feed Ranking at LinkedIn - How LinkedIn curates and ranks feed content
- Galene: LinkedIn's Search Architecture - LinkedIn's approach to search across the economic graph