# shmuelhizmi/react-fullstack architecture

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

- Interactive diagram: https://gitdiagram.com/shmuelhizmi/react-fullstack
- Repository: https://github.com/shmuelhizmi/react-fullstack

## Overview

##### Main Components

a) Core Framework Layer:
- Fullstack Package (`packages/fullstack`)
- Express Server Package (`packages/server-express`)
- Server Package (`packages/server`)
- React Render Null Package (`packages/react-render-null`)

b) Plugin System:
- Socket Plugins (Client/Server)
- Server-Side Rendering Plugin

c) Demo Application:
- Demo Client
- Demo Interfaces
- Demo Server Components

**┌─────────────────────────────────────────────┐**
- Core Framework                 │
- ┌─────────┐ ┌──────────┐ ┌──────────────┐  │
- Fullstack│ │  Server  │ │Server Express│  │
- ┘ └──────────┘ └──────────────┘  │
- ┘

**┌─────────────────────────────────────────────┐**
- Plugin System                  │
- ┌─────────┐ ┌──────────┐ ┌──────────────┐  │
- Socket   │ │  SSR     │ │Other Plugins │  │
- Client/  │ │  Plugin  │ │              │  │
- Server   │ │          │ │              │  │
- ┘ └──────────┘ └──────────────┘  │
- ┘

**┌─────────────────────────────────────────────┐**
- Demo Application                 │
- ┌─────────┐ ┌──────────┐ ┌──────────────┐  │
- Client   │ │Interface │ │Server        │  │
- Components│ │Layer    │ │Components    │  │
- ┘ └──────────┘ └──────────────┘  │
- ┘

##### Connection and Data Flow

- Bidirectional communication between client and server components
- Plugin integration points with the core framework
- Interface implementations between layers

##### Additional Details

- Shared types and interfaces
- Build and configuration tools
- Development utilities

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph "Demo Application"
        Client["Client Components"]:::app
        Interface["Interface Layer"]:::app
        ServerComp["Server Components"]:::app
        
        Client <--> Interface
        Interface <--> ServerComp
    end

    subgraph "Plugin System"
        SocketClient["Socket Client Plugin"]:::plugin
        SocketServer["Socket Server Plugin"]:::plugin
        SSRPlugin["SSR Plugin"]:::plugin
        
        SocketClient <--> SocketServer
    end

    subgraph "Core Framework"
        Fullstack["Fullstack Package"]:::core
        ServerExpress["Express Server"]:::core
        Server["Server Package"]:::core
        RenderNull["React Render Null"]:::core
        
        subgraph "Fullstack Components"
            ClientComp["Client Component"]:::core
            ServerComp2["Server Component"]:::core
            SharedUtils["Shared Utilities"]:::core
        end
        
        subgraph "Express Components"
            ExpressComp["Express Components"]:::core
            ServerImpl["Server Implementation"]:::core
            RouterComp["Routing Components"]:::core
        end
    end

    Client --> SocketClient
    ServerComp --> SocketServer
    ServerComp --> SSRPlugin
    SSRPlugin --> ServerExpress
    SocketServer --> Server
    Server --> RenderNull
    
    %% Component Mappings
    click Fullstack "https://github.com/shmuelhizmi/react-fullstack/tree/master/packages/fullstack"
    click ClientComp "https://github.com/shmuelhizmi/react-fullstack/tree/master/packages/fullstack/src/client"
    click ServerComp2 "https://github.com/shmuelhizmi/react-fullstack/tree/master/packages/fullstack/src/server"
    click SharedUtils "https://github.com/shmuelhizmi/react-fullstack/tree/master/packages/fullstack/src/shared"
    click ServerExpress "https://github.com/shmuelhizmi/react-fullstack/tree/master/packages/server-express"
    click ExpressComp "https://github.com/shmuelhizmi/react-fullstack/tree/master/packages/server-express/src/components"
    click ServerImpl "https://github.com/shmuelhizmi/react-fullstack/blob/master/packages/server-express/src/components/Server.tsx"
    click RouterComp "https://github.com/shmuelhizmi/react-fullstack/blob/master/packages/server-express/src/components/Router.tsx"
    click Server "https://github.com/shmuelhizmi/react-fullstack/tree/master/packages/server"
    click RenderNull "https://github.com/shmuelhizmi/react-fullstack/blob/master/packages/react-render-null/src/render.tsx"
    click SocketClient "https://github.com/shmuelhizmi/react-fullstack/blob/master/plugins/fullstack/socket-client/src/index.tsx"
    click SocketServer "https://github.com/shmuelhizmi/react-fullstack/blob/master/plugins/fullstack/socket-server/src/index.tsx"
    click SSRPlugin "https://github.com/shmuelhizmi/react-fullstack/tree/master/plugins/server-express/server-side-rendering"
    click Client "https://github.com/shmuelhizmi/react-fullstack/tree/master/apps/demo-app/demo-client/src/components"
    click Interface "https://github.com/shmuelhizmi/react-fullstack/blob/master/apps/demo-app/demo-interfaces/src/index.ts"
    click ServerComp "https://github.com/shmuelhizmi/react-fullstack/tree/master/apps/demo-app/demo/src/components/fullstack"

    classDef core fill:#2374ab,stroke:#2374ab,color:#fff
    classDef plugin fill:#7bc950,stroke:#7bc950,color:#fff
    classDef app fill:#ff934f,stroke:#ff934f,color:#fff

    %% Legend
    subgraph Legend
        CoreLegend["Core Framework"]:::core
        PluginLegend["Plugin System"]:::plugin
        AppLegend["Application Layer"]:::app
    end
```
