# faontane-git/diakonia architecture

> Architecture diagram of the GitHub repository faontane-git/diakonia, 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/faontane-git/diakonia
- Repository: https://github.com/faontane-git/diakonia

## Overview

- A web system (located in the “diakonia-admin-web” folder), which is a React application.
- A mobile system (located in the “diakonia-app” folder), which is a React Native/Expo application.

b. Mobile App: Represent the “diakonia-app” application. Note it is structured as a React Native application with Expo (as indicated by the “expo” folders and instructions in the README). Include details such as screens for login, registration, and various “Ventanas” like Asistencia, Seguimiento, and VerRegistro. Also, highlight its use of Expo for development and testing.

##### Separate supporting layers/components
- Static Assets & Public Files: For the Web Client, include a small subcomponent for “Public Assets” (HTML files, manifest, robots.txt), which are served to the browser.
- Third-party Services & Libraries: Optionally indicate any external libraries or services (for instance, Expo for mobile development, QR Code scanning functionalities in mobile, chart libraries in the web, etc.). While the file tree doesn’t list every dependency, you may annotate that common libraries (React, Firebase, React Navigation in the mobile app, etc.) play a role.

##### Interactions and data flow
– The Web Client and Firebase (for API calls, authentication, and data retrieval).
– The Mobile App and Firebase (for real-time data synchronization, authentication, and related services).
- Within each client, illustrate how presentation components (screens or pages) interact with shared service layers or contexts (for example, AuthContext in the web and its mobile equivalent).

## Diagram (Mermaid)

```mermaid
flowchart TD

    %% End Users
    webUser("Web User"):::user
    mobileUser("Mobile User"):::user

    %% Web Client Subgraph
    subgraph "Diakonia Admin Web – React Frontend"
        W_client["Diakonia Admin Web – React Frontend"]:::webComponent
        W_components["Components"]:::webComponent
        W_styles["Styles"]:::webComponent
        W_firebase["Firebase Config"]:::webService
        W_public["Public Assets"]:::webComponent

        W_client --> W_components
        W_client --> W_styles
        W_client --> W_firebase
        W_client --> W_public
        W_components -->|"calls"| W_firebase
    end

    %% Mobile App Subgraph
    subgraph "Diakonia Mobile App – React Native/Expo Frontend"
        M_client["Diakonia Mobile App – React Native/Expo Frontend"]:::mobileComponent
        M_screens["Screens"]:::mobileComponent
        M_firebase["Firebase Config"]:::mobileService
        M_expo["Expo Config"]:::mobileComponent

        M_client --> M_screens
        M_client --> M_firebase
        M_client --> M_expo
        M_screens -->|"uses"| M_firebase
    end

    %% Firebase Backend
    Firebase["Firebase Backend"]:::backend

    %% Connections from End Users to Clients
    webUser --> W_client
    mobileUser --> M_client

    %% Connections from Clients to Firebase Backend
    W_firebase -->|"syncs"| Firebase
    M_firebase -->|"syncs"| Firebase

    %% Click Events for Web Client Components
    click W_client "https://github.com/faontane-git/diakonia/tree/main/diakonia-admin-web"
    click W_components "https://github.com/faontane-git/diakonia/tree/main/diakonia-admin-web/src/components"
    click W_styles "https://github.com/faontane-git/diakonia/tree/main/diakonia-admin-web/src/estilos"
    click W_firebase "https://github.com/faontane-git/diakonia/blob/main/diakonia-admin-web/src/firebase-config.js"
    click W_public "https://github.com/faontane-git/diakonia/tree/main/diakonia-admin-web/public"

    %% Click Events for Mobile App Components
    click M_client "https://github.com/faontane-git/diakonia/tree/main/diakonia-app"
    click M_screens "https://github.com/faontane-git/diakonia/tree/main/diakonia-app/Ventanas"
    click M_firebase "https://github.com/faontane-git/diakonia/blob/main/diakonia-app/firebase-config.js"
    click M_expo "https://github.com/faontane-git/diakonia/blob/main/diakonia-app/app.json"

    %% Styles
    classDef webComponent fill:#FFCC80,stroke:#FB8C00,stroke-width:2px,color:#000;
    classDef webService fill:#FFE0B2,stroke:#FB8C00,stroke-dasharray: 5,5,color:#000;
    classDef mobileComponent fill:#BBDEFB,stroke:#1976D2,stroke-width:2px,color:#000;
    classDef mobileService fill:#E3F2FD,stroke:#1976D2,stroke-dasharray: 5,5,color:#000;
    classDef backend fill:#C8E6C9,stroke:#388E3C,stroke-width:2px,color:#000;
    classDef user fill:#FFF9C4,stroke:#FBC02D,stroke-width:2px,color:#000;
```
