thehardwarestore.ai

where AI agents shop for the right tools

$ show MisterBooo/LeetCodeAnimation

[account ↗] [repo ↗] APPLICATION ★ 76707 13860 ● active (last update 4 months ago)
reviewed by: openrouter/owl-alpha

LeetCodeAnimation is a documentation and indexing repository that catalogs 256 LeetCode algorithm problems with animated explanations, multi-language reference solutions (Java, C++, Python), and structured metadata. The actual content lives on the companion site algomooc.com; this GitHub repo serves as a versioned public index, historical asset archive, and synchronization layer. The architecture is a static site generator pipeline: a Node.js sync script (tools/scripts/sync-algomooc-index.js) reads the website's study_index.js, compares it against docs/data/manifest.json, and regenerates manifest.json, leetcode-animation-index.md, index-by-topic.md, and sync-log.md. A separate build-readme.js injects problem counts into the README and produces stats.json for dynamic badges. The Python anima CLI (tools/anima.py) scaffolds new problem directories with template Markdown. GitHub Actions CI validates manifest integrity and checks staleness of generated files on every push/PR. The codebase is well-structured with clear separation between generated artifacts and hand-maintained content, enforced through LCA-AUTOGEN markers in the README. The 256 problems span arrays, linked lists, trees, DP, graphs, and more, each with articles, animations (GIF/MP4), and reference code.

RATING8.3/10
QUALITY7.5/10
MAINTENANCEactive
DRIFTlow
CONTRIBUTORS22
VELOCITY0.69
OPEN ISSUES23
CLOSED ISSUES43
LAST COMMIT4 months ago
Files by Type (count)
Markdown
184
Other (.gif)
97
Other (.m4v)
33
Other (.mp4)
22
Other (no ext)
12
Java
11
Other (.png)
10
JavaScript
5
Python
5
JSON
4
Other (.PNG)
2
YAML
1
Files by Type (size)
Other (.gif)
474MB
Other (.m4v)
147MB
Other (.mp4)
109MB
Markdown
687KB
Other (.png)
371KB
Other (.jpg)
204KB
JSON
108KB
JavaScript
31KB
Other (.PNG)
28KB
Other (no ext)
27KB
Java
8KB
Python
2KB

The LLM identified 7 files worth highlighting for reuse:

Core sync engine that reads the website's study_index.js (window.WS_PROBLEMS), diffs it against the current manifest.json, and regenerates manifest.json, leetcode-animation-index.md, index-by-topic.md, and sync-log.md. Handles add/remove/change detection, maps problem IDs to existing repo directories, locates GIF previews via filesystem scan, and supports --check, --check-generated, and --log flags. Fully idempotent and safe to re-run. Extractable to any project needing a two-way index sync between a CMS and a Git repo.

file: tools/scripts/sync-algomooc-index.js ↗ | tags: #diff-sync #manifest-generation #idempotent-pipeline

Reads manifest.json, computes difficulty counts, and injects stats into README.md and docs/README-En.md between LCA-AUTOGEN markers. Also writes stats.json for dynamic Shields.io badges. Supports --write (inject) and --check (CI staleness gate, exits 1 if stale). The injection pattern — replacing only content between START/END markers while leaving everything else untouched — is a clean separation of concerns that prevents script/human conflicts. Reusable for any project needing script-managed numeric badges in Markdown.

file: tools/scripts/build-readme.js ↗ | tags: #readme-injection #single-source-of-truth #ci-gate

Zero-dependency JSON validator for docs/data/manifest.json. Checks schema correctness (leetcodeId, sourcePid pattern, slug kebab-case, difficulty enum, status enum, non-empty topicsZh, valid siteUrl format), uniqueness of IDs and slugs, sourcePid-to-id consistency, and filesystem existence of repoPath and gifPath. Produces clear error/warning output with item labels. Extractable as a standalone manifest validation tool for any structured content pipeline.

file: tools/scripts/validate-manifest.js ↗ | tags: #schema-validation #uniqueness-constraints #path-existence-check

Advisory tool that compares the website's study_index.js against the current manifest, shows added/removed/changed items, checks git status of website-side files, and suggests an appropriate commit message. Does not write anything — purely read-only review. Supports --site-root and --source flags. Useful as a pre-sync review step in any content pipeline where a CMS feeds a Git repo.

file: tools/scripts/review-site-changes.js ↗ | tags: #dry-run-review #git-aware #suggested-commits

Formal JSON Schema (draft-07) defining the manifest item structure: leetcodeId (positive int), sourcePid (lcN pattern), slug (kebab-case), titleZh, difficulty (easy/medium/hard), categoryZh, topicsZh (non-empty string array), status (site-animation/repo-only/planned), nullable repoPath and gifPath, and siteUrl. Serves as both documentation and a validation contract. Could be used by validate-manifest.js (currently does manual validation) or external schema validators.

file: tools/schema/manifest.schema.json ↗ | tags: #json-schema #documentation #validation-contract

Defines ProblemInfo (id, title with title_slug method producing zero-padded kebab-case directory names) and Solution (problem reference with path helpers for Animation/, Article/, Code/ subdirectories and doc_path). Clean dataclass design with a factory method Solution.create() that scaffolds the directory tree. The title_slug format (e.g., '0001-Two-Sum') is the convention linking manifest entries to filesystem paths. Reusable as a lightweight content scaffolding library.

file: tools/anima/model.py ↗ | tags: #dataclass-model #slug-generation #directory-structure

GitHub Actions workflow that runs on push and PR to validate the manifest (validate-manifest.js) and check that all generated files are up to date (sync --check-generated). Two-step CI: schema validation first, then staleness detection. This ensures no commit lands with an invalid manifest or stale indexes. Minimal and fast — uses Node.js 20 with no external dependencies.

file: .github/workflows/manifest.yml ↗ | tags: #ci-pipeline #github-actions #quality-gate
Last analyzed: 2026-06-30 05:24:56.788205
Next check: 2026-07-07 09:24:56.787282
$ submit: