Developer Docs

Platform Architecture

PTKRDME is built around a shared library pattern. The ptkrdmelibpackage contains all section definitions, auto-detection logic, configuration management, and markdown rendering. Three consumer tools each import the parts they need and add platform-specific interfaces.

System Overview

The four packages of the PTKRDME ecosystem. ptkrdmelib is the core; all three consumers import from it.

Loading diagram...

End-to-End Data Flow

End-to-end pipeline from project scan through per-section autodetection to final README.md output.

Loading diagram...

Consumer Import Patterns

Each consumer imports a different subset of ptkrdmelib based on its needs. The CLI and VS Code extension use the full manager classes; the web app uses only section data and types.

Loading diagram...

Configuration Data Model

ConfigFile (flat JSON on disk) converts to ReactConfigData (expanded with section objects) at runtime, and vice versa when saving.

Loading diagram...

Database Schema

SQLite database (managed by Prisma). The Project.json field stores the serialised ConfigFile as a JSON string.

Loading diagram...

Manager Architecture (Post-Migration)

All three managers now live in ptkrdmelib. The CLI's local copies of AutoDetector (including configFiles/ and filetypes/) have been replaced with imports from ptkrdmelib. NodeFSHandler and NodeProgressHandler bridge Node.js APIs to the library's abstract interfaces.

Loading diagram...

Section System

Adding a new section requires defining it in ptkrdmelib, rebuilding, then registering in each consumer tool.

Loading diagram...