Imported from Shreyans236/Equviscale (
AGENTS.md). Install upstream withnpx skills add Shreyans236/Equviscale. Copyright stays with the author.
EquiScale AI Agent Guide
This repository is a Vite + React recruitment platform prototype. The goal of this guide is to help coding agents make safe, consistent changes without rediscovering the project structure or API conventions.
Quick Start
- Install dependencies:
npm install - Start app:
npm run dev - Production build:
npm run build - Lint:
npm run lint - Local app URL:
http://localhost:5173
Project Shape
- App shell and routing live in
src/App.jsxandsrc/pages/ - Reusable UI lives under
src/components/ - API integrations live under
src/api/ - Shared request state logic lives in
src/hooks/useApi.js - Styling is custom CSS in
src/styles/,src/App.css, and page/component CSS files
API Layer Conventions
The project follows a mock-first API design. The canonical integration points are:
src/api/axiosInstance.js— shared axios clientsrc/api/candidateApi.js— candidate-related requestssrc/api/jobsApi.js— job-related requests and mock persistencesrc/api/anonymizeApi.js— anonymization and match-score requests
Important conventions:
axiosInstancesets a sharedbaseURLfromVITE_API_BASE_URLand falls back tohttp://localhost:8000- Request interceptor reads
localStorage.getItem('equiscale_token')and attaches the bearer token when present - Response interceptor unwraps
response.dataand normalizes errors into{ status, message } - Each API module exports async named functions, not default objects
- Mock mode is the default: each module sets
USE_MOCK = trueand returns promise-based mock responses - Switching to the real backend is done by setting that flag to
falsewhile keeping the same function signatures
Mock Data Pattern
This app intentionally ships with realistic mock data to support UI demos without a backend.
jobsApi.jspersists mock jobs inlocalStorageunderequiscale_jobscandidateApi.jsuses in-memory mock arrays for candidate data and applicationsanonymizeApi.jsincludes mock match-score breakdowns and anonymized candidate payloads
When changing an API contract:
- Update the matching mock response in the relevant API file
- Keep the real axios call path aligned to the same endpoint and response shape
- Preserve the existing function names and return structure expected by the UI
UI + Data Fetching Pattern
Components should not perform raw axios calls directly. Prefer the established flow:
- Use
src/hooks/useApi.jsfor loading, error, and data state - Call exported functions from the domain API files
- Keep UI components focused on rendering and user actions
This pattern is the default for candidate/recruiter screens and is the safest way to extend the app.
Repository-Specific Guidance for API Work
When working on the API layer or integrations:
- Keep changes within the correct domain file instead of creating ad hoc API helpers elsewhere
- Preserve
USE_MOCKguard behavior; avoid breaking the demo experience - Match the backend contract described in the project README and keep endpoint paths under
/api/v1/... - Treat
localStorage-backed job data as part of the working mock implementation, not as a deprecated shortcut - If a UI component depends on a field, ensure both mock and real responses include that field consistently
Validation
Before finishing a change, run the smallest relevant check:
npm run buildto validate the app still compilesnpm run lintif the change touches code quality or formatting-sensitive files
Use the existing project structure and patterns rather than introducing new state management, fetch layers, or API conventions.