# induzo/gocom architecture

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

- Interactive diagram: https://gitdiagram.com/induzo/gocom
- Repository: https://github.com/induzo/gocom

## Overview

##### Main Components

a. Package Groups:
- Database Utilities
- HTTP Utilities
- System Utilities (shutdown)

b. Individual Modules:
- database/pginit
- database/pgx-slog
- database/redisinit
- http/health
- http/middleware/writablecontext
- shutdown

**┌─ Database Utilities ─────────────────┐    ┌─ HTTP Utilities ──────────────┐**

- ┌─────────┐       ┌──────────┐     │    │  ┌────────┐                  │
- pginit  │─────▶ │ pgx-slog │     │    │  │ health │                  │
- ┘       └──────────┘     │    │  └────────┘                  │

- ┌──────────┐                       │    │  ┌─────────────────┐         │
- redisinit │                       │    │  │ writablecontext │         │
- ┘                       │    │  └─────────────────┘         │
- ┘    └───────────────────────────────┘

**┌─ System Utilities ──────────────────┐**

- ┌──────────┐                      │
- shutdown │                      │
- ┘                      │
- ┘

##### Important Details

- Version numbers for each module (from the README)
- Dependency relationships (like pginit depending on pgx-slog)
- Clear labels for each component

##### Technical Details

- Whether it has benchmarks (📊)
- Test coverage status (✓)
- Documentation availability (📘)

## Diagram (Mermaid)

```mermaid
graph TB
    %% Styles
    classDef database fill:#e1f5fe,stroke:#01579b
    classDef http fill:#e8f5e9,stroke:#1b5e20
    classDef system fill:#fff3e0,stroke:#e65100
    classDef group fill:none,stroke:#666,stroke-dasharray: 5 5

    %% Title
    title[Gocom - Go Common Packages Architecture]
    style title fill:none,stroke:none

    %% Database Utilities Subgraph
    subgraph DB[Database Utilities]
        pginit["pginit 📘✓📊"]
        pgxslog["pgx-slog 📘✓"]
        redisinit["redisinit 📘✓"]
        
        pginit --> pgxslog
    end

    %% HTTP Utilities Subgraph
    subgraph HTTP[HTTP Utilities]
        health["health 📘✓"]
        wctx["writablecontext 📘✓"]
    end

    %% System Utilities Subgraph
    subgraph SYS[System Utilities]
        shutdown["shutdown 📘✓"]
    end

    %% Click events for components
    click DB "https://github.com/induzo/gocom/tree/main//database"
    click pginit "https://github.com/induzo/gocom/blob/main//database/pginit/pginit.go"
    click pgxslog "https://github.com/induzo/gocom/blob/main//database/pgx-slog/adapter.go"
    click redisinit "https://github.com/induzo/gocom/blob/main//database/redisinit/redisinit.go"
    click HTTP "https://github.com/induzo/gocom/tree/main//http"
    click health "https://github.com/induzo/gocom/blob/main//http/health/health.go"
    click wctx "https://github.com/induzo/gocom/blob/main//http/middleware/writablecontext/writablecontext.go"
    click shutdown "https://github.com/induzo/gocom/blob/main//shutdown/shutdown.go"

    %% Styling classes
    class pginit,pgxslog,redisinit database
    class health,wctx http
    class shutdown system
    class DB,HTTP,SYS group

    %% Legend
    subgraph Legend
        l1["📘 Documentation"]
        l2["✓ High Test Coverage"]
        l3["📊 Benchmarks"]
    end
```
