# gauravmandall/gorlabs architecture

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

- Interactive diagram: https://gitdiagram.com/gauravmandall/gorlabs
- Repository: https://github.com/gauravmandall/gorlabs

## Overview

##### Main Architecture Components

The system should be represented as a monorepo architecture with the following main components:

a. Apps Layer:
- Landing App (Next.js 14)
- Documentation App (Next.js-based)

b. Packages Layer:
- UI Component Library
- Hooks Library
- Utils Library
- CLI Tool
- Shared Configurations (TypeScript, ESLint)

**┌─ Gorlabs Platform ─────────────────────┐**

- ┌─────────┐          ┌─────────┐     │
- Landing │          │  Docs   │     │
- App   │          │   App   │     │
- ┘          └─────────┘     │
- ▲                 ▲           │

- ┬────────┘           │

- ┌──────────────┐            │
- Shared      │            │
- Packages    │            │
- ┘            │
- ┘

##### Key Relationships to Highlight

- Dependencies between apps and shared packages
- Integration points between components
- Authentication flow
- Build and deployment pipeline

##### Component Details

For each major component, include:

a. Landing App:
- Next.js 14 server actions
- Authentication system
- PWA capabilities
- Analytics integration (Google Analytics, Microsoft Clarity)

b. UI Package:
- Component library with Storybook
- Theme provider
- Testing setup (Jest & RTL)

c. Shared Packages:
- Hooks
- Utils
- TypeScript configs
- ESLint configs

##### Technical Stack Indicators

- Next.js 14
- TypeScript
- TailwindCSS
- Jest
- Storybook
- Turborepo

##### Development Workflow

Development workflow with:
- Local development flow
- Testing pipeline
- Build process
- Deployment stages

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph Platform["Gorlabs Platform"]
        subgraph Apps["Applications Layer"]
            Landing["Landing App"]
            Docs["Documentation App"]
        end

        subgraph Packages["Shared Packages Layer"]
            subgraph UI["UI Package"]
                Components["Component Library"]
                ThemeProvider["Theme Provider"]
                Testing["Testing Setup"]
                Storybook["Storybook Integration"]
            end

            subgraph Libraries["Core Libraries"]
                Hooks["Hooks Library"]
                Utils["Utils Library"]
                CLI["CLI Tool"]
            end

            subgraph Config["Configuration"]
                TSConfig["TypeScript Config"]
                ESLintConfig["ESLint Config"]
            end
        end

        subgraph Features["Feature Components"]
            PWA["PWA Capabilities"]
            Analytics["Analytics Integration"]
            Auth["Authentication System"]
            Theme["Theme Implementation"]
            SiteConfig["Site Configuration"]
        end
    end

    %% Relationships
    Landing --> UI
    Landing --> Libraries
    Landing --> Features
    Docs --> UI
    Docs --> Libraries
    
    Components --> Testing
    Components --> ThemeProvider
    
    %% Click events for component mapping
    click Landing "https://github.com/gauravmandall/gorlabs/tree/main/apps/landing"
    click Docs "https://github.com/gauravmandall/gorlabs/tree/main/apps/docs"
    click Components "https://github.com/gauravmandall/gorlabs/tree/main/packages/ui/src/components"
    click ThemeProvider "https://github.com/gauravmandall/gorlabs/tree/main/packages/ui/src/providers/ThemeProvider"
    click Testing "https://github.com/gauravmandall/gorlabs/blob/main/packages/ui/.jest"
    click Storybook "https://github.com/gauravmandall/gorlabs/blob/main/packages/ui/.storybook"
    click Hooks "https://github.com/gauravmandall/gorlabs/tree/main/packages/hooks"
    click Utils "https://github.com/gauravmandall/gorlabs/tree/main/packages/utils"
    click CLI "https://github.com/gauravmandall/gorlabs/tree/main/packages/cli"
    click TSConfig "https://github.com/gauravmandall/gorlabs/tree/main/packages/typescript-config"
    click ESLintConfig "https://github.com/gauravmandall/gorlabs/tree/main/packages/eslint-config"
    click Analytics "https://github.com/gauravmandall/gorlabs/tree/main/apps/landing/src/metrics"
    click PWA "https://github.com/gauravmandall/gorlabs/blob/main/apps/landing/public/manifest.json"
    click Theme "https://github.com/gauravmandall/gorlabs/blob/main/apps/landing/src/themes/theme-button.tsx"
    click SiteConfig "https://github.com/gauravmandall/gorlabs/blob/main/apps/landing/src/config/site.ts"

    %% Styling
    classDef app fill:#2563eb,color:white
    classDef package fill:#16a34a,color:white
    classDef config fill:#ca8a04,color:white
    classDef feature fill:#9333ea,color:white
    
    class Landing,Docs app
    class Components,ThemeProvider,Testing,Storybook,Hooks,Utils,CLI package
    class TSConfig,ESLintConfig config
    class PWA,Analytics,Auth,Theme,SiteConfig feature

    %% Legend
    subgraph Legend
        AppLegend["Application"]:::app
        PackageLegend["Package"]:::package
        ConfigLegend["Configuration"]:::config
        FeatureLegend["Feature"]:::feature
    end
```
