# Learning Path — Structural Standard

Every topic in `D:\Learning-Path\` follows the same shape. This file is the contract.

## Folder layout

```
<Category>/                       ← "BE Frameworks", "Blockchain", "Languages", …
└── <Topic>/                      ← "Node.js", "Solidity-ERC20", "TypeScript", …
    ├── README.md                 ← Topic orientation: goals, prerequisites, path
    ├── index.html                ← Topic dashboard (progress, tabs, roadmap)
    ├── 01-Basics/
    │   ├── README.md             ← Level overview
    │   ├── 01-<Module>/          ← Numbered kebab-case module name
    │   │   ├── README.md         ← The lesson itself (concept → code → gotchas)
    │   │   ├── lesson.html       ← Beautiful renderer for README.md
    │   │   ├── cheatsheet.md     ← 1-screen rapid recall (tables + snippets)
    │   │   ├── interview.md      ← Senior-level Q/A pairs (easy/mid/hard)
    │   │   └── Tasks/
    │   │       ├── 01-<task>.md
    │   │       └── 02-<task>.md
    │   └── 02-<Module>/…
    ├── 02-Intermediate/…         ← same shape
    └── 03-Advanced/…              ← same shape
```

## File contracts

### `README.md` (module-level lesson)
- 400–800 lines is the sweet spot.
- Required sections:
  1. `# <Module Title>`
  2. `## What You'll Learn` — bulleted outcomes
  3. `## Concept Overview` — the mental model
  4. `## Code` — annotated, runnable examples
  5. `## Common Mistakes` — how it goes wrong
  6. `## Senior-Level Gotchas` — the questions a staff engineer would ask
  7. `## References` — external docs to go deeper
- Diagrams: use ```` ```mermaid ```` blocks — they render inline in `lesson.html`.

### `cheatsheet.md`
- Fits on one screen. Tables > prose. No preamble.
- Aim: someone re-reading before an interview can skim in 90 seconds.

### `interview.md`
- 8–15 Q/A pairs. Format:
  ```md
  ## Q — <question text>
  **Difficulty:** easy | mid | hard
  **Answer:** <a real answer, not a summary>
  **Follow-up:** <the question the interviewer asks next>
  ```

### `Tasks/NN-<slug>.md`
- Sections: Spec, Requirements, Hints (progressive — behind `<details>`), Stretch, Reflection.

### `lesson.html`
- Copied from `_assets/lesson.html.template`.
- Update the four placeholders:
  - `{{MODULE_TITLE}}` — page title
  - `{{TOPIC_SLUG}}` — matches `index.html`'s TOPIC_SLUG, e.g. `blockchain/solidity-erc20`
  - `{{LEVEL_ID}}` — `01-Basics` | `02-Intermediate` | `03-Advanced`
  - `{{MODULE_ID}}` — folder name, e.g. `01-Introduction`

### `index.html` (topic-level)
- Copied from `_assets/topic.html.template`.
- Fill `TOPIC_SLUG`, `TOPIC_DATA.levels`, and the Mermaid roadmap block.

## Naming rules

- Categories keep their existing names (may contain spaces): "BE Frameworks", "FE Frameworks", etc.
- New categories use single-word titles where possible: `Blockchain`, `Languages`, `Interview Prep`.
- Topics and modules use `PascalCase-With-Dashes` or `Number-Prefixed-Kebab`:
  - Topics: `Solidity-ERC20`, `Node.js`, `TypeScript`
  - Levels: always `01-Basics`, `02-Intermediate`, `03-Advanced`
  - Modules: `NN-<Kebab>` (e.g. `01-Introduction`, `02-Storage-Layout`)

## Progress keys

Every checkbox in a dashboard or lesson writes to `localStorage` under key:

```
module:<topic-slug>:<level-id>:<module-id>
```

Example: `module:blockchain/solidity-erc20:01-Basics:01-Introduction`

## Adding a new topic — checklist

1. Create `<Category>/<Topic>/` folders including all `NN-Level/NN-Module/` subfolders.
2. Copy `_assets/topic.html.template` → `<Topic>/index.html`. Fill placeholders + `TOPIC_DATA`.
3. Copy `_assets/lesson.html.template` → each module folder as `lesson.html`. Fill placeholders.
4. Write each module's `README.md`, `cheatsheet.md`, `interview.md`, and 3–5 `Tasks/*.md`.
5. Add the topic to the root `index.html`'s category card counts (auto-derived on regenerate, or update by hand).
6. Verify: open `<Topic>/index.html`, click a module, tick it complete, refresh — the tick should persist.
