{"id":31554622,"url":"https://github.com/devradheee/payroll-management-system","last_synced_at":"2026-04-07T08:02:14.434Z","repository":{"id":313401065,"uuid":"1051291797","full_name":"devradheee/Payroll-Management-System","owner":"devradheee","description":"The Payroll Management System is a Node.js and SQLite-based web app that manages employees, attendance, and payroll with secure authentication, role-based access, and responsive UI for efficient salary operations.","archived":false,"fork":false,"pushed_at":"2025-09-05T19:02:29.000Z","size":40,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-05T20:47:13.878Z","etag":null,"topics":["bootstrap5","ejs","expressjs","mongodb","nodejs","sqlite3"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/devradheee.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-05T18:35:47.000Z","updated_at":"2025-09-05T19:07:30.000Z","dependencies_parsed_at":"2025-09-05T20:47:15.333Z","dependency_job_id":"ac2421a4-cd22-4281-a515-bf6d81150c73","html_url":"https://github.com/devradheee/Payroll-Management-System","commit_stats":null,"previous_names":["devradheee/-payroll-management-system"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/devradheee/Payroll-Management-System","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devradheee%2FPayroll-Management-System","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devradheee%2FPayroll-Management-System/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devradheee%2FPayroll-Management-System/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devradheee%2FPayroll-Management-System/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/devradheee","download_url":"https://codeload.github.com/devradheee/Payroll-Management-System/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devradheee%2FPayroll-Management-System/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278373518,"owners_count":25976150,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-04T02:00:05.491Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bootstrap5","ejs","expressjs","mongodb","nodejs","sqlite3"],"created_at":"2025-10-04T21:11:23.173Z","updated_at":"2025-10-04T21:11:27.010Z","avatar_url":"https://github.com/devradheee.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 💼 Payroll Management System\n\nA comprehensive web-based payroll management system built with Node.js, Express.js, SQLite, and EJS templates. This system provides complete employee management, attendance tracking, and automated payroll generation capabilities.\n\n![Node.js](https://img.shields.io/badge/Node.js-18+-green)\n![Express.js](https://img.shields.io/badge/Express.js-5.1.0-blue)\n![SQLite](https://img.shields.io/badge/SQLite-3-lightblue)\n![Bootstrap](https://img.shields.io/badge/Bootstrap-5-purple)\n![License](https://img.shields.io/badge/License-ISC-yellow)\n\n## 🚀 Features\n\n### 👥 Employee Management\n- **Complete CRUD Operations** - Add, view, edit, and delete employee records\n- **Employee Codes** - Unique identification system for each employee\n- **Department \u0026 Designation** - Organized employee categorization\n- **Salary Management** - Base salary configuration with automatic calculations\n\n### 📅 Attendance Tracking\n- **Daily Attendance** - Mark present, absent, or leave status\n- **Date-wise Records** - Track attendance for specific dates\n- **Employee-specific Views** - Individual attendance history\n- **Leave Management** - Integrated leave tracking system\n\n### 💰 Payroll Generation\n- **Automatic Calculations** - HRA, allowances, and deductions\n- **Monthly Payroll** - Generate payroll for specific months\n- **Net Pay Calculation** - Comprehensive salary computation\n- **Historical Records** - Maintain payroll history for each employee\n\n### 🔐 Security \u0026 Authentication\n- **Session-based Authentication** - Secure user login system\n- **Role-based Access Control** - Admin, HR, and Employee roles\n- **Password Encryption** - bcrypt hashing for secure password storage\n- **CSRF Protection** - Cross-site request forgery prevention\n- **Input Validation** - Comprehensive data validation and sanitization\n\n### 🎨 Modern UI/UX\n- **Responsive Design** - Bootstrap 5 framework\n- **Mobile-friendly** - Works seamlessly on all devices\n- **Intuitive Interface** - User-friendly navigation and forms\n- **Flash Messages** - Real-time feedback and notifications\n\n## 🛠️ Tech Stack\n\n### Backend\n- **Node.js** - JavaScript runtime environment\n- **Express.js** - Web application framework\n- **SQLite** - Lightweight database with better-sqlite3\n- **bcrypt** - Password hashing and authentication\n- **express-session** - Session management\n- **helmet** - Security middleware\n- **morgan** - HTTP request logger\n\n### Frontend\n- **EJS** - Embedded JavaScript templating\n- **Bootstrap 5** - CSS framework for responsive design\n- **Custom CSS** - Additional styling and animations\n\n### Security\n- **CSRF Protection** - Cross-site request forgery prevention\n- **Input Validation** - Data sanitization and validation\n- **Secure Sessions** - HTTP-only cookies with proper configuration\n- **Password Hashing** - bcrypt with configurable rounds\n\n## 📋 Prerequisites\n\nBefore running this application, make sure you have the following installed:\n\n- **Node.js** (v18 or higher) - [Download here](https://nodejs.org/)\n- **npm** (comes with Node.js) or **yarn**\n- **Git** - [Download here](https://git-scm.com/)\n\n## 🚀 Quick Start\n\n### 1. Clone the Repository\n```bash\ngit clone https://github.com/devradheee/Payroll-Management-System.git\ncd Payroll-Management-System\n```\n\n### 2. Install Dependencies\n```bash\ncd payroll-management-system\nnpm install\n```\n\n### 3. Environment Configuration\nCreate a `.env` file in the `payroll-management-system` directory:\n```bash\n# Server Configuration\nPORT=3000\nNODE_ENV=development\n\n# Security (CHANGE THIS IN PRODUCTION!)\nSESSION_SECRET=your_very_secure_session_secret_key_here\n\n# Application\nAPP_NAME=Payroll Management System\nAPP_URL=http://localhost:3000\n\n# Database\nDB_PATH=./data.sqlite\n\n# Security\nBCRYPT_ROUNDS=10\n```\n\n### 4. Initialize Database\n```bash\nnode src/seed.js\n```\n\n### 5. Start the Application\n```bash\n# Development mode (with auto-restart)\nnpm run dev\n\n# Production mode\nnpm start\n```\n\n### 6. Access the Application\nOpen your browser and navigate to:\n```\nhttp://localhost:3000\n```\n\n## 🔑 Default Login Credentials\n\n| Role | Email | Password |\n|------|-------|----------|\n| Admin | admin@payroll.local | admin123 |\n\n## 📁 Project Structure\n\n```\nPayroll-Management-System/\n├── payroll-management-system/\n│   ├── src/\n│   │   ├── app.js          # Main Express application\n│   │   ├── auth.js         # Authentication helpers\n│   │   ├── db.js           # Database setup \u0026 migrations\n│   │   ├── routes.js       # Application routes\n│   │   └── seed.js         # Database seeding\n│   ├── views/              # EJS templates\n│   │   ├── layout.ejs      # Main layout template\n│   │   ├── index.ejs       # Dashboard\n│   │   ├── login.ejs       # Login page\n│   │   ├── employees.ejs   # Employee management\n│   │   ├── attendance.ejs  # Attendance tracking\n│   │   └── payroll.ejs     # Payroll generation\n│   ├── public/\n│   │   └── css/\n│   │       └── styles.css  # Custom styles\n│   ├── data.sqlite         # SQLite database\n│   ├── sessions.sqlite     # Session storage\n│   ├── package.json        # Dependencies\n│   └── README.md           # Server documentation\n├── .gitignore              # Git ignore rules\n└── README.md               # This file\n```\n\n## 🗄️ Database Schema\n\n### Users Table\n- `id` - Primary key\n- `name` - User's full name\n- `email` - Unique email address\n- `password_hash` - Encrypted password\n- `role` - User role (admin, hr, employee)\n- `created_at` - Account creation timestamp\n\n### Employees Table\n- `id` - Primary key\n- `user_id` - Foreign key to users table\n- `employee_code` - Unique employee identifier\n- `department` - Employee department\n- `designation` - Job title/position\n- `join_date` - Employment start date\n- `base_salary` - Monthly base salary\n\n### Attendance Table\n- `id` - Primary key\n- `employee_id` - Foreign key to employees table\n- `date` - Attendance date\n- `status` - present, absent, or leave\n- `UNIQUE(employee_id, date)` - One record per employee per day\n\n### Payroll Table\n- `id` - Primary key\n- `employee_id` - Foreign key to employees table\n- `month` - Payroll month (YYYY-MM format)\n- `basic` - Basic salary amount\n- `hra` - House Rent Allowance\n- `allowances` - Additional allowances\n- `deductions` - Salary deductions\n- `net_pay` - Final calculated salary\n- `generated_at` - Payroll generation timestamp\n\n## 🔧 Available Scripts\n\n| Command | Description |\n|---------|-------------|\n| `npm start` | Start the application in production mode |\n| `npm run dev` | Start the application in development mode with auto-restart |\n| `npm test` | Run tests (currently placeholder) |\n\n## 🌟 Key Features Explained\n\n### Employee Management\n- Add new employees with unique employee codes\n- Update employee information and salary details\n- View comprehensive employee listings\n- Delete employee records (with proper data integrity)\n\n### Attendance System\n- Mark daily attendance for all employees\n- Track present, absent, and leave status\n- View attendance history by date and employee\n- Generate attendance reports\n\n### Payroll Generation\n- Automatic calculation of HRA (House Rent Allowance)\n- Configurable allowances and deductions\n- Monthly payroll generation with net pay calculation\n- Historical payroll data maintenance\n\n### Security Features\n- Secure password hashing using bcrypt\n- Session-based authentication with SQLite storage\n- CSRF protection for all forms\n- Input validation and sanitization\n- Role-based access control\n\n## 🚀 Deployment\n\n### Environment Variables for Production\n```bash\nNODE_ENV=production\nPORT=3000\nSESSION_SECRET=your_very_secure_production_secret\nAPP_NAME=Payroll Management System\nAPP_URL=https://yourdomain.com\n```\n\n### Security Considerations\n- Change the default `SESSION_SECRET` in production\n- Use HTTPS in production environments\n- Regularly update dependencies\n- Implement proper backup strategies for the database\n- Consider using environment-specific database configurations\n\n## 🤝 Contributing\n\n1. Fork the repository\n2. Create a feature branch (`git checkout -b feature/AmazingFeature`)\n3. Commit your changes (`git commit -m 'Add some AmazingFeature'`)\n4. Push to the branch (`git push origin feature/AmazingFeature`)\n5. Open a Pull Request\n\n## 📝 License\n\nThis project is licensed under the ISC License - see the [LICENSE](LICENSE) file for details.\n\n## 👨‍💻 Author\n\n**Radheshyam Kumar**\n- GitHub: [@devradheee](https://github.com/devradheee)\n- Portfolio: [radheee.vercel.app](https://radheee.vercel.app/)\n- Repository: [Payroll Management System](https://github.com/devradheee/Payroll-Management-System)\n\n## 🙏 Acknowledgments\n\n- Express.js community for the excellent framework\n- Bootstrap team for the responsive CSS framework\n- SQLite team for the lightweight database solution\n- All open-source contributors who made this project possible\n\n## 📞 Support\n\nIf you encounter any issues or have questions, please:\n1. Check the [Issues](https://github.com/devradheee/-Payroll-Management-System/issues) page\n2. Create a new issue with detailed information\n3. Contact the maintainer\n\n---\n\n⭐ **Star this repository if you found it helpful!**\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevradheee%2Fpayroll-management-system","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevradheee%2Fpayroll-management-system","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevradheee%2Fpayroll-management-system/lists"}