Professional Documentation Plan
This plan defines how to implement professional package documentation for tablsx using JSDoc, VitePress, and handwritten guides.
Goals
- Produce a polished public documentation experience for npm and GitHub users.
- Keep API reference close to the source so docs stay accurate.
- Separate onboarding guides from low-level reference material.
- Make documentation maintainable as the package evolves.
Implementation Plan
- Audit the public API and group exports into documentation sections: core read/write, workbook model helpers, tabular helpers, builders, readers, and utilities.
- Add comprehensive JSDoc to all public exports and public classes/methods, standardizing descriptions, params, returns, thrown errors, examples, and cross-links where useful.
- Introduce a docs toolchain in
package.jsonwith VitePress scripts, JSDoc generation support if needed, and a lightweight docs build workflow compatible with the existing Node 18+ ESM setup. - Create a VitePress site under
docs/with professional information architecture: home page, getting started, reading workbooks, writing workbooks, tabular workflows, builder API, data types and behavior, limitations and non-goals, and API reference landing pages. - Rewrite
README.mdas a concise package landing page focused on npm and GitHub readers, with installation, a 60-second example, feature summary, and links into the full docs site. - Add runnable or test-backed examples that mirror the documentation's main workflows so code snippets stay accurate over time.
- Document contribution expectations for docs maintenance: when to update guides, how examples are validated, and how API changes map to README and docs updates.
- Build and verify the docs locally, checking for broken links, missing exports, awkward API descriptions, and gaps between source behavior and documentation claims.
Deliverables
- Source-level JSDoc on the public ESM API
- VitePress docs site under
docs/ - Handwritten guides for major user workflows
- Refined
README.md - Verified examples tied to tests or runnable samples
- Documentation maintenance guidance for contributors
Proposed Documentation Structure
README.mddocs/.vitepress/docs/index.mddocs/guide/getting-started.mddocs/guide/reading-workbooks.mddocs/guide/writing-workbooks.mddocs/guide/tabular-workflows.mddocs/guide/builder-api.mddocs/reference/index.mddocs/reference/core-api.mddocs/reference/tabular-api.mddocs/reference/builders.mddocs/reference/utilities.mddocs/reference/readers.mddocs/reference/data-types.mddocs/documentation/
Notes
- The public documentation should be organized around consumer workflows, not internal implementation layers.
- API reference should be derived from or tightly aligned with JSDoc on exported symbols.
- Guides should be written by hand, because generated reference docs alone will not present the package professionally.