How ritikdave-9/trainig_javascript works
Project Type and Purpose
• This is a static, front-end only training repository.
• It contains multiple independent demos (Week 1 → Week 6), each showcasing different JS topics (DOM, Events, To-Do List, Quiz, Data Structures).
• No backend server or database—content is served as static files on GitHub Pages.
File Structure
• Top-level:
– README.md / index.html (landing page)
– Week-specific directories: week_1_assignment/, week_2_assignment/, … week_6_assignment/.
• Inside each week:
– An index.html entry point
– script.js (or .ts + compiled output)
– styles.css
– Assets: images, JSON (e.g., gallery/usersDetails.json, questions.json, soundEffects/, images/)
• Build/config files appear in Week 4 & 5:
– package.json, tsconfig.json, .gitignore for TypeScript compilation.
README for Insights
• Each week has a distinct demo URL.
• Features by week:
– Week 1: Events / DOM / Calculator
– Week 2: Gallery + Signup/Login Form
– Week 3: To-Do List (vanilla JS)
– Week 4: Quiz App (TypeScript → JS + sound assets)
– Week 5: Data Structures in TS (compiled, tested)
– Week 6: Linked-List To-Do List
Main Components & Their Interactions
a. Hosting Layer
– GitHub Pages (serves static files directly from the master or gh-pages branch)
b. Web Front-end Client
– Browser loads index.html, then navigates to each week’s index.html.
– Fetches static assets (JS, CSS, JSON, images, audio).
c. Assignment Modules (six independent apps)
– Week 1: Calculator / DOM demo / Events demo
– Week 2: Gallery (fetch JSON) + Signup/Login (form validation)
– Week 3: To-Do List (local-state in JS)
– Week 4: Quiz (load questions.json, play audio)
– Week 5: TS Data-structures (compile TS → JS, run test.js)
– Week 6: Linked-List To-Do
Architectural Patterns & Principles
• Modular Structure: each week is a self-contained module with its own HTML/CSS/JS
• Static Hosting: no server logic, all assets pre-built
• Separation of Concerns:
– Presentation: HTML/CSS
– Behavior: JS or compiled TS
– Data: JSON files for gallery and quiz
• Build Step (for TypeScript weeks):
– tsconfig.json → compile src/*.ts → output script.js
Essential Elements
– Clear labels: “GitHub Pages”, “Browser (Chrome/Edge)”, “Week 3: To-Do Module”
– Legends or annotations**: note “TS → JS compilation,” “JSON data fetch”