# aadirathodprojects/infobell-devboard architecture

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

- Interactive diagram: https://gitdiagram.com/aadirathodprojects/infobell-devboard
- Repository: https://github.com/aadirathodprojects/infobell-devboard

## Overview

##### Project type and purpose
- This is a full-stack web application comprising:
- A React + TypeScript + Vite frontend that delivers a single-page app (SPA)
- A Go backend service exposing GraphQL (via schema.graphql) and gRPC interfaces (defined in devboard.proto)
- A PostgreSQL (or similar) database managed through SQL migrations

##### File structure
- Top-level separation:
- frontend (implicit): `package.json`, `vite.config.ts`, `src/`, `public/`, `index.html`
- backend: `backend/cmd/server/main.go`, `backend/internal/{config,db,service}`, `backend/migrations`, `backend/proto`, `backend/schema.graphql`
- Architectural hints:
- cmd/server → entry point for HTTP/gRPC server
- internal/config → centralized configuration loader
- internal/db → DB client, ORM/models, migration scripts
- internal/service → business logic layer
- proto + schema.graphql → API contracts for gRPC and GraphQL

##### Key README insights
- The README focuses on the Vite + React + TypeScript setup with ESLint, but does not describe the Go backend.
- We infer the backend is a separate Go module (`go.mod`) and uses SQL migrations plus protocol definitions.

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Developer Workstation and Tools
    subgraph "Developer Workstation"
        DevTools["Developer Workstation"]:::external
        ESLint["ESLint"]:::tool
        Protoc["protoc (for .proto)"]:::tool
        MigrationTool["SQL Migrations"]:::tool
    end

    %% Frontend Layer
    subgraph "Frontend"
        Vite["Vite Dev Server & Build"]:::frontend
        Package["package.json & Tooling"]:::frontend
        SPA["React SPA"]:::frontend
        Public["Public Assets & index.html"]:::frontend
    end

    %% Browser
    Browser["Browser: React SPA"]:::frontend

    %% Backend Layer
    subgraph "Backend"
        GoServer["Go HTTP & gRPC Server"]:::backend
        GraphQL["GraphQL API (/graphql)"]:::backend
        gRPC["gRPC API (devboard.proto)"]:::backend
        subgraph "Internal Layers"
            Config["Config Loader"]:::backend
            Service["Service Layer"]:::backend
            DBClient["DB Client & Models"]:::backend
        end
    end

    %% Database
    Database["PostgreSQL DB"]:::db

    %% CI Pipeline
    CI["CI Pipeline"]:::tool

    %% Connections
    DevTools -->|"runs lint"| ESLint
    DevTools -->|"runs protoc"| Protoc
    DevTools -->|"runs migrations"| MigrationTool
    DevTools -->|"go run backend/cmd/server"| GoServer
    DevTools -->|"npm run dev/build"| Vite

    Package -->|"configures"| Vite
    Vite -->|"bundles & serves"| SPA
    Vite -->|"serves assets"| Public
    SPA -->|"executes in"| Browser

    Browser -->|"HTTP GraphQL calls"| GraphQL
    Browser -->|"gRPC-web calls"| gRPC

    GoServer -->|"loads config"| Config
    GoServer -->|"hosts"| GraphQL
    GoServer -->|"hosts"| gRPC

    GraphQL -->|"invokes"| Config
    gRPC -->|"invokes"| Config
    Config -->|"calls"| Service
    Service -->|"uses"| DBClient
    DBClient -->|"queries/updates"| Database

    CI -->|"triggers"| MigrationTool
    MigrationTool -->|"applies migrations"| Database

    %% Click Events
    click SPA "https://github.com/aadirathodprojects/infobell-devboard/tree/main/src/"
    click Public "https://github.com/aadirathodprojects/infobell-devboard/tree/main/public/"
    click Public "https://github.com/aadirathodprojects/infobell-devboard/blob/main/index.html"
    click Vite "https://github.com/aadirathodprojects/infobell-devboard/blob/main/vite.config.ts"
    click Package "https://github.com/aadirathodprojects/infobell-devboard/blob/main/package.json"
    click Package "https://github.com/aadirathodprojects/infobell-devboard/blob/main/package-lock.json"
    click Package "https://github.com/aadirathodprojects/infobell-devboard/blob/main/tsconfig.json"
    click Package "https://github.com/aadirathodprojects/infobell-devboard/blob/main/tsconfig.app.json"
    click Package "https://github.com/aadirathodprojects/infobell-devboard/blob/main/tsconfig.node.json"
    click Package "https://github.com/aadirathodprojects/infobell-devboard/blob/main/eslint.config.js"
    click GoServer "https://github.com/aadirathodprojects/infobell-devboard/blob/main/backend/cmd/server/main.go"
    click GoServer "https://github.com/aadirathodprojects/infobell-devboard/blob/main/backend/go.mod"
    click GraphQL "https://github.com/aadirathodprojects/infobell-devboard/blob/main/backend/schema.graphql"
    click gRPC "https://github.com/aadirathodprojects/infobell-devboard/blob/main/backend/proto/devboard.proto"
    click Config "https://github.com/aadirathodprojects/infobell-devboard/blob/main/backend/internal/config/config.go"
    click DBClient "https://github.com/aadirathodprojects/infobell-devboard/blob/main/backend/internal/db/db.go"
    click DBClient "https://github.com/aadirathodprojects/infobell-devboard/blob/main/backend/internal/db/models.go"
    click Service "https://github.com/aadirathodprojects/infobell-devboard/blob/main/backend/internal/service/service.go"
    click MigrationTool "https://github.com/aadirathodprojects/infobell-devboard/blob/main/backend/migrations/001_initial_schema.sql"

    %% Styles
    classDef frontend fill:#D0E8FF,stroke:#0366D6,color:#0366D6
    classDef backend fill:#DFF2D8,stroke:#28A745,color:#28A745
    classDef db fill:#FFE5B4,stroke:#FF8C00,color:#FF8C00
    classDef tool fill:#E2E2E2,stroke:#6A737D,color:#6A737D
    classDef external fill:#F5F5F5,stroke:#444444,color:#444444
```
