Skip to content

Latest commit

 

History

History
337 lines (247 loc) · 8.6 KB

File metadata and controls

337 lines (247 loc) · 8.6 KB

AI Career Mentor

An AI-powered career guidance platform using Meta Llama for intelligent career recommendations and LinkedIn profile analysis.

Features

  • Landing Page: Professional hero section with feature highlights
  • Career Dashboard: Interactive interface for skill input and AI analysis
  • LinkedIn Integration: Fetch profile data directly from LinkedIn URLs
  • Resume Builder: AI-powered resume analysis and improvement suggestions
  • AI-Powered Recommendations: Get personalized job roles and technology suggestions
  • PDF Export: Download your career analysis and resume improvement reports
  • Modern UI: Dark theme with glassmorphism effects and smooth animations

Tech Stack

  • Frontend: Next.js 15, React, Tailwind CSS
  • Backend: Next.js API Routes
  • AI: Meta Llama (mock implementation included)
  • LinkedIn Data: RapidAPI, ScraperAPI, Bright Data, or Apify (demo mode included)
  • Deployment: Docker-ready

Getting Started

Prerequisites

  • Node.js 18+ installed
  • npm or yarn package manager

Installation

  1. Clone the repository
  2. Install dependencies:

```bash npm install ```

  1. Run the development server:

```bash npm run dev ```

  1. Open http://localhost:3000 in your browser

Integrating Meta Llama API

The current implementation uses a mock AI response. To integrate the real Meta Llama API:

  1. Install the AI SDK:

```bash npm install ai @ai-sdk/openai ```

  1. Add your Meta Llama API credentials to environment variables:

```env LLAMA_API_KEY=your_api_key_here ```

  1. Update app/api/analyze/route.ts to use the real API (see commented code in the file)

  2. Uncomment the Meta Llama integration code and remove the mock implementation

Integrating LinkedIn Data Fetching

The app supports fetching LinkedIn profile data directly from URLs. Currently using a demo mode with mock data.

Production Integration Options

Option 1: RapidAPI LinkedIn Scrapers (Recommended)

RapidAPI offers multiple LinkedIn scraping services. Choose one that fits your needs:

  1. Sign up at RapidAPI
  2. Subscribe to a LinkedIn scraper API:
  3. Add to environment variables:

```env RAPIDAPI_KEY=your_rapidapi_key ```

  1. Uncomment the RapidAPI integration code in app/api/linkedin/fetch/route.ts

Pricing: Varies by provider, typically $0.001-0.05 per profile

Option 2: ScraperAPI

General-purpose web scraping service that works with LinkedIn:

  1. Sign up at ScraperAPI
  2. Get your API key
  3. Add to environment variables:

```env SCRAPER_API_KEY=your_scraperapi_key ```

  1. Uncomment the ScraperAPI integration code in app/api/linkedin/fetch/route.ts
  2. Implement HTML parsing logic to extract profile data

Pricing: Starting at $49/month for 100K API credits

Option 3: Bright Data (Enterprise)

Enterprise-grade data collection platform:

  1. Sign up at Bright Data
  2. Access LinkedIn dataset
  3. Add to environment variables:

```env BRIGHT_DATA_API_KEY=your_brightdata_key ```

  1. Uncomment the Bright Data integration code in app/api/linkedin/fetch/route.ts

Pricing: Custom enterprise pricing

Option 4: Apify

Web scraping and automation platform with LinkedIn actors:

  1. Sign up at Apify
  2. Find LinkedIn Profile Scraper actor
  3. Add to environment variables:

```env APIFY_API_TOKEN=your_apify_token ```

  1. Uncomment the Apify integration code in app/api/linkedin/fetch/route.ts

Pricing: Pay-as-you-go, starting at $49/month

Option 5: Browser Extension (Free, Personal Use)

For personal use, create a browser extension that extracts LinkedIn data:

  1. Build a Chrome/Firefox extension
  2. Extract profile data from the DOM
  3. Send data to your app via API
  4. No external API costs

Note: This approach is for personal use only and may violate LinkedIn's terms of service if used at scale.

Current Demo Mode

The demo mode generates realistic mock profile data based on the LinkedIn URL. This is useful for:

  • Development and testing
  • Demonstrations and presentations
  • Understanding the data structure before integrating real APIs

To use real LinkedIn data, follow one of the production integration options above.

API Endpoints

POST /api/analyze

Analyzes skills and provides career recommendations.

Request: ```json { "skills": "Python, React, SQL, Node.js..." } ```

Response: ```json { "jobRoles": ["Full Stack Developer", "..."], "technologies": ["Docker", "..."], "summary": "Based on your skills..." } ```

POST /api/resume

Analyzes LinkedIn profile data and provides resume improvements.

Request: ```json { "profileData": "About: ... Experience: ..." } ```

Response: ```json { "improvements": ["Add quantifiable achievements", "..."], "optimizedSummary": "Results-driven professional...", "suggestedSkills": ["Leadership", "..."], "resumeScore": 75 } ```

POST /api/linkedin/fetch

Fetches LinkedIn profile data from URL (demo mode or with API integration).

Request: ```json { "linkedinUrl": "https://www.linkedin.com/in/username" } ```

Response: ```json { "profileData": "About: ... Experience: ...", "demo": true, "message": "Demo mode: Using mock data..." } ```

Project Structure

``` ├── app/ │ ├── page.tsx # Landing page │ ├── dashboard/ │ │ └── page.tsx # Career dashboard │ ├── api/ │ │ ├── analyze/ │ │ │ └── route.ts # AI analysis API endpoint │ │ ├── resume/ │ │ │ └── route.ts # Resume analysis API endpoint │ │ └── linkedin/ │ │ └── fetch/ │ │ └── route.ts # LinkedIn data fetching API endpoint │ ├── layout.tsx # Root layout │ └── globals.css # Global styles ├── components/ │ └── ui/ # shadcn/ui components ├── Dockerfile # Docker configuration └── README.md ```

Features in Detail

Landing Page

  • Hero section with compelling messaging
  • Feature cards highlighting AI capabilities
  • LinkedIn profile data fetching feature
  • Resume builder feature
  • Call-to-action buttons
  • Responsive design

Dashboard

  • Large text input for skills
  • Real-time AI analysis
  • LinkedIn profile data input
  • Resume improvement suggestions
  • Results display with:
    • Recommended job roles
    • Technologies to learn
    • AI-generated career summary
    • Optimized resume summary
  • Download report functionality

API Integration

  • RESTful API endpoint at /api/analyze

  • Mock implementation for development

  • Easy integration with Meta Llama

  • Error handling and validation

  • RESTful API endpoint at /api/resume

  • Analyzes LinkedIn profile data

  • Provides resume improvements

  • Error handling and validation

  • RESTful API endpoint at /api/linkedin/fetch

  • Fetches LinkedIn profile data from URL

  • Demo mode with mock data

  • Multiple integration options: RapidAPI, ScraperAPI, Bright Data, Apify

  • Error handling and validation

Customization

Styling

  • Edit app/globals.css to customize colors and themes
  • Modify design tokens for consistent theming
  • Adjust glassmorphism effects and animations

AI Prompts

  • Update the prompt in app/api/analyze/route.ts to customize AI responses
  • Adjust the mock analysis logic for different skill categories

LinkedIn Data Fetching

  • Customize the LinkedIn data fetching logic in app/api/linkedin/fetch/route.ts
  • Adjust the mock profile data generation for different scenarios

Resume Builder

  • Customize the resume analysis and improvement logic in app/api/resume/route.ts
  • Adjust the mock suggestions for different profile data

Environment Variables

```env

AI Integration (Optional - for production AI)

LLAMA_API_KEY=your_llama_api_key

LinkedIn Integration (Choose one)

RAPIDAPI_KEY=your_rapidapi_key

OR

SCRAPER_API_KEY=your_scraperapi_key

OR

BRIGHT_DATA_API_KEY=your_brightdata_key

OR

APIFY_API_TOKEN=your_apify_token ```

Docker Deployment

Build and run with Docker:

```bash

Build the image

docker build -t ai-career-mentor .

Run the container

docker run -p 3000:3000 ai-career-mentor ```

License

MIT

Support

For issues or questions, please open an issue on GitHub.

AI-career-mentor