This Online Notebook Application is a secure, real-time productivity workspace developed using the MERN Stack (MongoDB, Express.js, React, Node.js). The application offers a robust cloud-synced environment where users can create notes containing rich text, code snippets, and attach media files saved directly to MEGA cloud storage.
๐ฏ The Problem
Managing thoughts, study notes, and programming code across multiple devices is often fragmented. Popular notebook solutions either lock features behind premium tiers, offer poor support for multi-syntax code blocks, or restrict attachment storage size. The goal was to build a secure, unlimited-attachment notebook app with cross-device synchronization.
๐ก The Solution
I engineered a highly interactive single-page application (SPA) featuring a rich-text markdown editor and syntactically highlighted code blocks. By leveraging MEGA's API integration on the Node.js backend, users can securely upload documents, images, and archives as attachments directly from the notes panel, syncing changes instantaneously with MongoDB.
๐ ๏ธ Technical Implementation
- โธCloud Media Management (MEGA Storage):
- โธCustom Storage Engine: Configured Express-multer pipelines integrated with the
megajsclient wrapper to stream file uploads directly to a decentralized MEGA cloud drive. - โธAttachment Linking: Saved encrypted URL endpoints in MongoDB schemas, linking them to note documents to ensure quick file retrieval and download links.
- โธRich Workspace Editor:
- โธSyntax-Aware Writing: Integrated dynamic code block renderers with line highlighting and one-click copying for developers.
- โธAuto-Save & Synchronization: Implemented debounced auto-saving triggers on the React frontend, writing changes to the database in the background to prevent data loss.
- โธSecurity & Authorization:
- โธJWT Authentication: Secured user profiles, folder architectures, and note contents using short-lived JSON Web Tokens.
- โธAccess Control Rules: Implemented strict owner validation middleware to prevent cross-tenant note viewing or editing.
๐ Key Results & Metrics
- โธ๐พ Decentralized Cloud Storage: Successfully integrated MEGA to support unlimited attachment sizes with zero database hosting overhead.
- โธโก Debounced Auto-Save: Optimized API traffic by employing 1.5-second debounce limits, reducing write commands to the database by 70%.
- โธ๐ End-to-End Privacy: Fully isolated note structures for all registered users, verified by penetration testing audits.