{"id":30801024,"url":"https://github.com/mcyldz/hr-inventory","last_synced_at":"2026-04-08T18:02:20.866Z","repository":{"id":309562767,"uuid":"1015985801","full_name":"mcyldz/hr-inventory","owner":"mcyldz","description":"Human Resource Inventory Management Project","archived":false,"fork":false,"pushed_at":"2025-09-01T18:02:33.000Z","size":152,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-01T20:21:04.391Z","etag":null,"topics":["java","jpa-hibernate","jwt-authentication","mapstruct","maven","postgresql","rest-api","spring","spring-boot"],"latest_commit_sha":null,"homepage":"","language":"Java","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/mcyldz.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-07-08T10:16:17.000Z","updated_at":"2025-09-01T18:02:36.000Z","dependencies_parsed_at":"2025-08-12T16:26:26.437Z","dependency_job_id":"aa21ff50-b96f-4ad1-b89e-143385665188","html_url":"https://github.com/mcyldz/hr-inventory","commit_stats":null,"previous_names":["mcyldz/hr-inventory"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mcyldz/hr-inventory","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mcyldz%2Fhr-inventory","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mcyldz%2Fhr-inventory/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mcyldz%2Fhr-inventory/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mcyldz%2Fhr-inventory/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mcyldz","download_url":"https://codeload.github.com/mcyldz/hr-inventory/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mcyldz%2Fhr-inventory/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31567227,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-08T14:31:17.711Z","status":"ssl_error","status_checked_at":"2026-04-08T14:31:17.202Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["java","jpa-hibernate","jwt-authentication","mapstruct","maven","postgresql","rest-api","spring","spring-boot"],"created_at":"2025-09-05T20:47:51.837Z","updated_at":"2026-04-08T18:02:20.843Z","avatar_url":"https://github.com/mcyldz.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# HR Inventory Management System API\n\n## 📝 Project Description\n\n**HR Inventory Management System API** is a backend application developed for managing a company’s Human Resources (HR) and inventory processes.\n\nThis API provides the following core functionalities:\n\n- Personnel Management\n- Inventory Tracking\n- Asset Assignment and Return\n\nThe project is built with best practices and design patterns from the Java and Spring Boot ecosystem, structured to follow enterprise-level software architecture.\n\n---\n\n## 🚀 Tech Stack \u0026 Tools\n\n- **Backend:** Java 21, Spring Boot 3.x  \n- **Data Access:** Spring Data JPA, Hibernate  \n- **Database:** PostgreSQL  \n- **Security:** Spring Security, JWT (JSON Web Token)  \n- **API \u0026 Documentation:** RESTful API, Springdoc-openapi (Swagger UI)  \n- **Object Mapping:** MapStruct  \n- **Utilities:** Lombok  \n- **Build Tool:** Apache Maven  \n- **Database Management:** DBeaver  \n- **API Testing Tools:** Postman, Swagger UI\n\n---\n\n## 🧱 Architecture \u0026 Design Principles\n\n### Layered Architecture\n\nThe application is structured in clearly separated layers:\n\n- **Controller:** Handles HTTP requests and routing.\n- **Service:** Contains business logic.\n- **Repository:** Manages database operations.\n- **Entity:** Represents database tables.\n- **DTO (Data Transfer Object):** Defines data structures for requests/responses.\n- **Mapper:** Converts between Entities and DTOs.\n\n### DTO Pattern\n\n- Ensures sensitive data is hidden from API consumers.\n- Decouples API contracts from the database schema.\n- Uses structures such as `Request` and `Response`.\n\n### Centralized Exception Handling\n\n- Implemented with `@RestControllerAdvice` and a `GlobalExceptionHandler`.\n- Returns consistent error responses using a standardized `ErrorResponse` DTO and `ErrorCode` enum.\n\n### Programming to an Interface\n\n- Service layer is abstracted with interfaces.\n- Enhances testability, modularity, and scalability.\n\n---\n\n## ⚙️ Getting Started\n\n### Prerequisites\n\n- Java Development Kit (JDK) 21\n- Apache Maven\n- PostgreSQL\n\n### Clone the Repository\n\n```bash\ngit clone \ncd hr-inventory\n```\n\n### Database Setup\n\nCreate a PostgreSQL database named hr_inventory_db:\n\n```bash\nCREATE DATABASE hr_inventory_db;\n```\n\n### Configuration\n\nUpdate the database credentials in src/main/resources/application-dev.yml:\n\n```bash\nspring:\n  datasource:\n    url: jdbc:postgresql://localhost:5432/hr_inventory_db\n    username: ${DB_USER}\n    password: ${DB_PASSWORD}\n    driver-class-name: org.postgresql.Driver\n```\n\n### Run the Application\n\nUsing an IDE (e.g., IntelliJ IDEA):\n\nOpen the project.\n\nRun HrInventoryManagementApplication.java.\n\nVia Command Line:\n\n```bash\nmvn spring-boot:run\n```\n\n# 📚 API Reference\n\nACCESS INTERACTIVE API DOCUMENTATION AT:\n\nhttp://localhost:8080/swagger-ui.html\n\n# 🔐 Security\n\nThe API is secured using JWT (JSON Web Token) authentication.\n\nAfter successful login, the token must be provided in the request header:\n\nAuthorization: Bearer \u003cjwt-token\u003e\n\nRole-based access control is enforced using @PreAuthorize.\n\n# 📫 Contact\n\nFor questions or contributions, please open an issue or contact the developer via the GitHub repository.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmcyldz%2Fhr-inventory","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmcyldz%2Fhr-inventory","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmcyldz%2Fhr-inventory/lists"}