How shahidsamadov/wordle-azerbaycan-dilinde-web works
Project type and purpose
• This is a static, client‐side web application (a Progressive Web App) that implements “Wordle” in Azerbaijani.
• There is no custom backend or database—everything runs in the user’s browser against static text files.
File structure
• Top level:
• index.html – entry point and UI skeleton
• main.js – game logic, word‐matching, state management
• manifest.json – PWA metadata for install and offline support
• assets/ – images used in the UI
• wordbase/ – three .txt files containing the word lists (daily vs. less common vs. complete)
• No server‐side code, no build scripts, no tests—this is purely static content.
README
• Confirms the game rules and explains that the word lists reside in wordbase/.
• Mentions the three categories of words (1469 common, 3404 uncommon, total 4873).
Main components
a. Web Server (static host)
• Serves index.html, main.js, manifest.json, assets/*, wordbase/*.txt
b. Browser / Client
• UI Layer (HTML + CSS + images)
• Game Engine (JavaScript in main.js)
• Local Storage (browser’s localStorage for persisting game state)
• PWA Layer (manifest.json for “Install” / offline capability)
c. Wordbase Storage
• Static .txt files served as resources
Relationships and interactions
• User opens the PWA → Browser requests index.html from the Web Server.
• index.html loads main.js and CSS/images.
• Game Engine (main.js) on startup issues fetch requests to /wordbase/examination_words.txt, /main_words.txt, /words_base.txt.
• Game Engine parses the word lists into in‐memory arrays.
• Game Engine reads/writes progress (current word, attempts left) to browser localStorage.
• Manifest.json enables “Add to Home Screen” and offline capability (if a service worker were added).
Architectural patterns and design principles
• Single‐Page Application (SPA) pattern: all logic in main.js operates on the DOM without full page reloads.
• Client‐Side Rendering (CSR): the browser does all rendering and logic.
• Separation of concerns: UI assets vs. game logic vs. word data vs. storage.