Skip to content

A HR system. User can login to a Flutter app to use features like apply leave, equipments, check info. Admin can user React web portal to manage user and requests.

Notifications You must be signed in to change notification settings

Minhen96/hr_user_app_with_admin_web_portal

Repository files navigation

MH HR Employee Management System

A comprehensive HR management system with backend API, web admin portal, and mobile employee app.

web: Image Image Image Image Image

mobile:

Image Image Image Image Image Image

πŸ“ Project Structure

This is a monorepo containing three interconnected applications:

mh_hr_employee_projects/
β”œβ”€β”€ mh_hr_employee_dotnet_backend/    # .NET 8.0 Web API Backend
β”œβ”€β”€ mh_hr_employee_react_web/         # React Web Admin Portal
β”œβ”€β”€ mh_employee_flutter_app/          # Flutter Mobile Employee App
β”œβ”€β”€ CLAUDE.md                          # Detailed project documentation
└── README.md                          # This file

πŸ”§ Backend API - .NET 8.0

Directory: mh_hr_employee_dotnet_backend/

A RESTful API backend built with ASP.NET Core, featuring:

  • JWT authentication
  • Clean Architecture
  • SQL Server database
  • Firebase push notifications
  • Document management, leave tracking, equipment requests, and more

πŸ“– View Backend Documentation

🌐 Web Admin Portal - React

Directory: mh_hr_employee_react_web/my-react/

Modern React web application for HR administrators:

  • User & staff management
  • Approve/reject leave requests
  • Equipment request management
  • Document uploads
  • Training course management

πŸ“– View Web Admin Documentation

πŸ“± Mobile Employee App - Flutter

Directory: mh_employee_flutter_app/

Flutter mobile app for employees (Android/iOS):

  • View documents & company updates
  • Apply for leave
  • Request equipment
  • View training courses
  • Check attendance
  • Modern purple gradient UI with dark/light mode

πŸ“– View Mobile App Documentation


πŸš€ Quick Start

1. Start Backend API

cd mh_hr_employee_dotnet_backend
dotnet restore
dotnet build React.sln
dotnet run --project React.csproj

# API runs on:
# - HTTP: http://localhost:5000
# - HTTPS: https://localhost:7106
# - Swagger: https://localhost:7106/

2. Start Web Admin Portal

cd mh_hr_employee_react_web/my-react
npm install
npm run dev

# Web admin runs on: http://localhost:5173

3. Run Mobile App

cd mh_employee_flutter_app
flutter pub get
flutter run

# Runs on connected Android/iOS device or emulator

πŸ—οΈ System Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                    Mobile App (Flutter)                     β”‚
β”‚          Employee-facing features & self-service            β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                         β”‚
                         β”‚ HTTPS/REST API
                         β”‚ JWT Authentication
                         β”‚
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                  Backend API (.NET 8.0)                     β”‚
β”‚        - JWT Auth    - Document Management                  β”‚
β”‚        - SQL Server  - Leave Tracking                       β”‚
β”‚        - Firebase    - Equipment Requests                   β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–²β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                         β”‚
                         β”‚ HTTPS/REST API
                         β”‚ JWT Authentication
                         β”‚
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚              Web Admin Portal (React)                       β”‚
β”‚          Admin-facing features & management                 β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸ“‹ Prerequisites

  • .NET 8.0 SDK - For backend API
  • Node.js 16+ - For React web admin
  • Flutter 3.5.4+ - For mobile app
  • SQL Server - Database (local or remote)
  • Firebase (optional) - For push notifications

πŸ” Authentication Flow

  1. Users log in via web or mobile app
  2. Backend validates credentials and returns JWT token
  3. Token is stored (localStorage for web, secure storage for mobile)
  4. All subsequent API requests include the token in headers
  5. Backend validates token and processes requests
  6. Token expires after 24 hours (configurable)

πŸ“š Documentation

Project Documentation

  • CLAUDE.md - Comprehensive development guide with architecture details, conventions, and examples
  • README.md (this file) - Monorepo overview and quick start

Individual Project Documentation

Additional Documentation

  • Backend CLAUDE.md - Backend-specific development guide
  • TEST_AND_FINISH.md - React testing guide
  • QUICK_REFERENCE.md - Common commands and patterns
  • REFACTORING.md - Architecture refactoring notes

🎯 Key Features

For Employees (Mobile App)

  • View company documents and updates
  • Apply for annual/medical leave
  • Request IT equipment
  • View training courses and upload certificates
  • Track attendance
  • View company calendar and events
  • Social feed (moments)

For Administrators (Web Portal)

  • Manage users and departments
  • Approve/reject leave requests
  • Manage equipment requests
  • Upload company documents
  • Create training courses
  • View analytics and reports
  • Manage staff directory

Technical Features

  • JWT-based authentication
  • Role-based access control (super-admin, department-admin, user)
  • File upload/download
  • Push notifications (Firebase)
  • Email notifications
  • PDF generation and viewing
  • Real-time data updates

πŸ› οΈ Development Workflow

1. Setup Development Environment

# Clone repository
git clone <repository-url>
cd mh_hr_employee_projects

# Setup backend
cd mh_hr_employee_dotnet_backend
# Configure appsettings.json (see backend README)
dotnet restore

# Setup web admin
cd ../mh_hr_employee_react_web/my-react
npm install

# Setup mobile app
cd ../../mh_employee_flutter_app
flutter pub get

2. Run All Applications

# Terminal 1: Backend API
cd mh_hr_employee_dotnet_backend
dotnet run --project React.csproj

# Terminal 2: Web Admin
cd mh_hr_employee_react_web/my-react
npm run dev

# Terminal 3: Mobile App
cd mh_employee_flutter_app
flutter run

3. Access Applications

πŸ”§ Configuration

Backend API Configuration

See mh_hr_employee_dotnet_backend/appsettings.json:

  • Database connection string
  • JWT secret key and settings
  • Firebase service account path
  • SMTP email settings

Web Admin Configuration

See mh_hr_employee_react_web/my-react/.env.development:

  • Backend API URL

Mobile App Configuration

See mh_employee_flutter_app/lib/services/api_service.dart:

  • Backend API base URL
  • Timeout settings

πŸ› Troubleshooting

Backend Issues

  • Database connection failed: Check SQL Server is running and connection string is correct
  • JWT validation failed: Verify JWT key matches in config and is at least 32 characters
  • See Backend README for more

Web Admin Issues

Mobile App Issues

  • API not connecting: Check api_service.dart has correct backend URL
  • Build errors: Run flutter clean && flutter pub get
  • See Mobile App README for more

πŸ“Š Project Status

Component Status Description
Backend API βœ… Production Ready Clean Architecture, fully documented
Web Admin Portal βœ… Production Ready Modern React app with feature-based structure
Mobile App βœ… Production Ready Modern UI with purple gradient theme
Database βœ… Ready SQL Server with multiple contexts
Authentication βœ… Implemented JWT with role-based access
Documentation βœ… Complete Comprehensive README files for all projects

🀝 Contributing

  1. Follow the architecture patterns described in CLAUDE.md
  2. Write clean, documented code
  3. Test thoroughly before committing
  4. Update relevant documentation
  5. Follow naming conventions and code style

πŸ“„ License

Proprietary - MH HR Employee Management System

πŸ’‘ Need Help?


Last Updated: 2025-11-16

About

A HR system. User can login to a Flutter app to use features like apply leave, equipments, check info. Admin can user React web portal to manage user and requests.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published