# born2bemedia/trendelladigital architecture

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

- Interactive diagram: https://gitdiagram.com/born2bemedia/trendelladigital
- Repository: https://github.com/born2bemedia/trendelladigital

## Overview

##### Project type and purpose
- This is a full-stack Next.js (v13+) application using the App Router.
- Purpose: a marketing/site portal with internationalization, user authentication flows, dynamic pages (business-consulting, careers, contact-us, etc.), and shared UI/feature modules.

##### File structure
- Top-level config: pnpm, ESLint, Prettier, Husky (pre-commit hooks), Next.js config, PostCSS.
- messages/: localization JSONs (en.json, etc.).
- public/: static assets (images, fonts).
- scripts/: helper script for extracting translations.
- src/app/: Next.js App Router routes organized by locale and layout segments (account, auth, home, etc.).
- src/core/: low-level auth and user services (API calls, schemas, UI forms, global stores).
- src/features/: feature modules (business-consulting, careers, consulting, contact-form, groups, order, packages, products, password flows, etc.)

##### README
- Confirms Next.js app, dev commands, deployment via Vercel, next/font optimization.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Client
    subgraph "Client (Browser)"
        Browser["React Browser"]:::ui
    end

    %% Server
    subgraph "Next.js Server"
        Middleware["Middleware<br/>(auth redirects, locale detection)"]:::service
        AppRouter["App Router & Route Handlers<br/>(src/app/[locale]/)"]:::service
        I18n["Internationalization Layer<br/>(src/i18n/)"]:::service
        Messages["Localization Message Files<br/>(messages/*.json)"]:::service

        Middleware -->|intercepts requests| AppRouter
        AppRouter -->|loads i18n utilities| I18n
        I18n -->|loads messages| Messages

        %% Core Services
        subgraph "Core Services"
            CoreAuthAPI["Auth API Client"]:::service
            CoreAuthSchemas["Auth Schemas (Zod)"]:::service
            CoreAuthUI["Auth UI Forms"]:::service
            CoreUserAPI["User API Client"]:::service
            CoreUserModel["User Schemas & Store"]:::service
            CoreUserUI["User UI Components"]:::service
        end

        AppRouter --> CoreAuthAPI
        AppRouter --> CoreUserAPI
        CoreAuthAPI --> CoreAuthSchemas
        CoreAuthAPI --> CoreAuthUI
        CoreUserAPI --> CoreUserModel
        CoreUserAPI --> CoreUserUI

        %% Feature Modules
        subgraph "Feature Modules"
            BC["Business-Consulting"]:::service
            Careers["Careers"]:::service
            Consulting["Consulting"]:::service
            ContactForm["Contact-Form"]:::service
            Order["Order"]:::service
            Packages["Packages"]:::service
            Products["Products"]:::service
            ResetPassword["Reset Password"]:::service
            ChangePassword["Change Password"]:::service
        end

        AppRouter --> BC
        AppRouter --> Careers
        AppRouter --> Consulting
        AppRouter --> ContactForm
        AppRouter --> Order
        AppRouter --> Packages
        AppRouter --> Products
        AppRouter --> ResetPassword
        AppRouter --> ChangePassword

        %% Shared Layer
        subgraph "Shared Layer"
            SharedUIKit["Shared UI Kit"]:::shared
            SharedUIComp["Shared UI Components"]:::shared
            SharedIcons["Shared Icons"]:::shared
            SharedLib["Shared Utility Libraries"]:::shared
            SharedConfig["Environment Config"]:::shared
        end

        CoreAuthUI --> SharedUIKit
        CoreAuthUI --> SharedUIComp
        CoreUserUI --> SharedUIKit
        CoreUserUI --> SharedUIComp
        BC --> SharedUIKit
        Careers --> SharedUIKit

        %% Static Assets
        PublicAssets["Static Assets<br/>(public/images/, public/fonts/)"]:::external

        %% Tooling & CI
        subgraph "Tooling & CI"
            Scripts["Translation Extraction Script"]:::tooling
            Husky["Husky Hooks"]:::tooling
            ESLint["ESLint Config"]:::tooling
            Prettier["Prettier Config"]:::tooling
            PostCSS["PostCSS Config"]:::tooling
            NextConfig["Next.js Config"]:::tooling
            PnpmLock["pnpm-lock.yaml"]:::tooling
            TsConfig["tsconfig.json"]:::tooling
        end
    end

    %% External Services
    AuthBackend["External Auth Backend"]:::external
    Analytics["Analytics Service"]:::external
    CDN["CDN for Assets"]:::external

    %% Data Flows
    Browser -->|HTTP Requests| Middleware
    CoreAuthAPI -->|calls| AuthBackend
    PublicAssets -->|served via| CDN

    %% Click Events
    click AppRouter "https://github.com/born2bemedia/trendelladigital/tree/main/src/app/[locale]/"
    click I18n "https://github.com/born2bemedia/trendelladigital/tree/main/src/i18n/"
    click Messages "https://github.com/born2bemedia/trendelladigital/blob/main/messages/en.json"
    click Middleware "https://github.com/born2bemedia/trendelladigital/blob/main/src/middleware.ts"
    click CoreAuthAPI "https://github.com/born2bemedia/trendelladigital/tree/main/src/core/auth/api/"
    click CoreAuthSchemas "https://github.com/born2bemedia/trendelladigital/tree/main/src/core/auth/model/schemas/"
    click CoreAuthUI "https://github.com/born2bemedia/trendelladigital/blob/main/src/core/auth/ui/login-form.tsx"
    click CoreAuthUI "https://github.com/born2bemedia/trendelladigital/blob/main/src/core/auth/ui/sign-up-form.tsx"
    click CoreUserAPI "https://github.com/born2bemedia/trendelladigital/tree/main/src/core/user/api/"
    click CoreUserModel "https://github.com/born2bemedia/trendelladigital/tree/main/src/core/user/model/"
    click CoreUserModel "https://github.com/born2bemedia/trendelladigital/blob/main/src/core/user/model/user.store.ts"
    click CoreUserUI "https://github.com/born2bemedia/trendelladigital/blob/main/src/core/user/ui/edit-user-form.tsx"
    click CoreUserUI "https://github.com/born2bemedia/trendelladigital/blob/main/src/core/user/ui/user-info.tsx"
    click BC "https://github.com/born2bemedia/trendelladigital/tree/main/src/features/business-consulting/"
    click Careers "https://github.com/born2bemedia/trendelladigital/tree/main/src/features/careers/"
    click Consulting "https://github.com/born2bemedia/trendelladigital/tree/main/src/features/consulting/"
    click ContactForm "https://github.com/born2bemedia/trendelladigital/tree/main/src/features/contact-form/"
    click Order "https://github.com/born2bemedia/trendelladigital/tree/main/src/features/order/"
    click Packages "https://github.com/born2bemedia/trendelladigital/tree/main/src/features/packages/"
    click Products "https://github.com/born2bemedia/trendelladigital/tree/main/src/features/products/"
    click ResetPassword "https://github.com/born2bemedia/trendelladigital/tree/main/src/features/reset-password/"
    click ChangePassword "https://github.com/born2bemedia/trendelladigital/tree/main/src/features/change-password/"
    click SharedUIKit "https://github.com/born2bemedia/trendelladigital/tree/main/src/shared/ui/kit/"
    click SharedUIComp "https://github.com/born2bemedia/trendelladigital/tree/main/src/shared/ui/components/"
    click SharedIcons "https://github.com/born2bemedia/trendelladigital/tree/main/src/shared/icons/"
    click SharedLib "https://github.com/born2bemedia/trendelladigital/tree/main/src/shared/lib/"
    click SharedConfig "https://github.com/born2bemedia/trendelladigital/blob/main/src/shared/config/env.ts"
    click PublicAssets "https://github.com/born2bemedia/trendelladigital/tree/main/public/images/"
    click Scripts "https://github.com/born2bemedia/trendelladigital/blob/main/scripts/extract-translations.ts"
    click Husky "https://github.com/born2bemedia/trendelladigital/tree/main/.husky/pre-commit"
    click ESLint "https://github.com/born2bemedia/trendelladigital/blob/main/eslint.config.mjs"
    click Prettier "https://github.com/born2bemedia/trendelladigital/blob/main/prettier.config.mjs"
    click PostCSS "https://github.com/born2bemedia/trendelladigital/blob/main/postcss.config.mjs"
    click NextConfig "https://github.com/born2bemedia/trendelladigital/blob/main/next.config.ts"
    click PnpmLock "https://github.com/born2bemedia/trendelladigital/blob/main/pnpm-lock.yaml"
    click TsConfig "https://github.com/born2bemedia/trendelladigital/blob/main/tsconfig.json"

    %% Styles
    classDef ui fill:#E3F2FD,stroke:#90CAF9,color:#0D47A1
    classDef service fill:#E8F5E9,stroke:#66BB6A,color:#1B5E20
    classDef shared fill:#F5F5F5,stroke:#BDBDBD,color:#424242
    classDef external fill:#FFF3E0,stroke:#FFA726,color:#E65100
    classDef tooling fill:#F3E5F5,stroke:#AB47BC,color:#4A148C
```
