$ show justjavac/awesome-wechat-weapp
This repository is a curated resource catalog for WeChat Mini Program development. It does not build a deployable application in the traditional sense; instead, it operates as a structured data project that generates a searchable static site and API from a YAML data file. The core architecture is a set of TypeScript scripts that read `data/resources.yaml`, validate the data integrity, check external links for liveness, and generate `README.md`, `public/api/resources.json`, and the search interface in `public/index.html`. The data is categorized into official docs, tools, plugins, components, backend SDKs, and demos, each with metadata like language, difficulty, and topics. The repository's primary value lies in its data quality tooling. The validation script (`validate-data.ts`) enforces strict schema rules, checks for duplicate URLs, validates metadata, and provides precise YAML line numbers for errors. The link checker (`check-links.ts`) uses concurrent HTTP requests with retries and graceful handling of servers that block HEAD requests. The import script (`import-readme.ts`) can reconstruct the YAML from the generated README, enabling a bidirectional workflow. The GitHub Actions CI pipeline runs validation, generation checks, and link checks on pull requests, posting automated comments when checks fail. The codebase is well-structured with clean separation of concerns: `catalog.ts` handles all data types and YAML/JSON I/O, `generate.ts` handles README and API generation, and individual scripts handle specific tasks. The TypeScript configuration uses strict mode and modern ES2022 features. Dependencies are minimal (only `yaml` at runtime) and the project requires Node.js >= 20. The last commit was in June 2026, indicating the project is in a stable but not actively developed state.
The LLM identified 6 files worth highlighting for reuse:
A comprehensive data validation script that enforces a strict schema on the resources.yaml file. It validates category and section IDs against a pattern, checks for duplicate resource IDs and normalized URLs, validates metadata fields (language, difficulty, topics), and reports errors with exact YAML line numbers. It supports a configurable duplicate policy for resources that appear in multiple categories. The error reporting integrates with GitHub Actions annotation format. This is reusable as a standalone YAML validation tool for any structured catalog data with minor adaptation of the schema rules.
A concurrent URL health checker that validates all resource links. It uses a worker pool pattern with configurable concurrency, retries failed requests with exponential backoff, falls back from HEAD to GET for servers that return 405/501, and treats 401/403/429 as acceptable responses. It normalizes URLs to avoid false duplicates and provides clear failure reporting. The concurrent worker pattern and retry logic are reusable for any bulk URL validation task.
The core data layer module defining all TypeScript types (Catalog, Category, Section, Resource, FlattenedResource) and providing utility functions for reading/writing YAML and JSON, URL normalization, slug generation, and resource flattening for the API. The `inferMetadata` function automatically tags resources based on keyword matching in titles and descriptions. This module demonstrates clean separation between data access, transformation, and serialization, making it reusable as a data catalog foundation for similar projects.
A generation orchestrator that renders the catalog into Markdown README and JSON API formats. It uses idempotent writes (only writing files when content changes) and supports a `--check` mode for CI validation. The README renderer handles categories, sections, table of contents, and proper Markdown formatting. The API generator produces a structured JSON payload with flattened resource data. The idempotent write pattern and check-mode approach are reusable for any code generation pipeline.
A reverse import script that parses the generated README back into the YAML data structure, enabling a bidirectional workflow where contributors can edit either the YAML or the README. It handles Markdown list parsing, category/section detection, note/description splitting, and generates unique IDs with collision resolution. The bidirectional sync pattern is valuable for any project that maintains both a human-readable and machine-readable representation of the same data.
A self-contained single-page search interface that fetches the generated JSON API and provides client-side filtering by text query, category, and difficulty. It implements dark/light theme switching with localStorage persistence and system preference detection, responsive CSS grid layout, and accessible form controls. No build tools or frameworks are required. The pattern of a static HTML page consuming a JSON API is reusable for any catalog or documentation search interface.