Service Layer medium complexity Shared Component mobile
1
Dependencies
2
Dependents
5
Entities
0
Integrations

Description

Business logic service that manages contact retrieval, search operations, and role-based access enforcement. Communicates with the REST API to fetch paginated contact lists, perform server-side full-text search, and apply organization-scoped and role-scoped filtering. Enforces that peer mentors only receive their own assigned contacts while coordinators receive all contacts within their local association.

Feature: Contact List & Search

contact-service

Responsibilities

  • Fetch paginated contact lists from REST API with cursor-based pagination
  • Execute server-side full-text search queries across contact fields
  • Enforce role-based access control on contact data retrieval
  • Transform API responses into domain contact models
  • Handle network errors with appropriate fallback to cached data

Interfaces

getContacts(String cursor, int limit)
searchContacts(String query)
getContactsByRole(UserRole role)
getContactById(String contactId)
refreshContacts()
getContactCount()
isContactAssignedToUser(String contactId, String userId)

Relationships

Dependencies (1)

Components this component depends on

Dependents (2)

Components that depend on this component