Skip to content

feat(blocklist): scaffold blocklist data layer (api/service/repo/controller) - #1133

Merged
bmc08gt merged 1 commit into
code/cashfrom
feat/blocklist-data-layer
Jul 24, 2026
Merged

feat(blocklist): scaffold blocklist data layer (api/service/repo/controller)#1133
bmc08gt merged 1 commit into
code/cashfrom
feat/blocklist-data-layer

Conversation

@bmc08gt

@bmc08gt bmc08gt commented Jul 24, 2026

Copy link
Copy Markdown
Collaborator

What

Scaffolds the end-to-end data layer for the new Blocklist gRPC service in :services:flipcash, mirroring the existing ActivityFeed/Moderation conventions. No feature-module UI is included — this is the data layer only.

Layers added

Layer File
Proto defs definitions/flipcash/protos/.../blocklist/v1/{blocklist_service,model}.proto
API (gRPC wrapper) internal/network/api/BlocklistApi.kt
Service (error fold) internal/network/services/BlocklistService.kt
Repository repository/BlocklistRepository.kt + internal/repositories/InternalBlocklistRepository.kt
Controller controllers/BlocklistController.kt
Domain models models/BlockedUser.kt (BlockedUser, BlocklistPage)
Mapper internal/domain/BlockedUserMapper.kt
Errors models/Errors.kt (Block/Unblock/IsBlocked/GetBlocklist sealed classes)
DI inject/FlipcashModule.kt

Public surface

BlocklistController:

  • blockUser(userId) / unblockUser(userId)Result<Unit>
  • isBlocked(userId)Result<Boolean>
  • getBlocklist(queryOptions)Result<BlocklistPage> (paged, most-recently-blocked first)

Notes

  • getBlocklist service method returns the raw response so the repo can extract pagingToken/hasMore alongside the list (matches the Moderation pattern).
  • Denied/UserNotFound/CannotBlockSelf are treated as expected business errors (not NotifiableError), consistent with existing error classes.

Testing

  • ./gradlew :services:flipcash:compileDebugKotlin → BUILD SUCCESSFUL (also exercises proto codegen for the new blocklist/v1 protos).

…roller)

Adds the end-to-end data layer for the Blocklist gRPC service, mirroring the
existing ActivityFeed/Moderation conventions in :services:flipcash:

- BlocklistApi: gRPC stub wrapper for BlockUser/UnblockUser/IsBlocked/GetBlocklist
  with auth-signed requests and protovalidate
- BlocklistService: folds proto Result enums into typed Result<T>
- BlocklistRepository (+ Internal impl): maps proto -> domain, assembles paged
  BlocklistPage (users, pagingToken, hasMore)
- BlocklistController: resolves owner KeyPair from UserManager
- BlockedUser/BlocklistPage domain models + BlockedUserMapper
- Block/Unblock/IsBlocked/GetBlocklist error sealed classes
- Hilt wiring in FlipcashModule
- blocklist/v1 proto definitions
@github-actions github-actions Bot added type: feature New functionality area: network gRPC, connectivity, API, exchange rates labels Jul 24, 2026
@bmc08gt bmc08gt self-assigned this Jul 24, 2026
@bmc08gt
bmc08gt merged commit dace75b into code/cash Jul 24, 2026
3 checks passed
@bmc08gt
bmc08gt deleted the feat/blocklist-data-layer branch July 29, 2026 20:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: network gRPC, connectivity, API, exchange rates type: feature New functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant