# tiqdev/valocards architecture

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

- Interactive diagram: https://gitdiagram.com/tiqdev/valocards
- Repository: https://github.com/tiqdev/valocards

## Overview

##### Main Components Identification

The system should be represented with these key components:

a) Frontend Layer (Client-Side):
- Next.js Application Core
- UI Components Layer
- State Management Layer (Redux Toolkit)
- Theme System
- Internationalization System

b) External Services:
- Valorant API Integration
- Image Processing Service
- Vercel Deployment Platform

##### Component Organization

**User Interface Layer**
- Components (UI/UX)
- Core UI Components (from /components)
- Shadcn/UI Components (from /components/ui)

**Application Layer**
- Pages/Routes (from /app)
- Hooks (from /hooks)
- State Management
- Redux Store (from /stores)

**External Services Layer**
- Valorant API
- Vercel Platform

##### Key Relationships to Highlight

- How the Redux store connects to various components
- Data flow from Valorant API to the application
- Demonstrate the theme system's influence across components

##### Specific Implementation Details

- Rectangle: React/Next.js components
- Hexagon: External services
- Rounded Rectangle: UI components

##### Important Technical Elements

- Next.js 13+ App Router architecture
- Tailwind CSS styling system
- Redux Toolkit state flow
- API integration points
- Theme switching mechanism
- Language selection system
- Image processing pipeline

Create distinct sections for:
a) Core Application
- Relationship between pages, components, and stores
- Form handling and preview generation flow

b) UI Component System
- Demonstrate the hierarchy of UI components
- How Shadcn/UI integrates with custom components

c) State Management
- Redux store structure
- Action/reducer flow

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph Client
        NextCore["Next.js Core"]
        Layout["Main Layout"]
        HomePage["Home Page"]
        
        subgraph UILayer["UI Components Layer"]
            CoreUI["Core UI Components"]
            ShadcnUI["Shadcn/UI Components"]
            FormSystem["Form System"]
            PreviewSystem["Preview System"]
            Navigation["Navigation Components"]
        end
        
        subgraph StateLayer["State Management"]
            ReduxStore[(Redux Store)]
            Actions["Store Actions"]
            Hooks["Store Hooks"]
        end
        
        subgraph Systems["Core Systems"]
            ThemeSystem["Theme System"]
            I18nSystem["Internationalization"]
            MobileSystem["Mobile Responsiveness"]
            Utils["Utility Layer"]
            Styles["Styling System"]
        end
    end
    
    subgraph External["External Services"]
        ValorantAPI["Valorant API"]
        Vercel["Vercel Platform"]
    end
    
    %% Relationships
    NextCore --> Layout
    Layout --> HomePage
    Layout --> UILayer
    Layout --> Systems
    
    UILayer --> StateLayer
    StateLayer --> UILayer
    
    ValorantAPI --> StateLayer
    StateLayer --> ValorantAPI
    
    %% Click events
    click NextCore "https://github.com/tiqdev/valocards/tree/main/app"
    click Layout "https://github.com/tiqdev/valocards/blob/main/app/layout.jsx"
    click HomePage "https://github.com/tiqdev/valocards/blob/main/app/page.jsx"
    click CoreUI "https://github.com/tiqdev/valocards/tree/main/components"
    click ShadcnUI "https://github.com/tiqdev/valocards/tree/main/components/ui"
    click ReduxStore "https://github.com/tiqdev/valocards/tree/main/stores"
    click Actions "https://github.com/tiqdev/valocards/blob/main/stores/main/actions.jsx"
    click Hooks "https://github.com/tiqdev/valocards/blob/main/stores/main/hooks.jsx"
    click ThemeSystem "https://github.com/tiqdev/valocards/blob/main/components/theme-provider.jsx"
    click I18nSystem "https://github.com/tiqdev/valocards/blob/main/components/select-lang.jsx"
    click FormSystem "https://github.com/tiqdev/valocards/blob/main/components/form-card.jsx"
    click PreviewSystem "https://github.com/tiqdev/valocards/blob/main/components/preview-card.jsx"
    click Navigation "https://github.com/tiqdev/valocards/blob/main/components/menu-bar.jsx"
    click MobileSystem "https://github.com/tiqdev/valocards/blob/main/hooks/useIsMobile.jsx"
    click Utils "https://github.com/tiqdev/valocards/blob/main/lib/utils.js"
    click Styles "https://github.com/tiqdev/valocards/blob/main/styles/globals.css"
    
    %% Styling
    classDef default fill:#f9f9f9,stroke:#333,stroke-width:2px
    classDef external fill:#fcf3cf,stroke:#333
    classDef system fill:#d5f5e3,stroke:#333
    classDef store fill:#d6eaf8,stroke:#333
    
    class ValorantAPI,Vercel external
    class ThemeSystem,I18nSystem,MobileSystem,Utils,Styles system
    class ReduxStore,Actions,Hooks store
    
    %% Legend
    subgraph Legend
        L1["Component"]
        L2["External Service"]:::external
        L3["System"]:::system
        L4["Store"]:::store
    end
```
