A comprehensive HRMS and Loan Management backend API built with Laravel 11, designed for NBFCs and organizations to manage employees, attendance, salaries, loans, documents, and analytics. The API is fully tested, secure, and ready for integration with modern frontend dashboards.
- Employee Management (CRUD, bulk upload, profile, statistics)
- Attendance Management (CRUD, bulk upload, filtering, statistics)
- Salary Management (CRUD, bulk upload, reporting)
- Loan Management (CRUD, approval, rejection, disbursement, statistics)
- Document Management (upload, association, deletion)
- Organization & System Settings
- Dashboard Analytics (employee/loan stats)
- Authentication (Laravel Sanctum)
- Bulk Upload (CSV/Excel for employees, attendance, salary)
- Comprehensive API documentation (OpenAPI/Swagger)
- Robust validation, error handling, and security
- Automated feature tests for all modules
- Laravel 11 (PHP 8.2+)
- SQLite/MySQL/PostgreSQL (configurable)
- Laravel Sanctum (API authentication)
- OpenAPI/Swagger (API docs)
- PHPUnit (testing)
- Clone the repository:
git clone <repo-url> cd NBFC-anek-API-s
- Install dependencies:
composer install
- Copy and configure environment:
cp .env.example .env # Edit .env for DB and mail settings php artisan key:generate - Run migrations and seeders:
php artisan migrate --seed
- Run the development server:
php artisan serve
- (Optional) Run tests:
php artisan test
- Uses Laravel Sanctum for token-based authentication.
- Obtain a token via
/api/loginand include it asBearer <token>in theAuthorizationheader for all requests.
GET /api/employees— List/filter employeesPOST /api/employees— Create employeePUT /api/employees/{id}— Update employeeDELETE /api/employees/{id}— Delete employeePOST /api/employees/bulk-upload— Bulk upload employees (CSV/Excel)GET /api/employees/statistics— Employee stats
GET /api/attendance— List/filter attendancePOST /api/attendance— Create attendancePUT /api/attendance/{id}— Update attendanceDELETE /api/attendance/{id}— Delete attendancePOST /api/attendance/bulk-upload— Bulk upload attendanceGET /api/attendance/statistics— Attendance stats
GET /api/salaries— List salariesPOST /api/salaries— Create salaryPOST /api/salaries/bulk-upload— Bulk upload salaries
GET /api/loans— List/filter loansPOST /api/loans— Create loanPUT /api/loans/{id}— Update loanDELETE /api/loans/{id}— Delete loanPOST /api/loans/{id}/approve— Approve loanPOST /api/loans/{id}/reject— Reject loanPOST /api/loans/{id}/disburse— Disburse loanGET /api/loans/statistics— Loan stats
GET /api/documents— List documentsPOST /api/documents— Upload documentDELETE /api/documents/{id}— Delete document
GET /api/settings— System/organization settingsPUT /api/settings/{key}— Update settingGET /api/dashboard— Dashboard analytics
POST /api/login— User loginPOST /api/logout— LogoutPOST /api/change-password— Change password
- Endpoints accept CSV/Excel files for employees, attendance, and salary.
- Validation and error reporting for each row.
- Run
php artisan testto execute all feature and unit tests. - Factories and seeders provided for all major models.
- Swagger/OpenAPI docs available via
/api/documentation(if enabled). - All endpoints annotated for auto-generation.
- Fork the repo, create a feature branch, and submit a PR.
- Follow PSR-12 coding standards.
- Add/modify tests for new features.
MIT License. See LICENSE for details.