# Code maintenance OP-18657 - Publish JS/TS API docs (JSDoc/TSDoc-style)

Project: OpenProject
Status: on hold
URL: https://community.openproject.org/work_packages/OP-18657

## OPEN POINTS

_No work packages_

## Subtasks

_No work packages_

## Details

| Attribute | Value |
| --- | --- |
| Assignee |  |
| Accountable |  |
| Designer |  |
| Developers | Alexander Coles |
| Requires doc change | No |
| Date |  |
| Priority | Medium |
| Target versions | Product Backlog |
| Sprint |  |
| Backlog bucket |  |
| Module | Frontend components and Primer design system |
| Accessibility | No |
| List |  |
| Labels |  |

## Estimates and progress

| Attribute | Value |
| --- | --- |
| Work |  |
| Remaining work |  |

## Description

## Goal

Establish a generated frontend API reference so contributors and plugin authors can discover source-level contracts alongside Lookbook's component usage examples.

This work provides generation and publishing infrastructure. Defining which symbols are supported APIs and presenting their Stimulus contracts is tracked in [DREAM-822](https://community.openproject.org/wp/DREAM-822).

## Scope and requirements

- Generate TypeDoc documentation from `frontend/src/stimulus`, covering controllers, helpers, mixins and support modules. Directory inclusion does not imply a supported plugin API.
- Show controllers under their real class names, exclude external symbols, and remove misleading source links into `node_modules`.
- Pin CI-generated source links to the exact repository and commit being documented.
- Correct TSDoc syntax and enforce it through ESLint; test the documentation tooling with a Node-side Vitest harness in CI.
- Provide `npm run generate-docs` for local generation, with generated output git-ignored.
- Build and validate `edge` from `dev` and `stage` from the latest protected release branch before publication.

## Publication

Target: [GitHub Pages](https://opf.github.io/openproject/), with `edge` and `stage` channels. PR runs build and validate artifacts but skip deployment. Publication remains pending deployment permissions; add and validate links from Lookbook and the frontend guide once the site is available.

## Follow-up

[DREAM-822](https://community.openproject.org/wp/DREAM-822) owns the opt-in supported-API boundary, controller identifiers and markup contracts, grouping of Stimulus primitives, coverage and drift checks, and expansion to reusable code in `src/common` and `src/turbo`.

Legacy Angular APIs, rendering on `www.openproject.org/docs`, and Ruby API documentation remain separate future work.

Pull request: https://github.com/opf/openproject/pull/21688
