User Service
The user service provides the bounded context User.
It is responsible for managing users by interacting with Keycloak.
Domain Model
API
The service provides a GraphQL API, which is documented in the GraphQL API documentation.
Technology Stack
- Language: Kotlin
- Framework: Spring Boot
- GraphQL Library: GraphQL Kotlin
- Database: PostgreSQL
- Schema Management: Flyway
Repository Structure
The repository is structured as follows:
/src/main/: Source code of the servicekotlin/org/misarch/user/: Kotlin source codeevent/: Dapr event handlingmodel/: Event DTOs
graphql/: GraphQL APIdataloader/: Data loaders for efficient data fetchingfederation/: Apollo Federation entity resolversinput/: Input types for mutationsmodel/: GraphQL typesconnection/: Connection types and logic for paginated queries
persistance/: Database entities and repositoriesmodel/: R2DBC entitiesrepository/: Spring Data R2DBC repositories
service/: Service logic
resources/: Spring Boot application configuration and SQL schema migration filesdb/migration/: Flyway SQL schema migration files
Defined Events
This section lists events that are defined by the user service and can be used by other services.
interface Name {
firstName: string;
lastName: string;
}
Published Defined Events
user/user/created
This event is published when a new user is created.
{
id: string,
username: string,
name: Name,
dateJoined: string
}
Subscribed Defined Events
user/user/create
Published by Keycloak to inform the user service about a newly created user account.
{
id: string,
username: string,
firstName: string,
lastName: string
}
Imported Events
This section lists events defined by other services that are used by the user service.
Published Imported Events
n/a
Subscribed Imported Events
n/a
Important ADRs
n/a