How kunal-khairnar-05/fakehire works
FakeHire is a job-posting scam detector. A user submits a posting in the browser; the API authenticates and rate-limits the request, checks a versioned verdict cache, and on a miss asks the ML service to score it. The API saves the result to history and returns the verdict and flags. Separate workflows support account access, web evidence, user scam reports, moderator review, company search, and trending. The README documents PostgreSQL, Redis, and Tavily integrations; some API route and service implementations were not sampled, so uncertain connections are omitted or marked dashed.
Main entry points: main.py FastAPI application · check_service.py Check workflow · app.py ML prediction service · report_service.py Report review
Components 23
Browser app
- Application shell
frontend/src/App.tsx - Posting check form
frontend/src/components/CheckForm.tsx - API client
frontend/src/api.ts - Tab session state
frontend/src/useSessionState.ts
API and identity
- FastAPI application
api/app/main.py - Authentication routes
api/app/routes/auth.py - Authentication service
api/app/services/auth_service.py - Check workflow
api/app/services/check_service.py - ML HTTP client
api/app/clients/ml_client.py
Detection engine
- ML prediction service
ml/service/app.py - Posting representation
ml/fakehire_ml/posting.py - Red-flag rules
ml/fakehire_ml/rules.py - Hybrid scoring
ml/fakehire_ml/scoring.py - TF-IDF classifier
ml/fakehire_ml/model.py - Model training
ml/fakehire_ml/training.py
Reports and discovery
- Report review
api/app/services/report_service.py - Trending board
api/app/services/trending.py - Web evidence checks
api/app/services/web_check.py - Company discovery
api/app/services/company_service.py
Shared state
- PostgreSQL
- Redis
Other components
- Job seeker
- Tavily search
Connections 25
- Job seeker → Application shell: uses
- Application shell → Posting check form: renders
frontend/src/App.tsx - Posting check form → API client: requests
frontend/src/components/CheckForm.tsx - Application shell → Tab session state: persists page
frontend/src/App.tsx - API client → FastAPI application: calls API
frontend/src/api.ts - FastAPI application → Authentication routes: registers routes
api/app/main.py - Authentication routes → Authentication service: delegates
api/app/routes/auth.py - FastAPI application → Check workflow: provides dependencies
- Check workflow → ML HTTP client: requests version and scores
api/app/services/check_service.py - ML HTTP client → ML prediction service: posts prediction
api/app/clients/ml_client.py - ML prediction service → Posting representation: builds input
ml/service/app.py - ML prediction service → Red-flag rules: evaluates flags
ml/service/app.py - ML prediction service → TF-IDF classifier: predicts score
ml/service/app.py - Hybrid scoring → Red-flag rules: uses results
ml/fakehire_ml/scoring.py - Model training → TF-IDF classifier: trains pipeline
ml/fakehire_ml/training.py - Model training → Posting representation: converts data
ml/fakehire_ml/training.py - Check workflow → PostgreSQL: saves history
api/app/services/check_service.py - Check workflow → Redis: checks verdict cache
- FastAPI application → Report review: provides dependencies
- Report review → Trending board: records verified report
api/app/services/report_service.py - Report review → PostgreSQL: stores reports
api/app/services/report_service.py - Company discovery → Trending board: reads trends
api/app/services/company_service.py - FastAPI application → Web evidence checks: provides dependencies
- Web evidence checks → Tavily search: searches web
- Report review → Company discovery: supports company records