# bert093-project/lokalink-website architecture

> Architecture diagram of the GitHub repository bert093-project/lokalink-website, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-03-03). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/bert093-project/lokalink-website
- Repository: https://github.com/bert093-project/lokalink-website

## Overview

##### Project type & purpose (from README + tree)
**LocaLink** is a **minimalist Next.js (App Router) web application** built with **React + Tailwind CSS + DaisyUI**, using **Bun** as the package manager/runtime for dev scripts.
From the file tree, it appears to be a **pure frontend web app** (no `/api` routes, no backend service code, no database layer). The “system” is essentially:
- A browser-delivered UI
- A Next.js server/runtime (dev server and/or production server) responsible for rendering/serving pages and static assets
- Styling pipeline (Tailwind/PostCSS)
- A small utilities module (`src/utils/lenis.ts`) for UI behavior (smooth scrolling, likely)

##### Next.js App Router structure
- `src/app/layout.tsx`: **Root layout** (global shell). This is the top-level UI composition boundary in App Router.
- `src/app/page.tsx`: Route for `/` (home page).
- `src/app/aboutus/page.tsx`: Route for `/aboutus`.
- `src/app/pagesanimation/page.tsx`: Route for `/pagesanimation`.
- `src/app/globals.css`: global styles imported by layout.
- `src/app/img/**`: static image assets used by pages/components (team images).

##### Shared utilities
- `src/utils/lenis.ts`: reusable utility module (likely smooth scrolling / animation integration). This is an internal “library” component used by one or more pages/layout.

##### Runtime / Request flow (what runs in production or dev)
- User Browser
- Next.js Runtime (dev server or production server)
- Static assets (images, CSS)

##### Build / Tooling flow (what produces the runtime artifacts)
- Bun (scripts: `bun run dev`, `bun install`)
- Next build pipeline
- Tailwind + PostCSS
- DaisyUI plugin (Tailwind plugin)
- TypeScript compilation + ESLint checks (CI-ish)

This prevents the common mistake of mixing “Tailwind” as a runtime service (it’s not; it’s build-time).

##### Client: Browser
- Renders React UI
- Requests routes: `/`, `/aboutus`, `/pagesanimation`
##### Next.js App (App Router)
- **Route modules**
- `src/app/page.tsx` (Home)
- `src/app/aboutus/page.tsx` (About Us)
- `src/app/pagesanimation/page.tsx` (Pages Animation)
- **Root Layout**
- `src/app/layout.tsx` (wraps all routes, imports globals)
- **Global Styles**
- `src/app/globals.css`
- **UI Utility**
- `src/utils/lenis.ts` (consumed by layout/pages for smooth scroll/animation behavior)
##### Static Assets
- `src/app/img/ourteam/*.webp` (served to client; either via Next static serving or bundling depending on usage)

##### Bun
- `bun install` (dependency install)
- `bun run dev` (start Next dev server)
##### Next.js Build System
- Bundles JS/TS, performs SSR/SSG decisions depending on page usage
##### Tailwind CSS + PostCSS
- Config via `postcss.config.mjs`
- Produces final CSS consumed by `globals.css`
##### DaisyUI
- Tailwind plugin layer (component styling conventions)
##### TypeScript / ESLint
- `tsconfig.json`, `eslint.config.mjs`

##### Architectural patterns/design principles present (call these out
- **Next.js App Router / file-based routing**: each `app/<route>/page.tsx` is a route boundary.
- **Root layout composition**: `layout.tsx` provides global shell + styling import.
- **Utility module separation**: `src/utils/lenis.ts` is shared behavior, not duplicated in pages.
- **Styling architecture**: Tailwind utility-first + DaisyUI component layer; global CSS entrypoint.

##### “Don’t overthink it” but still be very detailed: how to split components
Since this is a small repo, the best detail comes from **splitting by Next.js boundaries**:
- Split **assets** (images) as their own node (because they’re part of delivered experience).
- Split **utilities** (`lenis.ts`) as a dependency node.
- Split **toolchain** into Bun vs Next vs Tailwind/PostCSS vs DaisyUI.

That decomposition is “as many components as possible” without inventing services that aren’t in the repository.

## Diagram (Mermaid)

```mermaid
flowchart TD

  %% =========================
  %% Runtime / Request Flow
  %% =========================
  subgraph "Runtime / Deployment (Request Flow)"
    direction TB

    U["User"]:::external
    B["Browser (Client Runtime)"]:::client

    subgraph "Hosting / Delivery"
      direction TB
      H["Hosting/CDN (generic)"]:::external
      NJS["Next.js Runtime Server (App Router)"]:::server
    end

    subgraph "LocaLink Next.js App (src/app)"
      direction TB

      AR["App Router (application root)"]:::app

      L["Root Layout (Global Shell)"]:::code
      G["Global Stylesheet"]:::stylesheet

      subgraph "Route Modules"
        direction TB
        R1["Home Route \"/\""]:::route
        R2["About Us Route \"/aboutus\""]:::route
        R3["Pages Animation Route \"/pagesanimation\""]:::route
      end

      UTL["Shared UI Utility (Lenis smooth scrolling)"]:::util

      subgraph "Static Assets"
        direction TB
        IMG["Team Images (ourteam)"]:::asset
        BUND["Compiled JS/CSS Chunks (Next output)"]:::asset
      end
    end

    %% Runtime connections
    U -->|"uses"| B
    B -->|"HTTPS:GET /,/aboutus,/pagesanimation"| H
    H -->|"routes_to"| NJS
    NJS -->|"renders/serves"| AR

    AR -->|"composes"| L
    L -->|"imports"| G

    AR -->|"file_based_routing"| R1
    AR -->|"file_based_routing"| R2
    AR -->|"file_based_routing"| R3

    L -->|"uses"| UTL
    R1 -->|"uses"| UTL
    R2 -->|"uses"| UTL
    R3 -->|"uses"| UTL

    NJS -->|"serves_assets"| BUND
    NJS -->|"serves_images"| IMG

    B -->|"fetches"| BUND
    B -->|"fetches"| IMG
  end

  %% =========================
  %% Build & Tooling Pipeline
  %% =========================
  subgraph "Build & Tooling (Repo → Runnable Artifacts)"
    direction TB

    DEV["Developer Machine / CI Runner"]:::external

    BUN["Bun (install + scripts)"]:::tool
    PKG["package.json (scripts + deps)"]:::config
    LOCK["bun.lock (dependency snapshot)"]:::config
    DOC["README.md (usage/docs)"]:::doc

    NB["Next.js Build System"]:::tool
    NC["next.config.ts"]:::config

    TW["Tailwind CSS + PostCSS Pipeline"]:::tool
    PC["postcss.config.mjs"]:::config
    DU["DaisyUI (Tailwind plugin)"]:::tool
    SH["components.json (shadcn/ui config)"]:::config

    TS["TypeScript (typecheck)"]:::quality
    TSC["tsconfig.json"]:::config
    ES["ESLint (lint rules)"]:::quality
    ESC["eslint.config.mjs"]:::config

    ART["Build Artifacts (Server bundle + static assets)"]:::artifact
    DEP["Deploy Target (generic)"]:::external

    %% Build connections
    DEV -->|"reads"| DOC
    DEV -->|"bun_install"| BUN
    BUN -->|"uses"| PKG
    BUN -->|"produces/uses"| LOCK

    BUN -->|"bun_run_dev/build"| NB
    NB -->|"configured_by"| NC

    NB -->|"processes_css"| TW
    TW -->|"configured_by"| PC
    TW -->|"plugin"| DU
    DU -->|"ui_conventions"| SH

    %% Quality gates (dotted)
    DEV -.->|"checks"| TS
    TS -.->|"configured_by"| TSC
    DEV -.->|"checks"| ES
    ES -.->|"configured_by"| ESC

    NB -->|"outputs"| ART
    ART -->|"deployed_to"| DEP
  end

  %% Build → Runtime linkage
  DEP -->|"serves"| H

  %% =========================
  %% Click Events (from component mapping)
  %% =========================
  click AR "https://github.com/bert093-project/lokalink-website/tree/main/src/app/"
  click L "https://github.com/bert093-project/lokalink-website/blob/main/src/app/layout.tsx"
  click G "https://github.com/bert093-project/lokalink-website/blob/main/src/app/globals.css"
  click R1 "https://github.com/bert093-project/lokalink-website/blob/main/src/app/page.tsx"
  click R2 "https://github.com/bert093-project/lokalink-website/blob/main/src/app/aboutus/page.tsx"
  click R3 "https://github.com/bert093-project/lokalink-website/blob/main/src/app/pagesanimation/page.tsx"
  click IMG "https://github.com/bert093-project/lokalink-website/tree/main/src/app/img/ourteam/"
  click UTL "https://github.com/bert093-project/lokalink-website/blob/main/src/utils/lenis.ts"
  click NC "https://github.com/bert093-project/lokalink-website/blob/main/next.config.ts"
  click PC "https://github.com/bert093-project/lokalink-website/blob/main/postcss.config.mjs"
  click SH "https://github.com/bert093-project/lokalink-website/blob/main/components.json"
  click TSC "https://github.com/bert093-project/lokalink-website/blob/main/tsconfig.json"
  click ESC "https://github.com/bert093-project/lokalink-website/blob/main/eslint.config.mjs"
  click LOCK "https://github.com/bert093-project/lokalink-website/blob/main/bun.lock"
  click PKG "https://github.com/bert093-project/lokalink-website/blob/main/package.json"
  click DOC "https://github.com/bert093-project/lokalink-website/blob/main/README.md"

  %% =========================
  %% Styles
  %% =========================
  classDef external fill:#E9EEF6,stroke:#3B5B8A,stroke-width:1px,color:#0B1B34;
  classDef client fill:#DFF5E3,stroke:#1E6B2E,stroke-width:1px,color:#0B2A12;
  classDef server fill:#FFE6D6,stroke:#A0431A,stroke-width:1px,color:#3B1407;
  classDef app fill:#E6DDFF,stroke:#4A2EA6,stroke-width:1px,color:#1A0D4D;
  classDef route fill:#F3E8FF,stroke:#6B21A8,stroke-width:1px,color:#2A0A3D;
  classDef code fill:#E6F0FF,stroke:#1D4ED8,stroke-width:1px,color:#0B1F57;
  classDef util fill:#E0FBFF,stroke:#0E7490,stroke-width:1px,color:#083344;
  classDef stylesheet fill:#FFF7D6,stroke:#B45309,stroke-width:1px,color:#3A2204;
  classDef asset fill:#F1F5F9,stroke:#475569,stroke-width:1px,color:#0F172A;

  classDef tool fill:#FFF1F2,stroke:#BE123C,stroke-width:1px,color:#4C0519;
  classDef config fill:#FAFAFA,stroke:#64748B,stroke-width:1px,color:#0F172A;
  classDef quality fill:#ECFCCB,stroke:#3F6212,stroke-width:1px,color:#1A2E05;
  classDef artifact fill:#E2E8F0,stroke:#334155,stroke-width:1px,color:#0F172A;
  classDef doc fill:#FDF4FF,stroke:#A21CAF,stroke-width:1px,color:#3B0764;
```
