# kripanshu-singh/challenge-8--to-do- architecture

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

- Interactive diagram: https://gitdiagram.com/kripanshu-singh/challenge-8--to-do-
- Repository: https://github.com/kripanshu-singh/challenge-8--to-do-

## Overview

##### Project type and purpose
- This is a static, client-side “To-Do” single-page application built with vanilla HTML, CSS, and JavaScript. It is designed to run entirely in the browser and persist data using the Web Storage API (localStorage).

##### File structure
- Top level:
- index.html – the single entry point and UI shell
- script.js – application logic for rendering tasks, handling user events, and managing storage
- style.css – all presentation rules and layout
- No backend, build scripts, or server-side code—everything executes in the client.

##### README for additional insights
- Confirms that the site is deployed (via GitHub Pages) at the provided URL.
- No extra architecture notes, so we infer standard static-site patterns.

a. Main components
1. Browser / Client
- UI Layer (HTML/CSS)
- Logic Layer (JavaScript)
- Storage Layer (localStorage API)
2. Asset Store (static assets in Asset/ directory)
3. Hosting Platform (GitHub Pages)
b. Relationships and interactions
- User interacts with the HTML UI in the browser.
- script.js listens for events (add, delete, toggle task), manipulates the DOM, and reads/writes to localStorage.
- style.css is loaded by index.html to style the UI.
- The hosting platform serves the static files over HTTP(S).
c. Architectural patterns/design principles
- Single-Page Application (SPA) pattern: all views and logic live client-side.
- Separation of concerns: HTML for structure, CSS for style, JS for behavior.
- Client-side persistence using the Web Storage API.
d. Key technologies
- HTML5, CSS3, vanilla JavaScript (ES6+)
- localStorage API for data persistence
- GitHub Pages (static file hosting)
- Browser DOM & Event loop

## Diagram (Mermaid)

```mermaid
flowchart TB
    Hosting["GitHub Pages (Hosting)"]:::hosting
    Assets["Asset Store"]:::assets

    subgraph "Browser/Client"
        HTMLUI["HTML UI"]:::ui
        CSS["CSS Stylesheet"]:::ui
        JS["JS Logic"]:::logic
        DOM["DOM"]:::ui
        Storage["localStorage"]:::storage
    end

    Hosting -->|"Serves index.html"| HTMLUI
    Hosting -->|"Serves style.css"| CSS
    Hosting -->|"Serves script.js"| JS
    Hosting -->|"Serves assets"| Assets

    HTMLUI -->|"loads stylesheet"| CSS
    HTMLUI -->|"loads script"| JS
    HTMLUI -->|"renders UI in"| DOM
    HTMLUI -->|"fetches icons/images"| Assets

    DOM -->|"user events"| JS
    JS -->|"manipulates"| DOM
    JS -->|"reads/writes JSON"| Storage

    click HTMLUI "https://github.com/kripanshu-singh/challenge-8--to-do-/blob/main/index.html"
    click CSS "https://github.com/kripanshu-singh/challenge-8--to-do-/blob/main/style.css"
    click JS "https://github.com/kripanshu-singh/challenge-8--to-do-/blob/main/script.js"
    click Assets "https://github.com/kripanshu-singh/challenge-8--to-do-/tree/main/Asset/"

    classDef ui fill:#D0E8FF,stroke:#333,stroke-width:1px
    classDef logic fill:#D0FFD0,stroke:#333,stroke-width:1px
    classDef storage fill:#FFF2B8,stroke:#333,stroke-width:1px
    classDef hosting fill:#E0E0E0,stroke:#333,stroke-width:1px
    classDef assets fill:#F0F0F0,stroke:#333,stroke-width:1px
```
