How sakamochanq/liberal-chart works
Project Type and Purpose
• This is a single‐page React application (“Liberal Chart”) bootstrapped with Create React App.
• It serves as an interactive guide to liberal arts courses at Kanazawa Institute of Technology, consuming a JSON data file and rendering it in the browser.
High-Level Architecture Components
a. User’s Browser (Client)
b. Static File Hosting / Web Server (e.g., GitHub Pages, S3 + CloudFront)
c. React Application Bundles (HTML, JS, CSS)
d. Static Assets (images, table.json)
e. Optional PWA Layer (manifest.json, service worker)
Relationships & Data Flows
1. Browser issues HTTP GET for index.html.
2. Server returns index.html which bootstraps bundle.js and main.css.
3. React (in browser) mounts <App /> via src/index.js.
4. React components (e.g., Lists.js, Explain.js, Attention.js) run client‐side rendering.
5. When data is needed, React issues a fetch XHR for public/assets/table.json.
6. JSON data is parsed; components render course listings.
7. Static images under public/assets/images are loaded on demand.
8. If PWA is enabled, service worker intercepts requests for offline caching.
Key Architectural Patterns & Principles
• Single‐page application (SPA) pattern: Client does routing and rendering.
• Component‐based UI (React).
• Asset separation: JSON, images, code, styles.
• Progressive Web App (optional): manifest + service worker.
• Conventional CRA build/deploy pipeline (npm run build → build/ → static host).
Technologies / Frameworks
• React, ReactDOM
• Create React App (Webpack, Babel under the hood)
• JavaScript (ES6+), CSS
• Browser Fetch API (for JSON)
• Optional: Service Worker + Web App Manifest