Skip to content

feat/docs: documentation site#843

Closed
kaljarv wants to merge 136 commits intomainfrom
claude/issue-322-20251214-0958
Closed

feat/docs: documentation site#843
kaljarv wants to merge 136 commits intomainfrom
claude/issue-322-20251214-0958

Conversation

@kaljarv
Copy link
Contributor

@kaljarv kaljarv commented Dec 14, 2025

Implements #322

This PR adds a comprehensive automated documentation generation system for the OpenVAA project.

Features

  • TypeDoc configuration for all packages and frontend libraries
  • Svelte component documentation extraction from @component docstrings
  • Component type file integration with TypeDoc
  • Route map generation from SvelteKit routes
  • README.md integration from directories
  • Comprehensive table of contents
  • npm scripts: docs:generate, docs:typedoc, docs:components, docs:routes

Usage

yarn docs:generate

See docs/auto-documentation.md for detailed information.

🤖 Generated with Claude Code

kaljarv and others added 30 commits December 14, 2025 11:54
Implement different user roles for admins and candidates.

Turn the Candidates’ login server action into a generic login api route.

Use the new api route in the candidate/login server action and also
check for correct user role.

These changes are in preparation for the Admin App.
Move content related to logging in and out, and editing the password to
a new context used by both the Candidate and upcoming Admin Apps.
Also convert the build in both to follow the standard, non-dual build
paradigm.
Add a scaffold for the Admin App on the `/admin` route.

Add `AdminContext` for use with the app.

Reorganize common translations used in both Candidate and Admin Apps.

Within the Admin App, add an incomplete draft of the argument
condensation function.

Add preliminary translations for some parts of the Admin App, which are
not yet available.
- add mock admin user
- utility for filtering questions based on supported types
- add translation updates for argument condensation
- temp fix: get api key using process.env.apiKey
- IMPORTANT FIX: copy prompts to argument condensation package build
  - they are crucial but not inherently in the build
- create a map store for jobs
- create a pastJobs map store to see finished/failed jobs
- logger instance that needs to be improved later
- update logger to handle sub-ops for added granularity
- integrate llm and arg-cond packages to use send progress updates
- live progress integration to admin app with info and warning messages
- improve warning logs and remove futile ones
- fix: add llm openaikey to docker, use getRoute for admin app link
- remove POST endpoint, use update functions via logger
- restore docker configurations after failed attempt to hot-reload packages
- update this store with ad hoc 1-per-second GET calls only when there is an active job
- remove system health store from the admin app
- replace system health store with subscription to the job store (nActive, nFailed, nCompleted)
- also create a utility function to load election data
- add some translations for question info
- add route to save custom data
- add controller to handle saving custom data
- add service to process saving custom data
- add argument condensation type to shared data package (avoid circular dependency)
- update frontend to use new API for saving custom data
- fails with authentication error
…ustom data

This reverts the backend parts of commit f80cf8d.
Add an api route for updating `Question.customData` so that existing
values are merged with new ones.
Add temporary implementation which allows updating the `customData`
property of `Question`s.
- llm-based packages can now extend these types for conciseness
  in their own input and output types
- updated argument-condensation package to extend new common types
Add a `ConfirmationModal` for displaying a simple confirmation modal.

Add a `ButtonWithConfirmation` component for displaying a `Button` that
opens a `ConfirmationModal` and performs the `onConfirm` action only if
confirmed.

Extend the `Modal` component family to facilitate this.

Remove the `<dialog on:close>` handler to prevent multiple `onClose`
callbacks.
Remove the `onAbort` handlers from the job details component chain.
Add placeholder text.

Allow passing an array of strings for which ids will be autogenerated.

Allow passing `name` for generating a hidden `input` with the selected
value.
Move common output generation into internal utility.
Start using `data-testid` for some elements to ward off unnecessary test
failures due to changed translation files.
Apply these principles to all components:

1. Each property is defined in a separate .type.ts file in a type called
<ComponentName>Props.
2. That file is the prime source of truth for the properties' descriptions
3. The type is imported to the component as $$Props
4. All props are typed using that.
5. At the top of the file, there is a Svelte doc with `@component`
6. The `### Properties` section is generated from the type file such that
`@default` is replaced with 'Default:' and the value is backticked.
7. The element or component onto which $$restProps is passed and which is
the base of the props type, is mentioned last as like '- Any valid
attributes of a `<figure>`
element'
8. Any other prop related headings can be removed along with their contents,
unless they contain relevant information missing from the type, in which case add the info
to the type
9. If the component doesn't follow this paradigm, create the type file,
export it from index.ts and import it to the component

Co-Author: Claude
@kaljarv kaljarv changed the title docs: implement automated documentation generation feat/docs: implement automated documentation generation Dec 14, 2025
@kaljarv kaljarv changed the title feat/docs: implement automated documentation generation feat/docs: documentation site Dec 14, 2025
- Add TypeDoc configuration for packages and frontend libraries
- Create script to extract Svelte @component docstrings
- Create route map generator for SvelteKit routes
- Create main orchestrator script for all documentation
- Add npm scripts: docs:generate, docs:typedoc, docs:components, docs:routes
- Add comprehensive documentation about the auto-doc system
- Update .gitignore to exclude generated documentation
- Add dependencies: typedoc, typedoc-plugin-markdown, typedoc-plugin-mermaid, tsx, glob

The system generates:
1. TypeDoc API docs for all packages and frontend libs
2. Component docs from Svelte @component docstrings (markdown)
3. Links to corresponding .type.ts TypeDoc documentation
4. Route map from SvelteKit routes directory
5. Integration of README.md files from directories
6. Comprehensive table of contents

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Kalle Järvenpää <kaljarv@users.noreply.github.com>
@kaljarv kaljarv force-pushed the claude/issue-322-20251214-0958 branch from 3443c05 to 6799758 Compare December 14, 2025 10:34
@kaljarv
Copy link
Contributor Author

kaljarv commented Jan 25, 2026

Superseded by #847

@kaljarv kaljarv closed this Jan 25, 2026
@kaljarv kaljarv deleted the claude/issue-322-20251214-0958 branch January 25, 2026 12:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants