# iamshaunjp/firegram architecture

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

- Interactive diagram: https://gitdiagram.com/iamshaunjp/firegram
- Repository: https://github.com/iamshaunjp/firegram

## Overview

##### Project type and purpose
- firegram is a front-end tutorial project: a React single-page application (SPA) that leverages Firebase as its back-end (Authentication, Firestore, Storage, Hosting) and Framer Motion for UI animations.
- Its purpose is to demonstrate how to build an image-sharing app (“Gram”) using React on the client and Firebase’s serverless services.

##### File structure
- The top-level contains only .gitignore and README.md because the actual code lives in two Git branches (“starter” and “final”).
├─ public/
└─ src/
├─ components/
├─ firebase.js (or config file)
└─ App.js, index.js
- There are no traditional back-end servers or Dockerfiles; all back-end services are hosted via Firebase.

##### README for additional insights
- It explicitly calls out React, Firebase & Framer Motion.
- No custom server code, CI/CD configs, or microservices are referenced—this is a serverless architecture with BaaS.

##### Detailed yet focused
- Every Firebase service used even though they are all under the “Firebase” umbrella.
- Separate UI, data, and deployment concerns into distinct blocks.

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Client Layer
    subgraph "Client (Browser)"
        direction TB
        React["React SPA"]:::frontend
        Framer["Framer Motion"]:::library
    end

    %% Firebase Services
    subgraph "Firebase Services"
        direction TB
        Auth[(Firebase Auth)]:::auth
        Firestore[(Firestore DB)]:::db
        Storage[(Firebase Storage)]:::db
        Hosting["Firebase Hosting"]:::hosting
    end

    %% Deployment CI/CD
    subgraph "CI/CD Pipeline"
        direction TB
        GitHubActions["GitHub Actions"]:::cicd
        Deploy["Deploy to Hosting"]:::cicd
    end

    %% Interactions
    React --> Framer
    React -->|Uses| Auth
    React -->|Reads/Writes| Firestore
    React -->|Uploads/Downloads| Storage
    GitHubActions --> Deploy
    Deploy -->|Deploys assets| Hosting

    %% Legend
    subgraph "Legend"
        direction TB
        LF["Client Components"]:::frontend
        LA["Auth Service"]:::auth
        LD["Database/Storage"]:::db
        LH["Hosting/CI"]:::hosting
        LL["Libraries"]:::library
    end

    %% Styles
    classDef frontend fill:#ADD8E6,stroke:#333,stroke-width:1px
    classDef auth fill:#90EE90,stroke:#333,stroke-width:1px
    classDef db fill:#FFA500,stroke:#333,stroke-width:1px
    classDef hosting fill:#98FB98,stroke:#333,stroke-width:1px
    classDef cicd fill:#98FB98,stroke:#333,stroke-width:1px
    classDef library fill:#D3D3D3,stroke:#333,stroke-width:1px
```
