# phpajaxexperts/techmoney architecture

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

- Interactive diagram: https://gitdiagram.com/phpajaxexperts/techmoney
- Repository: https://github.com/phpajaxexperts/techmoney

## Overview

This appears to be a customer/admin investment and wallet application built on Laravel and Filament: customers register, browse investment and subscription plans, manage deposits and withdrawals, and track referrals and activity; administrators manage users, plans, and financial requests. The graph emphasizes those domain areas and the model/observer layer. Several page implementations are unsampled, so their connections are shown only where the source index or excerpts support them; other likely links are omitted.

Main entry points: [`app/Models/User.php`](https://github.com/phpajaxexperts/techmoney/blob/main/app/Models/User.php) (User accounts), [`app/Observers/PurchaseObserver.php`](https://github.com/phpajaxexperts/techmoney/blob/main/app/Observers/PurchaseObserver.php) (Purchase lifecycle), [`app/Filament/Customer/Pages/Auth/Register.php`](https://github.com/phpajaxexperts/techmoney/blob/main/app/Filament/Customer/Pages/Auth/Register.php) (Registration), [`app/Filament/Resources/CustomerUserResource.php`](https://github.com/phpajaxexperts/techmoney/blob/main/app/Filament/Resources/CustomerUserResource.php) (Customer management)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_customer["Customer experience"]
  node_registration["Registration<br/>[Register.php]"]
  node_plans_page["Investment plans<br/>[PlansPage.php]"]
  node_subscription_page["Subscriptions"]
  node_purchases_page["Purchase history"]
  node_wallet_page["Wallet<br/>[WalletPage.php]"]
  node_wallet_history["Wallet history<br/>[WalletHistory.php]"]
  node_withdraw_page["Withdrawals<br/>[WithdrawPage.php]"]
  node_referrals["Referrals<br/>[Referral.php]"]
  node_customer_care["Customer care<br/>[CustomerCare.php]"]
end

subgraph group_admin["Administration"]
  node_admin_customer["Customer management"]
  node_admin_plans["Plan management<br/>[PlanResource.php]"]
  node_admin_subscriptions["Subscription management"]
  node_admin_purchases["Purchase management"]
  node_admin_funds["Fund requests"]
  node_admin_withdrawals["Withdrawal management"]
  node_dashboard["Admin dashboard<br/>[Dashboard.php]"]
end

subgraph group_domain["Investment domain"]
  node_plan_model["Investment plans<br/>[Plan.php]"]
  node_purchase_model["Purchases<br/>[Purchase.php]"]
  node_subscription_model["User subscriptions"]
  node_subscription_plan["Subscription plans"]
end

subgraph group_finance["Wallet and banking"]
  node_fund_model["Fund requests<br/>[FundRequest.php]"]
  node_withdrawal_model["Withdrawals<br/>[Withdrawal.php]"]
  node_wallet_tx["Wallet transactions"]
  node_bank_service["Bank options<br/>[BankService.php]"]
end

subgraph group_internal["Models and automation"]
  node_user_model["User accounts<br/>[User.php]"]
  node_settings["Application settings<br/>[Setting.php]"]
  node_purchase_observer["Purchase lifecycle"]
  node_subscription_observer["Subscription lifecycle"]
  node_fund_observer["Fund request lifecycle"]
  node_service_provider["Observer registration"]
  node_maturity_command["Maturity check"]
end

node_customer(("Customer"))
node_admin_user(("Administrator"))
node_database[("Database<br/>[database.php]")]

node_customer -->|"registers"| node_registration
node_registration -->|"creates account"| node_user_model
node_registration -->|"reads settings"| node_settings
node_registration -.->|"persists account"| node_database
node_customer -.->|"browses plans"| node_plans_page
node_customer -.->|"manages subscription"| node_subscription_page
node_customer -.->|"reviews purchases"| node_purchases_page
node_customer -.->|"manages wallet"| node_wallet_page
node_customer -.->|"views activity"| node_wallet_history
node_customer -.->|"requests withdrawal"| node_withdraw_page
node_customer -->|"views referrals"| node_referrals
node_referrals -->|"queries referrals"| node_user_model
node_referrals -->|"reads banner"| node_settings
node_customer -.->|"seeks assistance"| node_customer_care
node_admin_user -.->|"manages customers"| node_admin_customer
node_admin_user -.->|"manages plans"| node_admin_plans
node_admin_user -.->|"manages subscriptions"| node_admin_subscriptions
node_admin_user -.->|"manages purchases"| node_admin_purchases
node_admin_user -.->|"reviews funding"| node_admin_funds
node_admin_user -.->|"manages withdrawals"| node_admin_withdrawals
node_admin_user -.->|"views dashboard"| node_dashboard
node_admin_customer -->|"manages accounts"| node_user_model
node_admin_customer -->|"loads bank options"| node_bank_service
node_admin_customer -->|"links referral page"| node_referrals
node_user_model -->|"has purchases"| node_purchase_model
node_user_model -->|"has withdrawals"| node_withdrawal_model
node_user_model -->|"has subscriptions"| node_subscription_model
node_user_model -->|"has requests"| node_fund_model
node_user_model -->|"records transactions"| node_wallet_tx
node_purchase_model -->|"belongs to"| node_user_model
node_purchase_model -->|"uses plan"| node_plan_model
node_subscription_model -->|"belongs to"| node_user_model
node_subscription_model -->|"uses plan"| node_subscription_plan
node_service_provider -->|"registers observer"| node_purchase_observer
node_service_provider -->|"registers observer"| node_subscription_observer
node_service_provider -->|"registers observer"| node_fund_observer
node_purchase_observer -->|"handles updates"| node_purchase_model
node_purchase_observer -->|"reads commission"| node_settings
node_purchase_observer -->|"credits balances"| node_user_model
node_purchase_observer -->|"reads return"| node_plan_model
node_purchase_observer -->|"creates ledger entry"| node_wallet_tx
node_subscription_observer -->|"handles lifecycle"| node_subscription_model
node_subscription_observer -->|"reads settings"| node_settings

click node_registration "https://github.com/phpajaxexperts/techmoney/blob/main/app/Filament/Customer/Pages/Auth/Register.php"
click node_plans_page "https://github.com/phpajaxexperts/techmoney/blob/main/app/Filament/Customer/Pages/PlansPage.php"
click node_subscription_page "https://github.com/phpajaxexperts/techmoney/blob/main/app/Filament/Customer/Pages/SubscriptionPage.php"
click node_purchases_page "https://github.com/phpajaxexperts/techmoney/blob/main/app/Filament/Customer/Pages/MyPurchasesPage.php"
click node_wallet_page "https://github.com/phpajaxexperts/techmoney/blob/main/app/Filament/Customer/Pages/WalletPage.php"
click node_wallet_history "https://github.com/phpajaxexperts/techmoney/blob/main/app/Filament/Customer/Pages/WalletHistory.php"
click node_withdraw_page "https://github.com/phpajaxexperts/techmoney/blob/main/app/Filament/Customer/Pages/WithdrawPage.php"
click node_referrals "https://github.com/phpajaxexperts/techmoney/blob/main/app/Filament/Customer/Pages/Referral.php"
click node_customer_care "https://github.com/phpajaxexperts/techmoney/blob/main/app/Filament/Customer/Pages/CustomerCare.php"
click node_admin_customer "https://github.com/phpajaxexperts/techmoney/blob/main/app/Filament/Resources/CustomerUserResource.php"
click node_admin_plans "https://github.com/phpajaxexperts/techmoney/blob/main/app/Filament/Resources/PlanResource.php"
click node_admin_subscriptions "https://github.com/phpajaxexperts/techmoney/blob/main/app/Filament/Resources/UserSubscriptionResource.php"
click node_admin_purchases "https://github.com/phpajaxexperts/techmoney/blob/main/app/Filament/Resources/PurchaseResource.php"
click node_admin_funds "https://github.com/phpajaxexperts/techmoney/blob/main/app/Filament/Resources/FundRequestResource.php"
click node_admin_withdrawals "https://github.com/phpajaxexperts/techmoney/blob/main/app/Filament/Resources/WithdrawalResource.php"
click node_dashboard "https://github.com/phpajaxexperts/techmoney/blob/main/app/Filament/Pages/Dashboard.php"
click node_user_model "https://github.com/phpajaxexperts/techmoney/blob/main/app/Models/User.php"
click node_plan_model "https://github.com/phpajaxexperts/techmoney/blob/main/app/Models/Plan.php"
click node_purchase_model "https://github.com/phpajaxexperts/techmoney/blob/main/app/Models/Purchase.php"
click node_subscription_model "https://github.com/phpajaxexperts/techmoney/blob/main/app/Models/UserSubscription.php"
click node_subscription_plan "https://github.com/phpajaxexperts/techmoney/blob/main/app/Models/SubscriptionPlan.php"
click node_fund_model "https://github.com/phpajaxexperts/techmoney/blob/main/app/Models/FundRequest.php"
click node_withdrawal_model "https://github.com/phpajaxexperts/techmoney/blob/main/app/Models/Withdrawal.php"
click node_wallet_tx "https://github.com/phpajaxexperts/techmoney/blob/main/app/Models/WalletTransaction.php"
click node_bank_service "https://github.com/phpajaxexperts/techmoney/blob/main/app/Services/BankService.php"
click node_settings "https://github.com/phpajaxexperts/techmoney/blob/main/app/Models/Setting.php"
click node_purchase_observer "https://github.com/phpajaxexperts/techmoney/blob/main/app/Observers/PurchaseObserver.php"
click node_subscription_observer "https://github.com/phpajaxexperts/techmoney/blob/main/app/Observers/UserSubscriptionObserver.php"
click node_fund_observer "https://github.com/phpajaxexperts/techmoney/blob/main/app/Observers/FundRequestObserver.php"
click node_service_provider "https://github.com/phpajaxexperts/techmoney/blob/main/app/Providers/AppServiceProvider.php"
click node_maturity_command "https://github.com/phpajaxexperts/techmoney/blob/main/app/Console/Commands/CheckMaturedPlans.php"
click node_database "https://github.com/phpajaxexperts/techmoney/blob/main/config/database.php"

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_registration,node_plans_page,node_subscription_page,node_purchases_page,node_wallet_page,node_wallet_history,node_withdraw_page,node_referrals,node_customer_care toneBlue
class node_admin_customer,node_admin_plans,node_admin_subscriptions,node_admin_purchases,node_admin_funds,node_admin_withdrawals,node_dashboard,node_database toneAmber
class node_plan_model,node_purchase_model,node_subscription_model,node_subscription_plan toneMint
class node_fund_model,node_withdrawal_model,node_wallet_tx,node_bank_service toneRose
class node_user_model,node_settings,node_purchase_observer,node_subscription_observer,node_fund_observer,node_service_provider,node_maturity_command,node_customer,node_admin_user toneIndigo
```

## Components

### Customer experience

- [Registration](https://github.com/phpajaxexperts/techmoney/blob/main/app/Filament/Customer/Pages/Auth/Register.php): `app/Filament/Customer/Pages/Auth/Register.php`
- [Investment plans](https://github.com/phpajaxexperts/techmoney/blob/main/app/Filament/Customer/Pages/PlansPage.php): `app/Filament/Customer/Pages/PlansPage.php`
- [Subscriptions](https://github.com/phpajaxexperts/techmoney/blob/main/app/Filament/Customer/Pages/SubscriptionPage.php): `app/Filament/Customer/Pages/SubscriptionPage.php`
- [Purchase history](https://github.com/phpajaxexperts/techmoney/blob/main/app/Filament/Customer/Pages/MyPurchasesPage.php): `app/Filament/Customer/Pages/MyPurchasesPage.php`
- [Wallet](https://github.com/phpajaxexperts/techmoney/blob/main/app/Filament/Customer/Pages/WalletPage.php): `app/Filament/Customer/Pages/WalletPage.php`
- [Wallet history](https://github.com/phpajaxexperts/techmoney/blob/main/app/Filament/Customer/Pages/WalletHistory.php): `app/Filament/Customer/Pages/WalletHistory.php`
- [Withdrawals](https://github.com/phpajaxexperts/techmoney/blob/main/app/Filament/Customer/Pages/WithdrawPage.php): `app/Filament/Customer/Pages/WithdrawPage.php`
- [Referrals](https://github.com/phpajaxexperts/techmoney/blob/main/app/Filament/Customer/Pages/Referral.php): `app/Filament/Customer/Pages/Referral.php`
- [Customer care](https://github.com/phpajaxexperts/techmoney/blob/main/app/Filament/Customer/Pages/CustomerCare.php): `app/Filament/Customer/Pages/CustomerCare.php`

### Administration

- [Customer management](https://github.com/phpajaxexperts/techmoney/blob/main/app/Filament/Resources/CustomerUserResource.php): `app/Filament/Resources/CustomerUserResource.php`
- [Plan management](https://github.com/phpajaxexperts/techmoney/blob/main/app/Filament/Resources/PlanResource.php): `app/Filament/Resources/PlanResource.php`
- [Subscription management](https://github.com/phpajaxexperts/techmoney/blob/main/app/Filament/Resources/UserSubscriptionResource.php): `app/Filament/Resources/UserSubscriptionResource.php`
- [Purchase management](https://github.com/phpajaxexperts/techmoney/blob/main/app/Filament/Resources/PurchaseResource.php): `app/Filament/Resources/PurchaseResource.php`
- [Fund requests](https://github.com/phpajaxexperts/techmoney/blob/main/app/Filament/Resources/FundRequestResource.php): `app/Filament/Resources/FundRequestResource.php`
- [Withdrawal management](https://github.com/phpajaxexperts/techmoney/blob/main/app/Filament/Resources/WithdrawalResource.php): `app/Filament/Resources/WithdrawalResource.php`
- [Admin dashboard](https://github.com/phpajaxexperts/techmoney/blob/main/app/Filament/Pages/Dashboard.php): `app/Filament/Pages/Dashboard.php`

### Investment domain

- [Investment plans](https://github.com/phpajaxexperts/techmoney/blob/main/app/Models/Plan.php): `app/Models/Plan.php`
- [Purchases](https://github.com/phpajaxexperts/techmoney/blob/main/app/Models/Purchase.php): `app/Models/Purchase.php`
- [User subscriptions](https://github.com/phpajaxexperts/techmoney/blob/main/app/Models/UserSubscription.php): `app/Models/UserSubscription.php`
- [Subscription plans](https://github.com/phpajaxexperts/techmoney/blob/main/app/Models/SubscriptionPlan.php): `app/Models/SubscriptionPlan.php`

### Wallet and banking

- [Fund requests](https://github.com/phpajaxexperts/techmoney/blob/main/app/Models/FundRequest.php): `app/Models/FundRequest.php`
- [Withdrawals](https://github.com/phpajaxexperts/techmoney/blob/main/app/Models/Withdrawal.php): `app/Models/Withdrawal.php`
- [Wallet transactions](https://github.com/phpajaxexperts/techmoney/blob/main/app/Models/WalletTransaction.php): `app/Models/WalletTransaction.php`
- [Bank options](https://github.com/phpajaxexperts/techmoney/blob/main/app/Services/BankService.php): `app/Services/BankService.php`

### Models and automation

- [User accounts](https://github.com/phpajaxexperts/techmoney/blob/main/app/Models/User.php): `app/Models/User.php`
- [Application settings](https://github.com/phpajaxexperts/techmoney/blob/main/app/Models/Setting.php): `app/Models/Setting.php`
- [Purchase lifecycle](https://github.com/phpajaxexperts/techmoney/blob/main/app/Observers/PurchaseObserver.php): `app/Observers/PurchaseObserver.php`
- [Subscription lifecycle](https://github.com/phpajaxexperts/techmoney/blob/main/app/Observers/UserSubscriptionObserver.php): `app/Observers/UserSubscriptionObserver.php`
- [Fund request lifecycle](https://github.com/phpajaxexperts/techmoney/blob/main/app/Observers/FundRequestObserver.php): `app/Observers/FundRequestObserver.php`
- [Observer registration](https://github.com/phpajaxexperts/techmoney/blob/main/app/Providers/AppServiceProvider.php): `app/Providers/AppServiceProvider.php`
- [Maturity check](https://github.com/phpajaxexperts/techmoney/blob/main/app/Console/Commands/CheckMaturedPlans.php): `app/Console/Commands/CheckMaturedPlans.php`

### Other components

- **Customer**
- **Administrator**
- [Database](https://github.com/phpajaxexperts/techmoney/blob/main/config/database.php): `config/database.php`

## Connections

- Customer → Registration: registers (evidence: `app/Filament/Customer/Pages/Auth/Register.php`)
- Registration → User accounts: creates account (evidence: `app/Filament/Customer/Pages/Auth/Register.php`)
- Registration → Application settings: reads settings (evidence: `app/Filament/Customer/Pages/Auth/Register.php`)
- Registration → Database: persists account
- Customer → Investment plans: browses plans
- Customer → Subscriptions: manages subscription
- Customer → Purchase history: reviews purchases
- Customer → Wallet: manages wallet
- Customer → Wallet history: views activity
- Customer → Withdrawals: requests withdrawal
- Customer → Referrals: views referrals (evidence: `app/Filament/Customer/Pages/Referral.php`)
- Referrals → User accounts: queries referrals (evidence: `app/Filament/Customer/Pages/Referral.php`)
- Referrals → Application settings: reads banner (evidence: `app/Filament/Customer/Pages/Referral.php`)
- Customer → Customer care: seeks assistance
- Administrator → Customer management: manages customers
- Administrator → Plan management: manages plans
- Administrator → Subscription management: manages subscriptions
- Administrator → Purchase management: manages purchases
- Administrator → Fund requests: reviews funding
- Administrator → Withdrawal management: manages withdrawals
- Administrator → Admin dashboard: views dashboard
- Customer management → User accounts: manages accounts (evidence: `app/Filament/Resources/CustomerUserResource.php`)
- Customer management → Bank options: loads bank options (evidence: `app/Filament/Resources/CustomerUserResource.php`)
- Customer management → Referrals: links referral page (evidence: `app/Filament/Resources/CustomerUserResource.php`)
- User accounts → Purchases: has purchases (evidence: `app/Models/User.php`)
- User accounts → Withdrawals: has withdrawals (evidence: `app/Models/User.php`)
- User accounts → User subscriptions: has subscriptions (evidence: `app/Models/User.php`)
- User accounts → Fund requests: has requests (evidence: `app/Models/User.php`)
- User accounts → Wallet transactions: records transactions (evidence: `app/Models/User.php`)
- Purchases → User accounts: belongs to (evidence: `app/Models/Purchase.php`)
- Purchases → Investment plans: uses plan (evidence: `app/Models/Purchase.php`)
- User subscriptions → User accounts: belongs to (evidence: `app/Models/UserSubscription.php`)
- User subscriptions → Subscription plans: uses plan (evidence: `app/Models/UserSubscription.php`)
- Observer registration → Purchase lifecycle: registers observer (evidence: `app/Providers/AppServiceProvider.php`)
- Observer registration → Subscription lifecycle: registers observer (evidence: `app/Providers/AppServiceProvider.php`)
- Observer registration → Fund request lifecycle: registers observer (evidence: `app/Providers/AppServiceProvider.php`)
- Purchase lifecycle → Purchases: handles updates (evidence: `app/Observers/PurchaseObserver.php`)
- Purchase lifecycle → Application settings: reads commission (evidence: `app/Observers/PurchaseObserver.php`)
- Purchase lifecycle → User accounts: credits balances (evidence: `app/Observers/PurchaseObserver.php`)
- Purchase lifecycle → Investment plans: reads return (evidence: `app/Observers/PurchaseObserver.php`)
- Purchase lifecycle → Wallet transactions: creates ledger entry
- Subscription lifecycle → User subscriptions: handles lifecycle (evidence: `app/Observers/UserSubscriptionObserver.php`)
- Subscription lifecycle → Application settings: reads settings (evidence: `app/Observers/UserSubscriptionObserver.php`)
