# juma1-hub/crysatlinvestments-test-version- architecture

> Architecture diagram of the GitHub repository juma1-hub/crysatlinvestments-test-version-, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-13). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/juma1-hub/crysatlinvestments-test-version-
- Repository: https://github.com/juma1-hub/crysatlinvestments-test-version-

## Overview

Crystal Investments is a frontend for investment information and investor account services, with an admin workspace. The user journey runs from public opportunity information and registration/sign-in into investor account services; administrators manage platform settings and review financial and investor records. The README describes a browser-storage prototype, while sampled components also use Supabase for authentication and data operations; these should not be assumed to form one consistent or production-secure backend. Some feature connections are documented but their implementing source was not sampled.

Main entry points: [`components/AdminConsole.tsx`](https://github.com/juma1-hub/crysatlinvestments-test-version-/blob/main/components/AdminConsole.tsx) (Admin workspace), [`lib/supabase.ts`](https://github.com/juma1-hub/crysatlinvestments-test-version-/blob/main/lib/supabase.ts) (Supabase browser client), [`components/InvestorPortal.tsx`](https://github.com/juma1-hub/crysatlinvestments-test-version-/blob/main/components/InvestorPortal.tsx) (Investor account), [`app/register/page.tsx`](https://github.com/juma1-hub/crysatlinvestments-test-version-/blob/main/app/register/page.tsx) (Investor registration)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_public["Public website"]
  node_marketing["Investment information<br/>[page.tsx]"]
  node_contact["Contact enquiries<br/>[page.tsx]"]
  node_site_text["Dynamic site content"]
end

subgraph group_investor["Investor services"]
  node_registration["Investor registration<br/>[page.tsx]"]
  node_login["Investor sign-in<br/>[page.tsx]"]
  node_account["Investor account<br/>[InvestorPortal.tsx]"]
  node_investor_overview["Live overview"]
  node_investments_list["Investment list"]
  node_referral_panel["Referral panel"]
end

subgraph group_admin["Administration"]
  node_admin_entry["Admin page<br/>[page.tsx]"]
  node_admin_console["Admin workspace<br/>[AdminConsole.tsx]"]
  node_analytics["Financial analytics"]
  node_financial_requests["Deposit and withdrawal review"]
  node_portfolio_admin["Portfolio allocations"]
  node_roles["Admin roles"]
  node_referral_admin["Referral commissions"]
  node_site_admin["Site settings and content"]
  node_other_admin["Operational admin tools"]
end

subgraph group_platform["Data and integrations"]
  node_supabase_client["Supabase browser client<br/>[supabase.ts]"]
end

node_visitor(("Prospective investor"))
node_supabase[("Supabase")]
node_browser_storage[("Browser localStorage")]

node_visitor -->|"views opportunities"| node_marketing
node_visitor -->|"registers account"| node_registration
node_visitor -->|"sends enquiry"| node_contact
node_registration -->|"requests client"| node_supabase_client
node_login -->|"requests client"| node_supabase_client
node_account -->|"requests client"| node_supabase_client
node_account -->|"renders list"| node_investments_list
node_account -->|"renders panel"| node_referral_panel
node_visitor -->|"signs in"| node_login
node_admin_entry -->|"renders workspace"| node_admin_console
node_admin_console -.->|"shows analytics"| node_analytics
node_admin_console -.->|"reviews requests"| node_financial_requests
node_admin_console -.->|"manages allocations"| node_portfolio_admin
node_admin_console -.->|"manages roles"| node_roles
node_admin_console -.->|"manages referrals"| node_referral_admin
node_admin_console -.->|"manages site"| node_site_admin
node_admin_console -.->|"offers admin tools"| node_other_admin
node_registration -->|"creates account"| node_supabase
node_account -->|"reads and updates profile"| node_supabase
node_site_text -->|"requests client"| node_supabase_client
node_site_text -->|"reads configuration"| node_supabase
node_supabase_client -->|"creates client"| node_supabase
node_site_admin -->|"saves configuration"| node_supabase
node_roles -->|"updates memberships"| node_supabase
node_referral_admin -->|"updates commissions"| node_supabase
node_portfolio_admin -->|"reads and writes records"| node_browser_storage
node_admin_console -->|"includes manager"| node_portfolio_admin

click node_marketing "https://github.com/juma1-hub/crysatlinvestments-test-version-/blob/main/app/opportunities/page.tsx"
click node_contact "https://github.com/juma1-hub/crysatlinvestments-test-version-/blob/main/app/contact/page.tsx"
click node_registration "https://github.com/juma1-hub/crysatlinvestments-test-version-/blob/main/app/register/page.tsx"
click node_login "https://github.com/juma1-hub/crysatlinvestments-test-version-/blob/main/app/login/page.tsx"
click node_account "https://github.com/juma1-hub/crysatlinvestments-test-version-/blob/main/components/InvestorPortal.tsx"
click node_investor_overview "https://github.com/juma1-hub/crysatlinvestments-test-version-/blob/main/components/InvestorLiveOverview.tsx"
click node_investments_list "https://github.com/juma1-hub/crysatlinvestments-test-version-/blob/main/components/InvestorInvestmentList.tsx"
click node_referral_panel "https://github.com/juma1-hub/crysatlinvestments-test-version-/blob/main/components/InvestorReferralPanel.tsx"
click node_admin_entry "https://github.com/juma1-hub/crysatlinvestments-test-version-/blob/main/app/admin/page.tsx"
click node_admin_console "https://github.com/juma1-hub/crysatlinvestments-test-version-/blob/main/components/AdminConsole.tsx"
click node_analytics "https://github.com/juma1-hub/crysatlinvestments-test-version-/blob/main/components/AdminFinancialSummary.tsx"
click node_financial_requests "https://github.com/juma1-hub/crysatlinvestments-test-version-/blob/main/components/AdminFinancialRequests.tsx"
click node_portfolio_admin "https://github.com/juma1-hub/crysatlinvestments-test-version-/blob/main/components/AdminPortfolioManager.tsx"
click node_roles "https://github.com/juma1-hub/crysatlinvestments-test-version-/blob/main/components/AdminRolesManager.tsx"
click node_referral_admin "https://github.com/juma1-hub/crysatlinvestments-test-version-/blob/main/components/AdminReferralManager.tsx"
click node_site_admin "https://github.com/juma1-hub/crysatlinvestments-test-version-/blob/main/components/AdminSiteManager.tsx"
click node_other_admin "https://github.com/juma1-hub/crysatlinvestments-test-version-/blob/main/components/AdminKycManager.tsx"
click node_site_text "https://github.com/juma1-hub/crysatlinvestments-test-version-/blob/main/components/SiteContentText.tsx"
click node_supabase_client "https://github.com/juma1-hub/crysatlinvestments-test-version-/blob/main/lib/supabase.ts"

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_marketing,node_contact,node_site_text toneBlue
class node_registration,node_login,node_account,node_investor_overview,node_investments_list,node_referral_panel,node_supabase,node_browser_storage toneAmber
class node_admin_entry,node_admin_console,node_analytics,node_financial_requests,node_portfolio_admin,node_roles,node_referral_admin,node_site_admin,node_other_admin toneMint
class node_supabase_client toneRose
class node_visitor toneIndigo
```

## Components

### Public website

- [Investment information](https://github.com/juma1-hub/crysatlinvestments-test-version-/blob/main/app/opportunities/page.tsx): `app/opportunities/page.tsx`
- [Contact enquiries](https://github.com/juma1-hub/crysatlinvestments-test-version-/blob/main/app/contact/page.tsx): `app/contact/page.tsx`
- [Dynamic site content](https://github.com/juma1-hub/crysatlinvestments-test-version-/blob/main/components/SiteContentText.tsx): `components/SiteContentText.tsx`

### Investor services

- [Investor registration](https://github.com/juma1-hub/crysatlinvestments-test-version-/blob/main/app/register/page.tsx): `app/register/page.tsx`
- [Investor sign-in](https://github.com/juma1-hub/crysatlinvestments-test-version-/blob/main/app/login/page.tsx): `app/login/page.tsx`
- [Investor account](https://github.com/juma1-hub/crysatlinvestments-test-version-/blob/main/components/InvestorPortal.tsx): `components/InvestorPortal.tsx`
- [Live overview](https://github.com/juma1-hub/crysatlinvestments-test-version-/blob/main/components/InvestorLiveOverview.tsx): `components/InvestorLiveOverview.tsx`
- [Investment list](https://github.com/juma1-hub/crysatlinvestments-test-version-/blob/main/components/InvestorInvestmentList.tsx): `components/InvestorInvestmentList.tsx`
- [Referral panel](https://github.com/juma1-hub/crysatlinvestments-test-version-/blob/main/components/InvestorReferralPanel.tsx): `components/InvestorReferralPanel.tsx`

### Administration

- [Admin page](https://github.com/juma1-hub/crysatlinvestments-test-version-/blob/main/app/admin/page.tsx): `app/admin/page.tsx`
- [Admin workspace](https://github.com/juma1-hub/crysatlinvestments-test-version-/blob/main/components/AdminConsole.tsx): `components/AdminConsole.tsx`
- [Financial analytics](https://github.com/juma1-hub/crysatlinvestments-test-version-/blob/main/components/AdminFinancialSummary.tsx): `components/AdminFinancialSummary.tsx`
- [Deposit and withdrawal review](https://github.com/juma1-hub/crysatlinvestments-test-version-/blob/main/components/AdminFinancialRequests.tsx): `components/AdminFinancialRequests.tsx`
- [Portfolio allocations](https://github.com/juma1-hub/crysatlinvestments-test-version-/blob/main/components/AdminPortfolioManager.tsx): `components/AdminPortfolioManager.tsx`
- [Admin roles](https://github.com/juma1-hub/crysatlinvestments-test-version-/blob/main/components/AdminRolesManager.tsx): `components/AdminRolesManager.tsx`
- [Referral commissions](https://github.com/juma1-hub/crysatlinvestments-test-version-/blob/main/components/AdminReferralManager.tsx): `components/AdminReferralManager.tsx`
- [Site settings and content](https://github.com/juma1-hub/crysatlinvestments-test-version-/blob/main/components/AdminSiteManager.tsx): `components/AdminSiteManager.tsx`
- [Operational admin tools](https://github.com/juma1-hub/crysatlinvestments-test-version-/blob/main/components/AdminKycManager.tsx): `components/AdminKycManager.tsx`

### Data and integrations

- [Supabase browser client](https://github.com/juma1-hub/crysatlinvestments-test-version-/blob/main/lib/supabase.ts): `lib/supabase.ts`

### Other components

- **Prospective investor**
- **Supabase**
- **Browser localStorage**

## Connections

- Prospective investor → Investment information: views opportunities (evidence: `app/opportunities/page.tsx`)
- Prospective investor → Investor registration: registers account (evidence: `app/register/page.tsx`)
- Prospective investor → Contact enquiries: sends enquiry (evidence: `app/contact/page.tsx`)
- Investor registration → Supabase browser client: requests client (evidence: `app/register/page.tsx`)
- Investor sign-in → Supabase browser client: requests client (evidence: `app/login/page.tsx`)
- Investor account → Supabase browser client: requests client (evidence: `components/InvestorPortal.tsx`)
- Investor account → Investment list: renders list (evidence: `components/InvestorPortal.tsx`)
- Investor account → Referral panel: renders panel (evidence: `components/InvestorPortal.tsx`)
- Prospective investor → Investor sign-in: signs in (evidence: `app/login/page.tsx`)
- Admin page → Admin workspace: renders workspace (evidence: `app/admin/page.tsx`)
- Admin workspace → Financial analytics: shows analytics (evidence: `README.md`)
- Admin workspace → Deposit and withdrawal review: reviews requests (evidence: `README.md`)
- Admin workspace → Portfolio allocations: manages allocations
- Admin workspace → Admin roles: manages roles (evidence: `README.md`)
- Admin workspace → Referral commissions: manages referrals (evidence: `components/AdminReferralManager.tsx`)
- Admin workspace → Site settings and content: manages site (evidence: `components/AdminSiteManager.tsx`)
- Admin workspace → Operational admin tools: offers admin tools (evidence: `README.md`)
- Investor registration → Supabase: creates account (evidence: `app/register/page.tsx`)
- Investor account → Supabase: reads and updates profile (evidence: `components/InvestorPortal.tsx`)
- Dynamic site content → Supabase browser client: requests client (evidence: `components/SiteContentText.tsx`)
- Dynamic site content → Supabase: reads configuration (evidence: `components/SiteContentText.tsx`)
- Supabase browser client → Supabase: creates client (evidence: `lib/supabase.ts`)
- Site settings and content → Supabase: saves configuration (evidence: `components/AdminSiteManager.tsx`)
- Admin roles → Supabase: updates memberships (evidence: `components/AdminRolesManager.tsx`)
- Referral commissions → Supabase: updates commissions (evidence: `components/AdminReferralManager.tsx`)
- Portfolio allocations → Browser localStorage: reads and writes records
- Admin workspace → Portfolio allocations: includes manager
