CLAUDE.md
.claude/CLAUDE.mdCLAUDE.md
Quality
79/100
Scores the file, not the repository.Length
2,747 words
65 headings · 16 code blocksRepository
67k
— · pushed 1 days agoLast changed
3 days ago
First indexed 3 days ago.1# 33 JavaScript Concepts - Project Context23## Overview45This repository is a curated collection of **33 essential JavaScript concepts** that every JavaScript developer should know. It serves as a comprehensive learning resource and study guide for developers at all levels, from beginners to advanced practitioners.67The project was recognized by GitHub as one of the **top open source projects of 2018** and has been translated into 40+ languages by the community.89## Project Purpose1011- Help developers master fundamental and advanced JavaScript concepts12- Provide curated resources (articles, videos, books) for each concept13- Serve as a reference guide for interview preparation14- Foster community contributions through translations and resource additions1516## Repository Structure1718```1933-js-concepts/20├── .claude/ # Claude configuration21│ ├── CLAUDE.md # Project context and guidelines22│ └── skills/ # Custom skills for content creation23│ ├── write-concept/ # Skill for writing concept documentation24│ ├── fact-check/ # Skill for verifying technical accuracy25│ ├── seo-review/ # Skill for SEO audits26│ ├── test-writer/ # Skill for generating Vitest tests27│ ├── resource-curator/ # Skill for curating external resources28│ └── concept-workflow/ # Skill for end-to-end concept creation29├── .opencode/ # OpenCode configuration30│ └── skill/ # Custom skills (mirrored from .claude/skills)31│ ├── write-concept/ # Skill for writing concept documentation32│ ├── fact-check/ # Skill for verifying technical accuracy33│ ├── seo-review/ # Skill for SEO audits34│ ├── test-writer/ # Skill for generating Vitest tests35│ ├── resource-curator/ # Skill for curating external resources36│ └── concept-workflow/ # Skill for end-to-end concept creation37├── docs/ # Mintlify documentation site38│ ├── docs.json # Mintlify configuration39│ ├── index.mdx # Homepage40│ ├── introduction.mdx # Getting started guide41│ ├── contributing.mdx # Contribution guidelines42│ ├── translations.mdx # Community translations43│ └── concepts/ # 33 concept pages44│ ├── call-stack.mdx45│ ├── primitive-types.mdx46│ └── ... (all 33 concepts)47├── tests/ # Vitest test suites48│ └── fundamentals/ # Tests for fundamental concepts (1-6)49│ ├── call-stack/50│ ├── primitive-types/51│ ├── value-reference-types/52│ ├── type-coercion/53│ ├── equality-operators/54│ └── scope-and-closures/55├── vitest.config.js # Vitest configuration56├── README.md # Main GitHub README57├── CONTRIBUTING.md # Guidelines for contributors58├── CODE_OF_CONDUCT.md # Community standards59├── LICENSE # MIT License60├── package.json # Project metadata61├── opencode.jsonc # OpenCode AI assistant configuration62└── github-image.png # Project banner image63```6465## The 31 Concepts (32nd and 33rd coming soon)6667### Fundamentals (1-6)681. Primitive Types692. Value Types and Reference Types703. Type Coercion (Implicit, Explicit, Nominal, Structuring and Duck Typing)714. Equality Operators (== vs === vs typeof)725. Scope & Closures736. Call Stack7475### Functions & Execution (7-8)767. Event Loop (Message Queue)778. IIFE, Modules and Namespaces7879### Web Platform (9-10)809. DOM and Layout Trees8110. HTTP & Fetch8283### Object-Oriented JS (11-15)8411. Factories and Classes8512. this, call, apply and bind8613. new, Constructor, instanceof and Instances8714. Prototype Inheritance and Prototype Chain8815. Object.create and Object.assign8990### Functional Programming (16-19)9116. map, reduce, filter9217. Pure Functions, Side Effects, State Mutation and Event Propagation9318. Higher-Order Functions9419. Recursion9596### Async JavaScript (20-22)9720. Collections and Generators9821. Promises9922. async/await100101### Advanced Topics (23-31)10223. JavaScript Engines10324. Data Structures10425. Big O Notation (Expensive Operations)10526. Algorithms10627. Inheritance, Polymorphism and Code Reuse10728. Design Patterns10829. Partial Applications, Currying, Compose and Pipe10930. Clean Code110111## Content Format112113Each concept page in `/docs/concepts/` follows this structure:114115### 1. Frontmatter116```mdx117---118title: "Concept Name"119description: "Brief description of the concept"120---121```122123### 2. Real-World Analogy124Start with an engaging analogy that makes the concept relatable. Include ASCII art diagrams when helpful.125126### 3. Info Box (What You'll Learn)127```mdx128<Info>129**What you'll learn in this guide:**130- Key point 1131- Key point 2132- Key point 3133</Info>134```135136### 4. Main Content Sections137- Use clear headings (`##`, `###`) to organize topics138- Include code examples with explanations139- Use Mintlify components (`<AccordionGroup>`, `<Steps>`, `<Tabs>`, etc.)140- Add diagrams and visualizations where helpful141142### 5. Related Concepts143```mdx144<CardGroup cols={2}>145 <Card title="Related Concept" icon="icon-name" href="/concepts/concept-slug">146 Brief description of how it relates147 </Card>148</CardGroup>149```150151### 6. Reference152```mdx153<Card title="Topic — MDN" icon="book" href="https://developer.mozilla.org/...">154 Official MDN documentation155</Card>156```157158### 7. Articles159Curated blog posts and tutorials using `<CardGroup>` with `icon="newspaper"`.160161### 8. Courses (optional)162Educational courses using `<Card>` with `icon="graduation-cap"`.163164### 9. Videos165YouTube tutorials and conference talks using `<CardGroup>` with `icon="video"`.166167## Contributing Guidelines168169### Adding Resources170- Resources should be high-quality and educational171- Follow the existing Card format for consistency172- Include a brief description of what the resource covers173174### Resource Format175```mdx176<Card title="Resource Title" icon="newspaper" href="https://...">177 Brief description of what the reader will learn from this resource.178</Card>179```180181## Git Commit Conventions182183This project follows the [Conventional Commits](https://www.conventionalcommits.org/) specification. All commits must adhere to this format for consistency and automated changelog generation.184185### Commit Message Format186187```188<type>[optional scope]: <description>189190[optional body]191192[optional footer(s)]193```194195### Commit Types196197| Type | Description |198|------|-------------|199| `feat` | New features or content additions (e.g., new resources, new concepts) |200| `fix` | Bug fixes, broken link corrections, typo fixes |201| `docs` | Documentation changes (README updates, CONTRIBUTING updates) |202| `style` | Formatting changes (markdown formatting, whitespace) |203| `refactor` | Content restructuring without adding new resources |204| `chore` | Maintenance tasks (config updates, dependency updates) |205| `ci` | CI/CD configuration changes |206| `perf` | Performance improvements |207| `test` | Adding or updating tests |208| `build` | Build system or external dependency changes |209| `revert` | Reverting a previous commit |210211### Examples212213```bash214# Adding a new resource215feat: add article about closures by John Doe216217# Fixing a broken link218fix: update broken MDN link in Promises section219220# Documentation update221docs: update contributing guidelines for translations222223# Maintenance task224chore: update opencode.json configuration225226# Adding content to existing concept227feat(closures): add video tutorial by Fun Fun Function228229# Multiple changes in body230feat: add new resources for async/await231232- Add article by JavaScript Teacher233- Add video tutorial by Traversy Media234- Update reference links235```236237### Rules2382391. **Use lowercase** for the type and description2402. **No period** at the end of the description2413. **Use imperative mood** ("add" not "added", "fix" not "fixed")2424. **Keep the first line under 72 characters**2435. **Reference issues** in the footer when applicable (e.g., `Closes #123`)244245## MCP Servers Available246247This project has OpenCode configured with:2482491. **Context7** - Documentation search (`use context7` in prompts)2502. **GitHub** - Repository management (`use github` in prompts)251252## Testing253254This project uses [Vitest](https://vitest.dev/) as the test runner to verify that code examples in the documentation work correctly.255256### Running Tests257258```bash259# Run all tests once260npm test261262# Run tests in watch mode (re-runs on file changes)263npm run test:watch264265# Run tests with coverage report266npm run test:coverage267```268269### Test Structure270271Tests are organized by concept category in the `tests/` directory:272273```274tests/275├── fundamentals/ # Concepts 1-6276│ ├── call-stack/277│ ├── primitive-types/278│ ├── value-reference-types/279│ ├── type-coercion/280│ ├── equality-operators/281│ └── scope-and-closures/282├── functions-execution/ # Concepts 7-8283│ ├── event-loop/284│ └── iife-modules/285└── web-platform/ # Concepts 9-10286 ├── dom/287 └── http-fetch/288```289290### Writing Tests for Code Examples291292When adding new code examples to concept documentation, please include corresponding tests:2932941. **File naming**: Create `{concept-name}.test.js` in `tests/{category}/{concept-name}/`2952. **Use explicit imports**:296```javascript297 import { describe, it, expect } from 'vitest'298```2993. **Convert console.log examples to assertions**:300```javascript301 // Documentation example:302 // console.log(typeof "hello") // "string"303304 // Test:305 it('should return string type', () => {306 expect(typeof "hello").toBe("string")307 })308```3094. **Test error cases**: Use `expect(() => { ... }).toThrow()` for operations that should throw3105. **Skip browser-specific examples**: Tests run in Node.js, so skip DOM/window/document examples3116. **Note strict mode behavior**: Vitest runs in strict mode, so operations that "silently fail" in non-strict mode will throw `TypeError`312313### Current Test Coverage314315| Category | Concept | Tests |316|----------|---------|-------|317| Fundamentals | Call Stack | 20 |318| Fundamentals | Primitive Types | 73 |319| Fundamentals | Value vs Reference Types | 54 |320| Fundamentals | Type Coercion | 74 |321| Fundamentals | Equality Operators | 87 |322| Fundamentals | Scope and Closures | 46 |323| Functions & Execution | Event Loop | 56 |324| Functions & Execution | IIFE & Modules | 61 |325| Web Platform | DOM | 85 |326| Web Platform | HTTP & Fetch | 72 |327| **Total** | | **628** |328329## Documentation Site (Mintlify)330331The project includes a Mintlify documentation site in the `/docs` directory.332333### Local Development334335```bash336# Using npm script337npm run docs338339# Or install Mintlify CLI globally340npm i -g mint341cd docs342mint dev343```344345The site will be available at `http://localhost:3000`.346347### Documentation Structure348349- **Getting Started**: Homepage and introduction350- **Fundamentals**: Concepts 1-6 (Primitive Types through Call Stack)351- **Functions & Execution**: Concepts 7-8 (Event Loop through IIFE/Modules)352- **Web Platform**: Concepts 9-10 (DOM and HTTP & Fetch)353- **Object-Oriented JS**: Concepts 11-15 (Factories through Object.create/assign)354- **Functional Programming**: Concepts 16-19 (map/reduce/filter through Recursion)355- **Async JavaScript**: Concepts 20-22 (Collections/Generators through async/await)356- **Advanced Topics**: Concepts 23-31 (JavaScript Engines through Clean Code)357358### Adding/Editing Concept Pages359360Each concept page is in `docs/concepts/` and follows this template:361362```mdx363---364title: "Concept Name"365description: "Brief description"366---367368## Overview369[Explanation of the concept]370371## Reference372[MDN or official docs links]373374## Articles375[Curated articles with CardGroup components]376377## Videos378[Curated videos with CardGroup components]379```380381## Important Notes382383- This is primarily a documentation/resource repository, not a code library384- The main content lives in `README.md` and `/docs` (Mintlify site)385- Translations are maintained in separate forked repositories386- Community contributions are welcome and encouraged387- MIT Licensed388389## Custom Skills390391### write-concept Skill392393Use the `/write-concept` skill when writing or improving concept documentation pages. This skill provides comprehensive guidelines for:394395- **Page Structure**: Exact template for concept pages (frontmatter, opening hook, code examples, sections)396- **SEO Optimization**: Critical guidelines for ranking in search results397- **Writing Style**: Voice, tone, and how to make content accessible to beginners398- **Code Examples**: Best practices for clear, educational code399- **Quality Checklists**: Verification steps before publishing400401**When to invoke:**402- Creating a new concept page in `/docs/concepts/`403- Rewriting or significantly improving an existing concept page404- Reviewing an existing concept page for quality405406**SEO is Critical:** Each concept page should rank for searches like:407- "what is [concept] in JavaScript"408- "how does [concept] work in JavaScript"409- "[concept] JavaScript explained"410411The skill includes detailed guidance on title optimization (50-60 chars), meta descriptions (150-160 chars), keyword placement, and featured snippet optimization.412413**Location:** `.claude/skills/write-concept/SKILL.md`414415### fact-check Skill416417Use the `/fact-check` skill when verifying the technical accuracy of concept documentation. This skill provides comprehensive methodology for:418419- **Code Verification**: Verify all code examples produce stated outputs, run project tests420- **MDN/Spec Compliance**: Check claims against official MDN documentation and ECMAScript specification421- **External Resource Checks**: Verify all links work and descriptions accurately represent content422- **Misconception Detection**: Common JavaScript misconceptions to watch for (type coercion, async behavior, etc.)423- **Test Integration**: Instructions for running `npm test` to verify code examples424- **Report Template**: Structured format for documenting findings with severity levels425426**When to invoke:**427- Before publishing a new concept page428- After significant edits to existing pages429- When reviewing community contributions430- Periodic accuracy audits of existing content431432**What gets checked:**433- Every code example for correct output434- All MDN links for validity (not 404)435- API descriptions match current MDN documentation436- External resources (articles, videos) are accessible and accurate437- Technical claims are correct and properly nuanced438- No common JavaScript misconceptions stated as fact439440**Location:** `.claude/skills/fact-check/SKILL.md`441442### seo-review Skill443444Use the `/seo-review` skill when auditing concept pages for search engine optimization. This skill provides a focused audit checklist:445446- **27-Point Scoring System**: Systematic audit across 6 categories447- **Title & Meta Optimization**: Character counts, keyword placement, compelling hooks448- **Keyword Strategy**: Pre-built keyword clusters for all JavaScript concepts449- **Featured Snippet Optimization**: Patterns for winning position zero in search results450- **Internal Linking**: Audit of concept interconnections and anchor text quality451- **Report Template**: Structured SEO audit report with prioritized fixes452453**When to invoke:**454- Before publishing a new concept page455- When optimizing underperforming pages456- Periodic content audits457- After major content updates458459**Scoring Categories (30 points total):**460- Title Tag (4 points)461- Meta Description (4 points)462- Keyword Placement (5 points)463- Content Structure (6 points)464- Featured Snippets (4 points)465- Internal Linking (4 points)466- Technical SEO (3 points) — Single H1, keyword in slug, no orphan pages467468**Score Interpretation:**469- 90-100% (27-30): Ready to publish470- 75-89% (23-26): Minor optimizations needed471- 55-74% (17-22): Several improvements needed472- Below 55% (<17): Significant work required473474**Location:** `.claude/skills/seo-review/SKILL.md`475476### test-writer Skill477478Use the `/test-writer` skill when generating Vitest tests for code examples in concept documentation. This skill provides comprehensive methodology for:479480- **Code Extraction**: Identify and categorize all code examples (testable, DOM, error, conceptual)481- **Test Patterns**: 16 patterns for converting different types of code examples to tests482- **DOM Testing**: Separate file structure with jsdom environment for browser-specific code483- **Source References**: Line number references linking tests to documentation484- **Project Conventions**: File naming, describe block organization, assertion patterns485- **Report Template**: Test coverage report documenting what was tested and skipped486487**When to invoke:**488- After writing a new concept page489- When adding new code examples to existing pages490- When updating existing code examples491- To verify documentation accuracy through automated tests492493**Test Categories:**494- Basic value assertions (`console.log` → `expect`)495- Error testing (`toThrow` patterns)496- Async testing (Promises, async/await)497- DOM testing (jsdom environment, events)498- Floating point (toBeCloseTo)499- Object/Array comparisons (toEqual)500501**File Structure:**502```503tests/{category}/{concept-name}/{concept-name}.test.js504tests/{category}/{concept-name}/{concept-name}.dom.test.js (if DOM examples)505```506507**Location:** `.claude/skills/test-writer/SKILL.md`508509### resource-curator Skill510511Use the `/resource-curator` skill when finding, evaluating, or maintaining external resources (articles, videos, courses) for concept pages. This skill provides:512513- **Audit Process**: Check existing links for accessibility, accuracy, and relevance514- **Trusted Sources**: Prioritized lists of reputable article, video, and course sources515- **Quality Criteria**: Must-have, should-have, and red flag checklists516- **Description Writing**: Formula and examples for specific, valuable descriptions517- **Publication Guidelines**: Date thresholds for different topic categories518- **Report Template**: Audit report for documenting broken, outdated, and missing resources519520**When to invoke:**521- Adding resources to a new concept page522- Refreshing resources on existing pages523- Auditing for broken or outdated links524- Reviewing community-contributed resources525- Periodic link maintenance526527**Resource Targets:**528- Reference: 2-4 MDN links529- Articles: 4-6 quality articles530- Videos: 3-4 quality videos531- Courses: 1-3 (optional)532533**Trusted Sources Include:**534- Articles: javascript.info, MDN Guides, freeCodeCamp, 2ality, CSS-Tricks, dev.to535- Videos: Fireship, Web Dev Simplified, Fun Fun Function, Traversy Media, JSConf536- Courses: javascript.info, Piccalilli, freeCodeCamp, Frontend Masters537538**Location:** `.claude/skills/resource-curator/SKILL.md`539540### concept-workflow Skill541542Use the `/concept-workflow` skill for end-to-end creation of a complete concept page. This orchestrator skill coordinates all five specialized skills in optimal order:543544```545Phase 1: resource-curator → Find quality external resources546Phase 2: write-concept → Write the documentation page547Phase 3: test-writer → Generate tests for code examples548Phase 4: fact-check → Verify technical accuracy549Phase 5: seo-review → Optimize for search visibility550```551552**When to invoke:**553- Creating a brand new concept page from scratch554- Completely rewriting an existing concept page555- When you want the full end-to-end workflow with all quality checks556557**What it orchestrates:**558- Resource curation (2-4 MDN refs, 4-6 articles, 3-4 videos)559- Complete concept page writing (1,500+ words)560- Comprehensive test generation for all code examples561- Technical accuracy verification with test execution562- SEO audit targeting 90%+ score (24+/27)563564**Deliverables:**565- `/docs/concepts/{concept-name}.mdx` — Complete documentation page566- `/tests/{category}/{concept-name}/{concept-name}.test.js` — Test file567- Updated `docs.json` navigation (if new concept)568- Fact-check report569- SEO audit report (score 24+/27)570571**Estimated Time:** 2-5 hours depending on concept complexity572573**Example prompt:**574> "Create a complete concept page for 'hoisting' using the concept-workflow skill"575576**Location:** `.claude/skills/concept-workflow/SKILL.md`577578## Maintainer579580**Leonardo Maldonado** - [@leonardomso](https://github.com/leonardomso)581582## Links583584- Repository: https://github.com/leonardomso/33-js-concepts585- Issues: https://github.com/leonardomso/33-js-concepts/issues586- Original Article: [33 Fundamentals Every JavaScript Developer Should Know](https://medium.com/@stephenthecurt/33-fundamentals-every-javascript-developer-should-know-13dd720a90d1) by Stephen Curtis587
Similar configs
Same format, overlapping stack, ranked by quality.
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| bagisto/bagistoCLAUDE.md · 28k | CLAUDE.md | setupbuildteststyle+5 | 100/100 | 3 days ago | |
| livewire/livewireCLAUDE.md · 24k | CLAUDE.md | setupbuildteststyle+4 | 100/100 | 3 days ago | |
| dotCMS/corecore-web/CLAUDE.md · 949 | CLAUDE.md | teststylearchtesting-strategy+3 | 100/100 | 3 days ago | |
| nimbalyst/nimbalystpackages/android/CLAUDE.md · 1.4k | CLAUDE.md | setupbuildstylearch+2 | 100/100 | 3 days ago | |
| microsoft/playwrightCLAUDE.md · 94k | CLAUDE.md | buildtestlint-formatstyle+7 | 100/100 | 3 days ago | |
| filamentphp/filamentCLAUDE.md · 32k | CLAUDE.md | buildtestlint-formatstyle+7 | 100/100 | 3 days ago | |
| Adit-Jain-srm/NightmareNetCLAUDE.md · 45 | CLAUDE.md | buildtestlint-formatstyle+6 | 100/100 | 3 days ago | |
| dotCMS/coreCLAUDE.md · 949 | CLAUDE.md | setupbuildteststyle+7 | 99/100 | today |
