# pradeep-katkam/customerservice architecture

> Architecture diagram of the GitHub repository pradeep-katkam/customerservice, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-27). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/pradeep-katkam/customerservice
- Repository: https://github.com/pradeep-katkam/customerservice

## Overview

This Spring Boot service exposes customer-account operations plus ride-location discovery: clients create, find, or delete customers, search for drop-off locations, and submit pickup/destination coordinates for a route lookup. The controller delegates these operations to CustomerService, which persists customer records and calls LocationIQ for search and directions. Booking-related entities exist, but the sampled runtime code does not implement a booking workflow. Repository wiring beyond the sampled customer operations is uncertain, so no coordinate-store flow is shown.

Main entry points: [`src/main/java/com/alpha/CustomerService/Service/CustomerService.java`](https://github.com/pradeep-katkam/customerservice/blob/main/src/main/java/com/alpha/CustomerService/Service/CustomerService.java) (Customer service), [`src/main/java/com/alpha/CustomerService/Controller/CustomerController.java`](https://github.com/pradeep-katkam/customerservice/blob/main/src/main/java/com/alpha/CustomerService/Controller/CustomerController.java) (Customer controller), [`src/main/java/com/alpha/CustomerService/Repository/CustomerRepositor.java`](https://github.com/pradeep-katkam/customerservice/blob/main/src/main/java/com/alpha/CustomerService/Repository/CustomerRepositor.java) (Customer repository), [`src/main/java/com/alpha/CustomerService/CustomerServiceApplication.java`](https://github.com/pradeep-katkam/customerservice/blob/main/src/main/java/com/alpha/CustomerService/CustomerServiceApplication.java) (HTTP client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_api["Customer API"]
  node_controller["Customer controller"]
  node_service["Customer service"]
  node_dto["Request and response DTOs"]
  node_exceptions["Exception handler"]
end

subgraph group_rides["Ride discovery"]
  node_locationiq["LocationIQ"]
  node_rest_template["HTTP client"]
end

subgraph group_persistence["Customer persistence"]
  node_customer_repo["Customer repository"]
  node_customer_store[("Customer database")]
  node_entities["Customer and ride entities"]
end

node_client(("API client"))

node_client -->|"sends requests"| node_controller
node_controller -->|"delegates"| node_service
node_controller -->|"accepts and returns"| node_dto
node_service -->|"saves and finds"| node_customer_repo
node_customer_repo -->|"reads and writes"| node_customer_store
node_customer_repo -->|"persists Customer"| node_entities
node_service -->|"requests locations"| node_rest_template
node_rest_template -->|"calls search and directions"| node_locationiq
node_service -->|"throws handled errors"| node_exceptions

click node_controller "https://github.com/pradeep-katkam/customerservice/blob/main/src/main/java/com/alpha/CustomerService/Controller/CustomerController.java"
click node_service "https://github.com/pradeep-katkam/customerservice/blob/main/src/main/java/com/alpha/CustomerService/Service/CustomerService.java"
click node_dto "https://github.com/pradeep-katkam/customerservice/tree/main/src/main/java/com/alpha/CustomerService/Dto"
click node_exceptions "https://github.com/pradeep-katkam/customerservice/blob/main/src/main/java/com/alpha/CustomerService/Exception/GlobalExceptionHandler.java"
click node_customer_repo "https://github.com/pradeep-katkam/customerservice/blob/main/src/main/java/com/alpha/CustomerService/Repository/CustomerRepositor.java"
click node_entities "https://github.com/pradeep-katkam/customerservice/tree/main/src/main/java/com/alpha/CustomerService/Entity"
click node_rest_template "https://github.com/pradeep-katkam/customerservice/blob/main/src/main/java/com/alpha/CustomerService/CustomerServiceApplication.java"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_controller,node_service,node_dto,node_exceptions,node_client toneBlue
class node_locationiq,node_rest_template toneAmber
class node_customer_repo,node_customer_store,node_entities toneMint
```

## Components

### Customer API

- [Customer controller](https://github.com/pradeep-katkam/customerservice/blob/main/src/main/java/com/alpha/CustomerService/Controller/CustomerController.java): `src/main/java/com/alpha/CustomerService/Controller/CustomerController.java`
- [Customer service](https://github.com/pradeep-katkam/customerservice/blob/main/src/main/java/com/alpha/CustomerService/Service/CustomerService.java): `src/main/java/com/alpha/CustomerService/Service/CustomerService.java`
- [Request and response DTOs](https://github.com/pradeep-katkam/customerservice/tree/main/src/main/java/com/alpha/CustomerService/Dto): `src/main/java/com/alpha/CustomerService/Dto`
- [Exception handler](https://github.com/pradeep-katkam/customerservice/blob/main/src/main/java/com/alpha/CustomerService/Exception/GlobalExceptionHandler.java): `src/main/java/com/alpha/CustomerService/Exception/GlobalExceptionHandler.java`

### Ride discovery

- **LocationIQ**
- [HTTP client](https://github.com/pradeep-katkam/customerservice/blob/main/src/main/java/com/alpha/CustomerService/CustomerServiceApplication.java): `src/main/java/com/alpha/CustomerService/CustomerServiceApplication.java`

### Customer persistence

- [Customer repository](https://github.com/pradeep-katkam/customerservice/blob/main/src/main/java/com/alpha/CustomerService/Repository/CustomerRepositor.java): `src/main/java/com/alpha/CustomerService/Repository/CustomerRepositor.java`
- **Customer database**
- [Customer and ride entities](https://github.com/pradeep-katkam/customerservice/tree/main/src/main/java/com/alpha/CustomerService/Entity): `src/main/java/com/alpha/CustomerService/Entity`

### Other components

- **API client**

## Connections

- API client → Customer controller: sends requests
- Customer controller → Customer service: delegates
- Customer controller → Request and response DTOs: accepts and returns
- Customer service → Customer repository: saves and finds
- Customer repository → Customer database: reads and writes
- Customer repository → Customer and ride entities: persists Customer
- Customer service → HTTP client: requests locations
- HTTP client → LocationIQ: calls search and directions
- Customer service → Exception handler: throws handled errors
