How mnjay20/proto-2 works
Project type and purpose
• From the README (“only frontend”) and the file tree, this is a purely static front-end prototype (“proto-2”) consisting of multiple HTML pages (index.html, chemistry.html, game.html, teacher.html), each with their own stylesheets and JavaScript modules.
• The goal appears to be an educational web app with distinct “Chemistry” and “Game” experiences, plus a “Teacher” interface.
File structure
• Top-level:
• README.md
• proto/
• Inside proto/:
• HTML pages: index.html, chemistry.html, game.html, teacher.html
• Styles: style.css (global), chemistry.css, gameStyle.css, teacherdhs.css
• JS folder: chemistry.js, game.js, script.js (likely shared logic), teacher.js
• assets folder (if populated) for images, media, etc.
• No backend or server code—everything is client-side.
Key architectural observations
• Pattern: multiple single-page HTML “modules,” each wired to its own CSS and JS.
• A “shared core” script.js likely provides common utilities or navigation code.
• Page-specific JS handles domain logic (experiment simulation, game mechanics, teacher controls).
• CSS split into global vs. page-specific theming.
Components
a. UI Layer
• Four HTML pages (Index, Chemistry, Game, Teacher)
• Global CSS (style.css)
• Page CSS modules (chemistry.css, gameStyle.css, teacherdhs.css)
b. Client-side Logic
• Shared logic module (script.js)
• Page logic modules (chemistry.js, game.js, teacher.js)
c. Static Assets
• /assets (images, media)
d. Hosting/Delivery (optional)
• Static Web Host or CDN (e.g., GitHub Pages, S3 + CloudFront)
Relationships and data flows
• The Browser loads an HTML page →
• Reads its linked CSS → renders styles
• Loads required JS modules → executes page logic
• script.js may expose shared functions that chemistry.js, game.js, and teacher.js invoke.
• Assets are fetched by HTML/CSS/JS as needed.
Architectural patterns / design principles
• Separation of concerns: each page keeps its layout (HTML), style (CSS), and logic (JS) distinct.
• DRY for shared utilities: one script.js.
• Modular CSS and JS per feature/page.
What to label
• Each HTML, CSS, and JS file or logical bundle.
• The asset directory.
• The CDN/hosting service.
• File delivery flow
• In-browser dependency loading
• Shared logic calls