How ibttf/columbia-notetaker works
• A frontend browser component (the “front” directory) that contains the core extension assets—manifest, background script, content script, and a React-based popup UI.
• A backend component (the app.py file and associated python virtual environment in “venv”) that likely supports server-side functionality such as handling note requests or serving lecture note content.
Main Components
a. Browser Extension Core:
– Manifest & Configuration: Located in front/public (manifest.json, index.html, etc.).
– Background Script: front/public/background.js (handles extension lifecycle, background tasks, etc.).
– Content Script: front/public/contentScript.js (injects behavior into target web pages).
– Popup/User Interface: Located in front/src/components (components like Popup.tsx and Loading.tsx built in React with support from Tailwind, Webpack, etc.). It also utilizes bundling configurations (webpack.config.js, next.config.mjs) and TypeScript (tsconfig.json).
b. Python Backend:
– app.py: Likely a Flask or similar microservice that processes requests from the extension.
– Virtual Environment: “venv” directory ensuring dependency isolation.
Relationships/Interactions
– The User operates the Browser.
– When the User navigates to a Columbia video URL (on hosted.panopto.com or columbia.panopto.com), the Content Script (injected by the extension through the manifest) detects the URL.
– This detection triggers the background script to engage the Popup UI (React-based) – communicated via internal messaging channels.
– The extension may communicate with the Python backend (app.py) via HTTP or WebSocket calls for retrieving lecture note data or triggering further processing.
– The backend and extension interact to provide a seamless note-taking experience.
Architectural Patterns & Design Principles
– Separation of concerns: the extension’s frontend (UI, content, and background scripts) is clearly separated from the server-side logic.
– Client-side event-driven design: The browser extension listens to URL changes and triggers UI popups.
– Use of modern development tools and frameworks: React for UI, TypeScript for type safety, Tailwind for styling, and bundling via Webpack/Next.js for frontend deployment.
– Modularity: the directory structure indicates a clear modular separation between extension code and backend code.