A comprehensive Human Resource Management System (HRMS) with a modern React frontend and robust Node.js backend.
Day-Flow/
βββ frontend/ # React + TypeScript frontend
βββ src/ # Node.js + Express backend
βββ prisma/ # Database schema and migrations
βββ .kiro/ # Project specifications and tasks
βββ docker-compose.yml # Docker configuration
- π¨ Modern UI with light/dark theme support
- π± Responsive design for all devices
- π Role-based authentication and routing
- π₯ Employee dashboard and management
- β° Attendance tracking with real-time status
- ποΈ Leave management system
- π° Salary information display
- π§ͺ Comprehensive testing with Vitest and property-based tests
- π JWT-based authentication and authorization
- π₯ Employee management with role-based access control
- β° Attendance tracking with check-in/check-out functionality
- ποΈ Leave management system with approval workflows
- π° Salary calculation and payroll management
- π§ Email notifications using Nodemailer
- π‘οΈ Security middleware with rate limiting and input validation
- π PostgreSQL database with Prisma ORM
- π³ Docker support for easy deployment
- Framework: React 18 with TypeScript
- Build Tool: Vite
- Routing: React Router v6
- Styling: CSS Modules with CSS Variables
- HTTP Client: Axios
- Testing: Vitest, React Testing Library, fast-check
- Code Quality: ESLint, Prettier, Husky
- Runtime: Node.js with TypeScript
- Framework: Express.js
- Database: PostgreSQL with Prisma ORM
- Authentication: JWT tokens with bcrypt password hashing
- Email: Nodemailer
- Validation: Joi
- Testing: Jest with Supertest
- Code Quality: ESLint, Prettier, Husky
- Node.js (v18 or higher)
- Docker and Docker Compose
- Git
-
Install backend dependencies
npm install
-
Set up environment variables
cp .env.example .env # Edit .env with your configuration -
Start the database
docker-compose up -d postgres
-
Set up the database
npm run db:generate npm run db:push
-
Start the backend server
npm run dev
The API will be available at http://localhost:3000
-
Navigate to frontend directory
cd frontend -
Install frontend dependencies
npm install
-
Start the frontend development server
npm run dev
The frontend will be available at http://localhost:5173
npm run dev- Start development server with hot reloadnpm run build- Build the project for productionnpm start- Start the production servernpm test- Run testsnpm run test:watch- Run tests in watch modenpm run lint- Run ESLintnpm run lint:fix- Fix ESLint errorsnpm run format- Format code with Prettiernpm run db:generate- Generate Prisma clientnpm run db:push- Push schema changes to databasenpm run db:migrate- Run database migrationsnpm run db:studio- Open Prisma Studio
npm run dev- Start development servernpm run build- Build for productionnpm run preview- Preview production buildnpm run test- Run tests oncenpm run test:watch- Run tests in watch modenpm run test:ui- Run tests with UInpm run lint- Run ESLintnpm run lint:fix- Fix ESLint errorsnpm run format- Format code with Prettiernpm run format:check- Check code formatting
GET /health- Health check endpoint
POST /api/auth/login- User loginPOST /api/auth/refresh- Refresh JWT tokenPOST /api/auth/logout- User logoutPOST /api/auth/forgot-password- Request password resetPOST /api/auth/reset-password- Reset password
GET /api/employees- List employeesPOST /api/employees- Create employeeGET /api/employees/:id- Get employee detailsPUT /api/employees/:id- Update employeeGET /api/employees/me- Get current user profile
GET /api/attendance- Get attendance recordsPOST /api/attendance/checkin- Check inPOST /api/attendance/checkout- Check out
GET /api/leaves- Get leave requestsPOST /api/leaves- Apply for leavePUT /api/leaves/:id/approve- Approve leavePUT /api/leaves/:id/reject- Reject leave
GET /api/salary/structure- Get salary structurePUT /api/salary/structure- Update salary structure
Both frontend and backend use ESLint and Prettier for code quality and formatting. Husky is configured to run these checks on commit.
- Unit Tests: Component and utility function testing
- Integration Tests: API endpoint testing
- Property-Based Tests: Universal correctness properties
- E2E Tests: Critical user journey testing
- Create feature branches from
main - Write tests for new features
- Ensure all tests pass and code is formatted
- Create pull requests for review
The project includes Docker Compose configuration for:
- PostgreSQL database
- pgAdmin for database management
To start all services:
docker-compose up -dDATABASE_URL: PostgreSQL connection stringJWT_SECRET: Secret key for JWT token signingJWT_REFRESH_SECRET: Secret key for refresh token signingSMTP_*: Email configuration for NodemailerPORT: Server port (default: 3000)
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests for new functionality
- Ensure all tests pass
- Submit a pull request
This project is licensed under the MIT License.
This project is currently in active development. The frontend infrastructure is complete and ready for feature implementation. The backend infrastructure is also set up with database schema and basic middleware.
- Frontend project setup with Vite + React + TypeScript
- Theme system with light/dark mode support
- CSS Variables and responsive design foundation
- TypeScript type definitions
- Testing infrastructure with Vitest and fast-check
- Backend project setup with Express + TypeScript
- Database schema with Prisma ORM
- Authentication middleware and utilities
- Code quality tools (ESLint, Prettier, Husky)
- Authentication system implementation
- Dashboard components
- API endpoints development
- Integration between frontend and backend
- Employee management features
- Attendance tracking system
- Leave management workflows
- Salary calculation system
- Email notifications
- Deployment configuration