Skip to content

FairPay is a comprehensive salary transparency platform that leverages machine learning and real-time economic data to provide accurate salary predictions and market analysis.

License

Notifications You must be signed in to change notification settings

gowthamrdyy/Fairpay

Repository files navigation

FairPay - AI-Powered Salary Insights Platform

FairPay Logo

Know Your Worth | Transparent Salary Intelligence

React TypeScript Firebase Tailwind CSS

Live Demo | Documentation | Report Bug | Request Feature


πŸ“‹ Table of Contents


🎯 Overview

FairPay is a comprehensive salary transparency platform designed to empower professionals with data-driven insights for fair compensation negotiations. Built with React 19 and TypeScript, it leverages machine learning algorithms and real-time economic data to provide accurate salary predictions and market analysis.

Problem Statement

Wage inequality and lack of salary transparency prevent professionals from negotiating fair compensation. Without access to market data, employees are at a disadvantage during salary negotiations, perpetuating pay gaps across industries, genders, and demographics.

Solution

FairPay addresses this by providing:

  • Real-time salary benchmarks from 5000+ data points
  • AI-powered salary predictions using machine learning
  • Gender wage gap analysis and insights
  • Anonymous company reviews and culture ratings
  • Career path visualization and growth planning
  • AI-powered negotiation assistance

✨ Features

1. Salary Comparison Tool

  • Real-time Comparison: Compare your salary against 5000+ real market data points
  • Percentile Ranking: See where you stand (0-100 percentile)
  • Market Statistics: View average, median, and top 10% salaries for your role
  • Intelligent Verdict: Get personalized feedback on your compensation
  • Next Steps: Actionable recommendations based on your position

2. AI Salary Predictor

  • Machine Learning Predictions: ML-powered salary estimates based on your profile
  • Multiple Factors: Considers role, experience, education, location, industry, and skills
  • Confidence Score: Shows prediction accuracy (50-95%)
  • Salary Range: Provides min-max expected salary range
  • What-If Scenarios: Explore salary impact of career changes:
    • +2 years experience
    • Location change
    • Learning new skills
    • Getting advanced degree
    • Moving to management

3. Analytics Dashboard

  • Industry Analysis: Average salary by industry with interactive charts
  • Experience Breakdown: Salary progression by experience level (0-2, 3-5, 6-10, 10+ years)
  • Location Insights: Top 10 locations by average salary
  • Key Statistics: Total entries, industries covered, average salary
  • Visual Charts: Interactive bar charts with Recharts library
  • Real-time Updates: Data refreshes as new entries are added

4. Company Reviews

  • 5000+ Reviews: Anonymous company reviews from real employees
  • Multi-dimensional Ratings:
    • Overall rating (1-5 stars)
    • Work-life balance
    • Benefits
    • Culture
    • Management
    • Career growth
  • Pros & Cons: Detailed feedback on company strengths and weaknesses
  • Search Functionality: Find reviews by company name (case-insensitive)
  • Write Reviews: Submit anonymous reviews for any company

5. Negotiation Assistant

  • AI-Powered Tips: Personalized negotiation strategies
  • Email Templates: Pre-written professional email templates
  • Market Data: Leverage salary data in negotiations
  • Best Practices: Industry-standard negotiation techniques

6. Career Path Visualization

  • Role Progression: See typical career paths for your role
  • Salary Growth: Visualize salary increases at each level
  • Skills Required: Know what skills you need for the next level
  • Timeline: Understand typical years of experience needed

7. Economic Insights

  • Real-time Economic Data: Integration with FRED API
  • Market Trends: Track economic indicators affecting salaries
  • Inflation Impact: Understand purchasing power changes
  • Currency Conversion: Multi-currency support via ExchangeRate-API

πŸ› οΈ Tech Stack

Frontend

  • React 19.1.1 - Latest React with concurrent features
  • TypeScript 5.9.3 - Type-safe JavaScript
  • Vite 7.1.14 - Lightning-fast build tool (Rolldown)
  • React Router 7.9.4 - Client-side routing
  • Tailwind CSS 4.1.16 - Utility-first CSS framework
  • Lucide React 0.548.0 - Beautiful icon library

Backend & Database

  • Firebase 12.4.0 - Backend as a Service
  • Firestore - NoSQL cloud database
  • Firebase Auth - Anonymous authentication

Data Visualization

  • Recharts 3.3.0 - Composable charting library
  • Interactive Charts: Bar charts, line charts, area charts
  • Responsive Design: Mobile-friendly visualizations

Form Management

  • React Hook Form 7.65.0 - Performant form validation
  • Zod 4.1.12 - TypeScript-first schema validation

HTTP & APIs

  • Axios 1.12.2 - Promise-based HTTP client
  • FRED API - Federal Reserve Economic Data
  • Alpha Vantage API - Stock market data
  • ExchangeRate-API - Currency conversion
  • Gemini AI API - Google's AI for predictions

Utilities

  • date-fns 4.1.0 - Modern date utility library
  • lodash 4.17.21 - Utility functions
  • clsx 2.1.1 - Conditional className utility
  • tailwind-merge 3.3.1 - Merge Tailwind classes

Development Tools

  • ESLint 9.36.0 - Code linting
  • TypeScript ESLint 8.45.0 - TypeScript linting
  • Autoprefixer 10.4.21 - CSS vendor prefixing
  • PostCSS 8.5.6 - CSS transformations

πŸ“ Project Structure

fairpay/
β”œβ”€β”€ public/
β”‚   └── favicon.svg                 # FairPay logo favicon
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ assets/                     # Static assets (empty, for future use)
β”‚   β”œβ”€β”€ components/
β”‚   β”‚   β”œβ”€β”€ Charts/
β”‚   β”‚   β”‚   β”œβ”€β”€ ExperienceProgression.tsx    # Experience vs salary chart
β”‚   β”‚   β”‚   β”œβ”€β”€ GenderWageGapChart.tsx       # Gender pay gap visualization
β”‚   β”‚   β”‚   └── SalaryDistributionChart.tsx  # Salary distribution histogram
β”‚   β”‚   β”œβ”€β”€ Common/
β”‚   β”‚   β”‚   β”œβ”€β”€ Button.tsx                   # Reusable button component
β”‚   β”‚   β”‚   β”œβ”€β”€ Input.tsx                    # Form input component
β”‚   β”‚   β”‚   └── Modal.tsx                    # Modal dialog component
β”‚   β”‚   β”œβ”€β”€ Dashboard/
β”‚   β”‚   β”‚   └── StatCards.tsx                # Dashboard statistics cards
β”‚   β”‚   β”œβ”€β”€ Forms/
β”‚   β”‚   β”‚   β”œβ”€β”€ SalaryForm.tsx               # Salary submission form
β”‚   β”‚   β”‚   └── SearchForm.tsx               # Search/filter form
β”‚   β”‚   └── Layout/
β”‚   β”‚       β”œβ”€β”€ Header.tsx                   # App header with navigation
β”‚   β”‚       └── Footer.tsx                   # App footer
β”‚   β”œβ”€β”€ context/
β”‚   β”‚   β”œβ”€β”€ AuthContext.tsx                  # Firebase authentication context
β”‚   β”‚   └── ThemeContext.tsx                 # Dark/light theme context
β”‚   β”œβ”€β”€ data/
β”‚   β”‚   β”œβ”€β”€ india_salary_data.json           # 5000 salary entries
β”‚   β”‚   └── india_company_reviews.json       # 5000 company reviews
β”‚   β”œβ”€β”€ hooks/
β”‚   β”‚   β”œβ”€β”€ useFirebase.ts                   # Firebase operations hook
β”‚   β”‚   └── useSalaryData.ts                 # Salary data fetching hook
β”‚   β”œβ”€β”€ pages/
β”‚   β”‚   β”œβ”€β”€ About.tsx                        # About us page
β”‚   β”‚   β”œβ”€β”€ Analytics.tsx                    # Analytics dashboard
β”‚   β”‚   β”œβ”€β”€ CareerPath.tsx                   # Career path visualization
β”‚   β”‚   β”œβ”€β”€ CompanyReviews.tsx               # Company reviews page
β”‚   β”‚   β”œβ”€β”€ Dashboard.tsx                    # Main dashboard
β”‚   β”‚   β”œβ”€β”€ EconomicInsights.tsx             # Economic data page
β”‚   β”‚   β”œβ”€β”€ Home.tsx                         # Landing page
β”‚   β”‚   β”œβ”€β”€ NegotiationAssistant.tsx         # Negotiation tips
β”‚   β”‚   β”œβ”€β”€ ResetData.tsx                    # Data management page
β”‚   β”‚   β”œβ”€β”€ SalaryComparison.tsx             # Salary comparison tool
β”‚   β”‚   └── SalaryPredictor.tsx              # AI salary predictor
β”‚   β”œβ”€β”€ services/
β”‚   β”‚   β”œβ”€β”€ aiService.ts                     # Gemini AI integration
β”‚   β”‚   β”œβ”€β”€ authService.ts                   # Authentication service
β”‚   β”‚   β”œβ”€β”€ companyService.ts                # Company reviews CRUD
β”‚   β”‚   β”œβ”€β”€ costOfLivingService.ts           # Cost of living calculations
β”‚   β”‚   β”œβ”€β”€ economicDataService.ts           # FRED API integration
β”‚   β”‚   β”œβ”€β”€ exportService.ts                 # Data export functionality
β”‚   β”‚   β”œβ”€β”€ firebase.ts                      # Firebase configuration
β”‚   β”‚   β”œβ”€β”€ predictionService.ts             # ML prediction algorithms
β”‚   β”‚   β”œβ”€β”€ salaryService.ts                 # Salary data CRUD
β”‚   β”‚   └── sampleDataService.ts             # Sample data loader
β”‚   β”œβ”€β”€ types/
β”‚   β”‚   β”œβ”€β”€ company.ts                       # Company & review types
β”‚   β”‚   β”œβ”€β”€ economic.ts                      # Economic data types
β”‚   β”‚   β”œβ”€β”€ notification.ts                  # Notification types
β”‚   β”‚   β”œβ”€β”€ prediction.ts                    # Prediction types
β”‚   β”‚   β”œβ”€β”€ salary.ts                        # Salary entry types
β”‚   β”‚   └── user.ts                          # User types
β”‚   β”œβ”€β”€ utils/
β”‚   β”‚   β”œβ”€β”€ calculations.ts                  # Math & statistics utilities
β”‚   β”‚   β”œβ”€β”€ formatters.ts                    # Data formatting utilities
β”‚   β”‚   β”œβ”€β”€ stringUtils.ts                   # String manipulation utilities
β”‚   β”‚   └── validators.ts                    # Input validation utilities
β”‚   β”œβ”€β”€ App.tsx                              # Main app component
β”‚   β”œβ”€β”€ index.css                            # Global styles & Tailwind
β”‚   └── main.tsx                             # App entry point
β”œβ”€β”€ .env.example                             # Environment variables template
β”œβ”€β”€ .env.local                               # Your environment variables (gitignored)
β”œβ”€β”€ .gitignore                               # Git ignore rules
β”œβ”€β”€ eslint.config.js                         # ESLint configuration
β”œβ”€β”€ index.html                               # HTML entry point
β”œβ”€β”€ package.json                             # Dependencies & scripts
β”œβ”€β”€ postcss.config.js                        # PostCSS configuration
β”œβ”€β”€ README.md                                # This file
β”œβ”€β”€ tailwind.config.js                       # Tailwind CSS configuration
β”œβ”€β”€ tsconfig.json                            # TypeScript configuration
β”œβ”€β”€ tsconfig.app.json                        # App TypeScript config
β”œβ”€β”€ tsconfig.node.json                       # Node TypeScript config
└── vite.config.ts                           # Vite configuration

πŸš€ Installation

Prerequisites

Before you begin, ensure you have the following installed:

  • Node.js (v18.0.0 or higher) - Download
  • npm (v9.0.0 or higher) - Comes with Node.js
  • Git - Download
  • Firebase Account - Sign up

Step 1: Clone the Repository

# Clone the repository
git clone https://github.com/your-username/fairpay.git

# Navigate to project directory
cd fairpay

Step 2: Install Dependencies

# Install all dependencies
npm install

# This will install:
# - React, TypeScript, and all frontend libraries
# - Firebase SDK
# - Recharts for data visualization
# - All development dependencies

Step 3: Set Up Environment Variables

# Copy the example environment file
cp .env.example .env.local

Now open .env.local and add your API keys (see Configuration section below).

Step 4: Start Development Server

# Start the Vite development server
npm run dev

# The app will be available at:
# http://localhost:5173

Step 5: Verify Installation

  1. Open http://localhost:5173 in your browser
  2. Check the browser console (F12) for any errors
  3. You should see: "Firebase initialized successfully"
  4. The app will automatically load 5000 salary entries on first run

βš™οΈ Configuration

Firebase Setup

  1. Create Firebase Project:

    • Go to Firebase Console
    • Click "Add project"
    • Enter project name (e.g., "fairpay")
    • Disable Google Analytics (optional)
    • Click "Create project"
  2. Enable Firestore Database:

    • In Firebase Console, go to "Firestore Database"
    • Click "Create database"
    • Choose "Start in test mode" (for development)
    • Select your region
    • Click "Enable"
  3. Enable Authentication:

    • Go to "Authentication" β†’ "Sign-in method"
    • Enable "Anonymous" authentication
    • Click "Save"
  4. Get Firebase Configuration:

    • Go to Project Settings (gear icon)
    • Scroll to "Your apps" section
    • Click "Web" icon (</>) to add a web app
    • Register app with nickname "FairPay Web"
    • Copy the configuration values
  5. Add to .env.local:

VITE_FIREBASE_API_KEY=your_api_key_here
VITE_FIREBASE_AUTH_DOMAIN=your_project_id.firebaseapp.com
VITE_FIREBASE_PROJECT_ID=your_project_id
VITE_FIREBASE_STORAGE_BUCKET=your_project_id.firebasestorage.app
VITE_FIREBASE_MESSAGING_SENDER_ID=your_sender_id
VITE_FIREBASE_APP_ID=your_app_id

API Keys Setup

1. FRED API (Federal Reserve Economic Data)

VITE_FRED_API_KEY=your_fred_api_key

2. Alpha Vantage API

VITE_ALPHA_VANTAGE_API_KEY=your_alpha_vantage_key

3. ExchangeRate-API

VITE_EXCHANGERATE_API_KEY=your_exchangerate_key

4. Gemini AI API

VITE_GEMINI_API_KEY=your_gemini_api_key

Complete .env.local Example

# Firebase Configuration
VITE_FIREBASE_API_KEY=AIzaSyDdt7I6ZzIEyR9C7ZkLRawyAPka8Qche2c
VITE_FIREBASE_AUTH_DOMAIN=fairpay-91231.firebaseapp.com
VITE_FIREBASE_PROJECT_ID=fairpay-91231
VITE_FIREBASE_STORAGE_BUCKET=fairpay-91231.firebasestorage.app
VITE_FIREBASE_MESSAGING_SENDER_ID=269909528537
VITE_FIREBASE_APP_ID=1:269909528537:web:8d18faccf06002ff3913c8

# Economic Data APIs
VITE_FRED_API_KEY=c2a09745894a851ccde6184e917894eb
VITE_ALPHA_VANTAGE_API_KEY=S41SKROYR355ODZ3
VITE_EXCHANGERATE_API_KEY=3976ee107b827c80ac0c4446

# AI Features
VITE_GEMINI_API_KEY=AIzaSyD0VX7CmAn7e4waeWOw7g0jEKR46v806Jg

πŸ“– Usage

Running the Application

# Development mode (with hot reload)
npm run dev

# Build for production
npm run build

# Preview production build
npm run preview

# Run linter
npm run lint

Loading Sample Data

The app automatically loads 5000 salary entries and 5000 company reviews on first run. If you need to reload data:

Method 1: Using Reset Data Page

  1. Navigate to http://localhost:5173/reset-data
  2. Click "Load 5000 Entries" button
  3. Wait 2-3 minutes for data to load
  4. Page will auto-redirect when complete

Method 2: Browser Console

// Open browser console (F12) and run:
window.forceLoad5000()

// Or reset all data:
window.resetSalaryData()

Navigating the App

Home Page (/)

  • Landing page with feature overview
  • Quick access to all tools
  • Call-to-action buttons

Dashboard (/dashboard)

  • Overview of salary statistics
  • Submit new salary entries
  • View wage gap analysis
  • Experience progression charts

Analytics (/analytics)

  • Industry-wise salary breakdown
  • Experience level analysis
  • Location-based insights
  • Interactive charts

Salary Comparison (/salary-comparison)

  1. Enter your annual salary (β‚Ή)
  2. Enter your role (e.g., "Software Engineer")
  3. Click "Compare Now"
  4. View your percentile ranking
  5. See average, median, and top 10% salaries
  6. Get personalized recommendations

AI Salary Predictor (/salary-predictor)

  1. Fill in your profile:
    • Role
    • Years of experience
    • Education level
    • Location
    • Industry
    • Skills (comma-separated)
  2. Click "Predict My Salary"
  3. View predicted salary with confidence score
  4. Explore what-if scenarios

Company Reviews (/company-reviews)

  1. Search for a company (case-insensitive)
  2. View aggregate ratings:
    • Overall rating
    • Work-life balance
    • Benefits
    • Culture
    • Management
    • Career growth
  3. Read individual reviews
  4. Write your own anonymous review

Career Path (/career-path)

  • Select your current role
  • View typical career progression
  • See salary growth at each level
  • Understand required skills
  • Plan your career trajectory

About (/about)

  • Meet the team
  • Learn about the project
  • View technology stack
  • Contact information

πŸ“Š Data

Salary Data (src/data/india_salary_data.json)

5000 entries with the following fields:

{
  role: string;              // Job title (e.g., "Software Engineer")
  company: string;           // Company name (e.g., "Google")
  salary: number;            // Annual salary in INR
  experience: number;        // Years of experience (0-15)
  education: string;         // "Bachelor", "Master", or "PhD"
  location: string;          // City (e.g., "Bangalore", "Mumbai")
  industry: string;          // Industry sector
  jobType: string;           // "Full-time", "Contract", "Freelance"
  companySize: string;       // "Startup", "SME", "Large", "Enterprise"
  gender: string;            // "Male" or "Female"
}

Coverage:

  • 41 Companies: Google, Microsoft, Amazon, TCS, Infosys, Wipro, etc.
  • 10+ Locations: Bangalore, Mumbai, Delhi NCR, Hyderabad, Pune, Chennai, Kolkata, Gurgaon, Noida, Kochi
  • 10+ Industries: IT, FinTech, E-commerce, Healthcare, EdTech, Consulting, Finance, Logistics, InsurTech, Travel & Hospitality
  • 20+ Roles: Software Engineer, Data Scientist, Product Manager, DevOps Engineer, etc.

Company Reviews Data (src/data/india_company_reviews.json)

5000 reviews with the following fields:

{
  companyName: string;       // Company name
  userId: string;            // Anonymous user ID
  rating: number;            // Overall rating (1-5)
  workLifeBalance: number;   // Work-life balance rating (1-5)
  benefits: number;          // Benefits rating (1-5)
  culture: number;           // Culture rating (1-5)
  management: number;        // Management rating (1-5)
  careerGrowth: number;      // Career growth rating (1-5)
  review: string;            // Review text
  pros: string;              // Positive aspects
  cons: string;              // Negative aspects
  helpful: number;           // Helpful count
  createdAt: string;         // ISO date string
}

Data Loading Process

  1. Automatic Loading: On app startup, checks if Firestore has data
  2. Threshold Check: If less than 1000 entries, clears and reloads
  3. Batch Processing: Loads data in batches of 50 for performance
  4. Progress Tracking: Console logs show progress every 500 entries
  5. Error Handling: Failed entries are logged but don't stop the process

Data Management

// Available console commands:

// Force load 5000 entries (clears existing data)
window.forceLoad5000()

// Reset all data (clears and reloads)
window.resetSalaryData()

πŸ”Œ API Integration

Firebase Firestore

Collections:

  • salaries: Salary entries
  • companyReviews: Company reviews

Operations:

// Add document
await firestoreService.addDocument('salaries', data);

// Get all documents
const salaries = await firestoreService.getDocuments('salaries');

// Update document
await firestoreService.updateDocument('salaries', docId, data);

// Delete document
await firestoreService.deleteDocument('salaries', docId);

// Query documents
const results = await firestoreService.queryDocuments(
  'salaries',
  [where('role', '==', 'Software Engineer'), limit(10)]
);

FRED API (Economic Data)

Endpoints Used:

  • GDP: https://api.stlouisfed.org/fred/series/observations?series_id=GDP
  • Inflation: https://api.stlouisfed.org/fred/series/observations?series_id=CPIAUCSL
  • Unemployment: https://api.stlouisfed.org/fred/series/observations?series_id=UNRATE

Implementation:

// src/services/economicDataService.ts
export const economicDataService = {
  async getGDP(): Promise<EconomicData[]> {
    const response = await axios.get(
      `https://api.stlouisfed.org/fred/series/observations`,
      {
        params: {
          series_id: 'GDP',
          api_key: import.meta.env.VITE_FRED_API_KEY,
          file_type: 'json'
        }
      }
    );
    return response.data.observations;
  }
};

Alpha Vantage API (Market Data)

Endpoints Used:

  • Stock quotes
  • Market indicators
  • Company fundamentals

ExchangeRate-API (Currency Conversion)

Endpoint:

https://v6.exchangerate-api.com/v6/{API_KEY}/latest/INR

Usage:

// Convert INR to USD
const rate = await exchangeRateService.getRate('INR', 'USD');
const usdAmount = inrAmount * rate;

Gemini AI API (Predictions)

Used For:

  • Salary predictions
  • Negotiation tips
  • Career advice
  • Market insights

Implementation:

// src/services/aiService.ts
export const aiService = {
  async predictSalary(profile: UserProfile): Promise<Prediction> {
    const response = await axios.post(
      'https://generativelanguage.googleapis.com/v1/models/gemini-pro:generateContent',
      {
        contents: [{ parts: [{ text: prompt }] }]
      },
      {
        params: { key: import.meta.env.VITE_GEMINI_API_KEY }
      }
    );
    return response.data;
  }
};

🧩 Components

Common Components

Button (src/components/Common/Button.tsx)

<Button 
  variant="primary" | "secondary" | "danger"
  onClick={handleClick}
  disabled={isLoading}
>
  Click Me
</Button>

Input (src/components/Common/Input.tsx)

<Input
  label="Email"
  type="email"
  value={email}
  onChange={(e) => setEmail(e.target.value)}
  error={errors.email}
/>

Modal (src/components/Common/Modal.tsx)

<Modal
  isOpen={showModal}
  onClose={() => setShowModal(false)}
  title="Modal Title"
>
  <p>Modal content</p>
</Modal>

Chart Components

SalaryDistributionChart

  • Displays salary distribution histogram
  • Shows count of salaries in different ranges
  • Interactive tooltips with formatted currency

GenderWageGapChart

  • Visualizes pay gap between genders
  • Shows average salaries for male/female
  • Calculates gap percentage

ExperienceProgression

  • Line chart showing salary growth by experience
  • Helps visualize career progression
  • Interactive data points

Layout Components

Header

  • Sticky navigation bar
  • Responsive mobile menu
  • Links to all major pages
  • FairPay logo

Footer

  • Company information
  • Quick links
  • Social media links
  • Copyright notice
  • Scroll-to-top functionality

πŸ”§ Services

Salary Service (src/services/salaryService.ts)

Methods:

// Add new salary entry
await salaryService.addSalary(salaryData);

// Get all salaries
const salaries = await salaryService.getAllSalaries();

// Filter by role (case-insensitive)
const engineers = await salaryService.getSalariesByRole('Software Engineer');

// Filter by company (case-insensitive)
const googleSalaries = await salaryService.getSalariesByCompany('Google');

// Filter by location
const bangaloreSalaries = await salaryService.getSalariesByLocation('Bangalore');

// Calculate statistics
const stats = salaryService.calculateStats(salaries);
// Returns: { average, median, min, max, stdDev, count }

// Calculate wage gap
const wageGap = salaryService.calculateWageGap(salaries);
// Returns: { maleAverage, femaleAverage, gapPercentage, gapAmount }

// Get trend by experience
const trend = salaryService.getTrendByExperience(salaries);
// Returns: Array<{ experience, averageSalary }>

Prediction Service (src/services/predictionService.ts)

Methods:

// Predict salary based on profile
const prediction = predictionService.predictSalary(
  {
    role: 'Software Engineer',
    experience: 5,
    education: 'Bachelor',
    location: 'Bangalore',
    industry: 'IT',
    skills: ['React', 'Node.js', 'AWS']
  },
  historicalData
);
// Returns: { predictedSalary, confidence, range, factors }

// Generate what-if scenarios
const scenarios = predictionService.generateWhatIfScenarios(currentSalary);
// Returns: Array of scenarios with projected salaries

// Get career path
const path = predictionService.getCareerPath('Software Engineer');
// Returns: Array of career progression steps

// Calculate percentile
const percentile = predictionService.calculatePercentile(salary, allSalaries);
// Returns: 0-100 percentile ranking

Company Service (src/services/companyService.ts)

Methods:

// Add review
await companyService.addReview({
  companyName: 'Google',
  userId: user.uid,
  rating: 5,
  workLifeBalance: 4,
  benefits: 5,
  culture: 5,
  management: 4,
  careerGrowth: 5,
  review: 'Great place to work!',
  pros: 'Excellent benefits',
  cons: 'High pressure'
});

// Get company reviews (case-insensitive)
const reviews = await companyService.getCompanyReviews('google');

// Get company statistics
const stats = await companyService.getCompanyStats('Google');
// Returns: { companyName, averageRating, totalReviews, workLifeBalance, benefits, culture, management, careerGrowth }

// Mark review as helpful
await companyService.markReviewHelpful(reviewId);

AI Service (src/services/aiService.ts)

Methods:

// Get salary prediction from AI
const prediction = await aiService.predictSalary(profile);

// Get negotiation tips
const tips = await aiService.getNegotiationTips(currentSalary, targetSalary);

// Generate email template
const email = await aiService.generateNegotiationEmail(context);

// Get career advice
const advice = await aiService.getCareerAdvice(profile);

🚒 Deployment

Build for Production

# Create production build
npm run build

# Output will be in the 'dist' folder
# Files are optimized, minified, and ready for deployment

Deploy to Firebase Hosting

# Install Firebase CLI
npm install -g firebase-tools

# Login to Firebase
firebase login

# Initialize Firebase in your project
firebase init hosting

# Select options:
# - Use existing project
# - Public directory: dist
# - Single-page app: Yes
# - Automatic builds: No

# Deploy
firebase deploy --only hosting

# Your app will be live at:
# https://your-project-id.web.app

Deploy to Vercel

# Install Vercel CLI
npm install -g vercel

# Deploy
vercel

# Follow prompts:
# - Link to existing project or create new
# - Build command: npm run build
# - Output directory: dist

# Your app will be live at:
# https://your-app.vercel.app

Deploy to Netlify

# Install Netlify CLI
npm install -g netlify-cli

# Deploy
netlify deploy --prod

# Build directory: dist

# Your app will be live at:
# https://your-app.netlify.app

Environment Variables in Production

Make sure to add all environment variables in your hosting platform:

Firebase Hosting: Use Firebase Functions config Vercel: Project Settings β†’ Environment Variables Netlify: Site Settings β†’ Build & Deploy β†’ Environment


πŸ‘₯ Team

Gowtham Reddy

Founder & Machine Learning Engineer

Passionate about leveraging machine learning and data science to solve real-world problems. Specializes in building intelligent systems that empower users with actionable insights.

Skills: Machine Learning, React, TypeScript, Firebase, Python

Connect:

Hari Prasanna

Co-Founder & Machine Learning Engineer

Expert in machine learning and full-stack development. Focused on creating scalable solutions that deliver meaningful impact through data-driven decision making.

Skills: Machine Learning, React, TypeScript, Firebase, Python

Connect:


🀝 Contributing

This is a private project developed by Gowtham Reddy and Hari Prasanna. We are not currently accepting external contributions.

For inquiries, suggestions, or collaboration opportunities, please contact us via:


πŸ“„ License

Β© 2025 FairPay. All rights reserved.

This project is proprietary software. Unauthorized copying, modification, distribution, or use of this software, via any medium, is strictly prohibited without explicit permission from the authors.


πŸ™ Acknowledgments

  • Firebase - For providing excellent backend infrastructure
  • Google Gemini AI - For AI-powered predictions
  • FRED - For economic data
  • Alpha Vantage - For market data
  • ExchangeRate-API - For currency conversion
  • Recharts - For beautiful data visualizations
  • Tailwind CSS - For rapid UI development
  • React Team - For the amazing framework
  • Open Source Community - For all the amazing libraries

πŸ“ž Support

For support, email [email protected] or reach out to the team on LinkedIn.


πŸ—ΊοΈ Roadmap

Phase 1 (Current)

  • βœ… Salary comparison tool
  • βœ… AI salary predictor
  • βœ… Analytics dashboard
  • βœ… Company reviews
  • βœ… 5000+ salary data points
  • βœ… 5000+ company reviews

Phase 2 (Planned)

  • πŸ”„ Mobile app (React Native)
  • πŸ”„ Advanced ML models
  • πŸ”„ More data sources
  • πŸ”„ International markets
  • πŸ”„ Salary negotiation simulator
  • πŸ”„ Job matching algorithm

Phase 3 (Future)

  • πŸ“‹ Employer dashboard
  • πŸ“‹ Salary benchmarking API
  • πŸ“‹ Integration with job boards
  • πŸ“‹ Blockchain-based verification
  • πŸ“‹ Community features
  • πŸ“‹ Premium features

πŸ“š Additional Resources


Built with ❀️ for wage equality and transparency

⬆ Back to Top

About

FairPay is a comprehensive salary transparency platform that leverages machine learning and real-time economic data to provide accurate salary predictions and market analysis.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages