A modern Human Resource Management System (HRMS) built with React, TypeScript, and Supabase. This application provides comprehensive employee management, attendance tracking, and dashboard analytics features.
- Dashboard Analytics: Real-time insights and statistics about your workforce
- Employee Management: Complete CRUD operations for employee records
- Attendance Tracking: Monitor and manage employee attendance
- Modern UI: Built with shadcn/ui components and Tailwind CSS
- Responsive Design: Works seamlessly across desktop and mobile devices
- Dark Mode Support: Theme switching with next-themes
- Type-Safe: Full TypeScript support for better development experience
- React 18.3.1 - UI library
- TypeScript 5.8.3 - Type safety
- Vite 5.4.19 - Build tool and dev server
- React Router DOM 6.30.1 - Client-side routing
- TailwindCSS 3.4.17 - Utility-first CSS framework
- shadcn/ui - Re-usable component library built on Radix UI
- Framer Motion 12.33.0 - Animation library
- Supabase - Backend as a Service (BaaS)
- PostgreSQL database
- Real-time subscriptions
- Authentication
- Row Level Security (RLS)
- TanStack Query (React Query) 5.83.0 - Server state management
- React Hook Form 7.61.1 - Form handling
- Zod 3.25.76 - Schema validation
- Radix UI - Accessible component primitives
- Lucide React - Icon library
- Recharts - Charting library
- Sonner - Toast notifications
- date-fns - Date utility library
- Vitest 3.2.4 - Unit testing framework
- Testing Library - React component testing
- jsdom - DOM implementation for testing
Before you begin, ensure you have the following installed:
- Node.js (v18 or higher)
- npm or bun package manager
- Git
-
Clone the repository
git clone <repository-url> cd "assesment HRMS"
-
Install dependencies
npm install # or bun install -
Set up environment variables
Create a
.envfile in the root directory with the following variables:VITE_SUPABASE_PROJECT_ID=your_project_id VITE_SUPABASE_URL=https://your-project.supabase.co VITE_SUPABASE_PUBLISHABLE_KEY=your_publishable_key
Note: Replace the placeholder values with your actual Supabase project credentials.
-
Set up Supabase
- Create a Supabase project at supabase.com
- Run the SQL migrations from the
supabase/directory - Configure Row Level Security (RLS) policies as needed
npm run dev
# or
bun run devThe application will start at http://localhost:5173
npm run build
# or
bun run buildnpm run preview
# or
bun run previewnpm run build:devnpm run test
# or
bun run testnpm run test:watch
# or
bun run test:watchnpm run lint
# or
bun run lintassesment HRMS/
├── public/ # Static assets
├── src/
│ ├── components/ # React components
│ │ ├── attendance/ # Attendance-related components
│ │ ├── dashboard/ # Dashboard components
│ │ ├── employees/ # Employee management components
│ │ ├── layout/ # Layout components
│ │ └── ui/ # shadcn/ui components
│ ├── hooks/ # Custom React hooks
│ ├── integrations/ # External service integrations
│ │ └── supabase/ # Supabase client and types
│ ├── lib/ # Utility functions
│ ├── pages/ # Page components
│ ├── test/ # Test files
│ ├── App.tsx # Main App component
│ ├── main.tsx # Application entry point
│ └── index.css # Global styles
├── supabase/ # Supabase configuration and migrations
├── .env # Environment variables (not in git)
├── components.json # shadcn/ui configuration
├── package.json # Project dependencies
├── tailwind.config.ts # Tailwind CSS configuration
├── tsconfig.json # TypeScript configuration
├── vite.config.ts # Vite configuration
├── vitest.config.ts # Vitest configuration
└── vercel.json # Vercel deployment configuration
This project is configured for deployment on Vercel:
-
Install Vercel CLI (optional)
npm i -g vercel
-
Deploy
vercel
Or connect your GitHub repository to Vercel for automatic deployments.
-
Environment Variables
Don't forget to add your environment variables in the Vercel dashboard:
VITE_SUPABASE_PROJECT_IDVITE_SUPABASE_URLVITE_SUPABASE_PUBLISHABLE_KEY
The production build can be deployed to any static hosting service:
- Netlify
- GitHub Pages
- AWS S3 + CloudFront
- Firebase Hosting
| Variable | Description | Required |
|---|---|---|
VITE_SUPABASE_PROJECT_ID |
Your Supabase project ID | Yes |
VITE_SUPABASE_URL |
Your Supabase project URL | Yes |
VITE_SUPABASE_PUBLISHABLE_KEY |
Your Supabase publishable/anon key | Yes |