Thomas Joise
a1759864bf
feat(hq): shareable document link backend (mint/validate/revoke/list)
...
Add document_share table (CREATE TABLE IF NOT EXISTS; opaque token, optional
expiry, revoke flag) and repos-shares.ts:
- mintShare: 256-bit randomBytes hex token (64 hex, unique), default +30d expiry,
audited — the token itself is never written to the audit trail or any log.
- validateShare: resolves a live token to its one document; null on
unknown / revoked / expired (ISO-8601 UTC lexical compare).
- revokeShare: flips revoked=1, audited.
- listShares: a document's shares, scoped and newest-first.
Wire POST /api/documents/:id/share and
POST /api/documents/:id/share/:shareId/revoke (requireAuth, document-scoped
share guard) and surface shares on GET /api/documents/:id. TDD: 14 tests cover
token shape/uniqueness, validate rejections, revoke, and audit-without-token.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 week ago
Thomas Joise
52e8a03c81
feat(hq): GET /reminders/:id/preview — exact email via shared reminderContext
...
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 week ago
Thomas Joise
48731fdb2b
feat(hq): GET/PUT /settings/template + logo upload (owner-gated, audited)
...
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 week ago
Thomas Joise
c2f94df06d
feat(hq): screen paper styles + documentHtmlSample + POST /previews/sample
...
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 week ago
Thomas Joise
a948a92350
feat(hq): render editable template.* letterhead fields with default fallback
...
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 week ago
Thomas Joise
268a7469d3
feat(hq): POST /documents/preview — permissive live preview, persists nothing
...
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 week ago
Thomas Joise
5495b42e30
feat(hq): schedule monthly aws cost pull and owner-gated manual pull route
...
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2 weeks ago
Thomas Joise
ea8c2b23ad
feat(hq): company profile settings — owner-gated GET/PUT, audited
...
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2 weeks ago
Thomas Joise
b7085ce56e
feat(hq): payment receipts — own RCT/ series, zero-GST acknowledgment PDF
...
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2 weeks ago
Thomas Joise
42cfa3d0b2
feat(hq): reports — dues aging, module revenue, client profitability with margin
...
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2 weeks ago
Thomas Joise
9d2eedc366
feat(hq): aws usage repo — upsert/list, cross-client cost ranking, routes
...
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2 weeks ago
Thomas Joise
06b5eb532c
feat(hq): dashboard money view and 6-hourly scheduler wiring
...
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2 weeks ago
Thomas Joise
3204a9af97
feat(hq): reminder email send reusing gmail, plus manual-queue routes
...
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2 weeks ago
Thomas Joise
868fe17a5d
feat(hq): interaction log with types, follow-ups and routes
...
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2 weeks ago
Thomas Joise
0e66bd8ff8
feat(hq): amc contracts with renewal invoice and derived paid state
...
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2 weeks ago
Thomas Joise
405ee2917f
feat(hq): recurring plan repo and owner-gated routes
...
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2 weeks ago
Thomas Joise
54d6a63e81
feat(hq): HQ-1.5 — module quote content, pack pick-lists, bundle isolation check
...
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2 weeks ago
Thomas Joise
94734d04bf
feat(hq): gmail send with token-death handling and email log (HQ-1 task 11)
...
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2 weeks ago
Thomas Joise
8c90b09595
feat(hq): letterhead HTML templates and puppeteer PDF (HQ-1 task 10)
...
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2 weeks ago
Thomas Joise
5fc07b97ed
feat(hq): payments with allocation, TDS and advances (HQ-1 task 9)
...
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2 weeks ago
Thomas Joise
21ccaff363
feat(hq): document lifecycle with GST compute and credit notes (HQ-1 task 8)
...
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2 weeks ago
Thomas Joise
78771dad8d
feat(hq): client-module lifecycle tracking (HQ-1 task 6)
...
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2 weeks ago
Thomas Joise
fa8bb9c50a
feat(hq): module catalog with dated price book (HQ-1 task 5)
...
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2 weeks ago
Thomas Joise
9e4d53fb65
feat(hq): client registry with GSTIN validation (HQ-1 task 4)
...
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2 weeks ago
Thomas Joise
ac7aa891db
feat(hq): staff auth with sessions and owner gate (HQ-1 task 3)
...
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2 weeks ago
Thomas Joise
d17726941f
feat(hq): app skeleton with health endpoint (HQ-1 task 1)
...
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2 weeks ago