How vrosier800/kaamelott works
Project Type and Purpose
• This is a 100% frontend, client-side web application (“Jeu de citations Kaamelott”), written in TypeScript and SCSS.
• There is no backend or external service— all data (quotes and character list) is stored locally in a TypeScript object.
• The build output is static assets (HTML, JS, CSS) served to any static host or CDN.
Key Architectural Components
a. Developer Toolchain & Build Pipeline
– Node.js & npm scripts (package.json, package-lock.json)
– TypeScript compiler (tsconfig.json) → src/script.ts → dist/script.js
– SCSS compiler or bundler → src/styles.scss → dist/styles.css (+ .map)
b. Deployment Artifact
– index.html referencing dist/script.js & dist/styles.css
c. Runtime in the Browser
– Presentation (HTML structure in index.html)
– Styling (CSS from dist/styles.css)
– Application logic (JavaScript from dist/script.js)
– Local in-memory data store (TypeScript object holding quotes & characters)
Relationships & Data Flow
1. Developer writes TS & SCSS → runs build scripts → generates static assets in /dist
2. index.html is deployed to static web server or CDN
3. Browser requests index.html → pulls in script.js & styles.css
4. On load, script.js:
• Randomly selects a quote from the in-memory data object
• Renders quote text + answer choices into the DOM
• Listens to user clicks, updates score state, re-renders UI
5. CSS provides styling & responsive layout
Architectural Patterns & Principles
– SPA-style: all logic and data run in the client
– Separation of Concerns:
• src/script.ts handles data & UI logic
• src/styles.scss handles presentation
– Build-time transpilation rather than runtime preprocessing
– Static hosting: no server-side code, minimizing ops burden
Detail
– Capture every logical component: data storage, UI renderer, score manager
– Don’t omit the local data object – it’s the core “backend” of this quiz