Skip to main content
WEBSITEProduction Live

HR Portal

Hr Portal

HR Portal

HR Portal - Local Deployment Guide

Prerequisites

Before running the HR Portal, ensure you have the following installed:

  1. Node.js (v14 or higher) - Download here
  2. MySQL (v5.7 or higher) - Download here

Setup Instructions

1. Database Setup

  1. Start MySQL server
  2. Create a new database (the application will create it automatically if it doesn't exist)
  3. Update database credentials in backend/.env if needed:
    DB_HOST=localhost
    DB_USER=root
    DB_PASSWORD=your_mysql_password
    DB_NAME=hr_portal
    

2. Backend Setup

Open a terminal in the project directory:

# Navigate to backend folder
cd backend

# Install dependencies
npm install

# Start the server
npm start

The backend server will start on http://localhost:5000

The database schema will be created automatically and seed data will be inserted.

Default Admin Credentials:

  • Email: admin@company.com
  • Password: admin123

3. Frontend Setup

Open a new terminal in the project directory:

# Navigate to frontend folder
cd frontend

# Install dependencies
npm install

# Start the development server
npm start

The frontend will open automatically at http://localhost:3000

Using the Application

Login

  1. Open http://localhost:3000 in your browser
  2. Login with default admin credentials:
    • Email: admin@company.com
    • Password: admin123

Admin Functions

  • Create users with different roles (Admin, Manager, Artist, Retainer)
  • Approve productivity submissions
  • Configure pricing (per-image rates)
  • Submit quality scores
  • Apply penalties
  • Generate payroll reports

Artist Functions

  • Submit daily productivity (images completed)
  • View productivity history
  • Check estimated salary

Retainer Functions

  • Mark daily attendance
  • View attendance history
  • Check attendance statistics

Manager Functions

  • Review productivity submissions
  • Approve/reject entries
  • View team statistics

Troubleshooting

Backend Issues

  • Database connection error: Check MySQL is running and credentials in .env are correct
  • Port 5000 already in use: Change PORT in .env file

Frontend Issues

  • Port 3000 already in use: The terminal will prompt to use a different port
  • API calls failing: Ensure backend is running on port 5000

Features Included

✅ User Management (4 roles) ✅ Artist Productivity Tracking ✅ Retainer Attendance Management ✅ Automated Salary Calculations ✅ Quality Score System ✅ Penalty Management ✅ Comprehensive Payroll Reports ✅ Audit Logging ✅ Role-based Access Control ✅ Modern Glassmorphic UI with Professional Styling ✅ Customizable Themes (Light/Dark Mode & Color Swatches)

Next Steps

For production deployment:

  1. Use environment variables for sensitive data
  2. Set up proper MySQL user with limited permissions
  3. Configure HTTPS
  4. Use a process manager like PM2 for the backend
  5. Build frontend for production: npm run build
  6. Deploy to a cloud platform (AWS, Heroku, DigitalOcean, etc.)

Support

If you encounter any issues:

  1. Check both backend and frontend terminals for error messages
  2. Verify MySQL is running
  3. Ensure all dependencies are installed
  4. Check the .env configuration