# sakamochanq/kit-extension-pack architecture

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

- Interactive diagram: https://gitdiagram.com/sakamochanq/kit-extension-pack
- Repository: https://github.com/sakamochanq/kit-extension-pack

## Overview

##### Project type and purpose
- This is a **browser‐extension package** (Chrome/Edge), composed of three modular features (“prominent-button”, “focus-login”, “task-indicator”) that enhance the usability of the Kanazawa Institute of Technology student portal.

##### File structure
- Top level:
- manifest.json – declares extension metadata, content scripts, and permissions
- src/packages/ – three independent feature‐folders, each exposing one or more JavaScript entry points
- src/packages/prominent-button/main.js – highlights the attendance-confirmation button
- src/packages/focus-login/main.js – captures Enter key to auto-submit login
- src/packages/task-indicator/
- content.js – injected into portal pages to read/manage tasks
- popup.html / popup.js / popup.css – UI for a browser-action popup to register and view tasks

##### README for additional insights
- Confirms that all features are loaded via the manifest’s content_scripts array, matching student portal URLs
- No background/service-worker code – logic is split between content scripts and the popup UI

## Diagram (Mermaid)

```mermaid
flowchart TB
    Browser["Chrome/Edge Runtime"]:::external
    Browser --> Manifest["Manifest"]:::extEngine

    subgraph "Browser Extension"
      Manifest
      Prominent["prominent-button.js"]:::script
      Focus["focus-login.js"]:::script
      TaskContent["task-indicator content.js"]:::script
      subgraph "Popup UI"
         PopupHTML["popup.html"]:::ui
         PopupJS["popup.js"]:::ui
         PopupCSS["popup.css"]:::ui
      end
      Storage["browser.storage API"]:::storage
      Assets["assets/"]:::resource
      Images["src/images/"]:::resource
    end

    Browser -->|"Injects on portal URL match"| Prominent
    Browser -->|"Injects on portal URL match"| Focus
    Browser -->|"Injects on portal URL match"| TaskContent
    Browser -->|"On icon click"| PopupHTML

    TaskContent -->|"reads/writes"| Storage
    PopupJS -->|"reads/writes"| Storage

    ExternalPortal["Student Portal (navi.mars.kanazawa-it.ac.jp)"]:::external
    Prominent -->|"manipulates DOM"| ExternalPortal
    Focus -->|"listens for keypress"| ExternalPortal
    TaskContent -->|"scrapes task data"| ExternalPortal

    click Manifest "https://github.com/sakamochanq/kit-extension-pack/blob/master/src/manifest.json"
    click Prominent "https://github.com/sakamochanq/kit-extension-pack/blob/master/src/packages/prominent-button/main.js"
    click Focus "https://github.com/sakamochanq/kit-extension-pack/blob/master/src/packages/focus-login/main.js"
    click TaskContent "https://github.com/sakamochanq/kit-extension-pack/blob/master/src/packages/task-indicator/content.js"
    click PopupHTML "https://github.com/sakamochanq/kit-extension-pack/blob/master/src/packages/task-indicator/popup.html"
    click PopupJS "https://github.com/sakamochanq/kit-extension-pack/blob/master/src/packages/task-indicator/popup.js"
    click PopupCSS "https://github.com/sakamochanq/kit-extension-pack/blob/master/src/packages/task-indicator/popup.css"
    click Assets "https://github.com/sakamochanq/kit-extension-pack/tree/master/assets/"
    click Images "https://github.com/sakamochanq/kit-extension-pack/tree/master/src/images/"

    classDef external fill:#f2f0f7,stroke:#333,stroke-width:1px
    classDef extEngine fill:#fff3cd,stroke:#333,stroke-width:1px
    classDef script fill:#bbdefb,stroke:#333,stroke-width:1px
    classDef ui fill:#c8e6c9,stroke:#333,stroke-width:1px
    classDef storage fill:#fff9c4,stroke:#333,stroke-width:1px
    classDef resource fill:#e0e0e0,stroke:#333,stroke-width:1px
```
