Skip to content
CAI
Software that uses CAICheck a score

MayconCardoso/StockTradeTracking

61.3

Adequate · 21 September 2026

4.7k

lines of production code

Kotlin

primary language

4

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

This system is a mobile application for tracking stock trades and investment periods. It allows users to manage stock positions by buying, selling, and splitting shares, while also maintaining a timeline of balance periods to track profit and loss over time. The application synchronizes local data with remote price feeds and provides filtering and sorting capabilities for the portfolio.

Features

Add Stock Share Price API interface and response model

A new API interface, StockSharePriceAPI, has been introduced to fetch current stock prices. It defines a GET endpoint at 'v1/stock' that accepts a stock code query parameter. The corresponding response model, StockPriceResponse, includes fields for price, open, high, low, volume, previous close, and market change, all as nullable doubles.

_data/src/main/java/com/mctech/stocktradetracking/data/stock\share/api · high confidence

Add coroutine scope abstraction for dispatcher management

A new interface, CoroutineScope, has been introduced to abstract access to Kotlin coroutine dispatchers (io, main, default, and unconfined). This provides a centralized way to obtain specific thread pool dispatchers, likely to facilitate testing or dependency injection within the domain layer.

domain/src/main/java/com/mctech/stocktradetracking/domain/platform · high confidence

Add decimal extension functions for currency formatting and rounding

A new Kotlin file, decimalExtensions.kt, was added to the domain layer, introducing three extension functions for the Double type: formatBrazilianCurrency() for formatting currency strings, round() for precise decimal rounding, and toPercent() for percentage string conversion.

domain/src/main/java/com/mctech/stocktradetracking/domain/extentions · high confidence

Add stock share filtering and sorting capabilities

Users can now filter and sort their stock share list by name, percentage, or balance, with options for ascending or descending order. The feature includes a dedicated UI for applying these filter and sort preferences, which are then persisted and applied to the stock share list views.

(repo-wide) · high confidence

Added Gradle wrapper configuration

The project now includes a Gradle wrapper configuration file (gradle-wrapper.properties) that specifies the Gradle distribution URL (version 6.5) and storage paths, enabling consistent build environment setup for all users.

gradle · high confidence

Added Koin dependency injection modules for stock tracking data layer

Introduced new Koin modules in the app's data layer to wire up the application's data access and networking components. This includes the database module for Room (AppDatabase, StockShareDao, TimelineBalanceDao), the stock share data module for local/remote data sources and repositories, the stock share filter module for shared preferences and filtering logic, the networking module for Retrofit and OkHttp configuration, and the timeline balance data module for local data sources and repositories.

app/src/main/java/com/mctech/stocktradetracking/di/data · high confidence

Added architecture code generator for Stock Share and Timeline Balance features

A new code generator library has been added to the project to automate the creation of boilerplate code for feature modules. This includes templates and configurations for generating 'Stock Share' and 'Timeline Balance' features, each with specific use cases (e.g., Buy/Sell Stock Share, Create/Edit Periods, Deposit/Withdraw Money) and component states. The generator also provides a custom Gradle module template that automatically includes necessary dependencies for MVVM architecture, navigation, and UI components.

libraries/library-architecture-code-generator · high confidence

Added edit position screen for stock shares

Users can now edit stock share positions, including updating prices, deleting positions, closing positions, and splitting stock. This new screen provides the UI and logic for managing individual stock holdings, with navigation to a split-screen view for splitting stock.

_features/feature-stock-share/src/main/java/com/mctech/stocktradetracking/feature/stock\_share/edit\position · high confidence

Added local storage for stock share filters

The application now persists the user's stock share filter settings locally using SharedPreferences. A new data layer was introduced, including a LocalStockShareFilterDataSource interface and its implementation, which handles saving and observing the current filter state. A corresponding repository, StockShareFilterRepository, was also added to expose this local data source through the domain service interface, enabling the app to remember and retrieve the last used filter configuration.

_data/src/main/java/com/mctech/stocktradetracking/data/stock\_share\filter · high confidence

Added local storage for timeline balance periods

The application now persists timeline balance data locally using a new Room-based data layer. This includes a database entity for periods (tracking investment, profit, and dates), a data access object for CRUD operations, a data source implementing the data interface, a mapper for converting between database and business entities, and a repository that delegates to the local data source. This enables the app to store and retrieve period-based balance information offline.

_data/src/main/java/com/mctech/stocktradetracking/data/timeline\balance · high confidence

Added split position feature for stock shares

Users can now split a stock position by entering a split ratio in a new confirmation dialog. The change introduces the presentation layer (StockSplitPositionFragment) and its associated ViewModel, commands, and interactions, enabling the app to handle the logic for splitting a stock share.

_features/feature-stock-share/src/main/java/com/mctech/stocktradetracking/feature/stock\_share/split\position · high confidence

Added stock position entry screen for tracking new share purchases

Users can now add a new stock position by entering the share code, quantity, and purchase price. The interface calculates the total investment value in real-time and saves the new position to the database upon confirmation, then returns to the previous screen.

_features/feature-stock-share/src/main/java/com/mctech/stocktradetracking/feature/stock\_share/add\position · high confidence

Added stock share list position tracking with best/worst stock selection

Users can now view their stock share positions in a list, with the system automatically identifying and displaying the best and worst performing stocks based on the selected filter. The feature includes real-time price synchronization, final balance calculation, and navigation to buy or edit positions.

_features/feature-stock-share/src/main/java/com/mctech/stocktradetracking/feature/stock\_share/list\position · high confidence

Added timeline balance period management screens

Users can now add and edit timeline balance periods. The update introduces the AddPeriod and EditPeriod screens, each with their own ViewModel, Fragment, and interaction/command classes, enabling users to create new periods or modify existing ones.

_features/feature-timeline-balance/src/main/java/com/mctech/stocktradetracking/feature/timeline\_balance/add\period · medium confidence

Centralized navigation logic for stock and timeline balance features

The app now uses a centralized \AppNavigatorHandler\ to manage navigation between stock share and timeline balance screens. This handler implements the navigation interfaces for stock shares, stock share filters, and timeline balances, allowing components to trigger actions like editing positions, splitting stocks, buying shares, or editing periods through a single, unified entry point.

app/src/main/java/com/mctech/stocktradetracking/navigation · medium confidence

Initial project structure and documentation

The repository was initialized with the core project files, including a comprehensive README.md that outlines the Stock Trade Tracking application's architecture, modules, and testing approach. Additionally, the Gradle wrapper scripts (gradlew, gradlew.bat) were added to support the build system, and the .gitignore file was updated to properly exclude IDE and cache files.

(repo-wide) · high confidence

Introduce local and remote data sources for stock share tracking

Added new data source interfaces and implementations for managing stock share data. The local data source handles offline storage and retrieval of stock positions, including operations to save, sell, delete, and edit stock shares, as well as observing lists of open and closed positions. It also determines market status based on Brazilian market hours. The remote data source fetches current stock prices from an API. These changes enable the application to track stock shares locally and sync price updates from a remote service.

_data/src/main/java/com/mctech/stocktradetracking/data/stock\share/datasource · high confidence

Introduce money variation chart component

Added a new chart component for visualizing money variation data. This includes a custom Android View (ChartMoneyVariationView) that renders a line chart with positive and negative value indicators, supported by controllers for data management, drawers for rendering, and utility classes for layout and mathematical calculations.

libraries/library-chart · high confidence

Introduce stock share tracking and position management in the local database

A new data layer for tracking stock shares has been added, enabling users to monitor open and closed positions. The system now supports saving, deleting, and updating stock share records, including automatic and manual price updates, as well as closing positions. This provides the foundation for real-time and single-shot queries on stock share data.

_data/src/main/java/com/mctech/stocktradetracking/data/stock\share/database · high confidence

Introduce timeline balance list view and navigation

Added the TimelineBalanceListFragment, its corresponding ViewModel, and DI registration to display a list of trading periods with their final balance and a chart. The new UI allows users to view their current period's status and navigate to add or edit periods, facilitated by the new TimelineBalanceNavigator interface.

_features/feature-timeline-balance/src/main/java/com/mctech/stocktradetracking/feature/timeline\_balance/list\period · high confidence

Introduce timeline balance tracking for investment periods

Added a new domain model, \TimelineBalance\, which represents a specific period of investment and profit, along with a service interface to manage these periods. This enables the application to track and calculate final balances, profits, and variations across different time periods.

_domain/src/main/java/com/mctech/stocktradetracking/domain/timeline\balance/entity · high confidence

Introduces Koin-based dependency injection for business logic

The application now uses Koin for dependency injection, with new modules defining the wiring for coroutines, logging, navigation, and a comprehensive set of use cases for stock share management (including save, delete, close, edit, sell, sync, and filter operations) and timeline balance tracking (create, edit, and get balance). This change establishes the backend logic layer's entry points, enabling the UI to access these services through a consistent, testable interface.

app/src/main/java/com/mctech/stocktradetracking/di · high confidence

Introduces domain entities for stock share tracking and balance calculation

Added new domain models to support stock trading features. The \StockShare\ entity now tracks share amounts, purchase/sale prices, and positions, while providing computed properties for investment value, balance, and percentage variations. A new \StockShareFinalBalance\ model aggregates total balance, investment, and variation for portfolio summaries. Additionally, \MarketStatus\ and \SelectedStock\ entities were introduced to handle market state and selected stock details respectively, enabling the application to display real-time stock data and user selections.

_domain/src/main/java/com/mctech/stocktradetracking/domain/stock\share/entity · high confidence

Introduces domain interaction cases for stock share management

Adds a new set of domain interaction cases in the stock share module, enabling users to manage their stock portfolio. This includes operations to save, edit, sell, close, and delete stock shares, as well as syncing stock prices. The update also introduces logic to group stock shares, filter and sort stock lists by various criteria (such as name, balance, or percentage), and select the best or worst performing stocks based on daily or total variations.

_domain/src/main/java/com/mctech/stocktradetracking/domain/stock\share/interaction · high confidence

Introduces stock share management capabilities

Users can now view, buy, edit, and split stock shares. This change adds the presentation layer for the stock share feature, including the view models for listing, buying, editing, and splitting positions, along with the navigation logic and UI adapters to display market status.

_features/feature-stock-share/src/main/java/com/mctech/stocktradetracking/feature/stock\share · medium confidence

Introduces the StockShareRepository for managing stock share data operations

A new repository class, StockShareRepository, has been added to handle stock share data operations. It implements the StockShareService interface and coordinates between local and remote data sources. The repository provides methods to observe, save, sell, delete, and close stock shares, as well as to retrieve market status and stock details. A key addition is the syncStockSharePrice method, which fetches current stock prices from a remote source and updates the local database, handling concurrent price updates using Kotlin coroutines.

_data/src/main/java/com/mctech/stocktradetracking/data/stock\share/repository · high confidence

New design system components and utilities

The design system library introduces a new PulseView for animated visual indicators, a ViewColorAdapter for binding price-based color states to views and text views, and extension functions on EditText to safely parse double and long values.

libraries/library-design-system/src/main/java · high confidence

New shared logging interface and Android implementation

A new shared logging interface (Logger) is introduced, defining standard log levels (v, d, i, w, e) with a default tag of 'StockTradeTracking'. An Android-specific implementation (LogcatLogger) is added to route these calls to Android's Logcat, while a MutedLogger is provided as a no-op alternative. This enables consistent logging across Android and other platforms.

libraries/library-logger, libraries/library-logger-android · high confidence

New timeline balance interaction cases for period management

Added three new interaction classes in the timeline balance domain: CreatePeriodCase for creating new periods with parent period linkage, EditPeriodCase for updating period details and recalculating profit based on final balance changes, and GetCurrentPeriodBalanceCase for retrieving a list of periods with their parent relationships resolved. These cases handle the core logic for managing stock trading periods and their balances.

_domain/src/main/java/com/mctech/stocktradetracking/domain/timeline\balance/interaction · medium confidence

Behavioural changes

App initialization and single-activity navigation structure

The application now initializes its dependency injection (Koin) and configures time synchronization with the Google NTP server during startup. Additionally, the app adopts a single-activity architecture, using a main container activity that manages the navigation host, bottom navigation bar, and action bar, providing a unified entry point for the stock tracking features.

app/src/main/java/com/mctech/stocktradetracking · high confidence

Database schema updated to track initial stock share metrics

The application's local database has been upgraded to version 2, introducing two new columns, initialShareAmount and initialPurchasePrice, to the stock\_share table. This change preserves the original share and purchase price data during the database migration, ensuring that historical stock information is retained when the schema evolves.

data/src/main/java/com/mctech/stocktradetracking/data/database · high confidence

Test coverage

Added test data factories for stock trading entities; Added test helper utilities for Kotlin Coroutines and Flow testing; Added test utilities for Kotlin Coroutines and Result handling; Added unit tests for StockShareMapper; Added unit tests for StockShareRepository; Added unit tests for Timeline Balance ViewModels; Added unit tests for decimal extension functions; Added unit tests for stock share filter data and repository layers; Added unit tests for stock share filter domain logic; Added unit tests for stock share interaction use cases; Added unit tests for stock trading domain entities; Added unit tests for the TimelineBalance entity; Added unit tests for the timeline balance data layer; Added unit tests for timeline balance interaction cases.

Dependencies

Upgrade Android and Kotlin dependencies to modern versions

The project's build configuration has been updated to use newer versions of key libraries and the Android build system. This includes upgrading the Kotlin compiler to 1.4.31 and Kotlin Coroutines to 1.4.3/1.4.2-native-mt. Significant library updates include OkHttp to 4.9.1, Retrofit to 2.9.0, Koin to 2.2.2, and AndroidX components such as AppCompat 1.2.0, Lifecycle 2.3.0, and Material Design 1.1.0. Testing dependencies like JUnit 4.13.2, Robolectric 4.5.1, and Mockito-Inline 3.8.0 have also been updated.

(dependencies) · high confidence

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

This is the PUBLIC form of this artifact. Findings are listed in full, but the details of SECURITY findings — which rule fired, in which file, on which line, and how to fix it — are deliberately withheld, and any secret-scanner results are excluded entirely. Where detail is absent here it was REMOVED FOR PUBLICATION; it is not missing from the analysis. The complete artifact is available from the repository owner.

Score

  • CAI 70 → 61 (-9.1)
  • Rubric changed (rubric-2026.08.19 → rubric-2026.09.15) — scores are not directly comparable.

Lenses

  • Code Health 99 → 99 (-0.0)
  • Architecture 99 → 63 (-35.1)
  • Maturity 55 → 55 (+0.0)
  • Readiness 70 → 61 (-9.0)
  • Security 92 → 85 (-6.7)
  • Domain Modelling 100 → 70 (-30.3)

Resolved (11)

  • Change coupling: StockShareBuyFragment.kt ↔ StockShareEditPositionFragment.kt (features/feature-stock-share/src/main/java/com/mctech/stocktradetracking/feature/stock_share/add_position/StockShareBuyFragment.kt)
  • Change coupling: StockShareBuyFragment.kt ↔ StockShareListViewModel.kt (features/feature-stock-share/src/main/java/com/mctech/stocktradetracking/feature/stock_share/add_position/StockShareBuyFragment.kt)
  • Coverage not included — suite not readable by the collector
  • Dependency hygiene not measured — dependency manifest found but not parsed for hygiene
  • Duplicated block (20 lines × 2) (testing/testing-data-factory/src/main/java/com/mctech/stocktradetracking/testing/data_factory/factories/StockShareDataFactory.kt)
  • Duplicated block (20 lines × 4) (testing/testing-data-factory/src/main/java/com/mctech/stocktradetracking/testing/data_factory/factories/StockShareDataFactory.kt)
  • Duplicated block (21 lines × 2) (testing/testing-data-factory/src/main/java/com/mctech/stocktradetracking/testing/data_factory/factories/StockShareDataFactory.kt)
  • Duplicated block (22 lines × 2) (libraries/library-architecture-code-generator/src/main/java/com/mctech/stocktradetracking/library/architecture_code_generator/features/StockShareFeature.kt)
  • No exposed public API
  • Test reliability not included
  • dormant codebase — no living knowledge left to concentrate

New (15)

  • Dependency hygiene PARTLY measured — Maven/Gradle declarations read, no dependency graph resolved
  • Documentation: no installation or build instructions (README.md)
  • Documentation: no licence statement (README.md)
  • Documentation: no usage examples (README.md)
  • Duplicated block (18 lines × 4) (testing/testing-data-factory/src/main/java/com/mctech/stocktradetracking/testing/data_factory/factories/StockShareDataFactory.kt)
  • Duplicated block (29 lines × 3) (testing/testing-data-factory/src/main/java/com/mctech/stocktradetracking/testing/data_factory/factories/StockShareDataFactory.kt)
  • Duplicated block (32 lines × 2) (testing/testing-data-factory/src/main/java/com/mctech/stocktradetracking/testing/data_factory/factories/StockShareDataFactory.kt)
  • Duplicated block (46–61 lines × 2) (testing/testing-data-factory/src/main/java/com/mctech/stocktradetracking/testing/data_factory/factories/StockShareDataFactory.kt)
  • Duplicated block (6 lines × 2) (domain/src/main/java/com/mctech/stocktradetracking/domain/stock_share/interaction/SelectBestDailyStockShareCase.kt)
  • Duplicated block (6 lines × 2) (domain/src/main/java/com/mctech/stocktradetracking/domain/stock_share/interaction/SelectBestStockShareCase.kt)
  • Duplicated block (8 lines × 2) (features/feature-stock-share/src/main/java/com/mctech/stocktradetracking/feature/stock_share/list_position/BaseShareListFragment.kt)
  • High: security finding (details withheld)
  • Members sharing a duplicated core (4 members, 50+ identical tokens) (testing/testing-data-factory/src/main/java/com/mctech/stocktradetracking/testing/data_factory/factories/StockShareDataFactory.kt)
  • No ADRs found
  • Repeated repair: domain/src/main/java/com/mctech/stocktradetracking/domain/extentions/decimalExtensions.kt (domain/src/main/java/com/mctech/stocktradetracking/domain/extentions/decimalExtensions.kt)

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

MayconCardoso/StockTradeTracking was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.

About this page

  • The score is its most recent published measurement, taken on 21 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit 0c8757ea6822eb5d65cf39d82e60ede13bf55346 — the exact code this score is about.
  • Scored under rubric-2026.09.15 — the same rubric and the same method as every other entry in this index.
  • Measured by watchdog.canine.dev using codehealth-analyzer preprod-fa71c66cabd8.