Skip to content

This Microservices-based REST API, built with Java and Spring Boot, manages job listings, companies, and reviews. Each service is independently developed and scalable, supporting CRUD operations via RESTful endpoints for easy management and communication.

License

Notifications You must be signed in to change notification settings

Mansoor-P/jobsmicroservices

Repository files navigation

Job Companies and Reviews Microservices Architecture

Java Spring Boot Maven Docker MySQL PostgreSQL RabbitMQ Zipkin License

Overview

This Microservices-based REST API, built with Java 17 and Spring Boot, manages job listings, companies, and reviews for various companies. Each service is independently developed, ensuring scalability, maintainability, and fault tolerance. The API offers CRUD operations and uses a microservices architecture for efficient handling of resources. Integrated with tools like Spring Cloud, RabbitMQ, and Zipkin, the system supports service discovery, asynchronous communication, and distributed tracing.

Table of Contents

Features

  • Company Management: CRUD operations for companies.
  • Job Management: CRUD operations for jobs within a company.
  • Review Management: CRUD operations for reviews related to a company.
  • Service Discovery: Seamless service registration and discovery using Eureka.
  • Load Balancing: Intelligent routing and load balancing with Spring Cloud.
  • Fault Tolerance: Resilient microservices with retry mechanisms and circuit breakers.
  • Distributed Tracing: Integrated Zipkin for monitoring and tracing.

Technologies Used

Architecture

The system is composed of independent microservices, each responsible for a specific domain:

  • Company Service: Handles company-related operations, including company details and job associations.
  • Job Service: Manages job listings, including job creation, updates, and associations with companies.
  • Review Service: Manages user reviews of companies, integrating with job data.
  • Service Registry: Manages dynamic service registration and discovery using Eureka.
  • API Gateway: Routes external requests to the appropriate microservice, handling load balancing and security.
  • RabbitMQ: Enables asynchronous communication between services, enhancing scalability and resilience.

Getting Started

Prerequisites

Installation

  1. Clone the repository:

    git clone https://github.com/Mansoor-P/jobsmicroservices.git
    cd jobsmicroservices
  2. Configure the databases: Update the application.properties or application.yml files in each service with your database credentials.

  3. Build and package each service:

    mvn clean install
  4. Start the Service Registry:

    cd service-registry
    mvn spring-boot:run
  5. Start the microservices:

    cd ../company-service
    mvn spring-boot:run
    
    cd ../job-service
    mvn spring-boot:run
    
    cd ../review-service
    mvn spring-boot:run
  6. Run API Gateway and other services as needed.

Deployment

To deploy the microservices architecture, Docker can be used for containerization. Alternatively, you can deploy each service to your cloud provider of choice (e.g., AWS, Azure, GCP).

  • Docker Compose: Consider using Docker Compose for local deployment. Define services, networks, and volumes to manage the entire stack.

API Endpoints

Company Endpoints

  • GET /companies: Retrieve all companies.
  • POST /companies: Create a new company.
  • GET /companies/{id}: Retrieve details of a specific company.
  • PUT /companies/{id}: Update a company's details.
  • DELETE /companies/{id}: Delete a company.

Job Endpoints

  • GET /jobs: Retrieve all job listings.
  • POST /jobs: Create a new job listing.
  • GET /jobs/{id}: Retrieve details of a specific job.
  • PUT /jobs/{id}: Update a job listing.
  • DELETE /jobs/{id}: Delete a job listing.

Review Endpoints

  • GET /reviews: Retrieve all reviews.
  • POST /reviews: Create a new review.
  • GET /reviews/{id}: Retrieve details of a specific review.
  • PUT /reviews/{id}: Update a review.
  • DELETE /reviews/{id}: Delete a review.

Contributing

We welcome contributions! Please follow these guidelines:

  1. Fork the repository.
  2. Create a feature branch (git checkout -b feature/new-feature).
  3. Commit your changes with descriptive messages (git commit -m 'Add new feature').
  4. Push to the branch (git push origin feature/new-feature).
  5. Submit a Pull Request, and our team will review your contribution.

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

This Microservices-based REST API, built with Java and Spring Boot, manages job listings, companies, and reviews. Each service is independently developed and scalable, supporting CRUD operations via RESTful endpoints for easy management and communication.

Topics

Resources

License

Stars

Watchers

Forks