AutoHub is a microservices-based web application for managing cars, customers, and orders in an automobile dealership.
It provides REST APIs for adding cars, managing stock, handling customer information, and placing orders.
All services are independently deployed, registered with Netflix Eureka, and communicate through Spring Cloud OpenFeign via an API Gateway built using Spring Cloud Gateway.
AutoHub consists of three backend microservices, one API Gateway, and a frontend web application.
- CarService – Handles car details and stock management
- CustomerService – Manages customer information
- OrderService – Processes and coordinates orders between Car and Customer services
- API Gateway – Routes and load-balances requests to backend microservices
- Eureka Server – Service registry for automatic discovery and communication between services
All microservices are registered with Eureka and accessible through the API Gateway.
- Spring Boot – Microservice development
- Spring Cloud Gateway – API Gateway for routing and load balancing
- Spring Cloud Netflix Eureka – Service discovery and registration
- Spring Cloud OpenFeign – Inter-service communication
- Spring Data JPA – ORM and database management
- MySQL – Database
- Swagger/OpenAPI – API documentation
- Maven – Build and dependency management
- HTML, CSS, JavaScript
- Organized modules:
car.js,customer.js,order.js - Uses
fetch()to connect with API Gateway endpoints - Assets and styles in
/assetsand/css
- Java 17+
- Maven
- MySQL
- Node.js or any static server (for frontend)
git clone https://github.com/your-username/AutoHub.git
cd AutoHubCreate the following databases in MySQL:
car_dbcustomer_dborder_db
Update credentials in each service’s application.yml.
cd EurekaServer
mvn spring-boot:runcd CarService
mvn spring-boot:runcd ../CustomerService
mvn spring-boot:runcd ../OrderService
mvn spring-boot:runAll services will automatically register with Eureka.
cd ../ApiGateway
mvn spring-boot:run- Eureka Dashboard:
http://localhost:8761 - Swagger UI (for each microservice):
http://localhost:<port>/swagger-ui/index.html - Gateway Base URL:
http://localhost:8080
Open:
AutoHubFrontend/index.html
Access using:
http://127.0.0.1:5500/index.html
- Register, update, and view cars
- View and manage stock details
- Add and manage customers
- Place and track orders across services
- Service discovery and dynamic routing through Eureka and API Gateway
- Car Management UI
- Eureka Dashboard