# pedrosouza458/aceleradora-agil-2025-desafios architecture

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

- Interactive diagram: https://gitdiagram.com/pedrosouza458/aceleradora-agil-2025-desafios
- Repository: https://github.com/pedrosouza458/aceleradora-agil-2025-desafios

## Overview

Project Analysis:
This repository contains two separate applications:

##### High-Level Repository Structure
- Them as separate bounded contexts

##### Loja Agilstore Architecture
a. Core Components:
- Server Entry Point (server.ts)
- Product Management Layer
- File System Layer
- CLI Interface Layer

b. Data flow:
- User Input → CLI Interface
- CLI Interface → Product Management
- Product Management ↔ File System Layer
- File System Layer ↔ JSON Storage

- Rectangles: Core modules
- Diamonds: User interaction points

##### Galeria de Fotos Architecture
a. Frontend Layers:
- UI Components Layer
- API Integration Layer
- State Management
- Types/Interfaces Layer

b. External Services:
- Unsplash API
- Vite Development Server

Interactions with:
- External API calls
- Data flow through components

Specific Component Relationships:
- PhotoGalleryPage → PhotoGallery → Photo Components
- SearchBar → API Integration → Unsplash API
- Types/Interfaces supporting all layers

##### Technical Details

For Loja Agilstore:
- Node.js Runtime Environment
- TypeScript Compilation Flow
- File System Operations
- CLI Interface Points

For Galeria de Fotos:
- React Component Hierarchy
- Vite Build/Dev Environment
- Tailwind CSS Styling Layer
- Axios HTTP Client
- Unsplash API Integration

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph Repository["Main Repository"]
        direction TB
        
        subgraph LojaAgilstore["Loja Agilstore"]
            direction TB
            Server["Server Entry Point"]:::backend
            ProductMgmt["Product Management Layer"]:::backend
            FileSystem["File System Layer"]:::backend
            CLI["CLI Interface Layer"]:::backend
            Storage[(JSON Storage)]:::storage
            
            CLI --> ProductMgmt
            ProductMgmt <--> FileSystem
            FileSystem <--> Storage
            Server --> CLI
        end
        
        subgraph GaleriaFotos["Galeria de Fotos"]
            direction TB
            UILayer["UI Components Layer"]:::frontend
            APILayer["API Integration Layer"]:::api
            TypesLayer["Types/Interfaces Layer"]:::types
            
            subgraph Components
                direction TB
                PhotoPage["PhotoGalleryPage"]:::frontend
                PhotoGalleryComp["PhotoGallery Component"]:::frontend
                PhotoComp["Photo Component"]:::frontend
                Search["SearchBar Component"]:::frontend
            end
            
            UnsplashAPI["Unsplash API"]:::external
            ViteServer["Vite Dev Server"]:::server
            
            Search --> APILayer
            APILayer --> UnsplashAPI
            PhotoPage --> PhotoGalleryComp
            PhotoGalleryComp --> PhotoComp
            TypesLayer -.-> UILayer
            TypesLayer -.-> APILayer
            ViteServer --> UILayer
        end
    end
    
    %% Click events for component mapping
    click Server "https://github.com/pedrosouza458/aceleradora-agil-2025-desafios/blob/main/loja-agilstore/src/server.ts"
    click ProductMgmt "https://github.com/pedrosouza458/aceleradora-agil-2025-desafios/tree/main/loja-agilstore/src/functions/products/"
    click FileSystem "https://github.com/pedrosouza458/aceleradora-agil-2025-desafios/tree/main/loja-agilstore/src/functions/files/"
    click CLI "https://github.com/pedrosouza458/aceleradora-agil-2025-desafios/tree/main/loja-agilstore/src/functions/utils/"
    click UILayer "https://github.com/pedrosouza458/aceleradora-agil-2025-desafios/tree/main/galeria-de-fotos/src/components/"
    click APILayer "https://github.com/pedrosouza458/aceleradora-agil-2025-desafios/tree/main/galeria-de-fotos/src/api/"
    click TypesLayer "https://github.com/pedrosouza458/aceleradora-agil-2025-desafios/tree/main/galeria-de-fotos/src/types/"
    click PhotoPage "https://github.com/pedrosouza458/aceleradora-agil-2025-desafios/blob/main/galeria-de-fotos/src/pages/photo-galery-page.tsx"
    click PhotoGalleryComp "https://github.com/pedrosouza458/aceleradora-agil-2025-desafios/blob/main/galeria-de-fotos/src/components/photo-gallery.tsx"
    click PhotoComp "https://github.com/pedrosouza458/aceleradora-agil-2025-desafios/blob/main/galeria-de-fotos/src/components/photo.tsx"
    click Search "https://github.com/pedrosouza458/aceleradora-agil-2025-desafios/blob/main/galeria-de-fotos/src/components/search-bar.tsx"
    click APILayer "https://github.com/pedrosouza458/aceleradora-agil-2025-desafios/blob/main/galeria-de-fotos/src/api/get-pictures.ts"
    
    %% Styling
    classDef backend fill:#2196F3,color:white
    classDef frontend fill:#4CAF50,color:white
    classDef api fill:#9C27B0,color:white
    classDef types fill:#FF9800,color:white
    classDef storage fill:#607D8B,color:white
    classDef external fill:#F44336,color:white
    classDef server fill:#795548,color:white
    
    %% Legend
    subgraph Legend
        Backend["Backend Component"]:::backend
        Frontend["Frontend Component"]:::frontend
        API["API Component"]:::api
        Types["Types Component"]:::types
        StorageL["Storage"]:::storage
        ExternalL["External Service"]:::external
        ServerL["Server Component"]:::server
    end
```
