How jsebrech/plainvanilla works
Project Type and Purpose
• This is a static, full-frontend website (“Plain Vanilla”) showcasing web development without build tools or frameworks.
• All content lives under the public/ folder, served by a simple HTTP server. There is no dynamic backend—just HTML, CSS, and JavaScript modules.
Key Architectural Components
a. Static File Server
• Serves the public/ folder via HTTP (e.g., http-server, python -m http.server).
• Exposes endpoints for HTML pages, assets, blog posts, example apps, and tests.
b. Browser (Client)
• Fetches HTML, CSS, JS modules.
• Executes all logic client-side: routing, blog generation, examples, and tests.
c. Content & Assets
• HTML pages (public/index.html, public/blog/*.html, public/pages/**/*.html, public/tests/index.html).
• Styles (public/styles/*.css, component CSS under public/components/**).
• JavaScript modules:
– Core components in public/components/ (analytics, code-viewer, tab-panel)
– Example apps under public/pages/examples/**
– Blog generator script (public/blog/generator.js) + generated posts
– Test runner and specs under public/tests/
d. External Resources
• No external APIs; all assets are local.
Relationships and Data Flows
• Browser → HTTP Server: GET requests for HTML, CSS, JS, XML (feed), JSON (index.json), and other static assets.
• On page load: HTML includes <script type="module"> imports, CSS links.
• JavaScript modules import each other (e.g., examples import tiny-context or view-route).
• Blog generator script runs client-side or pre-run to produce static blog post pages.
• Tests are executed in the browser via Mocha/Chai loaded under public/tests/.
Architectural Patterns & Principles
• Monolithic static site architecture: no microservices, no backend layer.
• Modular JavaScript (ES modules) for code reuse and componentization.
• Separation of concerns:
• Content (HTML)
• Presentation (CSS, scoped by component)
• Behavior (vanilla JS modules)
• Progressive enhancement: pages work without bundlers or transpilers.