# luv-bug-likelion/luv_bug_fe architecture

> Architecture diagram of the GitHub repository luv-bug-likelion/luv_bug_fe, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-08-11). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/luv-bug-likelion/luv_bug_fe
- Repository: https://github.com/luv-bug-likelion/luv_bug_fe

## Overview

##### Project type and purpose
- This is a single-page front-end application built with React (JSX) and Vite.
- It serves as the “sijangtong-fe” client, handling UI, routing, and styling for user onboarding and other pages.

##### File structure
- Top-level files and directories:
- index.html – the HTML shell for the SPA
- package.json / package-lock.json – project metadata, dependencies
- vite.config.js – Vite bundler configuration
- src/ – all React source code
- Inside src/:
- main.jsx – entry point, mounts React into index.html
- App.jsx + App.css – root application component and styles
- Router.jsx – defines client-side routes
- pages/ – per-route components, e.g., Onboarding.jsx + Onboarding.css
- Tooling/config: .nvmrc, eslint.config.js, .gitignore, npm scripts

##### README for additional insights
- Describes local setup: `npm install` + `npm run dev`
- Branching rules and workflow are front-end–focused
- No mention of built-in backend—imply external APIs

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Development Environment
    subgraph "Development Environment"
        dev["Developer Workstation\n(Node.js & npm)"]:::devtools
        env[".nvmrc"]:::devtools
        eslint["eslint.config.js"]:::devtools
    end

    %% Build Toolchain
    subgraph "Build Toolchain"
        bundle["Vite Bundler\n(vite.config.js)"]:::devtools
        pkg1["package.json"]:::devtools
        pkg2["package-lock.json"]:::devtools
    end

    %% Source Code
    subgraph "Source Code (src/)"
        HTMLShell["index.html"]:::frontend
        main["src/main.jsx"]:::frontend
        AppComp["src/App.jsx"]:::frontend
        AppCSS["src/App.css"]:::frontend
        indexCSS["src/index.css"]:::frontend
        RouterComp["src/Router.jsx"]:::frontend
        OnboardComp["src/pages/Onboarding.jsx"]:::frontend
        OnboardCSS["src/pages/Onboarding.css"]:::frontend
    end

    %% Runtime
    Browser["Browser\n(Chrome, Safari, etc.)"]:::frontend
    API["External API Services\n(REST/GraphQL)"]:::external

    %% Connections
    dev -->|"npm run dev/build"| bundle
    env --> bundle
    eslint --> bundle
    pkg1 --> bundle
    pkg2 --> bundle

    bundle -->|"reads and bundles assets"| HTMLShell
    bundle -->|"processes source files"| main
    bundle --> HTMLShell
    bundle --> AppComp
    bundle --> RouterComp
    bundle --> OnboardComp
    bundle --> AppCSS
    bundle --> indexCSS
    bundle --> OnboardCSS

    bundle -->|"serves bundled app"| Browser

    Browser -->|"runs main.jsx"| main
    main -->|"renders App.jsx"| AppComp
    AppComp -->|"uses Router.jsx"| RouterComp
    RouterComp -->|"loads Onboarding.jsx"| OnboardComp

    Browser -->|HTTP GET/POST| API

    %% Click Events
    click env "https://github.com/luv-bug-likelion/luv_bug_fe/blob/main/.nvmrc"
    click eslint "https://github.com/luv-bug-likelion/luv_bug_fe/blob/main/eslint.config.js"
    click bundle "https://github.com/luv-bug-likelion/luv_bug_fe/blob/main/vite.config.js"
    click pkg1 "https://github.com/luv-bug-likelion/luv_bug_fe/blob/main/package.json"
    click pkg2 "https://github.com/luv-bug-likelion/luv_bug_fe/blob/main/package-lock.json"
    click HTMLShell "https://github.com/luv-bug-likelion/luv_bug_fe/blob/main/index.html"
    click main "https://github.com/luv-bug-likelion/luv_bug_fe/blob/main/src/main.jsx"
    click AppComp "https://github.com/luv-bug-likelion/luv_bug_fe/blob/main/src/App.jsx"
    click AppCSS "https://github.com/luv-bug-likelion/luv_bug_fe/blob/main/src/App.css"
    click indexCSS "https://github.com/luv-bug-likelion/luv_bug_fe/blob/main/src/index.css"
    click RouterComp "https://github.com/luv-bug-likelion/luv_bug_fe/blob/main/src/Router.jsx"
    click OnboardComp "https://github.com/luv-bug-likelion/luv_bug_fe/blob/main/src/pages/Onboarding.jsx"
    click OnboardCSS "https://github.com/luv-bug-likelion/luv_bug_fe/blob/main/src/pages/Onboarding.css"

    %% Styles
    classDef devtools fill:#AED6F1,stroke:#21618C,color:#154360
    classDef frontend fill:#ABEBC6,stroke:#1D8348,color:#145A32
    classDef external fill:#F8C471,stroke:#B9770E,color:#7E5109
```
