103 Commits

Author SHA1 Message Date
steve c2b2722c56 chore: bump version to 0.5.0
TODO to Issues / todo (push) Has been cancelled
Build and push Docker image / build-push (push) Has been cancelled
v0.5.0
2026-06-11 22:56:20 -06:00
steve d1b27837e3 Merge pull request #18 from snachodog/fix/qs-dos-advisory
Build and push Docker image / build-push (push) Has been cancelled
TODO to Issues / todo (push) Has been cancelled
fix(deps): force qs >= 6.15.2 to resolve DoS advisory
2026-06-11 22:30:50 -06:00
steve 5d66d1f575 fix(deps): force qs >= 6.15.2 to resolve DoS advisory
express 4 pins qs to ~6.14.0, which falls in the vulnerable range of
GHSA-q8mj-m7cp-5q26 (remotely triggerable TypeError in qs.stringify).
Add an npm override so the transitive dependency resolves to the patched
6.15.2.
2026-06-11 22:29:52 -06:00
steve 34540e410c Merge pull request #17 from snachodog/refactor/security-hardening
Build and push Docker image / build-push (push) Has been cancelled
TODO to Issues / todo (push) Has been cancelled
Security hardening and hot-path performance fixes
2026-06-11 22:25:30 -06:00
steve 2504766be7 perf(db): reuse prepared statements on hot paths
- Prepare the user_accounts role lookup once in the auth middleware; it
  runs on nearly every authenticated request
- Prepare session store get/set/destroy/purge statements once in the
  constructor instead of per request
- Prepare the per-check SELECT once per PDF job instead of once per check
2026-06-11 22:03:56 -06:00
steve b4824655dd fix(docker): run container as non-root and exclude local files from image
- Add .dockerignore: a local .env, the live SQLite database in data/, .git,
  and node_modules were previously copied into the published image by COPY
- Run the app as the unprivileged node user; pre-create /app/data with
  matching ownership so named volumes inherit it
- Set NODE_ENV=production in the image
- Document the one-time volume chown needed when upgrading existing
  deployments
2026-06-11 21:57:39 -06:00
steve 674506bd2d fix(api): close authz gap and tighten input validation
- Require account access on POST /api/pdf/preview: any authenticated user
  could previously render any account's MICR line (routing and account
  number) regardless of role
- Re-validate QBO import records server-side on confirm (date format,
  positive amounts, integer check numbers) instead of trusting client JSON
- Make PUT /api/users/:id atomic: validate all fields up front, then apply
  every change in a single transaction (a validation failure could
  previously leave a half-applied update)
- Block demoting the last remaining admin
- Validate routing numbers as exactly 9 digits on account setup and update
- Cap upload sizes (50 MB .mdb, 10 MB CSV) and add a JSON error handler so
  oversized uploads and bad JSON return clean 4xx errors instead of HTML
  stack traces
- Disable the X-Powered-By header
2026-06-11 21:56:53 -06:00
steve 3fd3285c13 fix(auth): harden session lifecycle, reset links, and OIDC logging
- Fix session store expiry: cookie.maxAge is already in milliseconds, so
  stored sessions outlived the cookie by 1000x
- Regenerate the session ID on login, first-run setup, and OIDC login to
  prevent session fixation
- Mark session cookies Secure on TLS connections (secure: 'auto') and add
  TRUST_PROXY support for reverse-proxy deployments
- Build password reset links from APP_BASE_URL instead of the Host header
  to prevent reset-link poisoning
- Rate-limit forgot-password requests (5 per IP per 15 minutes)
- Strip OIDC debug logging that leaked authorization codes, subject IDs,
  and emails to logs
2026-06-11 21:54:35 -06:00
steve 427b064af1 chore: add GitHub issue templates 2026-05-16 08:36:55 -06:00
steve 7d105bce21 chore: bump version to 0.4.6
TODO to Issues / todo (push) Has been cancelled
Build and push Docker image / build-push (push) Has been cancelled
v0.4.6
2026-05-02 17:22:31 -06:00
steve 0b21f4ea3c feat(layout): add preview PDF button to layout editor
Generates a 3-up PDF with dummy check data (no real checks touched) so the
layout can be proofed without printing live checks.

Closes #12
2026-05-02 17:21:41 -06:00
steve f91fc7bd8a fix(deposits): bold check numbers and amounts for better print visibility 2026-04-28 10:28:08 -06:00
steve bb935acfa9 fix(deposits): check number spacing, darker text, header/title repositioning
- Shift check numbers right (0.16->0.28") so they clear the row number labels
- Darken label text (#444->##111) and disclaimer text (#666->#333)
- Move 'DEPOSIT TICKET' header and depositor/bank block down 0.12" on front page
- Vertically center the check grid on the back page
- Reposition 'ADDITIONAL CHECK LISTING' title relative to centered grid
2026-04-28 09:59:28 -06:00
steve 3957cf5518 feat(deposits): add back page rows all at once via single button 2026-04-28 09:28:49 -06:00
steve 4a47394923 fix(deposits): darken deposit slip grid lines for scanner readability 2026-04-28 09:14:52 -06:00
steve 189ae53d34 feat(deposits): pre-fill 30 slots and add back-page overflow for 31-60 checks
- Deposit panel now pre-fills all 30 check slots on open (new and existing)
- Remove button maintains 30-slot minimum by appending a blank row
- Add Row button hidden at <30, visible at 30-59, disabled at 60
- Deposit slip PDF splits items: first 30 on front, up to 30 more on back
- Front page gains a FROM REVERSE row carrying back-page subtotal when needed
- Back page renders with same column positions/width as front, titled
  'ADDITIONAL CHECK LISTING', numbered rows 31-60, and
  'Forward to other side / TOTAL $' footer

Closes #10, closes #11
2026-04-28 09:04:44 -06:00
steve 657de9e61a fix(ui): resolve deposit panel scroll and PDF open on iOS
- Switch #deposit-panel to 100dvh so iOS browser chrome doesn't clip the Save button
- Move overflow-y:auto to #deposit-panel-body so the actions footer stays pinned
- Replace window.open(blob:) with <a download> click to fix PDF opening in Firefox iOS
  (Firefox iOS blocks blob: URL navigation in new tabs)

Closes #7, closes #9
2026-04-28 08:32:07 -06:00
steve 0ee95dbb09 chore: bump version to 0.4.5
Build and push Docker image / build-push (push) Has been cancelled
v0.4.5
2026-04-13 08:28:46 -06:00
steve a2de7e2d9d feat(layout): add grid, safe zone, and MICR anchor alignment
- Draw 1/8" grid overlay on layout editor canvas
- Anchor MICR second transit symbol at 2 59/64" from left
- Clamp draggable fields to printing safe zone (11/64" sides, 13/64" top, 0.5" bottom)
- Render dashed safe-zone outline on layout canvas
2026-04-13 08:06:23 -06:00
steve c4e4a8c246 chore: bump version to 0.4.3
Build and push Docker image / build-push (push) Has been cancelled
v0.4.3
2026-04-11 10:23:17 -06:00
steve b692791436 fix: align account access checkboxes with fixed grid layout
Use a 3-column inner grid (checkbox | label | dropdown) with fixed
64px row height for consistent alignment across all account entries.
2026-04-11 10:23:15 -06:00
steve 37d70b4d82 chore: bump version to 0.4.2
Build and push Docker image / build-push (push) Has been cancelled
v0.4.2
2026-04-11 09:51:20 -06:00
steve 7d854d4e01 fix: clean up account access grid and separate OIDC fields in user form
Use CSS grid for uniform account checkbox layout and add a bordered
subsection with heading for the OIDC identity fields.
2026-04-11 09:51:18 -06:00
steve f9f6a4cd9a chore: bump version to 0.4.1
Build and push Docker image / build-push (push) Has been cancelled
v0.4.1
2026-04-11 09:44:22 -06:00
steve fd36c25636 feat: replace settings modal with full-page sidebar layout
Convert the users/admin modal into a dedicated settings page with
left sidebar navigation and spacious content panels. Hash-based
routing (#settings/users, #settings/smtp, etc.) enables browser
back-button support and direct URL access. Admin-only tabs are
hidden for non-admin users.
2026-04-11 09:43:24 -06:00
steve a4be7c4cff chore: bump version to 0.4.0
Build and push Docker image / build-push (push) Has been cancelled
v0.4.0
2026-04-10 19:56:12 -06:00
steve deb31d248f feat: add check position selector and fix logo not rendering
Add per-account check position setting (top/middle/bottom/3-per-page)
so checks print in a specific slot on the page. Fix logos never
appearing on checks or in the layout editor — the Logo layout field
was missing from the default seed data and existing accounts.
2026-04-10 19:54:17 -06:00
steve 66374196c5 docs: rewrite README for current features and config
Update to reflect multi-account support, OIDC/SSO login, deposit
slips, QBO import, visual layout editor, SMTP password reset, and
env var configuration including all OIDC variables.
2026-04-10 08:34:43 -06:00
steve ec54373848 chore(deps): bump nodemailer from 8.0.4 to 8.0.5 (dependabot #6) 2026-04-09 19:36:12 -06:00
steve caf75fbb3f fix: style OIDC login button with divider line and icon
Replace the plain boxy btn-secondary with a modern outlined button
that has a login icon, horizontal "or" divider, and hover effects.
2026-04-09 17:09:59 -06:00
steve da5d436432 feat: move OIDC settings to env vars and add debug logging
OIDC configuration now comes from environment variables instead of
the database settings table. This is more natural for Docker/compose
deployments where secrets live in .env files.

Env vars: OIDC_ENABLED, OIDC_DISCOVERY_URL, OIDC_CLIENT_ID,
OIDC_CLIENT_SECRET, OIDC_REDIRECT_URI, OIDC_BUTTON_LABEL.

Also adds detailed [oidc] console logging throughout the authorize,
callback, and link flows to aid debugging connection issues.

Removes the OIDC settings UI section from the admin modal and the
GET/PUT /api/settings/oidc endpoints.
2026-04-09 16:34:14 -06:00
steve dff5fd4156 fix: deposit slip total row now includes currency and coin
The TOTAL row in the deposit slip grid was only showing the sum of
check items (checksTotal) instead of the full deposit total which
includes currency + coin - cash back.
2026-04-09 16:19:34 -06:00
dependabot[bot] 0c4e190952 Bump nodemailer from 8.0.4 to 8.0.5
Bumps [nodemailer](https://github.com/nodemailer/nodemailer) from 8.0.4 to 8.0.5.
- [Release notes](https://github.com/nodemailer/nodemailer/releases)
- [Changelog](https://github.com/nodemailer/nodemailer/blob/master/CHANGELOG.md)
- [Commits](https://github.com/nodemailer/nodemailer/compare/v8.0.4...v8.0.5)

---
updated-dependencies:
- dependency-name: nodemailer
  dependency-version: 8.0.5
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-04-09 20:50:24 +00:00
steve 01ca9a08d1 chore: bump version to 0.3.0 2026-04-09 14:49:26 -06:00
steve 3b1a35b7f2 feat: add OIDC login with account linking
Add OpenID Connect as an alternative login method. Users can sign in
via an external identity provider (e.g., Authentik, Keycloak, Google).

- OIDC settings configured in admin UI (discovery URL, client ID/secret,
  redirect URI, button label, enable/disable toggle)
- PKCE-based authorization code flow with state and nonce validation
- Admin can manually link any user's OIDC identity (sub/issuer fields)
- Self-service linking: logged-in users can link/unlink their own account
- SSO button conditionally shown on login page when OIDC is enabled
- Username in header now clickable to open profile for all users
- Callback errors/success communicated via URL hash fragments
2026-04-09 14:48:50 -06:00
steve 8587fb9378 fix (readme): Fixed the roles table formatting 2026-04-02 11:01:41 -06:00
steve 572b4d8c37 feat: make the layout editor modal show the actual content instead of generic labels 2026-04-01 15:40:45 -06:00
steve cac97f1d9c fix: increase layout editor modal specificity to override base .modal width 2026-04-01 15:16:53 -06:00
steve c2d61c96cd feat: expand layout editor — full-screen, rulers, bottom controls
- Modal enlarged to min(1400px, 96vw) × 92vh
- Canvas fills full width; field controls moved to a strip below
- Inch rulers on top and left: major ticks at every inch (labeled),
  half-inch, quarter-inch, and eighth-inch subdivisions
- Layout editor button hidden on mobile/portrait screens (canvas
  requires landscape space to be usable)
2026-04-01 15:10:36 -06:00
steve d70081159d feat: visual layout editor for check field positioning
- SVG canvas showing all layout fields scaled to check dimensions
- Click or dropdown to select a field; drag to reposition
- Sidebar shows X/Y coordinates in decimal inches with fraction
  equivalents (¼", ½", ¹⁄₁₆", etc.)
- End X/Y inputs appear for Line and Graph fields
- Nudge buttons move selected field by ¹⁄₁₆" per click
- Auto-saves on drag end; debounced save on input/nudge changes
- Visible toggle hides fields from PDF without deleting them
- Admin-only Reset to Default wipes and re-seeds the layout
- Accessible to editor+ role via ⊞ button in account header
2026-04-01 15:01:30 -06:00
steve 8a944d1d20 fix: reset all accounts to default layout; fix slot 0 top-field clipping
- One-time migration (layout_reset_v1) deletes all layout_fields for every
  account and re-seeds with the default layout, ensuring .mdb-imported accounts
  get the same clean check style as wizard-created ones.
- Remove the -0.25" slot 0 y-offset that was pushing Company Name and Check
  Number above the top of the page on the first check.
- Consolidate layout field seed logic into database.js (seedLayoutFields),
  removing the duplicate in app.js.
2026-03-31 17:27:55 -06:00
steve 064c14fa12 chore: bump version to 0.2.0
Build and push Docker image / build-push (push) Has been cancelled
v0.2.0
2026-03-31 17:03:20 -06:00
steve 9897841666 fix: seed layout fields at startup for accounts with none; add Company Name3/4 mapping
Accounts created before the layout seeder was deployed had no layout_fields
rows, so PDFs rendered blank (MICR only). The startup migration in database.js
now seeds default layout fields for any account with zero rows, idempotently
via INSERT OR IGNORE. Also adds Company Name3/Company Name4 cases to
resolveFieldValue so company3/company4 render correctly.
2026-03-31 17:01:06 -06:00
steve 368e41037f feat: seed default layout fields when creating account via wizard
New accounts created through the setup wizard previously had no
layout_fields rows, so PDFs rendered only the MICR line. Now
seedDefaultLayoutFields() is called after INSERT to populate a
standard check layout (company block, payee, amount box, memo,
signature line, MICR-compatible positions) so the PDF is usable
without a .mdb import.
2026-03-31 16:20:02 -06:00
steve 416b553be1 Merge branch 'main' of https://github.com/snachodog/check-printing 2026-03-31 10:53:06 -06:00
steve e902c6fc24 Merge pull request #4 from snachodog/dependabot/npm_and_yarn/picomatch-2.3.2
Bump picomatch from 2.3.1 to 2.3.2
2026-03-31 10:51:38 -06:00
steve acf8f9f4da fix: replace inline onclick handlers blocked by CSP with event delegation
The Content-Security-Policy header (default-src 'self') blocked inline
onclick attributes, silently preventing the Edit and Delete buttons in
the user management modal from firing. Replaced with data-id attributes
and a delegated click listener on the users-list container.
2026-03-31 10:49:23 -06:00
steve 1b56c2964c Merge pull request #2 from snachodog/dependabot/npm_and_yarn/brace-expansion-5.0.5
Bump brace-expansion from 5.0.4 to 5.0.5
2026-03-31 10:46:15 -06:00
steve d9210beea0 Merge pull request #3 from snachodog/dependabot/npm_and_yarn/path-to-regexp-0.1.13
Bump path-to-regexp from 0.1.12 to 0.1.13
2026-03-31 10:36:52 -06:00
dependabot[bot] a4d48a15c1 Bump picomatch from 2.3.1 to 2.3.2
Bumps [picomatch](https://github.com/micromatch/picomatch) from 2.3.1 to 2.3.2.
- [Release notes](https://github.com/micromatch/picomatch/releases)
- [Changelog](https://github.com/micromatch/picomatch/blob/master/CHANGELOG.md)
- [Commits](https://github.com/micromatch/picomatch/compare/2.3.1...2.3.2)

---
updated-dependencies:
- dependency-name: picomatch
  dependency-version: 2.3.2
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-31 16:34:26 +00:00