How btwiiin/findjobweb works
Project Overview & Purpose
• This project is a job posting platform built with a microservices architecture.
• It provides capabilities for employers to post/manage jobs and for job seekers to browse, search (with filtering and geolocation via an interactive map), and apply for jobs.
• The system uses an event-driven pattern with RabbitMQ (integrated via MassTransit) to decouple service communications.
• The front-end uses Next.js (React) for an interactive user interface and the back-end consists of several .NET microservices.
• Authentication is implemented via an external Identity service (utilizing Duende and Blazor components) with planned notification functionalities.
Analyzing the File Structure
• Notice the clear separation between frontend and backend:
• The "frontend/web-app" directory includes all client-side files and components for the user interface.
• The "src" folder contains several microservices: ApplyingService, IdentityService, JobPostingService, NotificationService, SearchService, and a GatewayService.
• Each service is organized into controllers, DTOs, models, repository layers, and consumers (for handling events).
• Dockerfiles in multiple services and a docker-compose.yml file at the root indicate containerization and orchestration.
Identifying the Main Architectural Components
a. Frontend (Client-side)
• Built with Next.js, it is responsible for rendering the job listings, interactive maps, forms for applying, and overall user interaction.
b. API Gateway
• GatewayService acts as an entry point to route and expose backend services.
c. Microservices (Back-end)
• JobPostingService: Manages job posts (CRUD operations, listings, search indexing).
• ApplyingService: Handles job applications and operations related to applying for jobs.
• IdentityService: Manages authentication, user sessions, and user profiles.
• SearchService: Provides advanced search functionality, heavily utilizing Elasticsearch.
• NotificationService (Planned/Partially implemented): Would handle job notifications and events triggering alerts.
d. Communication & Event Bus
• RabbitMQ (via MassTransit) for asynchronous, event-driven communication between these services.
e. Databases & External Tools
• PostgreSQL for persistent storage.
• Elasticsearch for search functionalities.
• Additional external integrations for identity (using Duende) and potentially for maps or other services.
Determining Relationships & Interactions
• The front-end communicates with the API Gateway for all user requests.
• The API Gateway routes the requests to the appropriate microservice.
• Microservices interact with each other by publishing or subscribing to events on RabbitMQ. For example, when a new job post is created in the JobPostingService, an event is sent for the SearchService to update indices and for the NotificationService to potentially trigger notifications.
• IdentityService is a shared component used for authentication and authorization across the full system.
• Each microservice communicates with its own database instance or shared database for both transactional (PostgreSQL) and search functionalities (Elasticsearch).