# 5.1. Whitebox: Common Service The white box view gives a rough overview on how the Common Service is built internally. The service basically consists of two major functional components, one to manage `Locations` and `LocationGroups` and another one to manage `TransportUnits`. **Contained Building Blocks**
ComponentResponsibility
appA package that contains lifecycle components of the Common Service, without any business value
Index ControllerThis service provides an HATEOAS REST API with index resources to navigate across the primary resources
Location ManagementFunctional building block to manage Locations and LocationGroups
Transport ManagementFunctional building block to manage TransportUnits and TransportUnitTypes
Location TablesA set of database tables belong and accessed by the Location Management
Transport TablesA set of database tables belong and accessed by the Transport Management
**Important Interfaces**
InterfaceDescription
REST APIThe public REST API is comprised of the Location Management API, the Transport Management API and an Index that lists and delegated to those two
Async Command APIThe asynchronous Command API is exposed to trigger actions on the Location- and Transport Management resources
## 5.1.1. Component: Location Management As mentioned the `Location` Management cares about the resources `Location`, `LocationGroup` and `Target`. The software design of all three primary resources is almost the same, hence the management of `Location` resources is shown here by example for the others. All types are located in the Java package `.location` with several sub-packages.
ComponentTypeResponsibility
apiPackageContains all types that are exposed and also exported to service clients
implPackageContains all types that are private and implement the solution
spiPackageContains interfaces and classes that can be used to extend the service implementation
LocationApiClassAn exposed class that defines the Location API and that can be used directly ba Java clients
LocationControllerClassIs a Spring RestController implementation of the LocationApi and resides in the main package
LocationServiceInterfaceUsed by the LocationController within the same package to avoid package dependencies (An interface is always public)
LocationServiceImplClassSpring managed transactional service that is the implementation of the business logic and the transaction boundary. In a internal package and kept package-private
LocationRepositoryInterface/ClassEither a Spring Data JPA implementation or some other technology that acts as a DAO and accesses the persistency layer in order to save and fetch Locations
COM_LOCATIONDatabase TableThe database table accessed by the repository, either mapped or directly accessed
Extension Point<abstract>This could be some interface that is used by the business logic to break out the standard processes and allow some kind of extensions
## 5.1.2. Component: Transport Management tbd ## 5.1.3. Component: Account Management tbd