How waleedhkhan/blog works
Main Components
• Frontend Website – Represent the Astro-based static site that renders pages using MDX content, incorporates layouts and styling (with Tailwind CSS), and uses components across frameworks (React, Vue, and Astro components). The “src” directory (with its subdirectories for components, layouts, styles, and pages) is the heart of this part.
• Bookmarks Management CLI – Include a separate block for the Node.js CLI tool (located within the “scripts” folder and invoked from the command line). This tool interacts with the bookmarks JSON file (found in “src/data/bookmarks.json”) by adding, categorizing, and updating bookmark records.
Relationships & Interactions
• CLI Tool → Bookmarks Data: Show that the CLI tool (bookmarks-cli.js) updates the bookmarks JSON file, which is then used by the website to display categorized bookmarks.
• Plugin and Transformation Pipelines: Demonstrate how custom remark plugins (in “src/plugins/remark”) transform MDX content during the build process.
Architectural Patterns & Design Principles
• Islands Architecture: Clearly separate static content rendering from interactive islands (React/Vue components) that hydrate on the client side.
• Separation of Concerns: Segregate the API endpoints, content, layout components, and utility libraries into distinct blocks.
• Build-Time vs. Run-Time: Emphasize that much of the site is statically generated (for performance), while dynamic functionalities like theme switching and music integration are handled at runtime.
Technologies, Frameworks, and Libraries
• Astro (static site generator)
• React & Vue (UI interactivity)
• Tailwind CSS (styling and responsive design)
• MDX with custom plugins (content processing)
• Node.js (CLI tool for bookmarks management)
• Last.fm API (music integration)
• Sharp, Fontaine, and other performance optimization tools