Repository navigation
feat: add example data loader and drop password minimum - #66
Closed
systemicdream wants to merge 1 commit into
Closed
systemicdream wants to merge 1 commit into
systemicdream wants to merge 1 commit into
Conversation
- Add `pnpm db:example` to load example users, tickets in every status, replies, and notifications for local testing. It refuses non-empty databases unless `--reset` is passed, and refuses NODE_ENV=production. - Allow passwords of 1-128 characters in the API, user:create CLI, and web forms (previously 12-128). Closes #64 Closes #65
systemicdream
marked this pull request as draft
October 21, 2026 20:35
Contributor
Author
|
Folding these changes into the ticket status notifications PR instead. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Makes local testing easier: one command loads a ready-to-use example database, and accounts no longer need 12+ character passwords.
Related issue
Closes #64
Closes #65
What changed
pnpm db:examplecommand (apps/api/src/database/example-data.ts,load-example-data.ts) loads:alice,bob(USER) andterry,tina(TECHNICIAN), all with passwordpassword--resetis passed (which deletes all users, sessions, tickets, replies, and notifications first), and refuses whenNODE_ENV=production.user:createCLI, and the web login/registration forms. Empty passwords are still rejected; the 128 max is kept to bound Argon2 hashing cost.Validation
db:examplelocally — refuses on non-empty DB, loads with--resetNot run:
coverage,build,scripts/smoke.sh. One web test (TicketDetail"updates the timeline after a technician advances the ticket") failed once in a full run but passed on reruns with and without this change, so it appears flaky.Screenshots or recordings
Not applicable.
Review notes
feature/ticket_status_notificationand ships as part of the larger notifications PR. The example data uses that branch'snotificationstable (migration 0005). Because this targets a non-default branch,Closes #64/#65will not auto-close; carry them into the notifications PR.passwordis committed intentionally for local-only test data. This is an exception to the AGENTS.md "no passwords in tracked files" rule, which is aimed at provisioned credentials.🤖 Generated with Claude Code