$ show pnp/custom-learning-office-365
This repository is a SharePoint Framework (SPFx) web part and companion pattern library that delivers Microsoft 365 Learning Pathways — a customizable training portal for Office 365. The application fetches structured JSON playlists and asset metadata from a public CDN (pnp.github.io), caches it client-side, and renders it through React components. Users can customize playlists and assets, with changes persisted to SharePoint lists via a custom data service. An UpgradeService migrates cached configuration and playlist data between major versions using version-specific migration functions (e.g., uCacheConfigV2V3, uPlaylistsV3V4). The repo also contains a style guide with atomic design (atoms/molecules/organisms/pages) and a dependency graph for template impact analysis. Although the dominant character is application, the repository is hybrid: it also stores a large static dataset of official Microsoft training content (playlists, assets, locale files) and a design-system data layer, so it is as much a content portal as a codebase. Maintenance is active but shows technical debt: duplicated locale lists, content drift between en-us and zh-cn asset files, disabled ESLint rules, and fragile cheerio-based CI scraping scripts.
The LLM identified 3 files worth highlighting for reuse:
Versioned migration runner for client-side cached data. Each major release registers a migration function (e.g., uCacheConfigV2V3, uPlaylistsV3V4) that upgrades stored config/playlist data in place. This is a clean, self-contained pattern for safely evolving persisted client-side data and can be extracted into any TypeScript project needing schema/data migrations.
Central TypeScript interfaces (ICategory, IPlaylist, IAsset, ICacheConfig) that define the domain contract between the web part, the external CDN content, and the SharePoint custom data layer. The file is self-contained and could be extracted as a type-only package for any client consuming the same JSON schemas.
Machine-readable graph of template dependencies in the style guide. It enables impact analysis and automated rebuild tracking for the pattern library. Although it is data rather than code, it demonstrates a reusable governance pattern for component libraries: encode template lineage in a structured graph so changes can be traced before regeneration.