# cngroupdk/vse-4it580-2022 architecture

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

- Interactive diagram: https://gitdiagram.com/cngroupdk/vse-4it580-2022
- Repository: https://github.com/cngroupdk/vse-4it580-2022

## Overview

##### Main Components

A. Frontend Layer:
- React Web Application (frontend/)
- Authentication Module
- Quack Module (likely a social media feature)
- Todo Module
- Static Pages Module
- Shared Design System
- Navigation System

B. Backend Layer:
- GraphQL API Server (backend/)
- User Module
- Quack Module
- Database Connection
- Authentication System

C. Mobile Application:
- React Native Pokedex
- Navigation System
- Pokemon Listing
- Pokemon Details
- Resource Management

**[Client Layer]**
- Web Frontend (React)
- Mobile App (React Native)

- v
**[API Layer]**
- GraphQL Server

- v
**[Data Layer]**
- Database

##### Component Relationships

Following interactions:
- Frontend modules communicating with GraphQL backend
- Authentication flow between frontend and backend
- Database interactions from the backend
- Shared resources and utilities

##### Detailed Component Breakdown

Frontend (React):
**[Design System] <- [Shared Components]**
- ↑

**[Core Modules]**
- Auth
- Quack
- Todo
- Static Pages

Backend (Node.js):
**[GraphQL Schema]**
- ↑
**[Resolvers]**
- ↑
**[Modules]**
- User
- Quack
- ↑
**[Database Layer]**

Mobile (React Native):
**[Navigation]**
- ↑
**[Screens]**
- ↑
**[Components]**
- ↑
**[Hooks/Utils]**

##### Additional Elements

- Configuration management (.env files)
- Build and deployment flow
- Authentication flow
- Data flow directions
- External service integrations

## Diagram (Mermaid)

```mermaid
graph TB
    %% Styles and Classes
    classDef frontend fill:#3498db,color:white
    classDef backend fill:#2ecc71,color:white
    classDef database fill:#f1c40f,color:white
    classDef mobile fill:#9b59b6,color:white
    classDef external fill:#95a5a6,color:white

    %% Frontend Layer
    subgraph Frontend
        FE_Core["Frontend Core"]
        FE_Auth["Authentication Module"]
        FE_Quack["Quack Module"]
        FE_Todo["Todo Module"]
        FE_Static["Static Pages"]
        FE_Design["Design System"]
        FE_Nav["Navigation System"]

        FE_Core --> FE_Auth
        FE_Core --> FE_Quack
        FE_Core --> FE_Todo
        FE_Core --> FE_Static
        FE_Design --> FE_Core
        FE_Nav --> FE_Core
    end

    %% Backend Layer
    subgraph Backend
        BE_GraphQL["GraphQL Server"]
        BE_User["User Module"]
        BE_Quack["Quack Module"]
        BE_Auth["Authentication System"]
        BE_DB_Conn["Database Connection"]

        BE_GraphQL --> BE_User
        BE_GraphQL --> BE_Quack
        BE_GraphQL --> BE_Auth
        BE_User --> BE_DB_Conn
        BE_Quack --> BE_DB_Conn
    end

    %% Mobile Layer
    subgraph Mobile
        M_Nav["Navigation System"]
        M_List["Pokemon Listing"]
        M_Detail["Pokemon Details"]
        M_Resource["Resource Management"]

        M_Nav --> M_List
        M_Nav --> M_Detail
        M_Resource --> M_List
        M_Resource --> M_Detail
    end

    %% Database Layer
    DB[(Database)]

    %% Connections between layers
    FE_Core --> BE_GraphQL
    BE_DB_Conn --> DB
    Mobile --> BE_GraphQL

    %% Click Events
    click FE_Auth "https://github.com/cngroupdk/vse-4it580-2022/tree/main/frontend/src/modules/auth"
    click FE_Quack "https://github.com/cngroupdk/vse-4it580-2022/tree/main/frontend/src/modules/quack"
    click FE_Todo "https://github.com/cngroupdk/vse-4it580-2022/tree/main/frontend/src/modules/todo"
    click FE_Static "https://github.com/cngroupdk/vse-4it580-2022/tree/main/frontend/src/modules/static-pages"
    click FE_Design "https://github.com/cngroupdk/vse-4it580-2022/tree/main/frontend/src/shared/design-system"
    click FE_Nav "https://github.com/cngroupdk/vse-4it580-2022/tree/main/frontend/src/shared/navigation"
    click BE_GraphQL "https://github.com/cngroupdk/vse-4it580-2022/blob/main/backend/src/modules/executableSchema.js"
    click BE_User "https://github.com/cngroupdk/vse-4it580-2022/tree/main/backend/src/modules/user"
    click BE_Quack "https://github.com/cngroupdk/vse-4it580-2022/tree/main/backend/src/modules/quack"
    click BE_DB_Conn "https://github.com/cngroupdk/vse-4it580-2022/blob/main/backend/src/libs/connection.js"
    click BE_Auth "https://github.com/cngroupdk/vse-4it580-2022/blob/main/backend/src/libs/token.js"
    click M_Nav "https://github.com/cngroupdk/vse-4it580-2022/tree/main/react-native-pokedex/navigation"
    click M_List "https://github.com/cngroupdk/vse-4it580-2022/blob/main/react-native-pokedex/screens/PokemonListScreen.tsx"
    click M_Detail "https://github.com/cngroupdk/vse-4it580-2022/blob/main/react-native-pokedex/screens/PokemonDetailScreen.tsx"
    click M_Resource "https://github.com/cngroupdk/vse-4it580-2022/blob/main/react-native-pokedex/hooks/useCachedResources.ts"

    %% Style Applications
    class FE_Core,FE_Auth,FE_Quack,FE_Todo,FE_Static,FE_Design,FE_Nav frontend
    class BE_GraphQL,BE_User,BE_Quack,BE_Auth,BE_DB_Conn backend
    class DB database
    class M_Nav,M_List,M_Detail,M_Resource mobile
```
