A modern, full-stack HR Management System built with Next.js 16, React 19, and Go
Features • Tech Stack • Getting Started • API Documentation • License
- Employee Directory - Browse and search employees across branches
- Profile Management - View detailed employee profiles and information
- Award Tracking - Manage employee awards and recognition
- Clock In/Out - Simple attendance tracking with calendar view
- Attendance Recap - Monthly/yearly attendance reports and analytics
- Leave Management - Track leave quotas and requests
- Work Permit System - Submit and track work permits with file attachments
- Approval Workflow - Admin approval/rejection with notifications
- Request History - Complete audit trail of all requests
- Announcements - Company-wide announcement system
- Calendar Events - Track holidays, events, and important dates
- Notifications - Real-time notification system
- User Management - Full CRUD for user accounts
- Branch Management - Manage company branches and locations
- Activity Logs - Comprehensive admin action logging
- Statistics Dashboard - Overview of system metrics
| Technology | Version | Purpose |
|---|---|---|
| Next.js | 16.1.1 | React Framework with App Router |
| React | 19.2.3 | UI Library |
| TypeScript | 5.x | Type Safety |
| Tailwind CSS | 4.x | Styling |
| Lucide React | Latest | Icons |
| Technology | Version | Purpose |
|---|---|---|
| Go | 1.21+ | Backend Language |
| Gin | Latest | HTTP Web Framework |
| MongoDB | Latest | Database |
| JWT | - | Authentication |
- Node.js 18+
- Go 1.21+
- MongoDB instance
- Docker (optional)
- Clone the repository
git clone https://github.com/yourusername/hr-system.git
cd hr-system- Install dependencies
# Install all workspace dependencies
npm install
# Or install separately
cd frontend && npm install
cd ../backend && go mod download- Environment Setup
Copy the example environment file and configure your credentials:
# Backend configuration
cd backend
cp .env.example .env
# Edit .env with your MongoDB credentials
# Frontend configuration (optional)
cd ../frontend
cp .env.example .env.local # if neededThe backend .env file should contain:
MONGODB_URI=mongodb+srv://username:password@your-cluster.mongodb.net/?appName=YourApp
MONGODB_DB=HRIS-Demo
JWT_SECRET=your-super-secret-jwt-key- Start the development servers
# Terminal 1 - Backend
cd backend
go run main.go
# Terminal 2 - Frontend
cd frontend
npm run dev- Access the application
- Frontend: http://localhost:3000
- Backend API: http://localhost:8080
Both frontend and backend include Dockerfiles for containerized deployment:
# Build and run with Docker Compose (if available)
docker-compose up --build
# Or build individually
docker build -t hr-frontend ./frontend
docker build -t hr-backend ./backend| Method | Endpoint | Description |
|---|---|---|
| POST | /api/auth/login |
User login |
| POST | /api/auth/logout |
User logout |
| POST | /api/auth/change-password |
Change password |
| GET | /api/auth/me |
Get current user |
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/employees |
List all employees |
| GET | /api/employees/:id |
Get employee details |
| GET | /api/attendance |
Get attendance records |
| POST | /api/attendance |
Record attendance |
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/work-permits |
List work permits |
| POST | /api/work-permits |
Create work permit |
| POST | /api/requests |
Submit request |
| GET | /api/leave-quota |
Get leave quota |
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/admin/stats |
Dashboard statistics |
| GET | /api/admin/users |
Manage users |
| GET | /api/admin/requests |
Pending requests |
| GET | /api/admin/logs |
Activity logs |
hr-system/
├── frontend/ # Next.js 16 Frontend
│ ├── src/
│ │ ├── app/ # App Router pages
│ │ │ ├── admin/ # Admin dashboard
│ │ │ ├── attendance/ # Attendance tracking
│ │ │ ├── directory/ # Employee directory
│ │ │ ├── login/ # Authentication
│ │ │ └── work-permit/ # Work permit system
│ │ ├── components/ # Reusable components
│ │ ├── context/ # React Context providers
│ │ ├── types/ # TypeScript definitions
│ │ └── utils/ # Utility functions
│ └── Dockerfile
│
├── backend/ # Go Backend
│ ├── handlers/ # API route handlers
│ ├── database/ # MongoDB connection & queries
│ ├── models/ # Data models
│ ├── seed/ # Database seeding
│ ├── main.go # Application entry point
│ └── Dockerfile
│
└── package.json # Workspace configuration
- JWT Authentication - Secure token-based authentication
- Role-Based Access Control - Admin and user role separation
- Protected Routes - Middleware-based route protection
- CORS Configuration - Configured allowed origins
- Input Validation - Server-side request validation
This project is licensed under the MIT License - see the LICENSE file for details.
Built with ❤️ for modern HR management