How tron01/hrsystem works
Project Type and Purpose
• This is a microservices-based HR System implemented in Spring Boot and Spring Cloud.
• It serves to manage user authentication, job postings, resume parsing, and application submissions through a unified API Gateway, with service discovery via Eureka, asynchronous events via Kafka, and centralized monitoring via Spring Boot Admin.
File Structure Analysis
• Top-level folders correspond to individual microservices:
• eureka-server (service discovery)
• api-gateway (Spring Cloud Gateway + security)
• auth-service (JWT auth)
• job-posting-service (job lifecycle)
• application-submit-service (application handling + Kafka producer)
• resume-parser-service (Kafka consumer + parsing logic)
• spring-boot-admin (monitoring UI)
• Shared config/build files: docker-compose.yml (Kafka+Zookeeper), service-specific Dockerfiles, Maven wrappers, application.yml.
• Each service follows a layered package structure (config, controller, service, repository, model, dto, filter, exception).
README Highlights
• Ports: Eureka (8761), Gateway (8080), Auth (8084), Job (8081), App Submit (8082), Resume Parser (8083), Admin UI (9090).
• Communication:
• Synchronous REST via API Gateway + Feign clients
• Asynchronous events: application-submit → Kafka topic → resume-parser
• Security: JWT enforced at Gateway and in each service via filters.
• Monitoring: Spring Boot Admin + Actuator endpoints.
Core Components
a. Gateway Layer
• API Gateway (Spring Cloud Gateway)
• JWT Authentication Filter
b. Service Discovery
• Eureka Server (registers all microservices)
c. Microservices
• Auth Service (handles /api/auth)
• Job Posting Service (/api/jobs)
• Application Submit Service (/api/applications)
• Resume Parser Service (Kafka consumer)
d. Messaging
• Kafka Broker + Zookeeper
• ResumeParseEvent topic
e. Monitoring
• Spring Boot Admin
• Actuator endpoints on each service
f. Data Stores
Relationships & Data Flows
• User → HTTP → API Gateway → routes to Auth/Job/Application endpoints → respective service
• Services register themselves on startup with Eureka → Eureka Dashboard
• Application Submit Service publishes ResumeParseEvent to Kafka when a new application is submitted
• Resume Parser Service subscribes to that Kafka topic, processes PDF, persists parsed resume
• Feign clients allow inter-service REST calls (e.g., Application Submit may call Job Service or Auth Service directly via Eureka)
• Spring Boot Admin periodically polls/receives events from all services’ Actuator endpoints
Architectural Patterns & Principles
• Microservices with bounded contexts (Auth, Job, Application, Parsing)
• API Gateway for cross-cutting concerns (routing, security)
• Service Discovery (Eureka) for dynamic routing
• Event-driven communication (Kafka) for loose coupling
• Centralized monitoring (Spring Boot Admin + Actuator)