How kevanmacgee/linkboard works
Project Type & Purpose
• Project Type: Single‐Page Application (SPA) delivered purely as static HTML/CSS/JS.
• Purpose: Let users create, categorize, drag‐and‐drop bookmarks, export/import data, and optionally install via a bookmarklet. Data lives in browser localStorage; favicon URLs are fetched from the web.
File Structure
• Root files (.gitignore, README.md) document status, features, issues.
• app/index.html: core SPA.
• app/linkboardResetData.json + test JSON files: sample data for import/restore.
• variants/*.html: design iterations of the same SPA.
• app/*.md and screenshots/: documentation & visuals.
Key Components to Model
a. Browser UI Layer
• HTML/CSS/JS loaded in the user’s browser tab (index.html).
• DOM module: renders columns/categories and links.
• Drag‐and‐drop handler module.
• Import/export module.
b. Data Layer
• Browser localStorage (persistent key–value store).
• JSON data (export/import).
c. External Services
• Favicon fetcher: HTTP requests to external domains (e.g., “https://www.google.com/s2/favicons?domain=…”).
• (Future) REST API + Database for persistence.
• (Optional) CDN/hosting layer (e.g., Cloudflare Pages) serving the static assets.
d. Bookmarklet Wrapper
• Tiny JS snippet injected into arbitrary sites.
• Loads the hosted index.html or JS payload.
Relationships & Data Flows
• User → Browser UI: click “Add link”, drag events → triggers JavaScript controllers.
• UI ↔ localStorage: read on load, write on add/edit/move/delete.
• UI → External Favicon Service: fetch favicon URLs for each new link.
• UI ↔ JSON Import/Export: serialize/deserialize localStorage state.
• Bookmarklet → UI loader: when invoked on any page, loads the index.html script.
Architectural Patterns & Principles
• SPA pattern: all UI logic lives in the client.
• MVC‐style separation at a high level:
• Model = JSON data in localStorage
• View = HTML/CSS templates in the DOM
• Controller = JS event handlers (add, drag, import/export)
• Future layering: move Model to server‐side REST API + DB.