# glebweider/animax architecture

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

- Interactive diagram: https://gitdiagram.com/glebweider/animax
- Repository: https://github.com/glebweider/animax

## Overview

Animax is a React Native anime discovery, tracking, and streaming app, with account, community, premium, and settings features. The principal user journey is to browse or search anime, open a title, and watch episodes; other screens support lists, comments, recommendations, and account management. The sampled entry point shows navigation, Redux, alerts, and Shikimori GraphQL setup. The README documents separate anime, episode/player, and main API services. Many screen-to-API calls were not shown, so those links are marked unverified rather than presented as confirmed calls.

Main entry points: [`App.tsx`](https://github.com/glebweider/animax/blob/main/App.tsx) (App entry), [`src/utils/api/rest/api.ts`](https://github.com/glebweider/animax/blob/main/src/utils/api/rest/api.ts) (Main REST API), [`src/utils/api/graphql`](https://github.com/glebweider/animax/tree/main/src/utils/api/graphql) (Anime GraphQL), [`src/screens/Tab/HomeScreen.tsx`](https://github.com/glebweider/animax/blob/main/src/screens/Tab/HomeScreen.tsx) (Home discovery)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["App shell"]
  node_app_entry["App entry<br/>[App.tsx]"]
  node_navigation["Screen navigation<br/>[StackNavigator.tsx]"]
  node_state["App state<br/>[store.ts]"]
  node_alerts["Alert context<br/>[AlertContext.tsx]"]
end

subgraph group_anime["Anime discovery"]
  node_home["Home discovery<br/>[HomeScreen.tsx]"]
  node_search["Anime search"]
  node_anime_detail["Anime details<br/>[AnimeScreen.tsx]"]
  node_release["New releases<br/>[ReleaseScreen.tsx]"]
  node_top_hits["Top hits"]
  node_recommendations["Recommendations"]
  node_watching["Episode playback"]
  node_my_list["Anime list<br/>[MyListScreen.tsx]"]
end

subgraph group_account["Account and community"]
  node_auth["Sign-in and setup"]
  node_profile["User profile<br/>[ProfileScreen.tsx]"]
  node_comments["Anime comments<br/>[CommentsScreen.tsx]"]
  node_premium["Premium plans<br/>[PaymentScreen.tsx]"]
  node_settings["Settings and support<br/>[SettingsScreen.tsx]"]
end

subgraph group_services["Data and integrations"]
  node_graphql["Anime GraphQL"]
  node_rest["Main REST API<br/>[api.ts]"]
  node_anime_service["Anime catalog service"]
  node_episode_service["Episode and player service"]
  node_local_storage[("Local preferences<br/>[storage.ts]")]
end

node_viewer(("App user"))

node_viewer -->|"opens"| node_app_entry
node_app_entry -->|"renders"| node_navigation
node_app_entry -->|"provides state"| node_state
node_app_entry -->|"provides alerts"| node_alerts
node_app_entry -->|"configures client"| node_graphql
node_app_entry -->|"reads NSFW setting"| node_local_storage
node_viewer -.->|"browses"| node_home
node_viewer -.->|"searches"| node_search
node_viewer -.->|"opens title"| node_anime_detail
node_anime_detail -.->|"gets episodes"| node_watching
node_home -.->|"loads anime"| node_graphql
node_search -.->|"searches catalog"| node_graphql
node_release -.->|"loads releases"| node_rest
node_top_hits -.->|"loads rankings"| node_graphql
node_recommendations -.->|"loads suggestions"| node_graphql
node_viewer -.->|"tracks titles"| node_my_list
node_my_list -.->|"updates list"| node_rest
node_viewer -.->|"authenticates"| node_auth
node_auth -.->|"uses account API"| node_rest
node_viewer -.->|"views profile"| node_profile
node_profile -.->|"loads profile"| node_rest
node_viewer -.->|"joins discussion"| node_comments
node_comments -.->|"uses comments API"| node_rest
node_viewer -.->|"chooses plan"| node_premium
node_premium -.->|"uses premium API"| node_rest
node_viewer -.->|"manages account"| node_settings
node_settings -.->|"updates settings"| node_rest
node_graphql -.->|"queries catalog"| node_anime_service
node_watching -.->|"requests episodes"| node_episode_service

click node_app_entry "https://github.com/glebweider/animax/blob/main/App.tsx"
click node_navigation "https://github.com/glebweider/animax/blob/main/src/screens/Stack/StackNavigator.tsx"
click node_state "https://github.com/glebweider/animax/blob/main/src/redux/store.ts"
click node_alerts "https://github.com/glebweider/animax/blob/main/src/components/alert/AlertContext.tsx"
click node_home "https://github.com/glebweider/animax/blob/main/src/screens/Tab/HomeScreen.tsx"
click node_search "https://github.com/glebweider/animax/blob/main/src/screens/Stack/AnimeSearchScreen.tsx"
click node_anime_detail "https://github.com/glebweider/animax/blob/main/src/screens/Stack/AnimeScreen.tsx"
click node_release "https://github.com/glebweider/animax/blob/main/src/screens/Tab/ReleaseScreen.tsx"
click node_top_hits "https://github.com/glebweider/animax/blob/main/src/screens/Stack/TopHitsAnimeScreen.tsx"
click node_recommendations "https://github.com/glebweider/animax/blob/main/src/screens/Stack/RecomendationsAnimeScreen.tsx"
click node_watching "https://github.com/glebweider/animax/blob/main/src/utils/api/rest/anime/getAnimeEpisodes.ts"
click node_my_list "https://github.com/glebweider/animax/blob/main/src/screens/Tab/MyListScreen.tsx"
click node_auth "https://github.com/glebweider/animax/blob/main/src/screens/Stack/Auth/AuthSignInScreen.tsx"
click node_profile "https://github.com/glebweider/animax/blob/main/src/screens/Tab/ProfileScreen.tsx"
click node_comments "https://github.com/glebweider/animax/blob/main/src/screens/Stack/CommentsScreen.tsx"
click node_premium "https://github.com/glebweider/animax/blob/main/src/screens/Stack/Premium/PaymentScreen.tsx"
click node_settings "https://github.com/glebweider/animax/blob/main/src/screens/Stack/Settings/SettingsScreen.tsx"
click node_graphql "https://github.com/glebweider/animax/tree/main/src/utils/api/graphql"
click node_rest "https://github.com/glebweider/animax/blob/main/src/utils/api/rest/api.ts"
click node_local_storage "https://github.com/glebweider/animax/blob/main/src/utils/functions/storage.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_app_entry,node_navigation,node_state,node_alerts,node_viewer toneBlue
class node_home,node_search,node_anime_detail,node_release,node_top_hits,node_recommendations,node_watching,node_my_list toneAmber
class node_auth,node_profile,node_comments,node_premium,node_settings toneMint
class node_graphql,node_rest,node_anime_service,node_episode_service,node_local_storage toneRose
```

## Components

### App shell

- [App entry](https://github.com/glebweider/animax/blob/main/App.tsx): `App.tsx`
- [Screen navigation](https://github.com/glebweider/animax/blob/main/src/screens/Stack/StackNavigator.tsx): `src/screens/Stack/StackNavigator.tsx`
- [App state](https://github.com/glebweider/animax/blob/main/src/redux/store.ts): `src/redux/store.ts`
- [Alert context](https://github.com/glebweider/animax/blob/main/src/components/alert/AlertContext.tsx): `src/components/alert/AlertContext.tsx`

### Anime discovery

- [Home discovery](https://github.com/glebweider/animax/blob/main/src/screens/Tab/HomeScreen.tsx): `src/screens/Tab/HomeScreen.tsx`
- [Anime search](https://github.com/glebweider/animax/blob/main/src/screens/Stack/AnimeSearchScreen.tsx): `src/screens/Stack/AnimeSearchScreen.tsx`
- [Anime details](https://github.com/glebweider/animax/blob/main/src/screens/Stack/AnimeScreen.tsx): `src/screens/Stack/AnimeScreen.tsx`
- [New releases](https://github.com/glebweider/animax/blob/main/src/screens/Tab/ReleaseScreen.tsx): `src/screens/Tab/ReleaseScreen.tsx`
- [Top hits](https://github.com/glebweider/animax/blob/main/src/screens/Stack/TopHitsAnimeScreen.tsx): `src/screens/Stack/TopHitsAnimeScreen.tsx`
- [Recommendations](https://github.com/glebweider/animax/blob/main/src/screens/Stack/RecomendationsAnimeScreen.tsx): `src/screens/Stack/RecomendationsAnimeScreen.tsx`
- [Episode playback](https://github.com/glebweider/animax/blob/main/src/utils/api/rest/anime/getAnimeEpisodes.ts): `src/utils/api/rest/anime/getAnimeEpisodes.ts`
- [Anime list](https://github.com/glebweider/animax/blob/main/src/screens/Tab/MyListScreen.tsx): `src/screens/Tab/MyListScreen.tsx`

### Account and community

- [Sign-in and setup](https://github.com/glebweider/animax/blob/main/src/screens/Stack/Auth/AuthSignInScreen.tsx): `src/screens/Stack/Auth/AuthSignInScreen.tsx`
- [User profile](https://github.com/glebweider/animax/blob/main/src/screens/Tab/ProfileScreen.tsx): `src/screens/Tab/ProfileScreen.tsx`
- [Anime comments](https://github.com/glebweider/animax/blob/main/src/screens/Stack/CommentsScreen.tsx): `src/screens/Stack/CommentsScreen.tsx`
- [Premium plans](https://github.com/glebweider/animax/blob/main/src/screens/Stack/Premium/PaymentScreen.tsx): `src/screens/Stack/Premium/PaymentScreen.tsx`
- [Settings and support](https://github.com/glebweider/animax/blob/main/src/screens/Stack/Settings/SettingsScreen.tsx): `src/screens/Stack/Settings/SettingsScreen.tsx`

### Data and integrations

- [Anime GraphQL](https://github.com/glebweider/animax/tree/main/src/utils/api/graphql): `src/utils/api/graphql`
- [Main REST API](https://github.com/glebweider/animax/blob/main/src/utils/api/rest/api.ts): `src/utils/api/rest/api.ts`
- **Anime catalog service**
- **Episode and player service**
- [Local preferences](https://github.com/glebweider/animax/blob/main/src/utils/functions/storage.ts): `src/utils/functions/storage.ts`

### Other components

- **App user**

## Connections

- App user → App entry: opens
- App entry → Screen navigation: renders (evidence: `App.tsx`)
- App entry → App state: provides state (evidence: `App.tsx`)
- App entry → Alert context: provides alerts (evidence: `App.tsx`)
- App entry → Anime GraphQL: configures client (evidence: `App.tsx`)
- App entry → Local preferences: reads NSFW setting (evidence: `App.tsx`)
- App user → Home discovery: browses
- App user → Anime search: searches
- App user → Anime details: opens title
- Anime details → Episode playback: gets episodes
- Home discovery → Anime GraphQL: loads anime
- Anime search → Anime GraphQL: searches catalog
- New releases → Main REST API: loads releases
- Top hits → Anime GraphQL: loads rankings
- Recommendations → Anime GraphQL: loads suggestions
- App user → Anime list: tracks titles
- Anime list → Main REST API: updates list
- App user → Sign-in and setup: authenticates
- Sign-in and setup → Main REST API: uses account API
- App user → User profile: views profile
- User profile → Main REST API: loads profile
- App user → Anime comments: joins discussion
- Anime comments → Main REST API: uses comments API
- App user → Premium plans: chooses plan
- Premium plans → Main REST API: uses premium API
- App user → Settings and support: manages account
- Settings and support → Main REST API: updates settings
- Anime GraphQL → Anime catalog service: queries catalog
- Episode playback → Episode and player service: requests episodes
