A web application for searching your LinkedIn network using semantic search.
- Sign in with LinkedIn to access your network
- Index your LinkedIn connections for semantic search
- Search for people by skills, experience, or company
- View detailed profile information
- Expandable profile cards with summaries
This project is divided into two main parts:
- Frontend: Next.js application with TypeScript and Tailwind CSS
- Backend: FastAPI application with PostgreSQL and Pinecone for vector search
- Node.js 18+ and npm
- Python 3.9+
- PostgreSQL
- Pinecone account
- OpenAI API key
- LinkedIn Developer account
-
Navigate to the backend directory:
cd backend -
Create a virtual environment and activate it:
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install dependencies:
pip install -r requirements.txt
-
Copy
.env.exampleto.envand fill in the required values:cp .env.example .env
-
Run the development server:
uvicorn app.main:app --reload
-
Navigate to the frontend directory:
cd frontend -
Install dependencies:
npm install
-
Copy
.env.local.exampleto.env.localand fill in the required values:cp .env.local.example .env.local
-
Run the development server:
npm run dev
- Open your browser and navigate to
http://localhost:3000 - Sign in with your LinkedIn account
- Wait for your network to be indexed
- Search for people using natural language queries
- Next.js
- TypeScript
- Tailwind CSS
- NextAuth.js
- React Icons
- FastAPI
- PostgreSQL with pgvector
- Pinecone
- OpenAI Embeddings
- SQLAlchemy
- JWT Authentication
This application uses NextAuth.js for authentication with LinkedIn. The authentication flow is as follows:
- User clicks "Sign in with LinkedIn" on the frontend
- NextAuth.js redirects to LinkedIn's OAuth page
- User authenticates with LinkedIn
- LinkedIn redirects back to the NextAuth.js callback URL
- NextAuth.js creates a session with the user's information and LinkedIn tokens
- The frontend uses the session token for API authentication
- The backend validates the NextAuth.js token and identifies the user
For authentication to work properly, you need to set up the following environment variables:
NEXTAUTH_URL=http://localhost:3000
NEXTAUTH_SECRET=your-nextauth-secret-for-development-only
LINKEDIN_CLIENT_ID=your-linkedin-client-id
LINKEDIN_CLIENT_SECRET=your-linkedin-client-secret
NEXTAUTH_SECRET=your-nextauth-secret-for-development-only
Important: The NEXTAUTH_SECRET must be the same in both the frontend and backend for token validation to work correctly.
In the LinkedIn Developer Portal, you need to configure the following:
- Redirect URL:
http://localhost:3000/api/auth/callback/linkedin - OAuth 2.0 scopes:
r_emailaddress,r_liteprofile
MIT