How superraihan/quick-note- works
Project type and purpose
• Quick Notes is a static, browser-based single-page web application (SPA) with no backend server.
• Purpose: allow users to quickly create, view, and manage personal notes in-memory (or with browser storage in future), with a theme toggle and dialog-based input form.
File structure
• Top-level files:
• indext.html (serves as the main view)
• style.css (presentation layer)
• app.js (application logic)
• README.md (documentation)
• No “backend” or API directories—entire system lives in the client.
README for additional insights
• README outlines: UI features (note grid, dialog form, theme toggle), technical stack (HTML, CSS, JS), and potential enhancements (persistence, search, rich text).
• No existing server component—persistence is planned via localStorage or future database.
Main components
a. Browser Client
• View Layer: index.html + style.css
– Header (title, “Add Note” button, theme toggle)
– Main Notes Grid (dynamically populated)
– Dialog Form (modal for adding notes)
– Footer (branding)
• Controller / Logic Layer: app.js
– Note Manager module (create, render, delete in-memory)
– Theme Manager module (toggle CSS variables or classes)
– Dialog Controller (open/close form, validate input)
• Data Store:
– In-Memory Array (current notes)
– (Future) Browser localStorage or IndexedDB as persistence
b. (Optional Future) External Services
• REST API / Database for permanent storage
• Search service or rich-text formatting library
Relationships and data flow
• User clicks “+ Add Note” → Dialog Controller opens modal
• User submits form → Note Manager validates and adds note to in-memory array (or localStorage)
• Manager triggers View Layer to re-render Notes Grid
• User toggles theme → Theme Manager updates CSS classes/variables → View Layer reflects new theme
• (Future) On save/delete, Controller sends HTTP request to External API → API persists data → Controller updates Data Store and View
Architectural patterns and design principles
• MVC-lite:
• Model: notes data array (and future localStorage)
• View: static HTML + dynamic rendering via DOM manipulation
• Controller: app.js modules handling events and updates
• Single Responsibility: separate modules for notes logic, theme toggling, and dialog control