A comprehensive, modern HRMS built with Next.js 16, TypeScript, and PostgreSQL. This system provides complete employee management, attendance tracking, leave management, payroll processing, and notification features.
- Multi-role Authentication: Employee, HR Officer, and Admin roles
- Secure Login/Signup: JWT-based authentication with password visibility toggle
- Employee Profiles: Complete employee information management
- Role-based Access Control: Different permissions for different user roles
- Employee ID Generation: Automatic unique employee ID assignment
- Real-time Analytics: Employee cards and attendance overview
- Quick Actions: Easy access to common tasks
- Notification Center: Integrated notification bell with unread count
- Role-based Views: Different dashboards for employees vs HR/admin
- Check-in/Check-out: Daily attendance tracking
- Attendance Status: Present, Absent, Half-day, Leave status
- Monthly/Yearly Views: Comprehensive attendance reports
- Bulk Attendance: HR can manage attendance for multiple employees
- Attendance Alerts: Automatic notifications for irregular attendance
- Leave Applications: Online leave request submission
- Leave Types: Paid, Sick, and Unpaid leave categories
- Approval Workflow: HR approval/rejection system
- Leave Balance Tracking: Automatic leave balance calculation
- Leave History: Complete leave record for each employee
- Email Notifications: Automatic notifications for leave status changes
- Salary Calculation: Auto-calculation of net salary (Gross - Deductions)
- Payroll Generation: Monthly payroll processing
- Payslip Generation: Digital payslip creation and download
- Salary Structure Management: Configurable salary components
- Payroll Reports: Comprehensive payroll analytics
- Payroll Notifications: Automatic notifications when payroll is published
- Document Upload: Profile pictures and employee documents
- File Storage: Local file storage with UUID naming
- Document Management: View, download, and delete documents
- File Type Validation: Support for images, PDFs, Word docs, text files
- File Size Limits: 5MB maximum file size
- Company Logo Upload: Brand customization for company settings
- Real-time Notifications: Polling-based notification updates
- Notification Types: Leave status, payroll published, approval requests, system alerts
- Unread Count Tracking: Visual notification badges
- Notification Management: Mark as read, delete notifications
- Bulk Actions: Mark all notifications as read
- Persistent Storage: Database-backed notification system
- Data Export: CSV export for attendance, leave, and payroll data
- Comprehensive Reports: Detailed analytics for HR decision-making
- Search & Filtering: Advanced search capabilities across all modules
- Data Visualization: Clear presentation of HR metrics
- Next.js 16: React framework with App Router
- TypeScript: Type-safe development
- Tailwind CSS: Modern utility-first CSS framework
- Radix UI: Accessible UI components
- Lucide React: Beautiful icon library
- Next.js API Routes: Server-side API endpoints
- PostgreSQL: Robust relational database
- Drizzle ORM: Modern TypeScript ORM
- JWT Authentication: Secure token-based authentication
- bcryptjs: Password hashing
- ESLint: Code quality and linting
- Vitest: Testing framework
- Drizzle Kit: Database management tools
- TypeScript: Static type checking
- users: Employee information and authentication
- attendance: Daily attendance records
- leaves: Leave requests and approvals
- payrolls: Monthly payroll records
- notifications: System notifications
- employee_documents: File attachments
- salary_structures: Employee salary configurations
- audit_logs: System activity tracking
- sessions: User session management
- UUID Primary Keys: Secure unique identifiers
- Foreign Key Constraints: Data integrity
- Indexes: Optimized query performance
- JSON Fields: Flexible data storage
- Timestamp Tracking: Created/updated timestamps
- Password Hashing: bcryptjs for secure password storage
- JWT Tokens: Secure authentication tokens
- Role-based Access: Permission-based feature access
- Input Validation: Comprehensive form validation
- SQL Injection Protection: ORM-based database queries
- File Upload Security: File type and size validation
- Session Management: Secure session handling
- View personal profile
- Manage own attendance (check-in/check-out)
- Apply for leave
- View own payroll records
- Upload personal documents
- Receive notifications
- All employee permissions
- Manage employee profiles
- Approve/reject leave requests
- Generate payroll
- View all attendance records
- Manage company settings
- Export reports
- All HR permissions
- User management (create/edit/delete users)
- System configuration
- Database management access
- Full system analytics
- Mobile-First: Optimized for mobile devices
- Tablet Support: Responsive tablet layouts
- Desktop Experience: Full-featured desktop interface
- Cross-Browser Compatibility: Works on all modern browsers
- Node.js 18+
- PostgreSQL database
- npm or yarn
-
Clone the repository
git clone https://github.com/DeepGoyani/odoo-gcet.git cd odoo-gcet/gcet -
Install dependencies
npm install
-
Set up environment variables
cp .env.local.example .env.local # Configure your database URL and other environment variables -
Set up the database
npm run db:push
-
Run the development server
npm run dev
-
Open your browser Navigate to
http://localhost:3000
DATABASE_URL=postgresql://username:password@localhost:5432/hrms_db
NEXTAUTH_SECRET=your-secret-key
NEXTAUTH_URL=http://localhost:3000npm run dev- Start development servernpm run build- Build for productionnpm run start- Start production servernpm run lint- Run ESLintnpm run test- Run testsnpm run db:generate- Generate database migrationsnpm run db:migrate- Run database migrationsnpm run db:push- Push schema changes to databasenpm run db:studio- Open Drizzle Studio
- Unit Tests: Component and utility function testing
- Integration Tests: API endpoint testing
- Test Coverage: Comprehensive test suite
- Testing Library: React Testing Library integration
gcet/
├── app/ # Next.js app directory
│ ├── api/ # API routes
│ ├── auth/ # Authentication pages
│ ├── dashboard/ # Dashboard
│ ├── employees/ # Employee management
│ ├── attendance/ # Attendance tracking
│ ├── leave/ # Leave management
│ ├── payroll/ # Payroll system
│ ├── notifications/ # Notification center
│ └── settings/ # Settings page
├── components/ # Reusable components
│ ├── ui/ # UI component library
│ └── ... # Feature components
├── hooks/ # Custom React hooks
├── lib/ # Utility libraries
│ ├── db/ # Database configuration
│ └── ... # Other utilities
├── public/ # Static assets
└── types/ # TypeScript type definitions
- NotificationBell: Real-time notification center
- FileUpload: Drag-and-drop file upload
- DocumentList: Document management interface
- PasswordInput: Password field with visibility toggle
- Toast: Notification toast system
- Button: Customizable button component
- Input: Form input fields
- Card: Content containers
- DataTable: Data display tables
- Sidebar: Navigation sidebar
- TopBar: Application header
- StatusBadge: Status indicators
- useSalaryCalculation: Reactive salary calculations
- useNotificationTrigger: Notification system integration
- useToastListener: Toast notification management
POST /api/auth/login- User loginPOST /api/auth/signup- User registrationGET /api/auth/me- Get current user
GET /api/users- List all usersGET /api/users/[id]- Get user detailsPUT /api/users/[id]- Update user
GET /api/attendance- Get attendance recordsPOST /api/attendance/check-in- Check inPOST /api/attendance/check-out- Check outGET /api/attendance/me- Personal attendance
GET /api/leaves- List leave requestsPOST /api/leaves- Apply for leavePOST /api/leaves/[id]/approve- Approve leavePOST /api/leaves/[id]/reject- Reject leave
GET /api/payroll- List payroll recordsPOST /api/payroll- Generate payrollGET /api/payroll/me- Personal payroll
GET /api/notifications- Get notificationsPOST /api/notifications- Create notificationPATCH /api/notifications/[id]- Mark as readDELETE /api/notifications/[id]- Delete notification
POST /api/uploads- Upload fileDELETE /api/uploads/[id]- Delete file
GET /api/export/attendance- Export attendance dataGET /api/export/leave- Export leave data
- Salary Calculation: Net salary = Gross salary - Deductions
- Real-time Updates: Instant recalculation on form changes
- Visual Feedback: Formula display and read-only fields
- Polling-based: 30-second interval updates
- Rich Notifications: Links, payloads, and actions
- Management Features: Mark as read, delete, bulk operations
- Secure Upload: Type and size validation
- Local Storage: No external dependencies
- Document Management: Complete CRUD operations
- Password Visibility: Eye icon toggle for better UX
- Role-based Access: Secure permission system
- Session Management: Secure token handling
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
For support, please contact the development team or create an issue in the repository.
- v0.1.0 - Initial release with core HRMS functionality
- User authentication and management
- Attendance tracking system
- Leave management workflow
- Payroll processing
- Notification system
- File upload capabilities
- Export functionality
- Responsive design
Built with ❤️ using Next.js, TypeScript, and PostgreSQL