Know Your Worth | Transparent Salary Intelligence
- Overview
- Features
- Tech Stack
- Project Structure
- Installation
- Configuration
- Usage
- Data
- API Integration
- Components
- Services
- Deployment
- Team
- Contributing
- License
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.
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.
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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- Firebase 12.4.0 - Backend as a Service
- Firestore - NoSQL cloud database
- Firebase Auth - Anonymous authentication
- Recharts 3.3.0 - Composable charting library
- Interactive Charts: Bar charts, line charts, area charts
- Responsive Design: Mobile-friendly visualizations
- React Hook Form 7.65.0 - Performant form validation
- Zod 4.1.12 - TypeScript-first schema validation
- 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
- 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
- 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
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
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
# Clone the repository
git clone https://github.com/your-username/fairpay.git
# Navigate to project directory
cd fairpay# Install all dependencies
npm install
# This will install:
# - React, TypeScript, and all frontend libraries
# - Firebase SDK
# - Recharts for data visualization
# - All development dependencies# Copy the example environment file
cp .env.example .env.localNow open .env.local and add your API keys (see Configuration section below).
# Start the Vite development server
npm run dev
# The app will be available at:
# http://localhost:5173- Open http://localhost:5173 in your browser
- Check the browser console (F12) for any errors
- You should see: "Firebase initialized successfully"
- The app will automatically load 5000 salary entries on first run
-
Create Firebase Project:
- Go to Firebase Console
- Click "Add project"
- Enter project name (e.g., "fairpay")
- Disable Google Analytics (optional)
- Click "Create project"
-
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"
-
Enable Authentication:
- Go to "Authentication" β "Sign-in method"
- Enable "Anonymous" authentication
- Click "Save"
-
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
-
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- Purpose: Real-time economic data (GDP, inflation, unemployment)
- Sign up: https://fred.stlouisfed.org/docs/api/api_key.html
- Free tier: Unlimited requests
- Add to
.env.local:
VITE_FRED_API_KEY=your_fred_api_key- Purpose: Stock market data and financial indicators
- Sign up: https://www.alphavantage.co/support/#api-key
- Free tier: 25 requests per day
- Add to
.env.local:
VITE_ALPHA_VANTAGE_API_KEY=your_alpha_vantage_key- Purpose: Currency conversion rates
- Sign up: https://www.exchangerate-api.com/
- Free tier: 1,500 requests per month
- Add to
.env.local:
VITE_EXCHANGERATE_API_KEY=your_exchangerate_key- Purpose: AI-powered salary predictions and insights
- Sign up: https://makersuite.google.com/app/apikey
- Free tier: 60 requests per minute
- Add to
.env.local:
VITE_GEMINI_API_KEY=your_gemini_api_key# 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# Development mode (with hot reload)
npm run dev
# Build for production
npm run build
# Preview production build
npm run preview
# Run linter
npm run lintThe app automatically loads 5000 salary entries and 5000 company reviews on first run. If you need to reload data:
- Navigate to http://localhost:5173/reset-data
- Click "Load 5000 Entries" button
- Wait 2-3 minutes for data to load
- Page will auto-redirect when complete
// Open browser console (F12) and run:
window.forceLoad5000()
// Or reset all data:
window.resetSalaryData()- Landing page with feature overview
- Quick access to all tools
- Call-to-action buttons
- Overview of salary statistics
- Submit new salary entries
- View wage gap analysis
- Experience progression charts
- Industry-wise salary breakdown
- Experience level analysis
- Location-based insights
- Interactive charts
- Enter your annual salary (βΉ)
- Enter your role (e.g., "Software Engineer")
- Click "Compare Now"
- View your percentile ranking
- See average, median, and top 10% salaries
- Get personalized recommendations
- Fill in your profile:
- Role
- Years of experience
- Education level
- Location
- Industry
- Skills (comma-separated)
- Click "Predict My Salary"
- View predicted salary with confidence score
- Explore what-if scenarios
- Search for a company (case-insensitive)
- View aggregate ratings:
- Overall rating
- Work-life balance
- Benefits
- Culture
- Management
- Career growth
- Read individual reviews
- Write your own anonymous review
- Select your current role
- View typical career progression
- See salary growth at each level
- Understand required skills
- Plan your career trajectory
- Meet the team
- Learn about the project
- View technology stack
- Contact information
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.
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
}- Automatic Loading: On app startup, checks if Firestore has data
- Threshold Check: If less than 1000 entries, clears and reloads
- Batch Processing: Loads data in batches of 50 for performance
- Progress Tracking: Console logs show progress every 500 entries
- Error Handling: Failed entries are logged but don't stop the process
// Available console commands:
// Force load 5000 entries (clears existing data)
window.forceLoad5000()
// Reset all data (clears and reloads)
window.resetSalaryData()Collections:
salaries: Salary entriescompanyReviews: 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)]
);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;
}
};Endpoints Used:
- Stock quotes
- Market indicators
- Company fundamentals
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;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;
}
};<Button
variant="primary" | "secondary" | "danger"
onClick={handleClick}
disabled={isLoading}
>
Click Me
</Button><Input
label="Email"
type="email"
value={email}
onChange={(e) => setEmail(e.target.value)}
error={errors.email}
/><Modal
isOpen={showModal}
onClose={() => setShowModal(false)}
title="Modal Title"
>
<p>Modal content</p>
</Modal>- Displays salary distribution histogram
- Shows count of salaries in different ranges
- Interactive tooltips with formatted currency
- Visualizes pay gap between genders
- Shows average salaries for male/female
- Calculates gap percentage
- Line chart showing salary growth by experience
- Helps visualize career progression
- Interactive data points
- Sticky navigation bar
- Responsive mobile menu
- Links to all major pages
- FairPay logo
- Company information
- Quick links
- Social media links
- Copyright notice
- Scroll-to-top functionality
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 }>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 rankingMethods:
// 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);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);# Create production build
npm run build
# Output will be in the 'dist' folder
# Files are optimized, minified, and ready for deployment# 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# 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# 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.appMake 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
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:
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:
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:
- Email: [email protected]
- LinkedIn: See team profiles above
Β© 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.
- 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
For support, email [email protected] or reach out to the team on LinkedIn.
- β Salary comparison tool
- β AI salary predictor
- β Analytics dashboard
- β Company reviews
- β 5000+ salary data points
- β 5000+ company reviews
- π Mobile app (React Native)
- π Advanced ML models
- π More data sources
- π International markets
- π Salary negotiation simulator
- π Job matching algorithm
- π Employer dashboard
- π Salary benchmarking API
- π Integration with job boards
- π Blockchain-based verification
- π Community features
- π Premium features
- Firebase Documentation
- React Documentation
- TypeScript Documentation
- Tailwind CSS Documentation
- Vite Documentation
- Recharts Documentation
Built with β€οΈ for wage equality and transparency