# pratap360/yummunity architecture

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

- Interactive diagram: https://gitdiagram.com/pratap360/yummunity
- Repository: https://github.com/pratap360/yummunity

## Overview

##### Main Components Identification

a. Frontend Architecture (Angular-based):
- Core Modules
- User Authentication (Login/Signup)
- Content Management
- Social Interaction
- Recipe Management
- Feature Components
- Services Layer
- External API Integrations

b. Backend Services:
- Appwrite Backend (identified from the lib/AppwriteConfig.ts)
- MealDB Integration
- Pexels API Integration

**[Client Layer]**
- ↓
**[Component Layer]**
- ↓
**[Services Layer]**
- ↓
**[External Services]**

##### Specific Component Relationships

a. User Interface Components:
- Home Feed → Post Container → Recipe Posts
- Search → Search Suggestions
- Navigation (Side Nav + Bottom Nav)
- Account Management
- Post Activity (Comments, Likes, Shares)

b. Service Integrations:
- Users Service ↔ Appwrite Auth
- Meal Service ↔ MealDB API
- Pexels Service ↔ Pexels API

##### Detailed Component Breakdown

a. Core Features:
- Authentication flow
- Post creation and management
- Social interactions
- Recipe management
- Search functionality

b. Shared Components:
- Navigation elements
- Post activity components
- User profile components

##### Data Flow Indicators

- User authentication flow
- Post creation and retrieval
- Social interaction paths
- API communication paths

##### Technical Stack Indicators

Technology badges for:
- Angular
- Appwrite
- External APIs (MealDB, Pexels)
- TypeScript

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph Client
        UI[User Interface]
        UI --> NAV[Navigation System]
        UI --> FEED[Home Feed]
        UI --> SEARCH[Search System]
        UI --> ACC[Account Management]
    end

    subgraph Components
        NAV --> SIDENAV[Side Navigation]:::nav
        NAV --> BOTTOMNAV[Bottom Navigation]:::nav
        
        FEED --> POSTC[Post Container]:::content
        POSTC --> RECIPE[Recipe Posts]:::content
        RECIPE --> BLOG[Blog Posts]:::content
        RECIPE --> TEXT[Text Posts]:::content
        RECIPE --> IMG[Image Posts]:::content
        
        SEARCH --> SEARCHSUGG[Search Suggestions]:::search
        
        ACC --> AUTH[Authentication]:::auth
        AUTH --> LOGIN[Login]:::auth
        AUTH --> SIGNUP[Signup]:::auth
        
        POSTC --> ACTIVITY[Post Activity]:::social
        ACTIVITY --> COMMENTS[Comments]:::social
        ACTIVITY --> LIKES[Likes]:::social
        ACTIVITY --> SHARE[Share Post]:::social
        
        TRENDING[Trending Recipes]:::content
    end

    subgraph Services
        USERS[Users Service]:::service
        MEAL[Meal Service]:::service
        PEXELS[Pexels Service]:::service
    end

    subgraph External
        APPWRITE[Appwrite Backend]:::external
        MEALDB[MealDB API]:::external
        PEXELSAPI[Pexels API]:::external
    end

    %% Service Connections
    USERS <--> APPWRITE
    MEAL <--> MEALDB
    PEXELS <--> PEXELSAPI

    %% Component to Service Connections
    AUTH --> USERS
    RECIPE --> MEAL
    IMG --> PEXELS

    %% Style Definitions
    classDef nav fill:#6c757d
    classDef content fill:#007bff
    classDef search fill:#17a2b8
    classDef auth fill:#6f42c1
    classDef social fill:#fd7e14
    classDef service fill:#20c997
    classDef external fill:#28a745

    %% Click Events
    click SIDENAV "https://github.com/pratap360/yummunity/tree/main/src/components/side-nav-bar"
    click BOTTOMNAV "https://github.com/pratap360/yummunity/tree/main/src/components/bottom-nav"
    click POSTC "https://github.com/pratap360/yummunity/tree/main/src/components/post-container"
    click RECIPE "https://github.com/pratap360/yummunity/tree/main/src/components/recipe-posts"
    click BLOG "https://github.com/pratap360/yummunity/tree/main/src/components/recipe-posts/blog-post"
    click TEXT "https://github.com/pratap360/yummunity/tree/main/src/components/recipe-posts/text-post"
    click IMG "https://github.com/pratap360/yummunity/tree/main/src/components/recipe-posts/with-img-post"
    click SEARCH "https://github.com/pratap360/yummunity/tree/main/src/app/search"
    click SEARCHSUGG "https://github.com/pratap360/yummunity/tree/main/src/components/search-suggestion-profile"
    click LOGIN "https://github.com/pratap360/yummunity/tree/main/src/app/login"
    click SIGNUP "https://github.com/pratap360/yummunity/tree/main/src/app/signup"
    click AUTH "https://github.com/pratap360/yummunity/blob/main/src/lib/appwrite/auth.ts"
    click COMMENTS "https://github.com/pratap360/yummunity/tree/main/src/components/post-activity/comments"
    click LIKES "https://github.com/pratap360/yummunity/tree/main/src/components/post-activity/likes"
    click SHARE "https://github.com/pratap360/yummunity/tree/main/src/components/post-activity/share-post"
    click USERS "https://github.com/pratap360/yummunity/blob/main/src/services/users/users.service.ts"
    click MEAL "https://github.com/pratap360/yummunity/blob/main/src/services/mealdb/meal.service.ts"
    click PEXELS "https://github.com/pratap360/yummunity/blob/main/src/services/pexels-bg-api/pexels.service.ts"
    click APPWRITE "https://github.com/pratap360/yummunity/blob/main/src/lib/AppwriteConfig.ts"
    click ACC "https://github.com/pratap360/yummunity/tree/main/src/app/account"
    click TRENDING "https://github.com/pratap360/yummunity/tree/main/src/components/trending-recipes-list"
    click FEED "https://github.com/pratap360/yummunity/tree/main/src/app/home-feed"
```
