Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Rampop01/HR-Platform/llms.txt
Use this file to discover all available pages before exploring further.
Quickstart Guide
This guide will help you get HCMatrix running locally in under 5 minutes. You’ll set up the development environment, configure the backend connection, and log in to the dashboard.Prerequisites
Before you begin, ensure you have:- Node.js 18.x or higher installed
- npm or yarn package manager
- A terminal/command line interface
- A code editor (VS Code recommended)
Quick Setup
Install dependencies
Install all required packages using npm:This will install all dependencies from
package.json:11, including:- Next.js 16.1.6
- React 19.2.4
- TypeScript 5.7.3
- Tailwind CSS 4.2.0
- Radix UI components
- Recharts for data visualization
Configure environment
Create a Add your backend API URL:
.env.local file in the root directory:The API proxy is configured to route requests through
/api/proxy to avoid CORS issues. See lib/api.ts:2 for implementation details.Start the development server
Run the development server:The application will start on
http://localhost:3000The dev server supports hot module replacement, so changes to your code will be reflected immediately in the browser.
Your First Login
The login page provides a clean, professional interface for authentication.Login Form
Fromapp/auth/login/page.tsx:19, here’s how the login process works:
Login Interface
Exploring the Dashboard
Once logged in, you’ll see the main dashboard with:Key Metrics
Fromapp/dashboard/page.tsx:12, the dashboard displays:
- Total Employees: Current workforce count with growth percentage
- New Hires This Month: Recent onboarding activity
- Upcoming Events: Birthdays, anniversaries, and important dates
- Open Positions: Active job requisitions
API Integration Example
Visual Analytics
The dashboard includes:- Headcount Growth Chart: 7-month trend visualization using Recharts
- Department Distribution: Pie chart showing workforce breakdown
- Attendance Metrics: Real-time presence tracking
- Action Items: Pending tasks requiring attention
Managing Employees
Navigate to the Employees section to view your workforce.Employee List
Fromapp/employees/page.tsx:25, the employee directory supports:
Features
Search
Real-time search with 500ms debounce for optimal performance
Pagination
Server-side pagination with customizable page size
Status Badges
Visual indicators for Active, Onboarding, On Leave, and other statuses
Quick View
Click any employee to view detailed profile information
Understanding the API Client
HCMatrix uses a typed API client defined inlib/api.ts. Here are the main methods:
Authentication
Data Fetching
TypeScript Interfaces
All API responses are fully typed. Fromlib/api.ts:19:
Next Steps
Full Installation Guide
Learn about production deployment, environment variables, and advanced configuration
API Reference
Explore all available API endpoints and their usage
Troubleshooting
Login fails with 'API error'
Login fails with 'API error'
- Verify your backend API URL in
.env.local - Check that the backend service is running
- Ensure CORS is properly configured on the backend
- Check the browser console for detailed error messages
Dashboard shows no data
Dashboard shows no data
- Verify your authentication token is valid
- Check network requests in browser DevTools
- Ensure the backend API endpoints are accessible
- Clear localStorage and login again
Build errors during npm install
Build errors during npm install
- Ensure Node.js version is 18.x or higher
- Delete
node_modulesandpackage-lock.json, then runnpm installagain - Check for conflicting global packages
If you encounter issues not covered here, check the browser console and terminal output for detailed error messages.
