# ghassanwc/wainzo architecture

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

- Interactive diagram: https://gitdiagram.com/ghassanwc/wainzo
- Repository: https://github.com/ghassanwc/wainzo

## Overview

Wainzo is a Flutter social app organized around geographic targeting and intentional viewing: creators describe and target a post, AI prepares an editable profile and preview, and viewers choose to watch or skip. The README documents the major product stages and learning loop; the tree supports the named feature, service, and data boundaries. Sampled source was limited to platform scaffolding and asset-generation tools, so internal call wiring beyond documented behavior is not asserted.

Main entry points: [`lib/features/create/create_screen.dart`](https://github.com/ghassanwc/wainzo/blob/main/lib/features/create/create_screen.dart) (Post composer), [`lib/data/repositories/repositories.dart`](https://github.com/ghassanwc/wainzo/blob/main/lib/data/repositories/repositories.dart) (Repository boundary), [`lib/features/feed/feed_screen.dart`](https://github.com/ghassanwc/wainzo/blob/main/lib/features/feed/feed_screen.dart) (Preview feed), [`lib/features/explore/explore_screen.dart`](https://github.com/ghassanwc/wainzo/blob/main/lib/features/explore/explore_screen.dart) (World map explore)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["App navigation"]
  node_entry["Flutter entry<br/>[main.dart]"]
  node_app_root["App setup<br/>[app.dart]"]
  node_router["Routes<br/>[app_router.dart]"]
  node_shell["Navigation shell<br/>[root_shell.dart]"]
end

subgraph group_discovery["Explore and watch"]
  node_explore["World map explore"]
  node_map_data["Offline map data"]
  node_country["Country content"]
  node_feed["Preview feed<br/>[feed_screen.dart]"]
  node_watch["Video watch<br/>[watch_screen.dart]"]
  node_post_actions["Watch and skip signals"]
end

subgraph group_creation["Creation and publishing"]
  node_create["Post composer<br/>[create_screen.dart]"]
  node_media["Media selection<br/>[media_step.dart]"]
  node_intent["Post intent<br/>[intent_step.dart]"]
  node_targeting["Country targeting"]
  node_review["AI review and preview<br/>[review_step.dart]"]
end

subgraph group_identity["People and learning"]
  node_profile["Creator profile and reach"]
  node_activity["Geographic activity"]
  node_settings["Learned interests"]
end

subgraph group_backend["Services and data"]
  node_recommend["Recommendation ranking"]
  node_ai["AI profiling<br/>[ai_service.dart]"]
  node_moderation["Content moderation"]
  node_repositories["Repository boundary<br/>[repositories.dart]"]
  node_remote["Remote repositories"]
  node_mock["Mock repositories"]
  node_interest["Interest profile"]
  node_api["HTTP client<br/>[api_client.dart]"]
end

node_viewer(("Viewer / creator"))
node_service(("Backend service"))

node_viewer -->|"opens app"| node_entry
node_entry -->|"starts"| node_app_root
node_app_root -->|"configures routes"| node_router
node_router -->|"opens shell"| node_shell
node_shell -->|"shows explore"| node_explore
node_explore -->|"draws offline map"| node_map_data
node_explore -->|"selects country"| node_country
node_country -->|"opens content"| node_feed
node_feed -->|"requests previews"| node_recommend
node_recommend -->|"loads candidates"| node_repositories
node_feed -->|"chooses watch"| node_watch
node_feed -->|"chooses skip"| node_post_actions
node_post_actions -->|"records signal"| node_recommend
node_viewer -->|"creates post"| node_create
node_create -->|"collects media"| node_media
node_create -->|"collects intent"| node_intent
node_create -->|"collects countries"| node_targeting
node_create -->|"requests profile and preview"| node_ai
node_create -->|"checks content"| node_moderation
node_create -->|"presents for approval"| node_review
node_review -->|"publishes approved post"| node_repositories
node_profile -->|"loads creator posts"| node_repositories
node_activity -->|"loads reach activity"| node_repositories
node_settings -->|"shows learned facets"| node_interest
node_settings -->|"deletes learned data"| node_repositories
node_repositories -.->|"selects remote implementation"| node_remote
node_repositories -.->|"selects mock implementation"| node_mock
node_remote -->|"makes requests"| node_api
node_api -->|"sends HTTP"| node_service

click node_entry "https://github.com/ghassanwc/wainzo/blob/main/lib/main.dart"
click node_app_root "https://github.com/ghassanwc/wainzo/blob/main/lib/app.dart"
click node_router "https://github.com/ghassanwc/wainzo/blob/main/lib/core/routing/app_router.dart"
click node_shell "https://github.com/ghassanwc/wainzo/blob/main/lib/features/shell/root_shell.dart"
click node_explore "https://github.com/ghassanwc/wainzo/blob/main/lib/features/explore/explore_screen.dart"
click node_map_data "https://github.com/ghassanwc/wainzo/blob/main/lib/data/geo/world_outlines.dart"
click node_country "https://github.com/ghassanwc/wainzo/blob/main/lib/features/country/country_screen.dart"
click node_feed "https://github.com/ghassanwc/wainzo/blob/main/lib/features/feed/feed_screen.dart"
click node_recommend "https://github.com/ghassanwc/wainzo/blob/main/lib/services/ranking/recommendation_service.dart"
click node_watch "https://github.com/ghassanwc/wainzo/blob/main/lib/features/watch/watch_screen.dart"
click node_post_actions "https://github.com/ghassanwc/wainzo/blob/main/lib/features/post/post_actions_sheet.dart"
click node_create "https://github.com/ghassanwc/wainzo/blob/main/lib/features/create/create_screen.dart"
click node_media "https://github.com/ghassanwc/wainzo/blob/main/lib/features/create/steps/media_step.dart"
click node_intent "https://github.com/ghassanwc/wainzo/blob/main/lib/features/create/steps/intent_step.dart"
click node_targeting "https://github.com/ghassanwc/wainzo/blob/main/lib/features/create/steps/countries_step.dart"
click node_review "https://github.com/ghassanwc/wainzo/blob/main/lib/features/create/steps/review_step.dart"
click node_ai "https://github.com/ghassanwc/wainzo/blob/main/lib/services/ai/ai_service.dart"
click node_moderation "https://github.com/ghassanwc/wainzo/blob/main/lib/services/moderation/moderation_service.dart"
click node_repositories "https://github.com/ghassanwc/wainzo/blob/main/lib/data/repositories/repositories.dart"
click node_remote "https://github.com/ghassanwc/wainzo/blob/main/lib/data/remote/remote_repositories.dart"
click node_mock "https://github.com/ghassanwc/wainzo/blob/main/lib/data/mock/mock_repositories.dart"
click node_profile "https://github.com/ghassanwc/wainzo/blob/main/lib/features/profile/profile_screen.dart"
click node_activity "https://github.com/ghassanwc/wainzo/blob/main/lib/features/activity/activity_screen.dart"
click node_settings "https://github.com/ghassanwc/wainzo/blob/main/lib/features/settings/settings_screen.dart"
click node_interest "https://github.com/ghassanwc/wainzo/blob/main/lib/models/interest_profile.dart"
click node_api "https://github.com/ghassanwc/wainzo/blob/main/lib/core/network/api_client.dart"

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_entry,node_app_root,node_router,node_shell,node_viewer toneBlue
class node_explore,node_map_data,node_country,node_feed,node_watch,node_post_actions toneAmber
class node_create,node_media,node_intent,node_targeting,node_review toneMint
class node_profile,node_activity,node_settings toneRose
class node_recommend,node_ai,node_moderation,node_repositories,node_remote,node_mock,node_interest,node_api,node_service toneIndigo
```

## Components

### App navigation

- [Flutter entry](https://github.com/ghassanwc/wainzo/blob/main/lib/main.dart): `lib/main.dart`
- [App setup](https://github.com/ghassanwc/wainzo/blob/main/lib/app.dart): `lib/app.dart`
- [Routes](https://github.com/ghassanwc/wainzo/blob/main/lib/core/routing/app_router.dart): `lib/core/routing/app_router.dart`
- [Navigation shell](https://github.com/ghassanwc/wainzo/blob/main/lib/features/shell/root_shell.dart): `lib/features/shell/root_shell.dart`

### Explore and watch

- [World map explore](https://github.com/ghassanwc/wainzo/blob/main/lib/features/explore/explore_screen.dart): `lib/features/explore/explore_screen.dart`
- [Offline map data](https://github.com/ghassanwc/wainzo/blob/main/lib/data/geo/world_outlines.dart): `lib/data/geo/world_outlines.dart`
- [Country content](https://github.com/ghassanwc/wainzo/blob/main/lib/features/country/country_screen.dart): `lib/features/country/country_screen.dart`
- [Preview feed](https://github.com/ghassanwc/wainzo/blob/main/lib/features/feed/feed_screen.dart): `lib/features/feed/feed_screen.dart`
- [Video watch](https://github.com/ghassanwc/wainzo/blob/main/lib/features/watch/watch_screen.dart): `lib/features/watch/watch_screen.dart`
- [Watch and skip signals](https://github.com/ghassanwc/wainzo/blob/main/lib/features/post/post_actions_sheet.dart): `lib/features/post/post_actions_sheet.dart`

### Creation and publishing

- [Post composer](https://github.com/ghassanwc/wainzo/blob/main/lib/features/create/create_screen.dart): `lib/features/create/create_screen.dart`
- [Media selection](https://github.com/ghassanwc/wainzo/blob/main/lib/features/create/steps/media_step.dart): `lib/features/create/steps/media_step.dart`
- [Post intent](https://github.com/ghassanwc/wainzo/blob/main/lib/features/create/steps/intent_step.dart): `lib/features/create/steps/intent_step.dart`
- [Country targeting](https://github.com/ghassanwc/wainzo/blob/main/lib/features/create/steps/countries_step.dart): `lib/features/create/steps/countries_step.dart`
- [AI review and preview](https://github.com/ghassanwc/wainzo/blob/main/lib/features/create/steps/review_step.dart): `lib/features/create/steps/review_step.dart`

### People and learning

- [Creator profile and reach](https://github.com/ghassanwc/wainzo/blob/main/lib/features/profile/profile_screen.dart): `lib/features/profile/profile_screen.dart`
- [Geographic activity](https://github.com/ghassanwc/wainzo/blob/main/lib/features/activity/activity_screen.dart): `lib/features/activity/activity_screen.dart`
- [Learned interests](https://github.com/ghassanwc/wainzo/blob/main/lib/features/settings/settings_screen.dart): `lib/features/settings/settings_screen.dart`

### Services and data

- [Recommendation ranking](https://github.com/ghassanwc/wainzo/blob/main/lib/services/ranking/recommendation_service.dart): `lib/services/ranking/recommendation_service.dart`
- [AI profiling](https://github.com/ghassanwc/wainzo/blob/main/lib/services/ai/ai_service.dart): `lib/services/ai/ai_service.dart`
- [Content moderation](https://github.com/ghassanwc/wainzo/blob/main/lib/services/moderation/moderation_service.dart): `lib/services/moderation/moderation_service.dart`
- [Repository boundary](https://github.com/ghassanwc/wainzo/blob/main/lib/data/repositories/repositories.dart): `lib/data/repositories/repositories.dart`
- [Remote repositories](https://github.com/ghassanwc/wainzo/blob/main/lib/data/remote/remote_repositories.dart): `lib/data/remote/remote_repositories.dart`
- [Mock repositories](https://github.com/ghassanwc/wainzo/blob/main/lib/data/mock/mock_repositories.dart): `lib/data/mock/mock_repositories.dart`
- [Interest profile](https://github.com/ghassanwc/wainzo/blob/main/lib/models/interest_profile.dart): `lib/models/interest_profile.dart`
- [HTTP client](https://github.com/ghassanwc/wainzo/blob/main/lib/core/network/api_client.dart): `lib/core/network/api_client.dart`

### Other components

- **Viewer / creator**
- **Backend service**

## Connections

- Viewer / creator → Flutter entry: opens app
- Flutter entry → App setup: starts
- App setup → Routes: configures routes
- Routes → Navigation shell: opens shell
- Navigation shell → World map explore: shows explore
- World map explore → Offline map data: draws offline map
- World map explore → Country content: selects country
- Country content → Preview feed: opens content
- Preview feed → Recommendation ranking: requests previews
- Recommendation ranking → Repository boundary: loads candidates
- Preview feed → Video watch: chooses watch
- Preview feed → Watch and skip signals: chooses skip
- Watch and skip signals → Recommendation ranking: records signal
- Viewer / creator → Post composer: creates post
- Post composer → Media selection: collects media
- Post composer → Post intent: collects intent
- Post composer → Country targeting: collects countries
- Post composer → AI profiling: requests profile and preview
- Post composer → Content moderation: checks content
- Post composer → AI review and preview: presents for approval
- AI review and preview → Repository boundary: publishes approved post
- Creator profile and reach → Repository boundary: loads creator posts
- Geographic activity → Repository boundary: loads reach activity
- Learned interests → Interest profile: shows learned facets
- Learned interests → Repository boundary: deletes learned data
- Repository boundary → Remote repositories: selects remote implementation
- Repository boundary → Mock repositories: selects mock implementation
- Remote repositories → HTTP client: makes requests
- HTTP client → Backend service: sends HTTP
