# dj28p/betsolutions architecture

> Architecture diagram of the GitHub repository dj28p/betsolutions, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-02). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/dj28p/betsolutions
- Repository: https://github.com/dj28p/betsolutions

## Overview

BetSolutions is an ASP.NET Core MVC administration app for managing users, betting accounts, transactions, and World Cup-style bets. Its principal workflow runs from a browser request through a controller to an application service, which applies business rules and reads or writes through the EF Core context to SQL Server; the controller then returns the result. The graph preserves the documented search and bet-settlement capabilities. Some links rely on the README’s architecture description because the corresponding implementation excerpts were not provided.

Main entry points: [`src/BetSolutions.Application/Interfaces/IApplicationDbContext.cs`](https://github.com/dj28p/betsolutions/blob/main/src/BetSolutions.Application/Interfaces/IApplicationDbContext.cs) (Persistence contract), [`src/BetSolutions.Web/Controllers/UsersController.cs`](https://github.com/dj28p/betsolutions/blob/main/src/BetSolutions.Web/Controllers/UsersController.cs) (User endpoints), [`src/BetSolutions.Web/Controllers/AccountsController.cs`](https://github.com/dj28p/betsolutions/blob/main/src/BetSolutions.Web/Controllers/AccountsController.cs) (Account endpoints), [`src/BetSolutions.Web/Controllers/TransactionsController.cs`](https://github.com/dj28p/betsolutions/blob/main/src/BetSolutions.Web/Controllers/TransactionsController.cs) (Transaction endpoints)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web interface"]
  node_users_controller["User endpoints<br/>[UsersController.cs]"]
  node_accounts_controller["Account endpoints"]
  node_transactions_controller["Transaction endpoints"]
  node_bets_controller["Bet endpoints<br/>[BetsController.cs]"]
  node_contact_controller["Contact endpoint"]
end

subgraph group_application["Application services"]
  node_user_service["User management<br/>[UserService.cs]"]
  node_account_service["Account management<br/>[AccountService.cs]"]
  node_transaction_service["Transaction management"]
  node_betting_service["Bet placement<br/>[BettingService.cs]"]
  node_odds_catalog["World Cup odds"]
end

subgraph group_persistence["Data access"]
  node_user_search["User search"]
  node_db_context["EF Core context"]
  node_sql_database[("SQL database")]
end

subgraph group_domain["Domain contracts"]
  node_domain_entities["Domain entities<br/>[BettingAccount.cs]"]
  node_application_context["Persistence contract"]
end

node_browser(("Browser"))

node_browser -->|"sends requests"| node_users_controller
node_browser -->|"sends requests"| node_accounts_controller
node_browser -->|"sends requests"| node_transactions_controller
node_browser -->|"sends requests"| node_bets_controller
node_browser -.->|"sends requests"| node_contact_controller
node_users_controller -->|"calls"| node_user_service
node_users_controller -->|"calls"| node_user_search
node_accounts_controller -->|"calls"| node_account_service
node_accounts_controller -->|"calls"| node_user_service
node_transactions_controller -->|"calls"| node_account_service
node_transactions_controller -->|"calls"| node_transaction_service
node_bets_controller -->|"calls"| node_betting_service
node_user_service -->|"queries and saves"| node_application_context
node_account_service -->|"queries and saves"| node_application_context
node_transaction_service -->|"queries and saves"| node_application_context
node_betting_service -->|"queries and saves"| node_application_context
node_betting_service -->|"uses odds"| node_odds_catalog
node_user_search -->|"queries"| node_application_context
node_db_context -->|"implements"| node_application_context
node_application_context -->|"exposes sets"| node_domain_entities
node_db_context -->|"reads and writes"| node_sql_database

click node_users_controller "https://github.com/dj28p/betsolutions/blob/main/src/BetSolutions.Web/Controllers/UsersController.cs"
click node_accounts_controller "https://github.com/dj28p/betsolutions/blob/main/src/BetSolutions.Web/Controllers/AccountsController.cs"
click node_transactions_controller "https://github.com/dj28p/betsolutions/blob/main/src/BetSolutions.Web/Controllers/TransactionsController.cs"
click node_bets_controller "https://github.com/dj28p/betsolutions/blob/main/src/BetSolutions.Web/Controllers/BetsController.cs"
click node_contact_controller "https://github.com/dj28p/betsolutions/blob/main/src/BetSolutions.Web/Controllers/ContactController.cs"
click node_user_service "https://github.com/dj28p/betsolutions/blob/main/src/BetSolutions.Application/Services/UserService.cs"
click node_account_service "https://github.com/dj28p/betsolutions/blob/main/src/BetSolutions.Application/Services/AccountService.cs"
click node_transaction_service "https://github.com/dj28p/betsolutions/blob/main/src/BetSolutions.Application/Services/TransactionService.cs"
click node_betting_service "https://github.com/dj28p/betsolutions/blob/main/src/BetSolutions.Application/Services/BettingService.cs"
click node_odds_catalog "https://github.com/dj28p/betsolutions/blob/main/src/BetSolutions.Application/Services/WorldCupOddsCatalog.cs"
click node_user_search "https://github.com/dj28p/betsolutions/blob/main/src/BetSolutions.Infrastructure/Services/UserSearchService.cs"
click node_db_context "https://github.com/dj28p/betsolutions/blob/main/src/BetSolutions.Infrastructure/Data/ApplicationDbContext.cs"
click node_domain_entities "https://github.com/dj28p/betsolutions/blob/main/src/BetSolutions.Core/Entities/BettingAccount.cs"
click node_application_context "https://github.com/dj28p/betsolutions/blob/main/src/BetSolutions.Application/Interfaces/IApplicationDbContext.cs"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_users_controller,node_accounts_controller,node_transactions_controller,node_bets_controller,node_contact_controller,node_browser toneBlue
class node_user_service,node_account_service,node_transaction_service,node_betting_service,node_odds_catalog toneAmber
class node_user_search,node_db_context,node_sql_database toneMint
class node_domain_entities,node_application_context toneRose
```

## Components

### Web interface

- [User endpoints](https://github.com/dj28p/betsolutions/blob/main/src/BetSolutions.Web/Controllers/UsersController.cs): `src/BetSolutions.Web/Controllers/UsersController.cs`
- [Account endpoints](https://github.com/dj28p/betsolutions/blob/main/src/BetSolutions.Web/Controllers/AccountsController.cs): `src/BetSolutions.Web/Controllers/AccountsController.cs`
- [Transaction endpoints](https://github.com/dj28p/betsolutions/blob/main/src/BetSolutions.Web/Controllers/TransactionsController.cs): `src/BetSolutions.Web/Controllers/TransactionsController.cs`
- [Bet endpoints](https://github.com/dj28p/betsolutions/blob/main/src/BetSolutions.Web/Controllers/BetsController.cs): `src/BetSolutions.Web/Controllers/BetsController.cs`
- [Contact endpoint](https://github.com/dj28p/betsolutions/blob/main/src/BetSolutions.Web/Controllers/ContactController.cs): `src/BetSolutions.Web/Controllers/ContactController.cs`

### Application services

- [User management](https://github.com/dj28p/betsolutions/blob/main/src/BetSolutions.Application/Services/UserService.cs): `src/BetSolutions.Application/Services/UserService.cs`
- [Account management](https://github.com/dj28p/betsolutions/blob/main/src/BetSolutions.Application/Services/AccountService.cs): `src/BetSolutions.Application/Services/AccountService.cs`
- [Transaction management](https://github.com/dj28p/betsolutions/blob/main/src/BetSolutions.Application/Services/TransactionService.cs): `src/BetSolutions.Application/Services/TransactionService.cs`
- [Bet placement](https://github.com/dj28p/betsolutions/blob/main/src/BetSolutions.Application/Services/BettingService.cs): `src/BetSolutions.Application/Services/BettingService.cs`
- [World Cup odds](https://github.com/dj28p/betsolutions/blob/main/src/BetSolutions.Application/Services/WorldCupOddsCatalog.cs): `src/BetSolutions.Application/Services/WorldCupOddsCatalog.cs`

### Data access

- [User search](https://github.com/dj28p/betsolutions/blob/main/src/BetSolutions.Infrastructure/Services/UserSearchService.cs): `src/BetSolutions.Infrastructure/Services/UserSearchService.cs`
- [EF Core context](https://github.com/dj28p/betsolutions/blob/main/src/BetSolutions.Infrastructure/Data/ApplicationDbContext.cs): `src/BetSolutions.Infrastructure/Data/ApplicationDbContext.cs`
- **SQL database**

### Domain contracts

- [Domain entities](https://github.com/dj28p/betsolutions/blob/main/src/BetSolutions.Core/Entities/BettingAccount.cs): `src/BetSolutions.Core/Entities/BettingAccount.cs`
- [Persistence contract](https://github.com/dj28p/betsolutions/blob/main/src/BetSolutions.Application/Interfaces/IApplicationDbContext.cs): `src/BetSolutions.Application/Interfaces/IApplicationDbContext.cs`

### Other components

- **Browser**

## Connections

- Browser → User endpoints: sends requests (evidence: `README.md`)
- Browser → Account endpoints: sends requests (evidence: `README.md`)
- Browser → Transaction endpoints: sends requests (evidence: `README.md`)
- Browser → Bet endpoints: sends requests (evidence: `README.md`)
- Browser → Contact endpoint: sends requests
- User endpoints → User management: calls (evidence: `src/BetSolutions.Web/Controllers/UsersController.cs`)
- User endpoints → User search: calls (evidence: `src/BetSolutions.Web/Controllers/UsersController.cs`)
- Account endpoints → Account management: calls (evidence: `src/BetSolutions.Web/Controllers/AccountsController.cs`)
- Account endpoints → User management: calls (evidence: `src/BetSolutions.Web/Controllers/AccountsController.cs`)
- Transaction endpoints → Account management: calls (evidence: `src/BetSolutions.Web/Controllers/TransactionsController.cs`)
- Transaction endpoints → Transaction management: calls (evidence: `src/BetSolutions.Web/Controllers/TransactionsController.cs`)
- Bet endpoints → Bet placement: calls (evidence: `src/BetSolutions.Web/Controllers/BetsController.cs`)
- User management → Persistence contract: queries and saves (evidence: `src/BetSolutions.Application/Services/UserService.cs`)
- Account management → Persistence contract: queries and saves (evidence: `src/BetSolutions.Application/Services/AccountService.cs`)
- Transaction management → Persistence contract: queries and saves (evidence: `src/BetSolutions.Application/Services/TransactionService.cs`)
- Bet placement → Persistence contract: queries and saves (evidence: `src/BetSolutions.Application/Services/BettingService.cs`)
- Bet placement → World Cup odds: uses odds (evidence: `src/BetSolutions.Application/Services/BettingService.cs`)
- User search → Persistence contract: queries (evidence: `src/BetSolutions.Infrastructure/Services/UserSearchService.cs`)
- EF Core context → Persistence contract: implements (evidence: `src/BetSolutions.Infrastructure/Data/ApplicationDbContext.cs`)
- Persistence contract → Domain entities: exposes sets (evidence: `src/BetSolutions.Application/Interfaces/IApplicationDbContext.cs`)
- EF Core context → SQL database: reads and writes (evidence: `README.md`)
