# teawhoyou/seekfit architecture

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

- Interactive diagram: https://gitdiagram.com/teawhoyou/seekfit
- Repository: https://github.com/teawhoyou/seekfit

## Overview

##### Main Components Identification

a) Client Layer:
- React Native Mobile Application (built with Expo)
- Camera Integration Module
- Local Storage Component

b) Backend Services:
- Authentication Service (OAuth/Google)
- User Management Service
- Wardrobe Management Service
- Social Features Service
- Weather Integration Service
- Notification Service (Firebase Cloud Messaging)

c) Data Storage:
- PostgreSQL (structured data)
- MongoDB (unstructured data)
- File System (image storage)

d) External Services:
- AccuWeather API
- Firebase Cloud Messaging
- Google OAuth

##### Component Relationships

- Data flow direction
- User authentication flow

##### Deployment Information

Kubernetes deployment structure:
- Container orchestration
- DigitalOcean hosting
- Load balancing
- Service discovery

##### Additional Elements

Include:
- API Gateway for service orchestration
- Security boundaries
- Caching layers
- Load balancers
- Service discovery mechanisms

## Diagram (Mermaid)

```mermaid
graph TB
    %% Styles and Classes
    classDef client fill:#3498db,stroke:#2980b9,color:white
    classDef service fill:#2ecc71,stroke:#27ae60,color:white
    classDef external fill:#f1c40f,stroke:#f39c12,color:white
    classDef database fill:#9b59b6,stroke:#8e44ad,color:white
    classDef gateway fill:#95a5a6,stroke:#7f8c8d,color:white
    classDef infrastructure fill:#34495e,stroke:#2c3e50,color:white

    %% Client Layer
    subgraph ClientLayer
        MobileApp["Mobile App (React Native + Expo)"]:::client
        Camera["Camera Module"]:::client
        LocalStorage["Local Storage"]:::client
    end

    %% API Gateway Layer
    APIGateway["API Gateway"]:::gateway

    %% Microservices Layer
    subgraph Services
        AuthService["Authentication Service"]:::service
        UserService["User Management Service"]:::service
        WardrobeService["Wardrobe Management Service"]:::service
        SocialService["Social Features Service"]:::service
        WeatherService["Weather Service"]:::service
        NotifService["Notification Service"]:::service
        CalendarService["Calendar Service"]:::service
    end

    %% External Services Layer
    subgraph ExternalServices
        AccuWeather["AccuWeather API"]:::external
        FCM["Firebase Cloud Messaging"]:::external
        GoogleOAuth["Google OAuth"]:::external
    end

    %% Data Layer
    subgraph DataLayer
        PostgreSQL[(PostgreSQL)]:::database
        MongoDB[(MongoDB)]:::database
        FileSystem[("File System")]:::database
    end

    %% Connections
    MobileApp --> APIGateway
    Camera --> MobileApp
    LocalStorage --> MobileApp

    APIGateway --> AuthService
    APIGateway --> UserService
    APIGateway --> WardrobeService
    APIGateway --> SocialService
    APIGateway --> WeatherService
    APIGateway --> NotifService
    APIGateway --> CalendarService

    AuthService --> GoogleOAuth
    WeatherService --> AccuWeather
    NotifService --> FCM

    UserService --> PostgreSQL
    WardrobeService --> PostgreSQL
    SocialService --> MongoDB
    CalendarService --> PostgreSQL
    WardrobeService --> FileSystem

    %% Click Events
    click AuthService "https://github.com/TeaWhoYou/SeekFit/blob/main/docs/diagrams/SD-log-in.drawio"
    click UserService "https://github.com/TeaWhoYou/SeekFit/blob/main/docs/diagrams/UCD-profile-management.drawio"
    click WardrobeService "https://github.com/TeaWhoYou/SeekFit/blob/main/docs/diagrams/UCD-item-management.drawio"
    click SocialService "https://github.com/TeaWhoYou/SeekFit/blob/main/docs/diagrams/UCD-friend-list-management.drawio"
    click CalendarService "https://github.com/TeaWhoYou/SeekFit/blob/main/docs/diagrams/UCD-managing-outfits-in-calendar.drawio"

    %% Legend
    subgraph Legend
        Client["Client Component"]:::client
        ServiceComp["Service Component"]:::service
        ExternalComp["External Service"]:::external
        DataComp["Data Storage"]:::database
        GatewayComp["Gateway"]:::gateway
    end
```
