Code base documentation can be built automatically if using TypeScript and/or OpenAPI
The TypeDoc NPM package can auto-generate HTML Documentation for any TypeScript code base. The same sort of thing can be done by APIs implementing the OpenAPI standard using ReDoc.
Examples:
TypeDoc - GoJS Documentation
ReDoc - Oura API Documentation