# fraank98/snapdish architecture

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

- Interactive diagram: https://gitdiagram.com/fraank98/snapdish
- Repository: https://github.com/fraank98/snapdish

## Overview

##### Main Components
- Mobile Frontend (React Native App): This is represented by the core App.js file, along with the supporting configuration files (app.json, babel.config.js, metro.config.js) and the assets directory. The mobile app handles user interactions, camera functionality, and image capture.
- Expo Ecosystem: The Expo structure (e.g., .expo-shared directory) is used for managing the development and build process. This layer abstracts many native capabilities and simplifies deployment.
- Firebase Storage: Although not explicitly visible in the file tree, the README indicates that captured images are uploaded to Firebase storage, which serves as the backend storage component.
- Device Hardware: The mobile device’s camera hardware is used to capture the images.

##### Important Architectural Patterns
- Configuration Abstraction: The use of Expo configuration files indicates an abstraction layer that simplifies cross-platform functionality; emphasize this by grouping related files (app.json, metro.config.js) together.
- Modularized Assets: The inclusion of an assets folder suggests an organized structure for static files, which can be shown as part of the mobile app’s asset management.

## Diagram (Mermaid)

```mermaid
flowchart TD
    DC["Device Camera"]:::hardware

    subgraph "Mobile Frontend (React Native App)"
        A["App.js"]:::frontend
        J["app.json"]:::frontend
        B["babel.config.js"]:::frontend
        M["metro.config.js"]:::frontend
        AS["assets"]:::frontend
    end

    subgraph "Expo Ecosystem (Build & Configuration)"
        ES[".expo-shared"]:::config
        AJS["assets.json"]:::config
    end

    FS["Firebase Storage"]:::backend

    DC -->|"captures_image"| A
    A -->|"builds_with"| ES
    A -->|"uploads_image"| FS

    click A "https://github.com/fraank98/snapdish/blob/master/App.js"
    click J "https://github.com/fraank98/snapdish/blob/master/app.json"
    click B "https://github.com/fraank98/snapdish/blob/master/babel.config.js"
    click M "https://github.com/fraank98/snapdish/blob/master/metro.config.js"
    click AS "https://github.com/fraank98/snapdish/tree/master/assets"
    click ES "https://github.com/fraank98/snapdish/blob/master/.expo-shared"
    click AJS "https://github.com/fraank98/snapdish/blob/master/.expo-shared/assets.json"

    classDef frontend fill:#AED6F1,stroke:#1F618D,stroke-width:2px;
    classDef hardware fill:#A9DFBF,stroke:#145A32,stroke-width:2px;
    classDef config fill:#F9E79F,stroke:#B7950B,stroke-width:2px;
    classDef backend fill:#F5B7B1,stroke:#C0392B,stroke-width:2px;
```
