# mohamedbahaaa30/omega-test- architecture

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

- Interactive diagram: https://gitdiagram.com/mohamedbahaaa30/omega-test-
- Repository: https://github.com/mohamedbahaaa30/omega-test-

## Overview

Omega is an Arabic-first cognitive and memory-care app. Its documented user journey is to select a person, complete assessments or training, review cognitive analysis and plans, and track progress; carers can also create memories and run guided recall. The app additionally documents accounts, an admin question bank, and optional Gemini services. The supplied tree and excerpts omit the Flutter/Dart application and database migrations, so those capabilities are represented at subsystem level; dashed, uncited links indicate documented but unsampled connections.

Main entry points: [`supabase/docker/volumes/functions/main/index.ts`](https://github.com/mohamedbahaaa30/omega-test-/blob/main/supabase/docker/volumes/functions/main/index.ts) (Function router), [`supabase/docker/volumes/functions/main/logging.ts`](https://github.com/mohamedbahaaa30/omega-test-/blob/main/supabase/docker/volumes/functions/main/logging.ts) (Runtime logging), [`supabase/docker/volumes/functions/main/events/index.ts`](https://github.com/mohamedbahaaa30/omega-test-/blob/main/supabase/docker/volumes/functions/main/events/index.ts) (Event worker), [`android/app/src/main/kotlin/com/omega/omega_app/MainActivity.kt`](https://github.com/mohamedbahaaa30/omega-test-/blob/main/android/app/src/main/kotlin/com/omega/omega_app/MainActivity.kt) (Android host)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Omega app"]
  node_flutter_app["Flutter app"]
  node_assessment["Assessments"]
  node_analysis["Cognitive analysis"]
  node_training_progress["Training and progress"]
  node_memory["Memory bank and recall"]
  node_accounts["Accounts and profiles"]
  node_question_bank[("Admin question bank")]
end

subgraph group_backend["Supabase services"]
  node_supabase[("Supabase backend")]
  node_ai_analysis["AI analysis proxy<br/>[index.ts]"]
  node_gemini_token["Gemini token service<br/>[index.ts]"]
end

subgraph group_runtime["Edge runtime"]
  node_edge_main["Function router<br/>[index.ts]"]
  node_edge_logging["Runtime logging<br/>[logging.ts]"]
  node_memory_pressure["Memory pressure loop<br/>[memory-pressure.ts]"]
  node_event_worker["Event worker<br/>[index.ts]"]
end

subgraph group_platform["Native launchers"]
  node_android_host["Android host<br/>[MainActivity.kt]"]
  node_ios_host["iOS host<br/>[AppDelegate.swift]"]
  node_linux_host["Linux host<br/>[my_application.h]"]
  node_windows_host["Windows host<br/>[main.cpp]"]
  node_macos_plugins["macOS plugins"]
  node_linux_plugins["Linux plugins"]
  node_windows_plugins["Windows plugins"]
end

node_individual(("Individuals and carers"))

node_individual -->|"uses"| node_flutter_app
node_flutter_app -.->|"starts"| node_assessment
node_flutter_app -.->|"opens"| node_training_progress
node_assessment -.->|"produces results"| node_analysis
node_flutter_app -.->|"manages memories"| node_memory
node_flutter_app -.->|"manages profiles"| node_accounts
node_flutter_app -.->|"administers"| node_question_bank
node_flutter_app -.->|"uses"| node_supabase
node_flutter_app -.->|"requests analysis"| node_ai_analysis
node_flutter_app -.->|"requests token"| node_gemini_token
node_edge_main -->|"logs through"| node_edge_logging
node_edge_main -->|"starts"| node_memory_pressure
node_event_worker -->|"logs through"| node_edge_logging
node_android_host -.->|"hosts"| node_flutter_app
node_ios_host -.->|"hosts"| node_flutter_app
node_linux_host -.->|"hosts"| node_flutter_app
node_windows_host -.->|"hosts"| node_flutter_app

click node_ai_analysis "https://github.com/mohamedbahaaa30/omega-test-/blob/main/supabase/functions/ai-analysis/index.ts"
click node_gemini_token "https://github.com/mohamedbahaaa30/omega-test-/blob/main/supabase/functions/gemini-token/index.ts"
click node_edge_main "https://github.com/mohamedbahaaa30/omega-test-/blob/main/supabase/docker/volumes/functions/main/index.ts"
click node_edge_logging "https://github.com/mohamedbahaaa30/omega-test-/blob/main/supabase/docker/volumes/functions/main/logging.ts"
click node_memory_pressure "https://github.com/mohamedbahaaa30/omega-test-/blob/main/supabase/docker/volumes/functions/main/memory-pressure.ts"
click node_event_worker "https://github.com/mohamedbahaaa30/omega-test-/blob/main/supabase/docker/volumes/functions/main/events/index.ts"
click node_android_host "https://github.com/mohamedbahaaa30/omega-test-/blob/main/android/app/src/main/kotlin/com/omega/omega_app/MainActivity.kt"
click node_ios_host "https://github.com/mohamedbahaaa30/omega-test-/blob/main/ios/Runner/AppDelegate.swift"
click node_linux_host "https://github.com/mohamedbahaaa30/omega-test-/blob/main/linux/runner/my_application.h"
click node_windows_host "https://github.com/mohamedbahaaa30/omega-test-/blob/main/windows/runner/main.cpp"
click node_macos_plugins "https://github.com/mohamedbahaaa30/omega-test-/blob/main/macos/Flutter/GeneratedPluginRegistrant.swift"
click node_linux_plugins "https://github.com/mohamedbahaaa30/omega-test-/blob/main/linux/flutter/generated_plugin_registrant.h"
click node_windows_plugins "https://github.com/mohamedbahaaa30/omega-test-/blob/main/windows/flutter/generated_plugin_registrant.h"

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_flutter_app,node_assessment,node_analysis,node_training_progress,node_memory,node_accounts,node_question_bank toneBlue
class node_supabase,node_ai_analysis,node_gemini_token toneAmber
class node_edge_main,node_edge_logging,node_memory_pressure,node_event_worker toneMint
class node_android_host,node_ios_host,node_linux_host,node_windows_host,node_macos_plugins,node_linux_plugins,node_windows_plugins toneRose
class node_individual toneIndigo
```

## Components

### Omega app

- **Flutter app**
- **Assessments**
- **Cognitive analysis**
- **Training and progress**
- **Memory bank and recall**
- **Accounts and profiles**
- **Admin question bank**

### Supabase services

- **Supabase backend**
- [AI analysis proxy](https://github.com/mohamedbahaaa30/omega-test-/blob/main/supabase/functions/ai-analysis/index.ts): `supabase/functions/ai-analysis/index.ts`
- [Gemini token service](https://github.com/mohamedbahaaa30/omega-test-/blob/main/supabase/functions/gemini-token/index.ts): `supabase/functions/gemini-token/index.ts`

### Edge runtime

- [Function router](https://github.com/mohamedbahaaa30/omega-test-/blob/main/supabase/docker/volumes/functions/main/index.ts): `supabase/docker/volumes/functions/main/index.ts`
- [Runtime logging](https://github.com/mohamedbahaaa30/omega-test-/blob/main/supabase/docker/volumes/functions/main/logging.ts): `supabase/docker/volumes/functions/main/logging.ts`
- [Memory pressure loop](https://github.com/mohamedbahaaa30/omega-test-/blob/main/supabase/docker/volumes/functions/main/memory-pressure.ts): `supabase/docker/volumes/functions/main/memory-pressure.ts`
- [Event worker](https://github.com/mohamedbahaaa30/omega-test-/blob/main/supabase/docker/volumes/functions/main/events/index.ts): `supabase/docker/volumes/functions/main/events/index.ts`

### Native launchers

- [Android host](https://github.com/mohamedbahaaa30/omega-test-/blob/main/android/app/src/main/kotlin/com/omega/omega_app/MainActivity.kt): `android/app/src/main/kotlin/com/omega/omega_app/MainActivity.kt`
- [iOS host](https://github.com/mohamedbahaaa30/omega-test-/blob/main/ios/Runner/AppDelegate.swift): `ios/Runner/AppDelegate.swift`
- [Linux host](https://github.com/mohamedbahaaa30/omega-test-/blob/main/linux/runner/my_application.h): `linux/runner/my_application.h`
- [Windows host](https://github.com/mohamedbahaaa30/omega-test-/blob/main/windows/runner/main.cpp): `windows/runner/main.cpp`
- [macOS plugins](https://github.com/mohamedbahaaa30/omega-test-/blob/main/macos/Flutter/GeneratedPluginRegistrant.swift): `macos/Flutter/GeneratedPluginRegistrant.swift`
- [Linux plugins](https://github.com/mohamedbahaaa30/omega-test-/blob/main/linux/flutter/generated_plugin_registrant.h): `linux/flutter/generated_plugin_registrant.h`
- [Windows plugins](https://github.com/mohamedbahaaa30/omega-test-/blob/main/windows/flutter/generated_plugin_registrant.h): `windows/flutter/generated_plugin_registrant.h`

### Other components

- **Individuals and carers**

## Connections

- Individuals and carers → Flutter app: uses
- Flutter app → Assessments: starts
- Flutter app → Training and progress: opens
- Assessments → Cognitive analysis: produces results
- Flutter app → Memory bank and recall: manages memories
- Flutter app → Accounts and profiles: manages profiles
- Flutter app → Admin question bank: administers
- Flutter app → Supabase backend: uses
- Flutter app → AI analysis proxy: requests analysis
- Flutter app → Gemini token service: requests token
- Function router → Runtime logging: logs through (evidence: `supabase/docker/volumes/functions/main/index.ts`)
- Function router → Memory pressure loop: starts (evidence: `supabase/docker/volumes/functions/main/index.ts`)
- Event worker → Runtime logging: logs through (evidence: `supabase/docker/volumes/functions/main/events/index.ts`)
- Android host → Flutter app: hosts
- iOS host → Flutter app: hosts
- Linux host → Flutter app: hosts
- Windows host → Flutter app: hosts
