Skip to content

refactor: Monolithic Decoupling & Stateless Multicast Stream Migration - #221

Closed
TotallyPresent wants to merge 3 commits into
developfrom
feature/000-stateless-migration-refactor
Closed

TotallyPresent wants to merge 3 commits into
developfrom
feature/000-stateless-migration-refactor

Conversation

@TotallyPresent

Copy link
Copy Markdown
Collaborator

Description

This engineering refactor breaks down the legacy monolithic structure of the Roky repository, establishing a decoupled, Multi-Module Clean Architecture workspace. By separating core corporate rules from framework side-effects, we protect the project toolchain from version dependencies and prepare the user interface engine for upcoming roadmap targets (such as dedicated GUI or mobile applications) during our high-growth timeline.

Core Changes Implemented

  • Submodule Architecture Segmentation: Realigned the physical project directory tree into three isolated compilation scopes:
    • :core (Domain Policy Layer): Houses pure framework-agnostic models (Message), abstract contracts (ReadChatRepository), and fake sandbox database mocks.
    • :infrastructure-supabase (Data Adapter Layer): Encapsulates live network transmission rules, client setup, and remote table streams (v2.1.0 SDK).
    • :app-tui (Console Presentation Layer): Mounts the terminal execution loop, Lanterna window modules, layout panels, and presenters.
  • Primitive Domain Mapping & Elimination of Legacy Envelopes: Standardised data transit collections natively around generic types (Map<String, String> for profiles, Set<String> for presence tracking). Removed legacy monolithic envelope wrappers (PresenceResult, ProfileResult), eliminating type-casting hazards and downstream component dependencies inside the user interface.
  • Multicast Stream Management Optimization: Integrated a centralized domain MessageCoordinator to consume separate database synchronized tasks through a unified, long-lived hot SharedFlow multicast structure, lowering system connection leaks and optimizing background thread performance profiles.
  • Centralised Governance Registry Integration: Replaced the legacy resolver footprint within settings.gradle.kts with centralized dependencyResolutionManagement rules (FAIL_ON_PROJECT_REPOS). This prevents layout drift by ensuring submodules draw strictly from checked repository networks.
  • Explicit Growth Onboarding Documentation: Patched module boundaries by injecting granular inline JUSTIFICATION FOR THE TEAM structural markers and RESOLUTION context comments across all new presenters and view architectures, supporting rapid code comprehension for incoming engineering contributors.

Fixes # (If you have a ticket number from your project board, type it here—otherwise you can delete this line)

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Checklist:

  • I have performed a self-review of my code / this code was reviewed during pair work
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

…align test data maps

- Add missing coroutines, flexmark, and Ktor client core engine transit dependencies to app-tui build logic.

- Fix abstract Presenter contract compliance by injecting clean onDetach lifecycle bodies into presenters.

- Align MainMenuPresenter selection handling patterns and Auth session validation to leverage core domain interfaces.

- Standardize test suite mocking models around native primitive types to drop legacy framework response wrappers.
@github-actions

github-actions Bot commented Sep 16, 2026 •

Copy link
Copy Markdown

Test Results

0 tests   0 ✅  0s ⏱️
0 suites  0 💤
0 files    0 ❌

Results for commit 6ac2251.

♻️ This comment has been updated with latest results.

@PPartisan PPartisan closed this Sep 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants