# aurangzaibramzan/anime-jisho architecture

> Architecture diagram of the GitHub repository aurangzaibramzan/anime-jisho, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-01-17). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/aurangzaibramzan/anime-jisho
- Repository: https://github.com/aurangzaibramzan/anime-jisho

## Overview

##### Main System Components

a) Client Layer (Mobile Applications)
- React Native (v0.59.8) as the bridge between them
- Main app navigation structure (MainTabNavigator)

b) Application Layer
Into three main sections:

##### Container Layer (Business Logic)
- AllTimePopularAnime
- HighestRatedAnime
- HighlyAnticipatingAnime
- PopularAnime
- SearchAnime/Character containers

##### Widget Layer (Reusable Components)
- EmptyList
- FlatList
- Image
- Loading
- NetworkError
- Text

c) Data Layer
- GraphQL Client (Apollo Client v2.5.1)
- GraphQL Queries (src/graphql/queries)
- Different query types (AnimeDetails, CharacterDetails, etc.)

##### Interaction Flows
- User interaction flow from UI components to containers
- Data flow from containers through Apollo Client to the GraphQL backend
- Response flow back to the UI

##### Technical Stack Indicators
Badges/labels showing:
- React Native v0.59.8
- React v16.8.3
- GraphQL v14.1.1
- Apollo Client v2.5.1
- Styled Components

##### Architecture Patterns
Highlight:
- Container/Component pattern
- GraphQL query organization
- Widget reusability
- Navigation structure

##### Notes about key architectural decisions

Tools Recommendation:
- Maintain consistent spacing and alignment
- Export in both SVG and PNG formats for documentation

Remember to:
- Clear component boundaries
- GraphQL integration points
- Error handling and loading states
- Document the navigation flow

This structure will provide a clear understanding of how the anime exploration app is architected, from UI components through to data fetching, while maintaining a focus on the React Native and GraphQL integration points that are central to the application's functionality.

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph "Client Layer"
        iOS["iOS Client"]:::client
        Android["Android Client"]:::client
        RN["React Native v0.59.8"]:::framework
    end

    subgraph "Application Layer"
        subgraph "Navigation"
            MN["Main Navigator"]
            MTN["Main Tab Navigator"]
        end

        subgraph "Presentation Layer"
            MS["MainScreen"]
            AL["AnimeList"]
            SA["SearchAnime"]
            CH["Character"]
        end

        subgraph "Container Layer"
            ATPA["AllTimePopularAnime"]
            HRA["HighestRatedAnime"]
            HAA["HighlyAnticipatingAnime"]
            PA["PopularAnime"]
            SAC["SearchAnime Container"]
            SCC["SearchCharacter Container"]
        end

        subgraph "Widget Layer"
            EL["EmptyList"]
            FL["FlatList"]
            IC["Icon"]
            IM["Image"]
            LD["Loading"]
            NE["NetworkError"]
            TX["Text"]
        end
    end

    subgraph "Data Layer"
        AC["Apollo Client v2.5.1"]:::graphql
        GQ["GraphQL Queries"]:::graphql
        AD["AnimeDetails"]:::graphql
        CD["CharacterDetails"]:::graphql
        SQ["SearchQueries"]:::graphql
        PQ["PopularAnimeQueries"]:::graphql
    end

    iOS & Android --> RN
    RN --> MN
    MN --> MTN
    MTN --> MS & AL & SA & CH
    MS & AL & SA & CH --> ATPA & HRA & HAA & PA & SAC & SCC
    ATPA & HRA & HAA & PA & SAC & SCC --> EL & FL & IC & IM & LD & NE & TX
    ATPA & HRA & HAA & PA & SAC & SCC --> AC
    AC --> GQ
    GQ --> AD & CD & SQ & PQ

    %% Click Events
    click iOS "https://github.com/AurangzaibRamzan/Anime-jisho/tree/master/ios/anime_jisho"
    click Android "https://github.com/AurangzaibRamzan/Anime-jisho/tree/master/android/app"
    click MS "https://github.com/AurangzaibRamzan/Anime-jisho/tree/master/src/components/MainScreen"
    click AL "https://github.com/AurangzaibRamzan/Anime-jisho/tree/master/src/components/AnimeList"
    click SA "https://github.com/AurangzaibRamzan/Anime-jisho/tree/master/src/components/SearchAnime"
    click CH "https://github.com/AurangzaibRamzan/Anime-jisho/tree/master/src/components/Character"
    click ATPA "https://github.com/AurangzaibRamzan/Anime-jisho/tree/master/src/containers/AllTimePopularAnime"
    click HRA "https://github.com/AurangzaibRamzan/Anime-jisho/tree/master/src/containers/HighestRatedAnime"
    click HAA "https://github.com/AurangzaibRamzan/Anime-jisho/tree/master/src/containers/HighlyAnticiptingAnime"
    click PA "https://github.com/AurangzaibRamzan/Anime-jisho/tree/master/src/containers/PopularAnime"
    click SAC "https://github.com/AurangzaibRamzan/Anime-jisho/tree/master/src/containers/SearchAnime"
    click SCC "https://github.com/AurangzaibRamzan/Anime-jisho/tree/master/src/containers/SearchCharactor"
    click EL "https://github.com/AurangzaibRamzan/Anime-jisho/tree/master/src/widget/EmptyList"
    click FL "https://github.com/AurangzaibRamzan/Anime-jisho/tree/master/src/widget/FlatList"
    click IC "https://github.com/AurangzaibRamzan/Anime-jisho/tree/master/src/widget/Icon"
    click IM "https://github.com/AurangzaibRamzan/Anime-jisho/tree/master/src/widget/Image"
    click LD "https://github.com/AurangzaibRamzan/Anime-jisho/tree/master/src/widget/Loading"
    click NE "https://github.com/AurangzaibRamzan/Anime-jisho/tree/master/src/widget/NetworkError"
    click TX "https://github.com/AurangzaibRamzan/Anime-jisho/tree/master/src/widget/Text"
    click MN "https://github.com/AurangzaibRamzan/Anime-jisho/blob/master/src/containers/app/Navigator.js"
    click MTN "https://github.com/AurangzaibRamzan/Anime-jisho/blob/master/src/containers/app/MainTabNavigator.js"
    click GQ "https://github.com/AurangzaibRamzan/Anime-jisho/blob/master/src/grahql/quries.js"
    click AD "https://github.com/AurangzaibRamzan/Anime-jisho/blob/master/src/grahql/quries.js/AnimeDetails.js"
    click CD "https://github.com/AurangzaibRamzan/Anime-jisho/blob/master/src/grahql/quries.js/CharacterDetails.js"
    click SQ "https://github.com/AurangzaibRamzan/Anime-jisho/blob/master/src/grahql/quries.js/SearchAnime.js"
    click PQ "https://github.com/AurangzaibRamzan/Anime-jisho/blob/master/src/grahql/quries.js/popularAnime.js"

    %% Styling
    classDef client fill:#B2D7DA
    classDef framework fill:#D4E6B5
    classDef graphql fill:#FFE1A8
    
    %% Legend
    subgraph Legend
        C1["Client Components"]:::client
        F1["Framework"]:::framework
        G1["GraphQL Components"]:::graphql
    end
```
