# arvindcs/swiftui-animation architecture

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

- Interactive diagram: https://gitdiagram.com/arvindcs/swiftui-animation
- Repository: https://github.com/arvindcs/swiftui-animation

## Overview

##### Project Type and Purpose
This is a collection of iOS UI animations and templates built using SwiftUI, featuring various interactive components and social media app templates.

##### Main System Components

A. Core Animation Modules
- Basic animations (dots, rings, rotations)
- Complex animations (side menu, card swipes)
- Gesture-based animations

B. Template Applications
- Separate components for each social media template:
- Instagram template
- Facebook template
- LinkedIn template
- Tinder template

C. Reusable Components
- UI Components layer:
- Custom buttons
- Loading indicators
- Menu systems
- Card views

**[Core Animation Engine] ←→ [Animation Controllers]**
- ↑                         ↑
- ↓                         ↓
**[Reusable Components] ←→ [Template Applications]**
- ↑                         ↑
- ↓                         ↓
**[SwiftUI Framework] ←→ [Asset Management]**

##### Component Relationships

- Data flow between components
- Inheritance relationships
- Dependencies
- User interaction flow

##### Detailed Component Breakdown

A. Animation Modules:
**[Animation Engine]**
- Basic Animations
- Dots Animation
- Ring Animation
- Circle Rotation
- Complex Animations
- Side Menu
- Card Swipe
- Loading Spinners

B. Template Structure:
**[Template Apps]**
- Social Media Templates
- Instagram
- Facebook
- LinkedIn
- Feature Templates
- Side Menu
- Tabbar
- Cards

##### Implementation Notes

- Notes for key architectural decisions:
- SwiftUI as the primary framework
- Modular animation system
- Reusable component architecture
- Asset management strategy

##### Integration points with SwiftUI

This system design will help developers understand the project's architecture and how different components interact while maintaining a clean and modular structure.

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph Core["Core Animation System"]
        AE["Animation Engine"]
        BA["Basic Animations"]
        CA["Complex Animations"]
        LA["Loading Animations"]
    end

    subgraph Templates["Template Applications"]
        SocialTemplates["Social Media Templates"]
        IT["Instagram Template"]:::template
        FT["Facebook Template"]:::template
        LT["LinkedIn Template"]:::template
        TT["Tinder Template"]:::template
    end

    subgraph Components["Reusable Components"]
        UI["UI Components"]
        MS["Menu Systems"]:::menu
        CV["Card Views"]:::card
        TB["Tabbar"]:::ui
        Toggle["Custom Toggle"]:::ui
    end

    subgraph Framework["Framework Layer"]
        SwiftUI["SwiftUI Framework"]
        Assets["Asset Management"]:::asset
    end

    %% Core Animation Relationships
    AE --> BA
    AE --> CA
    AE --> LA

    %% Basic Animations
    BA --> Dots["Dots Animation"]:::basic
    BA --> Ring["Ring Animation"]:::basic
    BA --> Circle["Circle Rotation"]:::basic
    BA --> ThreeDot["Three Dot Rotation"]:::basic

    %% Complex Animations
    CA --> SideMenu["Side Menu"]:::complex
    CA --> CardSwipe["Card Swipe"]:::complex
    CA --> Loading["Loading Spinners"]:::complex

    %% Template Relationships
    SocialTemplates --> IT
    SocialTemplates --> FT
    SocialTemplates --> LT
    SocialTemplates --> TT

    %% Component Usage
    Components --> Templates
    Core --> Templates
    Framework --> Core
    Framework --> Components

    %% Style Definitions
    classDef basic fill:#a8d5e5
    classDef complex fill:#95b8d1
    classDef template fill:#8ecae6
    classDef ui fill:#edede9
    classDef menu fill:#e9edc9
    classDef card fill:#fefae0
    classDef asset fill:#ddd
    
    %% Click Events
    click Dots "https://github.com/Arvindcs/SwiftUI-Animation/blob/master/AnimatedDots/AnimatedDots/ContentView.swift"
    click Ring "https://github.com/Arvindcs/SwiftUI-Animation/blob/master/RingAnimation/RingAnimation/ContentView.swift"
    click Circle "https://github.com/Arvindcs/SwiftUI-Animation/blob/master/CircleRotation/CircleRotation/ContentView.swift"
    click ThreeDot "https://github.com/Arvindcs/SwiftUI-Animation/blob/master/ThreeDotRotation/ThreeDotRotation/ContentView.swift"
    click SideMenu "https://github.com/Arvindcs/SwiftUI-Animation/blob/master/Animated-SideMenu/Animated-SideMenu/ContentView/SideMenu.swift"
    click IT "https://github.com/Arvindcs/SwiftUI-Animation/blob/master/Insta-template/Insta-template/ContentView/ContentView.swift"
    click FT "https://github.com/Arvindcs/SwiftUI-Animation/blob/master/facebook-template/facebook-template/View/ContentView.swift"
    click LT "https://github.com/Arvindcs/SwiftUI-Animation/blob/master/linkedin-template/linkedin-template/ContentView/ContentView.swift"
    click TT "https://github.com/Arvindcs/SwiftUI-Animation/blob/master/tinder-template/tinder-template/ContentView/ContentView.swift"
    click Toggle "https://github.com/Arvindcs/SwiftUI-Animation/blob/master/Custom-Toggle/swiftui-toggle/ContentView.swift"
    click CV "https://github.com/Arvindcs/SwiftUI-Animation/blob/master/Card-Payment/Card-Payment/View/CardView.swift"
    click TB "https://github.com/Arvindcs/SwiftUI-Animation/blob/master/animated-tabbar/animated-tabbar/TabbarButton/TabbarButton.swift"
    click Loading "https://github.com/Arvindcs/SwiftUI-Animation/blob/master/InstagramLodingAnimation/InstagramLodingAnimation/ContentView.swift"
    click MS "https://github.com/Arvindcs/SwiftUI-Animation/blob/master/Animated-SideMenu/Animated-SideMenu/MenuButton/MenuButton.swift"
    click CardSwipe "https://github.com/Arvindcs/SwiftUI-Animation/blob/master/Card-Payment/Card-Payment/View/CardDetailView.swift"
    click Assets "https://github.com/Arvindcs/SwiftUI-Animation/blob/master/Resource/Assets.xcassets"
```
