xChiro/KalanMyMoney
55.9
Adequate · 20 September 2026
942
lines of production code
C#
primary language
4
measurements over time
What this system is
KalanMoney is a personal finance tracking system built on .NET Azure Functions that allows users to manage financial accounts and record income and expense transactions. It provides API endpoints for opening accounts, adding categorized transactions, and retrieving detailed dashboard data including balances, monthly transaction history, and category breakdowns. The system supports persistence via Azure Cosmos DB or an in-memory store for development, with a domain-driven architecture separating core financial logic from infrastructure concerns.
Features
Add FinancialAccountModel DTO for memory database persistence
A new FinancialAccountModel DTO has been introduced in the memory database persistence layer to facilitate the serialization and deserialization of financial account data. This class maps domain entities to a structure suitable for in-memory storage, including properties for account identification, name, owner details, balance, creation date, and associated transactions. It provides conversion methods to transform between the domain FinancialAccount entity and the DTO, ensuring that account data can be correctly persisted and retrieved within the local memory database.
KalanMoney/KalanMoney.Persistence.MemoryDatabase/DTOs · high confidence
Add Outcome Transaction API endpoint
A new HTTP-triggered Azure Function is introduced at the route 'accounts/transactions/outcome' to handle POST requests for recording expense transactions. The endpoint accepts an account ID, amount, category, and transaction description, validates the request against the 'AddOutcomeTransaction' use case, and returns the resulting transaction ID and updated account balance. It specifically handles errors for missing accounts or categories by returning a 404 Not Found, and malformed requests by returning a 400 Bad Request.
KalanMoney/KalanMoney.API.Functions/AddOutcomeTransaction · high confidence
Added Cosmos DB DTOs for financial data persistence
New Data Transfer Objects (FinancialAccountDto, OwnerDto, and TransactionDto) have been introduced in the CosmosDB persistence layer to serialize and deserialize financial account data. These classes define the structure for storing account details, owner information, and transaction records, including specific handling for timestamps as long integers, facilitating the mapping between domain entities and the Cosmos DB storage format.
KalanMoney/KalanMoney.Persistence.CosmosDB/DTOs · high confidence
CosmosDB repository implementation for account and transaction data
The CosmosDB persistence layer now includes concrete repository implementations for managing financial accounts and transactions. AccountCommandsRepository handles account creation and transaction storage, while AccountQueriesRepository provides methods to retrieve accounts, fetch monthly transactions with optional category filtering, and list distinct categories per account. These repositories translate domain entities to and from CosmosDB-specific DTOs and execute SQL-like queries against the container.
KalanMoney/KalanMoney.Persistence.CosmosDB/Repositories · high confidence
Initial Azure Functions project structure and core infrastructure
This change introduces the foundational structure for the KalanMoney API Functions module. It includes configuration for the Azure Functions host (host.json) and dependency injection startup (Startup.cs), which reads a deployment strategy from environment variables. It also adds core utility classes: BaseRequestFunction for common request handling and TokenHandler for extracting user identity from JWT authorization headers.
KalanMoney/KalanMoney.API.Functions · high confidence
Initial domain model for financial accounts, transactions, and dashboarding
This change introduces the core domain entities and value objects for the KalanMoney application, including FinancialAccount, Transaction, Balance, Category, Description, and TimeStamp. It establishes the data structures for managing account ownership, tracking income and outcome transactions with categories, and calculating balances. Additionally, it defines the request/response models and filter criteria for key use cases such as opening an account, adding transactions, retrieving account dashboards, and querying monthly transactions.
KalanMoney.Domain · high confidence
Initial solution structure for KalanMoney
The KalanMoney solution file has been created, defining the project hierarchy and build configurations. This structure organizes the application into Domain, API, Main, and Infrastructure layers, including specific projects for domain entities, use cases, Azure Functions, startup logic, and persistence implementations (in-memory and Cosmos DB), along with their respective test suites.
KalanMoney · high confidence
Introduce Azure Function for opening accounts with optional names
Added the OpenAccount HTTP-triggered Azure Function (route: accounts/open) that accepts an optional account name via OpenAccountFunctionRequest. The function validates the request, extracts the user subject from the token, and executes the OpenAccount use case, returning the new account ID and balance via OpenAccountPresenter. It handles bad requests, invalid account names, and internal errors with appropriate HTTP status codes.
KalanMoney/KalanMoney.API.Functions/OpenAccount · high confidence
Introduce in-memory persistence for financial accounts
Added an in-memory database implementation (\MemoryDb\) and a corresponding \AccountsMemoryRepository\ to support local development and testing without requiring an external database. This change enables the application to store and retrieve financial accounts and transactions using an in-memory dictionary, providing a lightweight alternative to the existing Cosmos DB repository for scenarios where persistent storage is not required.
KalanMoney/KalanMoney.Persistence.MemoryDatabase · high confidence
Introduces core financial use cases and repository interfaces
This change adds the domain logic for opening accounts, recording income and outcome transactions, retrieving account dashboards, fetching monthly transactions with category filters, and listing account categories. It also defines the \IAccountCommandsRepository\ and \IAccountQueriesRepository\ interfaces that these use cases depend on, along with supporting exception types for missing accounts or categories.
KalanMoney/KalanMoney.Domain.UseCases · high confidence
Introduction of core domain entities and transaction collection logic
The application now includes foundational domain models, starting with a base Entity class that manages unique identifiers. New entities for transactions, categories, and financial accounts have been added to support the core money-tracking functionality. Additionally, a TransactionCollection class has been introduced to manage transaction history, providing methods to add new transactions with amounts, descriptions, and categories, as well as retrieving the most recent transaction.
KalanMoney/KalanMoney.Domain.Entities · high confidence
New API endpoint to add income transactions
A new HTTP-triggered Azure Function is now available at the route \accounts/transactions/income\ (POST) for adding income transactions. Users can submit the account ID, amount, category, and transaction description; the function validates the request, executes the domain use case, and returns the resulting transaction ID and updated account balance. It handles specific errors by returning 404 Not Found for missing accounts or categories, and 400 Bad Request for malformed input.
KalanMoney/KalanMoney.API.Functions/AddIncomeTransaction · high confidence
New API endpoint to retrieve categories for a specific account
A new HTTP-triggered Azure Function has been added at the route \accounts/{id}/categories\ (GET) that allows users to fetch the list of categories associated with a specific account. The endpoint validates the account ID and owner identity, executes the underlying use case, and returns the category names as a JSON array. It handles errors by returning 400 Bad Request for invalid inputs, 401 Unauthorized for missing ownership, and 404 Not Found if the account does not exist.
KalanMoney/KalanMoney.API.Functions/GetCategoriesByAccount · high confidence
New API endpoint to retrieve monthly transactions with category filtering
A new HTTP-triggered Azure Function has been added at the route 'accounts/transactions' to fetch monthly transaction data. Users must provide accountId, year, and month as query parameters, along with an owner ID for authorization. The endpoint supports an optional 'category' filter to narrow down results. It returns a list of transactions including ID, amount, description, category, and timestamp, handling errors for missing parameters, unauthorized access, or invalid account IDs.
KalanMoney/KalanMoney.API.Functions/GetMonthlyTransactions · high confidence
New Account Dashboard API endpoint
Users can now retrieve a comprehensive account dashboard via a new HTTP GET endpoint at \accounts/dashboard\. This feature exposes the account ID, name, current balance, monthly income and outcome totals, category-wise balances, and a list of recent transactions. The endpoint requires authentication via an owner ID and returns specific HTTP status codes (404 for missing accounts, 500 for server errors) to handle edge cases gracefully.
KalanMoney/KalanMoney.API.Functions/AccountDashboard · high confidence
Behavioural changes
Configurable account data persistence via dependency injection
The application now supports switching between an in-memory database and Azure Cosmos DB for account-related operations. Users can select the storage strategy via a configuration setting, which registers the appropriate repositories and use-case dependencies (such as OpenAccount, AddIncomeTransaction, and GetAccountDashboard) through the new service registration module. A custom Cosmos serializer is also included to handle JSON serialization with camel-case naming policies.
KalanMoney/KalanMoney.Startup · high confidence
Introduces AccountNameException for invalid account names
A new exception class, AccountNameException, has been added to the domain entities to handle validation errors related to account names. When an invalid account name is provided, this exception is thrown, carrying the specific invalid name in its InvalidName property to help identify the cause of the failure.
KalanMoney/KalanMoney.Domain.Entities/Exceptions · high confidence
Roll back .NET 8 and C\# 11 to .NET 7 and C\# 11
The CosmosDB persistence project has been reverted to target .NET 7.0 instead of .NET 8.0, while maintaining C\# 11 language features. This change also resolves a merge conflict in the project file by selecting the older Microsoft.Azure.Cosmos package version 3.30.0 over version 3.31.2.
KalanMoney/KalanMoney.Persistence.CosmosDB · high confidence
Test coverage
Added mock repository for account commands; Added unit tests for DateRangeFilter; Added unit tests for GetCategoriesFunction; Added unit tests for GetMonthlyTransactions use case; Added unit tests for domain entities; Added unit tests for domain value objects; Added unit tests for monthly transactions API function; Added unit tests for the Account Dashboard API function; Added unit tests for the Account Dashboard use case; Added unit tests for the Add Income Transaction function; Added unit tests for the Add Income Transaction use case; Added unit tests for the AddOutcomeTransaction API function; Added unit tests for the AddOutcomeTransaction use case; Added unit tests for the GetCategoriesByAccount use case; Added unit tests for the Open Account Azure Function; Added unit tests for the Open Account use case; Added unit tests for the in-memory accounts repository.
Dependencies
Initial project structure and dependency setup for .NET 6 Azure Functions
This change introduces the foundational project structure for the KalanMoney application, establishing a .NET 6 target framework across multiple modules including the Azure Functions API, domain entities, use cases, and persistence layers (Cosmos DB and Memory Database). It adds specific package references such as Microsoft.Azure.Cosmos (v3.30.0), Microsoft.NET.Sdk.Functions (v4.1.1), and xunit (v2.4.2) to support the application's architecture and testing requirements.
(dependencies) · high confidence
Housekeeping
Added documentation for the Open Account use case; Documented Account Dashboard use case and data flow.
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
Score
- CAI 55 → 56 (+0.9)
- Rubric changed (rubric-2026.08.17 → rubric-2026.09.15) — scores are not directly comparable.
Lenses
- Code Health 71 → 71 (-0.1)
- Architecture 81 → 82 (+0.1)
- Maturity 56 → 56 (+0.0)
- Readiness 43 → 43 (+0.0)
- Security 86 → 84 (-2.5)
- Domain Modelling 97 (new)
Resolved (8)
- Bounded contexts not declared
- Change coupling: AccountQueriesRepository.cs ↔ AccountsMemoryRepository.cs (KalanMoney/KalanMoney.Persistence.CosmosDB/Repositories/AccountQueriesRepository.cs)
- Coverage not measured — analyzer environment
- No exposed public API
- No tests discovered
- The TDD section claims three rules but never states what tests are written or how failures are handled. (README.md)
- redundant comment (KalanMoney/KalanMoney.API.Functions.Tests/AccountDashboardTests/AccountDashboardFunctionTest.cs)
- single-maintainer — knowledge-concentration (bus factor) risk
New (15)
- Coverage not measured — no coverage collector is wired up
- Documentation: no installation or build instructions (README.md)
- Documentation: no usage examples (README.md)
- Duplicated block (25–29 lines × 2) (KalanMoney/KalanMoney.Persistence.CosmosDB/Repositories/AccountQueriesRepository.cs)
- Duplicated block (8 lines × 2) (KalanMoney/KalanMoney.Domain.UseCases/AddIncomeTransaction/AddIncomeTransaction.cs)
- End-of-life runtime: .NET net6.0
- Inconsistent article usage in test names: 'a_income' vs 'a_new_outcome'. 'a_income' is grammatically incorrect (should be 'an'), and 'a_new' adds an adjective not present in the other.
- Inconsistent article usage: 'a_income' (incorrect) vs 'an_outcome' (correct).
- Inconsistent phrasing in test names: 'Add_a_income_transaction...' vs 'Try_to_add_an_outcome_transaction...'. One uses a direct statement, the other uses 'Try_to_'.
- Inconsistent return/result description in test names: one specifies 'return_bad_request', the other describes the condition 'but_the_name_is_to_long' without specifying the HTTP result.
- Inconsistent structure: one test name includes the expected result ('return_bad_request'), the other does not.
- Inconsistent suffix usage: one test ends with 'to_an_existing_account_successfully' while the other ends with 'successfully'.
- Inconsistent use of the term 'unexciting_account' vs 'existing_account'. 'Unexciting' appears to be a specific test fixture name or state, while 'existing' is a general state. If 'unexciting' is a specific mock state, it should be consistent across all tests using that state.
- Inconsistent verb tense/mood: 'Open_an_account...' (imperative/statement) vs 'Try_to_open_an_account...' (attempt).
- Spelling errors in test method names: 'moth' instead of 'month' and 'to' instead of 'too'.
Architecture
- Unchanged — 0 containers · 1 contexts · 0 edges
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
xChiro/KalanMyMoney 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 20 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 aa6e9bc4ec8774b636bb84372e1398cdeeca8988 — 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-28e75b8e3254.