How heyaryx/pinotes works
Main components
• Application Logic: The app.js file encompasses all the client-side logic. This includes creating, editing, auto-saving notes, toggling preview modes, encrypting/decrypting notes, and handling user interactions.
• External Dependencies: Include the libraries:
• Marked for Markdown parsing.
• DOMPurify for sanitizing HTML.
• Sharing/Encryption Service: Although it is implemented within the client code, highlight that a special note encryption and sharing mechanism exists, which generates shareable links.
Relationships and interactions
• The UI layer (index.html and styles.css) provides the interface for interacting with the note-taking features.
• When a note is created or edited, the app.js logic takes the raw text and processes it using Marked to convert Markdown to HTML, and DOMPurify ensures the generated HTML is safe.
• Encryption logic is also present within app.js to handle the encryption and decryption of shared notes.
Architectural patterns and design principles
• Although simple, the app follows a clear separation of concerns: HTML/CSS for presentation and app.js for all business logic.
• The system design promotes a single-page application (SPA) structure, where all logic occurs on the client side without the need for a backend server.
Relevant technologies and frameworks
• HTML, CSS, and JavaScript as the core languages.
• Marked, DOMPurify, and FontAwesome as key external libraries.
• The note sharing functionality (via encryption) should be clearly marked as a process that both transforms and secures note data.