How ousaro/jobtrackerlocal works
Purpose and Entry Points
JobTracker is a polyglot job-application management platform composed of independently runnable services. The browser entry is the Next.js App Router in Frontend/app/layout.tsx and Frontend/app/page.tsx; backend HTTP processes start from service-specific bootstrap files such as Backend/application_service/src/index.js, Backend/auth_service/src/main/java/com/jobtracker/auth_service/JobtrackerApplication.java, and Backend/fileUpload_service/index.js.
Edge, Authentication, and Discovery
Kong is the public routing and security boundary, configured in Kong/kong.yml and Kong/kong.conf; it applies RS256 JWT validation and CORS before routing to services. Auth is a Spring Boot/PostgreSQL bounded context: Backend/auth_service/src/main/java/com/jobtracker/auth_service/controllers/AuthController.java, Backend/auth_service/src/main/java/com/jobtracker/auth_service/services/TokenService.java, and Backend/auth_service/src/main/java/com/jobtracker/auth_service/configurations/SecurityConfig.java. Services self-register and expose health endpoints for Consul-driven discovery, e.g. Backend/user_service/src/Config/registerService.js and Backend/analytics_service/src/Controllers/healthController.js.
Frontend Client Boundary
The frontend provides login/signup and authenticated dashboard domains—applications, contacts, interviews, profiles, analytics, and settings—through route files including Frontend/app/(auth)/login/page.tsx, Frontend/app/dashboard/layout.tsx, and Frontend/app/dashboard/analytics/page.tsx. Frontend/context/AuthContext.tsx and Frontend/components/withAuth.tsx own client auth state/protection; API modules such as Frontend/api/applicationApi/applicationApi.ts and Frontend/utils/axios.ts isolate calls to gateway-backed services.
Write-Side Domain Services
User, application, contact, and interview services own CRUD commands and publish domain events. Node/Express services use MongoDB models/controllers in Backend/user_service/src/Models/user.js, Backend/user_service/src/Controllers/userController.js, and Backend/application_service/src/Models/JobApplication.js. Java/Spring Boot services use Mongo repositories and service layers in Backend/contact_service/src/main/java/com/jobtracker/contact_service/services/ContactService.java, Backend/interview_service/src/main/java/com/jobtracker/interview_service/repositories/InterviewRepository.java, and Backend/interview_service/src/main/java/com/jobtracker/interview_service/services/RabbitMQPublisher.java. User deletion spans user and auth boundaries with compensating behavior rather than a shared transaction.
Event and Read-Model Pipeline
RabbitMQ topic events decouple write services from derived views. Publishers are represented by Backend/application_service/src/Config/publisher.js and Backend/user_service/src/Config/publisher.js; Java producers publish through Backend/contact_service/src/main/java/com/jobtracker/contact_service/services/RabbitMQPublisher.java. Analytics consumes application/interview events and persists aggregate counters through Backend/analytics_service/src/Config/consumer.js and Backend/analytics_service/src/Models/AnalyticsModel.js. Dashboard and notification services are consumer-oriented processes rooted at Backend/dashboard_service/src/index.js and Backend/notification_service/src/index.js.
Search, Files, and Infrastructure
Search is a CQRS read side: Backend/search_service/src/Config/consumer.js consumes write-side queues, Backend/search_service/src/Config/meili.js connects to Meilisearch, and Backend/search_service/src/Controllers/searchController.js serves indexed queries. File uploads are a separate filesystem-backed boundary using Backend/fileUpload_service/src/controllers/UploadController.js, Backend/fileUpload_service/src/constants/UploadFolders.js, and Backend/fileUpload_service/uploads/resume/1. Material infrastructure is defined at the repository root in docker-compose.yml: Kong, Consul, RabbitMQ, PostgreSQL, MongoDB, and Meilisearch; services otherwise run independently with Node.js/Express or Java 17/Spring Boot runtimes.
Main entry points: kong.yml Kong gateway · docker-compose.yml Domain event bus · userController.js User service · AuthController.java Auth service
Components 18
Client & Edge
- Next.js frontend · Browser login and dashboard experience.
Frontend/app/layout.tsx - Client auth boundary
Frontend/context/AuthContext.tsx - Kong gateway · Public JWT and CORS enforcement boundary.
Kong/kong.yml
Write Services
- Auth service
Backend/auth_service/src/main/java/com/jobtracker/auth_service/controllers/AuthController.java - User service
Backend/user_service/src/Controllers/userController.js - Application service
Backend/application_service/src/index.js - Contact service
Backend/contact_service/src/main/java/com/jobtracker/contact_service/services/ContactService.java - Interview service
Backend/interview_service/src/main/java/com/jobtracker/interview_service/services/RabbitMQPublisher.java - File upload service · Filesystem-backed resume uploads.
Backend/fileUpload_service/src/controllers/UploadController.js
Event Consumers & Reads
- Analytics service · Builds aggregate dashboard counters.
Backend/analytics_service/src/Config/consumer.js - Dashboard service
Backend/dashboard_service/src/index.js - Notification service
Backend/notification_service/src/index.js - Search service · Indexes write-side events and serves search queries.
Backend/search_service/src/Config/consumer.js
Shared Infrastructure
- Auth database
docker-compose.yml - Domain data · Service-owned document persistence.
docker-compose.yml - Domain event bus
docker-compose.yml - Search index
docker-compose.yml - Service discovery · Registration and health-based discovery.
docker-compose.yml
Connections 27
- Next.js frontend → Client auth boundary: auth state
- Next.js frontend → Kong gateway: API requests
- Client auth boundary → Auth service: login/signup
- Kong gateway → Auth service: routes authenticated calls
- Kong gateway → User service: routes
- Kong gateway → Application service: routes
- Kong gateway → Contact service: routes
- Kong gateway → Interview service: routes
- Kong gateway → Search service: search queries
- Kong gateway → File upload service: file uploads
- Auth service → Auth database: accounts and tokens
- User service → Domain data: user documents
- Application service → Domain data: application documents
- Contact service → Domain data: contact documents
- Interview service → Domain data: interview documents
- User service → Auth service: deletion compensation
- User service → Domain event bus: publishes events
- Application service → Domain event bus: publishes events
- Contact service → Domain event bus: publishes events
- Interview service → Domain event bus: publishes events
- Domain event bus → Analytics service: application/interview events
- Domain event bus → Dashboard service: derived view events
- Domain event bus → Notification service: notification events
- Domain event bus → Search service: indexing events
- Search service → Search index: indexes and queries
- User service → Service discovery: registers and health checks
- Analytics service → Service discovery: health endpoint