How freightcognition/openquote works
Project type and purpose
• openQuote is an open-source Chromium browser extension used by freight brokers to generate spot quotes quickly.
• All code runs client-side in the browser: HTML/CSS for UI, JavaScript for logic and configuration.
File structure
• Top-level files:
• manifest.json – extension metadata and entry points
• sidepanel.html – the popup/side panel UI
• styles.css – styling for the UI
• calculator.js – core quoting logic
• settings.js – user preferences and persistence
• No backend or database directories; it is a purely client-side tool.
• .gitignore, LICENSE, README.md – repo metadata and docs.
README for additional insights
• Confirms it is a Chromium extension built with HTML/CSS/JS.
• No mention of server APIs, so assume all calculation happens locally.
• Extensible via open-source contributions; key integration point is the Chrome Extension API.
Main components and their interactions
a. Browser runtime (Chromium)
b. Extension configuration (manifest.json)
d. Business Logic (calculator.js)
e. Settings & Persistence (settings.js using chrome.storage)
f. Chrome Extension APIs (chrome.runtime, chrome.storage, chrome.browserAction)
g. (Optional) External freight-broker API or data sources, if added later
Relationships and data flow:
• Browser loads the extension per manifest.json.
• UI components collect input and invoke functions in calculator.js.
• calculator.js may read/write user preferences via settings.js (chrome.storage).
• Results are pushed back into the UI for display.
• If integrated, calculator.js could call external REST endpoints (external service) for live rate data.
Architectural patterns and design principles
• Modular separation: UI vs. business logic vs. settings.
• Single-page panel design for minimal overhead.
• Configuration via manifest.json and chrome.* APIs.
• Extensibility: static assets and scripts can be swapped or extended.
Elements to include for clarity
• A note callout for manifest.json to indicate entry points (popup, permissions).
• An area showing the Chrome Extension API boundary.