How yousefbilal/banner-to-google-calendar works
Main Components
• Chrome Extension Code: Represent all files under the “extension” directory. These include:
• Manifest file (manifest.json) specifying the extension’s behavior, permissions, and entry points.
• Content scripts (e.g., content_script.js) that interact with the webpage, and background/popup scripts (e.g., popup.js, errors.js, etc.) managing UI interactions.
• UI Assets like popup.html and popup.css.
• Dependencies and build configuration (package.json, package-lock.json) indicating the use of NPM, Parcel as the bundler, and moment.js for date formatting.
• Build & Bundling Process: Illustrate the bundler step that takes raw source files and produces the optimized output in “extension/dist/”. Highlight that the Parcel bundler (or an alternative) is used along with specific build scripts (build and build:test) defined in package.json.
• Google Calendar & Chrome Identity Integration:
• Hugo Static Website:
• “site” directory containing Hugo configuration (hugo.toml), content (under site/content), archetypes, static assets, and themes (with the PaperMod theme inside “site/themes/PaperMod”).
• Integration with GitHub Actions workflows (in .github/workflows/hugo-deploy.yaml and theme-specific workflows) that automate the website deployment.
Relationships and Interactions
• From the extension’s UI (popup.html and popup.js) → Triggering the OAuth flow using Chrome Identity API.
• From the extension logic → Formatting dates with moment.js.
• From the extension → Exporting event data into Google Calendar.
• In another section, outline how the Hugo site is built:
• “Hugo Source (site directory)” → “GitHub Actions / Build Scripts” → “Deployed Website” (possibly hosted via GitHub Pages).
• That the website serves as documentation and promotion for the extension.
Architectural Patterns & Design Principles
• Modularity: Separate the extension’s functionality (UI, background, content scripts) from its build process.
• CI/CD Integration: Inclusion of GitHub Actions workflows implies an automated build/deploy pipeline for the Hugo site.
• Dependency Management: Use of NPM for managing dependencies and Parcel for module bundling.
• Separation of Concerns: The extension and its UI are completely separate from the documentation website.
Relevant Technologies, Frameworks, and Libraries
• Chrome Extensions (Manifest V3 compliance)
• Parcel Bundler (for handling module imports and optimization)
• NPM (package management)
• moment.js (for date/time formatting)
• Hugo (static site generator) with the PaperMod theme for the website
• GitHub Actions for deployment automation