# krmroland/typing-master architecture

> Architecture diagram of the GitHub repository krmroland/typing-master, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-06-10). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/krmroland/typing-master
- Repository: https://github.com/krmroland/typing-master

## Overview

##### Project type and purpose
- This is a single-page, client-side PWA (Progressive Web App) built with React for UI, Redux + Immutable.js for state management, and service-worker for offline/caching support.
- Its purpose is an interactive typing tutor (“Keyboard Typing Master”) with courses, drills, real-time summaries, and sound feedback.

##### File structure
- Top level:
- public/ – static assets (index.html, manifest.json) for PWA.
- src/ – application code.
- src subdivides into:
- layouts/ – top-level containers (NavbarComponent).
- courses/ – logic for drills and loading data.json.
- keyboard/ – on-screen key components, keyboard rows.
- summary/ & typing/ – UI for typing sessions and progress dashboard.
- store/ – Redux: actions, reducers, store setup.
- registerServiceWorker.js – PWA offline support.
- package.json, manifest.json indicate frameworks (React, Redux, Immutable, Webpack via create-react-app).

##### README
- Confirms React + Redux + Immutable use.
- No backend APIs—purely front-end.
- PWA demo link and local install/start instructions.

##### Detail level
- Individual reducers or actions only if critical (e.g., courseActions.js → CoursesReducer).
- Essential modules without drawing every single file.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Browser & PWA Layer
    subgraph "Browser & PWA Layer"
        Client["Browser Client\n(public/index.html)"]:::infra
        SW["Service Worker / PWA Cache Layer\n(src/registerServiceWorker.js)"]:::infra
    end
    Client <--> SW
    
    %% React App Layer
    subgraph "React App Layer"
        indexJS["Entry Point\n(src/index.js)"]:::infra
        AppShell["App Shell\n(src/App.js)"]:::infra
        indexJS --> AppShell

        subgraph "Layout Module"
            Navbar["NavbarComponent"]:::ui
            NavCSS["navbar.css"]:::assets
            NavCopy["ccopy.css"]:::assets
            Navbar --> NavCSS
            Navbar --> NavCopy
        end

        subgraph "Feature Modules"
            Courses["Courses Module"]:::ui
            Keyboard["Keyboard Module"]:::ui
            Typing["Typing View"]:::ui
            Summary["Summary View"]:::ui
        end

        AppShell --> Navbar
        AppShell --> Courses
        AppShell --> Keyboard
        AppShell --> Typing
        AppShell --> Summary
    end

    %% State Management Layer
    subgraph "State Management Layer"
        Store["Redux Store\n(src/store/index.js)"]:::state
        Actions["Actions"]:::state
        Reducers["Reducers"]:::state
        Store --> Actions
        Store --> Reducers
    end

    %% Static Resources
    subgraph "Static Resources"
        AssetsCSS["CSS Files"]:::assets
        AssetsIcons["Icon Components"]:::assets
        AssetsSounds["Sounds"]:::assets
        CoursesData["courses data.json"]:::assets
    end

    %% Interactions
    Courses -->|dispatchesActions| Actions
    Keyboard -->|dispatchesActions| Actions
    Typing -->|dispatchesActions| Actions
    Summary -->|dispatchesActions| Actions

    Actions -->|triggersReducers| Reducers
    Reducers -->|updatesStore| Store

    Store -.->|updatesProps| Courses
    Store -.->|updatesProps| Keyboard
    Store -.->|updatesProps| Typing
    Store -.->|updatesProps| Summary

    AppShell --> AssetsCSS
    Navbar --> AssetsIcons
    Keyboard --> AssetsSounds
    Courses --> CoursesData

    %% Click Events
    click Client "https://github.com/krmroland/typing-master/blob/master/public/index.html"
    click SW "https://github.com/krmroland/typing-master/blob/master/src/registerServiceWorker.js"
    click indexJS "https://github.com/krmroland/typing-master/blob/master/src/index.js"
    click AppShell "https://github.com/krmroland/typing-master/blob/master/src/App.js"
    click Navbar "https://github.com/krmroland/typing-master/blob/master/src/layouts/NavbarComponent.js"
    click NavCSS "https://github.com/krmroland/typing-master/blob/master/src/layouts/navbar.css"
    click NavCopy "https://github.com/krmroland/typing-master/blob/master/src/layouts/ccopy.css"
    click Courses "https://github.com/krmroland/typing-master/blob/master/src/courses/BaseDrill.js"
    click Keyboard "https://github.com/krmroland/typing-master/blob/master/src/keyboard/Keyboard.js"
    click Typing "https://github.com/krmroland/typing-master/blob/master/src/typing/TypingComponent.js"
    click Summary "https://github.com/krmroland/typing-master/blob/master/src/summary/SummaryComponent.js"
    click Store "https://github.com/krmroland/typing-master/blob/master/src/store/index.js"
    click Actions "https://github.com/krmroland/typing-master/blob/master/src/store/actions/courseActions.js"
    click Reducers "https://github.com/krmroland/typing-master/blob/master/src/store/reducers/CoursesReducer.js"
    click AssetsCSS "https://github.com/krmroland/typing-master/blob/master/src/css/App.css"
    click AssetsIcons "https://github.com/krmroland/typing-master/blob/master/src/icons/IconArrowLeft.js"
    click AssetsSounds "https://github.com/krmroland/typing-master/blob/master/src/sounds/Sounds.js"
    click CoursesData "https://github.com/krmroland/typing-master/blob/master/src/courses/data.json"

    %% Styles
    classDef ui fill:#add8e6,stroke:#333,stroke-width:1px
    classDef state fill:#90ee90,stroke:#333,stroke-width:1px
    classDef assets fill:#ffff99,stroke:#333,stroke-width:1px
    classDef infra fill:#d3d3d3,stroke:#333,stroke-width:1px
```
