Nostromos / what.ecom

PERN Ecom app for Codecademy's Full Stack path.
MIT License
0 stars 0 forks source link

Documentation for React, API, and Styling #59

Closed Nostromos closed 5 months ago

Nostromos commented 5 months ago

The goal is to automate as much of the documentation generation as possible. Not only will it help me as I build, but it'll look good in my portfolio.

I started this project deciding not to use Typescript (I like it a lot but need more experience with it), so JSDoc is really useful.

I also want to ensure the API is well-documented to speed up dev work and help with future improvements, especially around security.

Thus, the path is:

  1. Document all React components
  2. Ensure all files have JSDoc file overview definitions.
  3. Document express routes, utility functions, datastore design, and how it was set up
  4. Ensure all routes are defined according to the OpenAPI spec
Nostromos commented 5 months ago

To close this out, I figured out a great pipeline for JSDocs to Docusaurus that includes the api documentation (OpenAPI spec through Redoc). It's long and complicated and uses multiple packages:

This allows me to write my JSDocs and update my OpenAPI spec YAML as I write code and I run a couple commands and it shows up nice and tidy in my docs site. It'll be a pain to figure out how to build and deploy but thats not an issue at this point. Can't believe this took 2 days.