Compare commits

...

3184 Commits

Author SHA1 Message Date
Lucas Smith 198dafc8ec v2.9.0 2026-04-18 22:04:26 +10:00
armorbreak001 2f1aaa2b5d fix: prevent TooltipTrigger from submitting parent forms (fixes #2684) (#2701) 2026-04-16 14:29:35 +10:00
Lucas Smith f54a8ed72f feat: add turnstile captcha to auth flow (#2703) 2026-04-16 14:29:07 +10:00
David Nguyen 5082226e08 fix: brand logo caching (#2699) 2026-04-14 21:18:17 +10:00
David Nguyen bc82b2e70e fix: admin org sorting (#2694) 2026-04-14 21:17:16 +10:00
Ephraim Duncan 4935f387bf feat: signing reminders (#1749) 2026-04-14 21:01:53 +10:00
David Nguyen 6d7bd212bf fix: clean up duplicate dialogs (#2686) 2026-04-09 14:37:49 +10:00
David Nguyen 283334921b fix: update team member invitation ux (#2687) 2026-04-09 14:32:29 +10:00
Lucas Smith 1af83ea854 chore: add translations (#2683) 2026-04-09 14:08:44 +10:00
Lucas Smith 7cb64c3d04 fix: allow nullable document audit logs (#2682) 2026-04-08 16:23:43 +10:00
github-actions[bot] 4c69cb9c66 chore: extract translations (#2631) 2026-04-08 15:37:18 +10:00
David Nguyen 14b0b4805d feat: auto insert email and date fields (#2639) 2026-04-08 15:35:08 +10:00
Ephraim Duncan 9bfaa08d38 fix: documents table team email recipient lookup (#2578) 2026-04-07 20:10:38 +00:00
chaoliang yan 229cd2f7e9 fix: validate Resend API key before creating mail transport (#2672) 2026-04-07 12:08:29 +10:00
Swalih kolakkadan 6f650e1c2f feat: add document rename feature (#2542) (#2595) 2026-04-02 19:07:52 +11:00
Lucas Smith 0b9a23c550 fix: handle malformed pdf cropbox/mediabox entries (#2668)
Some PDFs have CropBox or MediaBox entries stored as a PDFDict
instead of the expected PDFArray, causing pdf-lib to throw during
lookup.

Wrap both box lookups in try-catch and fall back to A4 dimensions
when neither can be parsed
2026-04-02 18:58:13 +11:00
David Nguyen 3cca8cdae8 fix: labeler typo (#2670) 2026-04-02 18:57:43 +11:00
David Nguyen b13ec8909c fix: resolve incorrect recipient comparision check (#2646)
## Description

Resolve issues with comparison checks.

The `envelope-editor-provider.tsx` should be low impact since it's embed
only which will only cause the non relevant attributes (such as sent at)
to be incorrectly mapped

The `auth-provider.tsx` one should have no impact
2026-04-01 16:04:14 +11:00
David Nguyen e3b7a9e7cb feat: add ability to save documents as template (#2661) 2026-04-01 16:03:26 +11:00
Timur Ercan 74d79dc6b2 chore: update labeler.yml (#2653) 2026-04-01 15:26:45 +11:00
jpsimonsen 1c82595c12 feat: webhook allow private hosts (#2654) 2026-04-01 15:22:07 +11:00
Lucas Smith ad559f72dd feat: add BullMQ background job provider with Bull Board dashboard (#2657)
Add a new BullMQ/Redis-backed job provider as an alternative to the
existing Inngest and Local providers. Includes Bull Board UI for job
monitoring at /api/jobs/board (admin-only in production, open in dev).
2026-04-01 13:07:47 +11:00
Lucas Smith 025a27d385 docs: add user-facing documentation for recipient expiration (#2659) 2026-03-30 12:24:18 +11:00
Catalin Pit a71c44570b feat: admin panel org improvements (#2548)
## Description

- Add a new team page showing team details, global settings, members,
and pending invites
- Update the organisation page to display organisation usage and global
settings
- Show the role and ID of each organisation member, with navigation to
their teams

## Checklist

<!--- Please check the boxes that apply to this pull request. -->
<!--- You can add or remove items as needed. -->

- [ ] I have tested these changes locally and they work as expected.
- [ ] I have added/updated tests that prove the effectiveness of these
changes.
- [ ] I have updated the documentation to reflect these changes, if
applicable.
- [ ] I have followed the project's coding style guidelines.
- [ ] I have addressed the code review feedback from the previous
submission, if applicable.
2026-03-27 11:55:33 +02:00
Catalin Pit f5b3babcbb feat: display the field id in dev mode (#2658) 2026-03-27 00:40:29 +11:00
Lucas Smith 2346de83a6 fix: replace z.string().email() with RFC 5322 compliant zEmail() (#2656) 2026-03-26 16:31:21 +11:00
Lucas Smith 814f6e62de fix: replace z.string().email() with RFC 5322 compliant ZEmail/zEmail (#2655) 2026-03-26 13:31:26 +11:00
Lucas Smith 0434bdfacf fix: require billing address on checkout (#2647) 2026-03-25 15:07:27 +11:00
David Nguyen 53b6078fa9 fix: missing embed direct template email validation (#2635) 2026-03-23 15:12:42 +11:00
Catalin Pit 5be71cca21 feat: add option to disable Document created from template (#2609) 2026-03-23 15:11:42 +11:00
David Nguyen ace472c294 fix: prevent managers from deleting admin invitations (#2636) 2026-03-20 22:26:59 +11:00
David Nguyen b2d395e00b fix: stale envelope editor query (#2633) 2026-03-19 17:22:07 +11:00
Lucas Smith dd1b6d7dfe chore: add translations (#2632) 2026-03-19 16:02:09 +11:00
Lucas Smith bef3ea483d chore: add translations (#2630) 2026-03-19 15:57:31 +11:00
David Nguyen e87aa29823 feat: add page title translations (#2629) 2026-03-19 15:44:53 +11:00
Niels Kaspers 4f8132be61 fix(ui): add scroll to date format dropdown (#2626) 2026-03-19 14:47:38 +11:00
David Nguyen 9cf8ed1d00 fix: resolve envelope editor settings ccer logic (#2628)
## Description

Fix issue where having a CCer for a draft document would prevent
changing the date/timezone and some other settings.
2026-03-19 14:21:28 +11:00
github-actions[bot] 108d422a2e chore: extract translations (#2613) 2026-03-19 14:18:42 +11:00
David Nguyen 48fb066b9a feat: allow editing pending envelope titles (#2604) 2026-03-19 14:03:30 +11:00
David Nguyen 0b605d61c6 feat: add envelope pdf replacement (#2602) 2026-03-18 22:53:28 +11:00
Ted Liang 5dcdac7ecd feat: support language in embedding (#2364) 2026-03-18 16:17:23 +11:00
Abdul Alim f48aa84c9e fix(recipient): filter invalid emails in suggestions (#2510) 2026-03-18 14:43:44 +11:00
Catalin Pit 455fef70bd fix: folder view all page nested navigation and search filtering (#2450)
Add parentId query param support to documents/templates folder index
pages so View All correctly shows subfolders. Fix search not filtering
unpinned folders on documents page and broken mt- Tailwind class on
templates page.
2026-03-17 12:02:32 +02:00
Konrad 647dc5fc2d fix(i18n): mark billing messages for translation (#2525) 2026-03-17 12:05:27 +11:00
Lucas Smith de134afba1 v2.8.1 2026-03-17 01:30:28 +11:00
Ephraim Duncan 36bbd97514 feat: add organisation template type (#2611) 2026-03-17 01:29:34 +11:00
Ephraim Duncan 943a0b50e3 perf: parallelize async operations in duplicateEnvelope (#2619) 2026-03-16 02:34:08 +00:00
Ephraim Duncan 6ef501c9f2 perf: parallelize getTeamSettings and getEditorEnvelopeById (#2617) 2026-03-16 11:13:39 +11:00
Ephraim Duncan ac09a48eaa perf: parallelize independent async operations in createEnvelope (#2618) 2026-03-16 11:13:36 +11:00
Ephraim Duncan 70fb834a6a feat: add more webhook events (#2125) 2026-03-15 19:47:52 +11:00
Ephraim Duncan 66e357c9b3 feat: add email domain restriction for signups (#2266)
Co-authored-by: Lucas Smith <me@lucasjamessmith.me>
2026-03-14 16:32:34 +11:00
Ted Liang 3106fd7483 fix: exclude native modules from Vite dependency optimization (#2615) 2026-03-14 11:51:00 +11:00
Catalin Pit 32c54e1245 fix: hide name/email in embed signing when provided via prop (#2600)
## Description

When signing via embed, recipient name and email provided through the
embed context were ignored if the DB recipient record had empty values.

This fix adds:
- the signing context's fullName and email as fallbacks in the recipient
payload
- keeps the form in sync with values instead of defaultValues
- ensures the override payload is sent even when the form is hidden
2026-03-13 21:59:10 +11:00
Ted Liang 83fbc70a1c refactor: avoid recipient color duplication (#2355) 2026-03-13 15:52:15 +11:00
Lucas Smith 1ee6ec87a2 chore: add translations (#2614) 2026-03-13 15:22:20 +11:00
Lucas Smith 6b1b1d0417 fix: improve webhook execution (#2608)
Webhook URLs were being fetched without validating whether they
resolved to private/loopback addresses, exposing the server to SSRF.

Current SSRF is best effort and fail open, you should never host
services that
you cant risk exposure of.

This extracts webhook execution into a shared module that validates
URLs against private IP ranges (including DNS resolution), enforces
timeouts, and disables redirect following. The resend route now
queues through the job system instead of calling fetch inline.
2026-03-13 15:02:09 +11:00
Lucas Smith 9f680c7a61 perf: set global prisma transaction timeouts and reduce transaction scope (#2607)
Configure default transaction options (5s maxWait, 10s timeout) on the
PrismaClient instead of per-transaction overrides. Move side effects
like email sending, webhook triggers, and job dispatches out of
$transaction blocks to avoid holding database connections open during
network I/O.

Also extracts the direct template email into a background job and fixes
a bug where prisma was used instead of tx inside a transaction.
2026-03-13 14:51:53 +11:00
github-actions[bot] 76d96d2f65 chore: extract translations (#2583) 2026-03-13 14:50:48 +11:00
David Nguyen 2f2b5dd232 feat: allow creating embeds in folder (#2612)
## Description

Allow passing in a `folderId` when creating an embedded envelope 

## Embed repo changes here

https://github.com/documenso/embeds/pull/69/changes
2026-03-13 14:50:14 +11:00
David Nguyen 8d97f1dcfa fix: resolve error flash on page refresh (#2606) 2026-03-13 12:37:30 +11:00
David Nguyen e67e19358a fix: add hipaa flag (#2603) 2026-03-13 12:06:10 +11:00
Timur Ercan 364537e8fe chore: update hipaa status in docs (#2599) 2026-03-13 12:00:05 +11:00
Joshua Sharp 4751c9cecc fix: template description overflow (#2605) 2026-03-12 18:15:21 +11:00
VIVEK TIWARI a5fd814fbc fix: handle invalid qr share tokens without 500 (#2597) 2026-03-12 13:46:17 +11:00
Ephraim Duncan 1d2c781a6d docs: add organisation ownership transfer guide (#2601) 2026-03-12 13:39:37 +11:00
Lucas Smith 03ca3971a0 perf: upgrade @libpdf/core to 0.3.3 and deduplicate font registration (#2598)
Upgrade @libpdf/core from 0.2.12 to 0.3.3, which includes:
- WebCrypto SHA-256 replacing pure-JS @noble/hashes (10x signing
speedup)
- Iterative collectReachableRefs (fixes stack overflow on large PDFs)
- Iterative Math.max helpers in xref writer (fixes remaining stack
overflow)

Extract duplicated FontLibrary.use() calls from render-certificate,
render-audit-logs, and insert-field-in-pdf-v2 into a shared
ensureFontLibrary() helper with has() guards so fonts are only
registered once per process.
2026-03-11 20:23:18 +11:00
Lucas Smith 5ea4060fd7 v2.8.0 2026-03-10 21:43:01 +11:00
Lucas Smith af346b179c feat: add recipient role editing and audit log PDF download in admin (#2594)
- Allow admins to update recipient role from document detail page
- Add download button to export audit logs as PDF
- Display recipient status details in accordion
- Add LocalTime component with hover popover for timestamps
2026-03-10 21:41:46 +11:00
Catalin Pit ab69ee627b fix: include extra recipient info in missing fields error msg (#2590) 2026-03-10 12:17:24 +11:00
Lucas Smith 4daec44550 fix: move window.__ENV__ script before client bundle to prevent stale fallback (#2592) 2026-03-10 12:15:15 +11:00
Ted Liang 11eb4dd2cd fix: security CVE-2026-29045 (#2589) 2026-03-09 16:46:11 +11:00
Lucas Smith cc71c7d9ba fix: add cmaps (#2588) 2026-03-09 14:07:13 +11:00
Lucas Smith f82bf97480 fix: only use embed hash name/email as fallback when recipient values are blank (#2586)
For document signing embeds, the hash-provided name and email should
only
be used when the recipient doesn't already have values set. For template
signing, the hash values are always allowed.

Also makes the email input editable in V1 embeds when the recipient has
no email, matching V2 behavior.

Ref: documenso/embeds#53
2026-03-09 13:30:27 +11:00
Lucas Smith 0e20d364ef fix: opt findDocumentsInternal query out of batch fetching (#2585) 2026-03-09 12:47:59 +11:00
David Nguyen ef57c8448a fix: dropdown fields (#2584) 2026-03-09 12:19:20 +11:00
Lucas Smith eaaf8f9e63 chore: add translations (#2582) 2026-03-09 11:56:17 +11:00
David Nguyen 58f0c98038 chore: add embed envelope docs (#2576) 2026-03-09 11:50:13 +11:00
Catalin Pit da7b5d12f8 fix: make signing page left-hand sidebar collapsible (#2541) 2026-03-09 11:45:28 +11:00
github-actions[bot] 7cfe876762 chore: extract translations (#2577) 2026-03-09 11:39:37 +11:00
Ephraim Duncan 15399cbe8e feat: auto-disable telemetry when license key is configured (#2562) 2026-03-09 11:24:24 +11:00
Catalin Pit c4754553c9 feat: implement template search functionality (#2376)
- Added  function to handle template searches based on user input
- Introduced in the TRPC router to facilitate authenticated template
searches
- Updated to include template search results alongside document search
results
- Enhanced query handling by enabling searches only when the input is
valid
- Created corresponding Zod schemas for request and response validation
in
2026-03-09 10:44:51 +11:00
David Nguyen 6c8726b58c fix: performance improvements (#2581) 2026-03-09 10:22:57 +11:00
Lucas Smith abd031b58b chore: add translations (#2575) 2026-03-06 16:10:54 +11:00
github-actions[bot] 1ff8680c32 chore: extract translations (#2566) 2026-03-06 14:15:37 +11:00
David Nguyen 7ea664214a feat: add embedded envelopes (#2564)
## Description

Add envelopes V2 embedded support

---------

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
2026-03-06 14:11:27 +11:00
Ephraim Duncan 7e2cbe46c0 fix: show current month data and add caching (#2573)
### Summary

- Add Cache-Control headers to all route responses (1h s-maxage, 2h
stale-while-revalidate)
- Append current month to chart data so graphs stay up-to-date
(cumulative carries forward, else zero)
- Remove `.limit(12)` from growth queries for full history
- Pass isCumulative flag through addZeroMonth
- Deduplicate TransformedData type, remove transformRepoStats
2026-03-06 13:30:31 +11:00
Konrad c63b4ca3cc fix(i18n): mark dropdown and radio placeholder for translation (#2537) 2026-03-06 13:05:03 +11:00
David Nguyen 6faa01d384 feat: add pdf image renderer (#2554)
## Description

Replace the PDF renderer with an custom image renderer.

This allows us to remove the "react-pdf" dependency and allows us to use
a virtual list to improve performance.
2026-03-06 12:39:03 +11:00
Lucas Smith 0ce909a298 refactor: find envelopes (#2557) 2026-03-06 12:38:40 +11:00
Lucas Smith 7f271379b9 fix: upgrade @libpdf/core (#2572) 2026-03-06 10:08:58 +11:00
Lucas Smith 406e77e4be chore: add translations (#2570) 2026-03-05 17:33:36 +11:00
Lucas Smith bff360b084 fix: upgrade @libpdf/core (#2569) 2026-03-05 15:34:40 +11:00
Lucas Smith db1087d76d v2.7.1 2026-03-05 15:16:45 +11:00
Lucas Smith ef0a5b54ba fix: verify before re-registering in email sync (#2568) 2026-03-05 15:12:20 +11:00
David Nguyen 1f985e2cd3 fix: invalid po translations (#2567) 2026-03-05 14:54:36 +11:00
Konrad 525dd92a56 fix(i18n): mark SUBSCRIPTION_STATUS_MAP for translation (#2515) 2026-03-05 14:42:40 +11:00
Konrad d21b99825d fix(i18n): add pluralization to expiration period picker (#2535) 2026-03-05 14:32:12 +11:00
Konrad dfbf68e4cd fix(i18n): mark editor field number form placeholder for translation (#2536) 2026-03-05 14:31:24 +11:00
github-actions[bot] 8b0231825f chore: extract translations (#2539) 2026-03-05 14:11:53 +11:00
Ephraim Duncan 03e2e4f171 docs: clarify placeholder support is envelope.* only (#2560) 2026-03-05 13:58:29 +11:00
Lucas Smith 7f5f2b22ed feat: add seal-document sweep job and admin unsealed documents page (#2563) 2026-03-05 13:56:40 +11:00
Lucas Smith 7d3a56a006 feat: add admin ability to move subscription between orgs (#2558)
## Summary

- Adds a new admin action to move a subscription (and Stripe customerId)
from one organisation to another owned by the same user
- The target organisation must be on the free plan (no active
subscription) — enforces paid → free only
- The source organisation's claim is reset to the free plan after the
move

## How it works

A "Move Subscription" option appears in the actions dropdown of the
organisations table (on the admin user detail page) for any org with an
active or past-due subscription. Clicking it opens a dialog where the
admin selects a target org from a filtered list of eligible (free-plan)
orgs owned by the same user.

The backend performs the swap atomically in a single Prisma transaction:
1. Deletes any stale inactive subscription on the target org
2. Moves the `customerId` from source to target org
3. Reassigns the `Subscription` record to the target org
4. Copies claim entitlements to the target org
5. Resets the source org's claim to FREE

No Stripe API calls are made — the Stripe subscription and customer
remain unchanged; only the DB-level org association is updated.

## Files changed

- **New:**
`packages/trpc/server/admin-router/swap-organisation-subscription.types.ts`
— Zod schemas
- **New:**
`packages/trpc/server/admin-router/swap-organisation-subscription.ts` —
Admin mutation
- **New:**
`apps/remix/app/components/dialogs/admin-swap-subscription-dialog.tsx` —
Dialog component
- **Modified:** `packages/trpc/server/admin-router/router.ts` — Register
route
- **Modified:**
`apps/remix/app/components/tables/admin-organisations-table.tsx` — Add
action menu item
2026-03-04 22:34:53 +11:00
Catalin Pit f1323679aa fix: use default field meta for embedding template fields (#2556) 2026-03-03 22:24:57 +11:00
Lucas Smith a05251d5ee v2.7.0 2026-03-03 16:19:38 +11:00
Lucas Smith 454f73f2a9 chore: remove old docs (#2550) 2026-03-02 13:47:40 +11:00
Lucas Smith 24a5c85b6c fix(docs): rewrite mermaid component to avoid async client component error (#2549)
Replace use() with useEffect/useState pattern to prevent 'async Client
Component' errors in Next.js 16 / React 19. Also strip colons from
useId() output which broke mermaid's render().
2026-02-28 16:55:33 +11:00
Lucas Smith b92c53dbb2 feat: docs v2 (#2460)
Co-authored-by: Catalin Pit <catalinpit@gmail.com>
2026-02-27 22:05:27 +11:00
Lucas Smith f8ac782f2e deps: 2026-02-26 upgrades (#2545) 2026-02-26 14:17:08 +11:00
Ephraim Duncan 194660d847 fix: return all documents from V1 API regardless of folder (#2471) 2026-02-26 13:55:14 +11:00
Lucas Smith 0d3bd59ec6 fix: handle cjk and special chars when slugifying (#2544) 2026-02-26 13:54:35 +11:00
Konrad 92d82c0423 fix(i18n): mark supported languages for translation (#2377) 2026-02-26 12:06:18 +11:00
Lucas Smith 484e1c20d0 chore: add translations (#2533) 2026-02-26 11:50:08 +11:00
Lucas Smith 6f5014a561 feat: support optional read replicas (#2540) 2026-02-25 19:07:02 +11:00
Lucas Smith c112392da9 feat: add admin email domain management and sync job (#2538) 2026-02-25 15:14:18 +11:00
github-actions[bot] bc72d9cb17 chore: extract translations (#2505) 2026-02-24 22:07:03 +11:00
Karlo 3ad3216c4c fix: update button width to fit content in public profile page (#2506)
Co-authored-by: Catalin Pit <catalinpit@gmail.com>
2026-02-23 12:46:58 +02:00
Lucas Smith 36eef79b1a fix: omit fieldId from embed create endpoints (#2523) 2026-02-21 21:14:51 +11:00
Lucas Smith 6fb88fede5 chore: upgrade libpdf (#2522) 2026-02-21 20:54:33 +11:00
Lucas Smith 653ab3678a feat: better ratelimiting (#2520)
Replace hono-rate-limiter with a Prisma/PostgreSQL bucketed counter
approach that works correctly across multiple instances without sticky
sessions.

- Add RateLimit model with composite PK (key, action, bucket) and atomic
upsert
- Create rate limit factory with window parsing, bucket computation, and
fail-open
- Define auth-tier and API-tier rate limit instances
- Add Hono middleware, rateLimitResponse helper, and tRPC
assertRateLimit helper
- Wire rate limit headers through AppError constructor (was declared but
never assigned)
- Apply rate limits to auth routes (email-password, passkey), tRPC
routes
  (2FA email, link org account), API routes, and file upload endpoints
- Add cleanup cron job for expired rate limit rows (batched delete every
15 min)
- Remove hono-rate-limiter dependency
2026-02-20 12:23:02 +11:00
Lucas Smith 006b1d0a57 feat: per-recipient envelope expiration (#2519) 2026-02-20 11:36:20 +11:00
Lucas Smith f3ec8ddc57 v2.6.1 2026-02-18 21:57:10 +11:00
Lucas Smith 9a66d0ebf6 fix: simplify openapi field schemas to fix SDK generation (#2503) 2026-02-18 17:07:46 +11:00
Konrad 29622d3151 fix(i18n): mark strings inside div for translation (#2514) 2026-02-18 13:50:42 +11:00
Lucas Smith 5de2527e54 fix: v2 embed direct templates not reading email/lockEmail from hash params (#2509) 2026-02-18 13:35:04 +11:00
Lucas Smith 6fcf0a638c chore: add translations (#2507) 2026-02-17 11:31:37 +11:00
Louis Liu ff9e6acb7a fix(ui): clarify email settings labels (#2448) 2026-02-16 17:00:24 +11:00
Lucas Smith a60c6a90ab chore: add translations (#2504) 2026-02-16 16:10:43 +11:00
github-actions[bot] f35c19d098 chore: extract translations (#2458) 2026-02-16 14:34:33 +11:00
McMek590 cf8e21bf35 fix: create full sentences for document-signing-auth files (#2451) 2026-02-16 13:30:36 +11:00
Jahangir Babar 3f7c4df1b1 fix: strip diacritics from team URL slug generation (#2489) 2026-02-16 12:36:14 +11:00
Konrad ca199e7885 fix(i18n): mark span strings for translation (#2494) 2026-02-16 12:07:53 +11:00
Konrad 435d61ea57 fix(i18n): mark badge string for translation (#2495) 2026-02-16 11:58:03 +11:00
Konrad 34f14ba69a fix(i18n): mark tabs trigger strings for translation (#2496) 2026-02-16 11:57:44 +11:00
Konrad 51916cd3f0 fix(i18n): mark DialogTitle string for translation (#2497) 2026-02-16 11:57:23 +11:00
Konrad f158305499 fix(i18n): mark paragraph strings for translation (#2498) 2026-02-16 11:57:03 +11:00
Lucas Smith 2e3d22c856 fix: use instance-specific emails for service accounts (#2502) 2026-02-16 11:52:19 +11:00
Ephraim Duncan d66c330d46 fix: match cert and audit log page dimensions to source document (#2473) 2026-02-12 18:25:11 +11:00
David Nguyen 9bcb240895 fix: revert canceled individual subscriptions to free claim (#2483)
## Description

Resolves an issue where individual plan customers who cancel are not
correctly put down to the free plan.

To resolve this, we delete the subscription on the stripe subscription
delete webhook. Since the customerId is stored on the organisation they
can still access their old invoices.
2026-02-12 17:44:33 +11:00
David Nguyen 066e6bc847 fix: envelope editor flush race condition (#2482)
## Description

Fixes a race condition in the envelope editor when opening "Send
Document" immediately after moving/resizing a selected field

Replication
1. Move or resize a field (do not blur the selector/quickbar that
appears when a field is selected)
2. Directly click the "Send Document" dialog
3. Error appears

Note: Step 2 needs to happen relatively fast after step 1 since this is
a race against the flush debouncer

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-02-12 16:32:26 +11:00
David Nguyen 0d65693d55 fix: highlight rejected certificate text (#2478)
## Description

- Update the rejected certificate so that is it more clear on who
rejected the document.
- Updated the audit log generation so that the completed audit log is
included

### Before

<img width="681" height="597" alt="image"
src="https://github.com/user-attachments/assets/3dab41c1-c86f-4555-8d50-3d9245be65d5"
/>

### After

Note that the order of the recipient is different in this case

<img width="818" height="769" alt="image"
src="https://github.com/user-attachments/assets/71f0ac12-5859-47b4-8980-2420ef949d18"
/>

---------

Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Lucas Smith <me@lucasjamessmith.me>
2026-02-12 16:06:43 +11:00
Lucas Smith e3dee5e565 fix: auto placement field meta (#2480) 2026-02-12 14:20:52 +11:00
Catalin Pit f1c91c4951 fix: bulk actions improvements (#2440) 2026-02-10 20:13:03 +11:00
Lucas Smith a5ef1d23e6 feat: add team memberships section to admin user detail page (#2457) 2026-02-09 17:35:22 +11:00
github-actions[bot] d91414697d chore: extract translations (#2429) 2026-02-09 17:30:46 +11:00
Konrad e222a872d2 fix(i18n): rewrite audit log messages to support correct grammar (#2455) 2026-02-09 13:20:12 +11:00
Ephraim Duncan e3b0087be6 feat: create plain customer (#2442)
Co-authored-by: Catalin Pit <catalinpit@gmail.com>
2026-02-09 11:24:45 +11:00
Konrad da89ce7c9a fix(i18n): add localization context to dialog messages (#2452) 2026-02-09 10:52:50 +11:00
Konrad b762561f11 chore(i18n): add context to ambiguous message (#2454) 2026-02-09 10:52:00 +11:00
Catalin Pit 9b190ef582 docs: add info callout for enterprise-only embedded authoring (#2443) 2026-02-04 12:41:46 +11:00
Lucas Smith 1669216a91 fix: flatten pdf-lib form fields before sealing document (#2441)
- Fixes checkbox fields not displaying correctly in sealed documents by
calling `flatten()` on the pdf-lib form before saving
2026-02-03 14:24:23 +11:00
Lucas Smith 594a0f0c3f fix: store formValues in database when creating document from template (#2437) 2026-02-02 11:36:06 +11:00
Konrad 39ebc8184a fix(i18n): add pluralization to envelopes-bulk-delete-dialog.tsx (#2428) 2026-01-30 12:43:27 +11:00
Konrad 2df41b9f01 feat(ui): rename sign up button for better clarity (#2427) 2026-01-30 12:30:33 +11:00
Lucas Smith 8704c731c0 chore: upgrade libpdf (#2435) 2026-01-29 23:34:46 +11:00
Lucas Smith eaee0d4bc6 v2.6.0 2026-01-29 18:44:58 +11:00
Lucas Smith 0f8b7670f4 fix: correct path prefix check for static assets caching (#2433) 2026-01-29 16:05:08 +11:00
Catalin Pit 25e148d459 feat: update team member creation dialog with invite functionality (#2366) 2026-01-29 15:15:06 +11:00
David Nguyen 97ceb317a8 fix: license banner not correctly showing (#2432) 2026-01-29 15:09:23 +11:00
David Nguyen c83109628d fix: add license logging (#2431) 2026-01-29 14:08:36 +11:00
David Nguyen a4d0e3e873 fix: resolve safari cert download issues (#2430) 2026-01-29 14:08:07 +11:00
Catalin Pit 59a514c238 feat: allow non-team members as default recipients (#2404) 2026-01-29 13:32:18 +11:00
David Nguyen 1b0df2d082 feat: add license integration (#2346)
Changes:
- Adds integration for the license server.
- Prevent adding flags that the instance is not allowed to add
2026-01-29 13:30:48 +11:00
Catalin Pit d18dcb4d60 feat: autoplace fields from placeholders (#2111)
This PR introduces automatic detection and placement of fields and
recipients based on PDF placeholders.

The placeholders have the following structure:
- `{{fieldType,recipientPosition,fieldMeta}}` 
- `{{text,r1,required=true,textAlign=right,fontSize=50}}`

When the user uploads a PDF document containing such placeholders, they
get converted automatically to Documenso fields and assigned to
recipients.
2026-01-29 13:13:45 +11:00
Konrad d77f81163b fix(i18n): mark missing strings for translation in card components (#2308) 2026-01-29 12:22:07 +11:00
Lahiru Dahampath 62fb9e5248 fix: correct webhook event name in documentation (#2424) 2026-01-29 11:52:36 +11:00
github-actions[bot] 53b0131740 chore: extract translations (#2418) 2026-01-28 21:25:23 +11:00
Catalin Pit 155310b028 feat: add bulk document selection and move functionality (#2387)
This PR introduces bulk actions for documents, allowing users to select
multiple envelopes and perform actions such as moving or deleting 1 or
more documents simultaneously.
2026-01-28 18:27:32 +11:00
Catalin Pit 28bc2dc975 fix: send organisation member removal email to correct user (#2405) 2026-01-28 09:18:58 +02:00
David Nguyen eb3b3b18ce chore: add v1 deprecated docs (#2423) 2026-01-28 14:09:13 +11:00
misha 8bc4f1a713 fix: exclude soft-deleted documents from folder count (#2410) 2026-01-28 13:07:57 +11:00
Timur Ercan d3c898e317 chore: update fair policy with support (#2422)
updated fair policy and added fair self-host support
2026-01-27 17:34:07 +01:00
Lucas Smith d08049ed3b v2.5.1 2026-01-27 20:25:31 +11:00
Lucas Smith 7a583aa7af fix: preserve prompt parameter in OAuth authorize URL builder (#2421)
The prompt option was being discarded for OAuth authorize URLs after
adding support for the NEXT_PRIVATE_OIDC_PROMPT env var. This meant
select_account (used elsewhere) was not being passed through.

Now defaults prompt to the provided option (or 'login'), and only
overwrites it when a valid OIDC prompt env var is set. Also adds a
type guard to validate the env var value.
2026-01-27 20:25:16 +11:00
David Nguyen b590076d85 fix: allow past due subscriptions (#2420)
Allow plans with past_due subscriptions to continue to use the platform
until the subscription becomes inactive.
2026-01-27 18:45:58 +11:00
Lucas Smith 65e30b88be fix: persist formValues in document creation endpoints (#2419) 2026-01-27 16:21:09 +11:00
Ted Liang 9c6ee88cc4 fix: security CVE-2026-23527 (#2399) 2026-01-27 15:52:34 +11:00
Lucas Smith 6028ad9158 chore: add translations (#2412)
Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
2026-01-27 15:44:01 +11:00
Lucas Smith 7fc6f5bb6e fix: make teamId optional in support form validation (#2417)
The contact form accepts teamId as an optional param based on
where the user clicks "Support" from. Previously, when opened
from a non-team context, the null teamId would be parsed to NaN
and fail validation, causing the form to error out. Now the
validation only runs when a teamId is actually provided.
2026-01-27 15:00:53 +11:00
Jorge Ramirez 17b261df1f fix(api): add take parameter to template search query for pagination (#2396)
This PR fixes a bug in the `/api/v2/template` endpoint where the
pagination parameter `perPage` was being ignored. Previously, the
endpoint would return all matching templates regardless of the requested
limit, which could lead to performance issues and incorrect API
behavior.
2026-01-27 15:00:37 +11:00
Lucas Smith c732c85082 chore: add manual dispatch to publish workflow and remove chromium builds (#2415) 2026-01-27 14:15:04 +11:00
Lucas Smith 7d38e18f93 v2.5.0 2026-01-26 15:59:30 +11:00
Lucas Smith 0a3e0b8727 feat: validate signers have signature fields before distribution (#2411)
API users were inadvertently sending documents without signature fields,
causing confusion for recipients and breaking their signing flows.

- Add getRecipientsWithMissingFields helper in recipients.ts
- Add server-side validation in sendDocument to block distribution
- Fix v1 API to return 400 instead of 500 for validation errors
- Consolidate UI signature field checks to use isSignatureFieldType
- Add E2E tests for both v1 and v2 APIs
2026-01-26 15:22:12 +11:00
github-actions[bot] b538580a1e chore: extract translations (#2380) 2026-01-26 12:21:02 +11:00
Lucas Smith 42d6e1cbbd chore: upgrade libpdf (#2409) 2026-01-26 12:20:33 +11:00
Lucas Smith 67da488f63 chore: upgrade libpdf (#2408) 2026-01-23 21:38:48 +11:00
Lucas Smith fd3ebc08ec chore: upgrade libpdf (#2406) 2026-01-22 12:45:20 +11:00
Catalin Pit a7963b385a docs: add default recipients section (#2400) 2026-01-21 09:45:34 +02:00
Lucas Smith 9035240b4d refactor: replace pdf-sign with libpdf/core for PDF operations (#2403)
Migrate from @documenso/pdf-sign and @cantoo/pdf-lib to @libpdf/core
for all PDF manipulation and signing operations. This includes:

- New signing transports for Google Cloud KMS and local certificates
- Consolidated PDF operations using libpdf API
- Added TSA (timestamp authority) helper for digital signatures
- Removed deprecated flatten and insert utilities
- Updated tests to use new PDF library
2026-01-21 15:16:23 +11:00
Ephraim Duncan ed7a0011c7 fix: sync envelope state after direct link changes (#2257) 2026-01-21 14:43:24 +11:00
Ted Liang 158b36a9b7 fix: security CVE-2026-22817 CVE-2026-22818 (#2390) 2026-01-15 18:27:04 +11:00
Lucas Smith fabd69bd62 build: upgrade simplewebauthn packages from v9 to v13 (#2389)
The v9 packages are deprecated. This updates to v13 which includes
breaking API changes: optionsJSON wrapper for auth functions,
renamed properties (authenticator→credential), and base64 encoding
for credential IDs via isoBase64URL helper.
2026-01-15 14:22:37 +11:00
Lucas Smith c976e747e3 fix: dont flatten forms for templates (#2386)
Templates shouldn't have their form flattened until they're
converted to a document.
2026-01-14 12:06:28 +11:00
Lucas Smith 34f512bd55 docs: add OpenCode AI-assisted development guide (#2384)
Adds OpenCode support for AI-assisted development, including custom
commands and skills to help contributors maintain consistency and
streamline common workflows.

#### Changes
- Added "AI-Assisted Development with OpenCode" section to
CONTRIBUTING.md with:
  - Installation instructions and provider configuration
- Documentation for 8 custom commands (/implement, /continue,
/interview, /document, /commit, /create-plan, /create-scratch,
/create-justification)
  - Typical workflow guide
- Clear policy that AI-generated code must be reviewed before submission
- Added .agents/ directory for plans, scratches, and justifications
- Added .opencode/ commands and skills for the agent
- Added helper scripts for creating agent files
2026-01-14 10:10:20 +11:00
Karlo db913e95b6 fix: downgrade pdfjs-dist to version 5.4.296 and update react-pdf to version 10.3.0 (#2383) 2026-01-13 21:01:29 +11:00
Catalin Pit bb3e9583e4 feat: add default recipients for teams and orgs (#2248) 2026-01-13 20:32:00 +11:00
Lucas Smith 5bc73a7471 chore: npm audit fix (#2367) 2026-01-13 16:39:10 +11:00
Lucas Smith 06d7849146 chore: add translations (#2373) 2026-01-13 14:34:26 +11:00
Lucas Smith cef7987a72 feat: add audit logs to document details page (#2379)
- Add collapsible audit logs section with paginated table
- Add View JSON button to inspect raw audit log entries
- Display legacy document ID and recipient roles
- Add admin TRPC endpoint for fetching audit logs
- Add database index on envelopeId for DocumentAuditLog table

<img width="887" height="724" alt="image"
src="https://github.com/user-attachments/assets/aeb904c9-515f-49e1-9f8f-513aef455678"
/>
2026-01-13 14:18:10 +11:00
github-actions[bot] cf6f6bcea0 chore: extract translations (#2363) 2026-01-13 12:49:05 +11:00
Catalin Pit 2f27304750 refactor: simplify field dialog component (#2369) 2026-01-13 12:38:10 +11:00
Konrad 912530ca17 fix: mark document visibility options for translation (#2330) 2026-01-12 10:17:03 +11:00
Konrad a995961c4e fix: mark document auth types for translation (#2331) 2026-01-12 09:28:16 +11:00
Lucas Smith 6b041c23b4 v2.4.0 2026-01-08 15:16:57 +11:00
Ted Liang 7b6e948aa2 refactor: reuse svgToPng function (#2365) 2026-01-08 11:30:45 +11:00
Catalin Pit f6d81b22bd docs: update field coordinates documentation and improve devmode (#2359) 2026-01-06 10:29:21 +02:00
Lucas Smith c861dd2ee2 chore: add translations (#2362) 2026-01-06 15:54:54 +11:00
github-actions[bot] 7eabae4b4b chore: extract translations (#2351) 2026-01-06 15:36:46 +11:00
Lucas Smith ae4272a6b6 fix: remove logo from embedded signing v2 page (#2361) 2026-01-06 15:10:58 +11:00
Dylan Tarre fd672943d1 fix: replace hardcoded #7AC455 with text-documenso-700 token (#2358)
Standardizes navigation link colors by replacing hardcoded `#7AC455` hex
values with the existing `text-documenso-700` design token.
2026-01-06 14:58:45 +11:00
David Nguyen c2ea5e5859 fix: migrate certificate generation (#2251)
Generate certificates and audit logs using Konva instead of browserless.

This should:
- Reduce the changes of generations failing
- Improve sealing speed
2026-01-06 14:26:19 +11:00
Grégoire Bécue c1217c5a58 docs: ensure cert directory exists before generating PKCS12 (#2354) 2026-01-03 11:43:55 +11:00
Ted Liang 27eb2d65d4 feat: upgrade alpine and support chromium path (#2353)
Upgrade alpine to 3.22
Support chromium executable path
2026-01-03 11:31:56 +11:00
Catalin Pit ef407cb0b4 refactor: simplify form validation and enhance recipient handling (#2317) 2026-01-02 13:16:45 +11:00
Lucas Smith 1e20561e91 v2.3.2 2025-12-24 16:20:23 +11:00
Lucas Smith a2ec5f0fa1 fix: cleanup konva stages during field insertion (#2347) 2025-12-24 16:09:09 +11:00
Ted Liang de8d13a4c1 fix: hide branding logo in audit log (#2342) 2025-12-24 15:10:13 +11:00
github-actions[bot] 495d61a11d chore: extract translations (#2327) 2025-12-24 13:51:40 +11:00
Catalin Pit 90fdba8000 feat: get many endpoints (#2226)
Co-authored-by: Lucas Smith <me@lucasjamessmith.me>
2025-12-24 11:02:02 +11:00
Ephraim Duncan aa1cada79b feat: add find envelopes endpoint (#2244) 2025-12-23 22:51:51 +11:00
Lucas Smith 790b385849 chore: add bundled chromium docker container (#2344)
We use playwright + chromium for certificate generation
and other things.

Self-hosters often have an issue with generating certificates
due to the base image not coming with chromium for size purposes.

This adds a new `-chromium` tag to our docker images for downloading
the larger bundled chromium containers.
2025-12-23 22:09:12 +11:00
Catalin Pit baa2c51123 feat: add delegate document ownership option (#2272)
When using an API key created in a team context, the
documents/templates’ owner always defaults to the team API token
creator, rather than the actual uploader.

For example, John creates the API key for the team "Lawyers". Tom and
Maria use the API key to upload documents. All the uploaded documents
are attributed to John.

This makes it impossible to see who actually uploaded a document.

The new feature allows users to enable document ownership delegation
from the organization/team settings.
2025-12-23 22:08:54 +11:00
Catalin Pit 1e585e06e6 docs: update documentation (#2339) 2025-12-22 15:07:28 +02:00
Ted Liang 5624484631 fix: security CVE-2025-68130 (#2343)
## Description

Fix security
[CVE-2025-68130](https://github.com/advisories/GHSA-43p4-m455-4f4j)
2025-12-22 21:53:49 +11:00
Catalin Pit 810e00da03 feat: add new features to the FEATURES list (#2338) 2025-12-19 10:38:56 +11:00
Lucas Smith eeeee2fa0e v2.3.1 2025-12-18 12:02:04 +11:00
Lucas Smith c50a31a503 fix: use cpu for field rendering (#2337) 2025-12-18 10:48:46 +11:00
Lucas Smith 7360709795 fix: use gemimi 3 flash preview (#2336) 2025-12-18 10:48:16 +11:00
Lucas Smith df678d7d69 v2.3.0 2025-12-17 22:10:47 +11:00
Lucas Smith 6739242554 fix: use cpu for skia-canvas rendering (#2334)
Seems there's a memory leak in gpu rendering with skia canvas
where contexts can live for much longer than expected escaping gc
cleanup

CPU rendering seems better albeit a bit slower.

Synthetic tests were ran with `--expose-gc` to simulate load over time.
2025-12-17 14:48:21 +11:00
Konrad a5e5eecf8b fix: mark links for translation (#2333) 2025-12-17 12:02:12 +11:00
Lucas Smith b0248c20eb v2.2.8 2025-12-16 16:04:07 +11:00
Lucas Smith f129968968 fix: ensure PDF form appearance streams have required /Subtype /Form entry (#2328)
When flattening PDF forms, some appearance streams lack the required
/Subtype /Form dictionary entry needed when used as XObjects. This
causes
corruption in Adobe Reader which fails to render these flattened fields.

Per PDF spec, Form XObject streams require:
- /Subtype /Form (required)
- /FormType 1 (optional)

The normalizeAppearanceStream function ensures these entries exist
before
adding appearance streams as XObjects to the page content stream.

Fixes rendering issues where flattened fields don't display in PDF
viewers.
2025-12-16 16:00:11 +11:00
Lucas Smith c5c87e3fd1 v2.2.7 2025-12-16 12:38:53 +11:00
Lucas Smith 24a74c7b57 chore: add translations (#2321)
Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
2025-12-16 12:06:58 +11:00
Lucas Smith f0a5a7e816 feat: prefill typed signature with user's full name (#2324)
Add fullName prop to signature pad components to automatically populate
typed signature
field with signer's name. Updates signature dialog, type component, and
all signing forms
across embed, document, template, and envelope flows to pass through the
user's full
name for better user experience.
2025-12-16 12:06:04 +11:00
Catalin Pit 8462cd13fd fix: assignment operator for directRecipientName (#2323) 2025-12-16 12:04:19 +11:00
Lucas Smith 576846de32 fix: fallback for certficate sent date when using link distribution (#2316) 2025-12-16 11:40:16 +11:00
Lucas Smith 06071ea035 fix: memory leak in PDF to images conversion (#2325)
Add proper cleanup for PDF.js pages and loading task to prevent memory
leaks when
processing multiple PDF pages. Ensure page cleanup is called after each
page is
rendered and both PDF document and loading task are properly destroyed
with error
handling.
2025-12-16 11:34:30 +11:00
dzhou777 b45a2691ba fix: Unhide text field scrollbar (#2277) 2025-12-15 15:52:39 +11:00
Ted Liang f31cc575d0 fix: white-label for next-button, progress-bar, and steps (#2319) 2025-12-15 15:51:11 +11:00
github-actions[bot] 05d7015ef0 chore: extract translations (#2320) 2025-12-15 13:06:08 +11:00
Chenyang Gao 2ca5d6cfaa fix: local job retry loop for webhook calls (#2295) 2025-12-15 13:04:35 +11:00
Ryan Wagoner 04814ca14e fix: on error job should resubmit with isRetry (#2072) 2025-12-15 13:03:04 +11:00
Ryan Wagoner dd1dccdb6a fix: organisation invite member should be case insensitive (#2068) 2025-12-15 12:50:27 +11:00
Valentin Cocaud df4316ac5c fix: log unknown errors in the auth error handler (#2014) 2025-12-15 12:44:03 +11:00
Catalin Pit 02f1264eea feat: unlink documents from deleted organization (#2006) 2025-12-15 12:17:13 +11:00
github-actions[bot] 928edb8645 chore: extract translations (#2302) 2025-12-15 12:11:55 +11:00
Konrad 54b0e4964e chore(i18n): improve punctuation (#2307) 2025-12-15 12:00:51 +11:00
Konrad 68e6ccdd19 fix(i18n): mark sr-only strings for translation (#2309) 2025-12-15 11:51:02 +11:00
Konrad 09ab7e9a09 fix(i18n): mark "(Optional)" strings for translation (#2310) 2025-12-15 11:50:06 +11:00
Konrad 3bb0777914 fix(i18n): mark field content for translation (#2306) 2025-12-15 11:49:23 +11:00
Catalin Pit 4d6389e901 fix(api): replace generic errors with AppError in getApiTokenByToken (#2315) 2025-12-15 11:47:38 +11:00
Vincent Vu 51e3d5030d fix(security): CVE-2025-55184, CVE-2025-55183 (#2314) 2025-12-12 16:50:00 +11:00
David Nguyen 0cebdec637 fix: remove legacy envelope uploads (#2303) 2025-12-11 14:09:38 +11:00
Lucas Smith 43486d8448 v2.2.6 2025-12-09 21:11:01 +11:00
Lucas Smith 4d3d1b8d14 fix: make ai features more discoverable (#2305)
Previously you had to have explicit knowledge of the
feature and enable it in order to use AI assisted field
detection.

This surfaces it by having a secondary dialog prompting
for enablement.

Also includes a fix for CC recipients not getting marked
as signed in weird edge cases.
2025-12-09 15:30:48 +11:00
David Nguyen 0387f3c20a chore: add missing dropdown image (#2304)
## Description

Add missing dropdown image in the docs.
2025-12-09 12:37:45 +11:00
Ted Liang c5032d0c43 refactor: extract image-helpers (#2261) 2025-12-09 09:19:49 +11:00
Konrad 3bd34964cd fix(i18n): add pluralization to ai features (#2301) 2025-12-09 09:18:38 +11:00
Dailson Allves fe93b11a2c chore: update existing pt-BR translations after commit #2289 (#2300) 2025-12-09 09:17:22 +11:00
github-actions[bot] 7638faf27b chore: extract translations (#2289)
Automated translation extraction

Co-authored-by: github-actions <github-actions@documenso.com>
2025-12-08 19:20:21 +11:00
Ephraim Duncan 8fca029d96 fix: invalidate sessions on password reset and update (#2076) 2025-12-08 19:17:23 +11:00
Lucas Smith bac2bf11f4 v2.2.5 2025-12-08 14:33:00 +11:00
Lucas Smith d93b2a70a7 fix: upgrade react-email/render (#2297)
Upgrade the `@react-email/render` package to handle
suspense during renders.

We could have just swapped to `renderAsync` for the 0.0.x
version of the package but it's better to upgrade as part
of this change.

CI has been run locally and emails have been verified to
work and render as expected in our local mail trap.
2025-12-08 13:08:34 +11:00
Lucas Smith 5da915da38 fix: update server only urls to use private internal web app url (#2290)
Replaced instances of NEXT_PUBLIC_WEBAPP_URL with
NEXT_PRIVATE_INTERNAL_WEBAPP_URL
2025-12-08 12:56:41 +11:00
Ted Liang dcaecf1fc5 feat: resource restriction in presign token (#2150) 2025-12-08 12:55:54 +11:00
Ephraim Duncan f70b76d8b8 feat: add envelope audit logs endpoint (#2232) 2025-12-08 12:34:03 +11:00
David Nguyen 93137c6396 fix: translation extraction job (#2288)
## Description

Workaround until we can commit directly to main for translation
extractions

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-12-06 16:19:35 +11:00
Catalin Pit d058b7c705 feat: include CC role in removed recipient email check (#2285) 2025-12-06 14:20:25 +11:00
David Nguyen b51f562224 feat: add empty emails for envelopes (#2267) 2025-12-06 13:38:10 +11:00
David Nguyen f80aa4bf72 chore: optimize tests (#2280) 2025-12-06 12:59:53 +11:00
Lucas Smith 9238f759a6 v2.2.4 2025-12-05 12:23:23 +11:00
Lucas Smith 74ad6af47d chore: add docs for ai features (#2284)
Adds documentation for the recently added AI features

Includes details for how users can enable AI features for their team or
organisation

Also includes details for how self-hosters can setup their instance to
allow for AI features
2025-12-05 11:47:53 +11:00
Lucas Smith 18902ed59d fix: export loader for personal document preferences (#2283) 2025-12-05 11:22:29 +11:00
Lucas Smith 3f70082146 v2.2.3 2025-12-05 09:53:40 +11:00
Lucas Smith 31ba6d5f00 fix: polyfill promise.withResolvers (#2282)
Co-authored-by: Catalin Pit <catalinpit@gmail.com>
2025-12-04 23:33:31 +11:00
Lucas Smith c4f89a87a2 fix: use skia-canvas with pdfjs to avoid N-API errors (#2281)
Use custom CanvasFactory for pdfjs so we can continue to use
skia-canvas.
2025-12-04 23:26:08 +11:00
Ted Liang 89d6dd5b0e fix: embed authoring permission issue (#2279) 2025-12-04 15:02:50 +11:00
Lucas Smith 08a9ab3aaf v2.2.2 2025-12-04 14:50:09 +11:00
Lucas Smith e66bd422e3 chore: upgrade dependencies (#2278) 2025-12-04 14:31:30 +11:00
Lucas Smith 0f5814ff89 chore: add translations (#2259) 2025-12-04 14:01:35 +11:00
Konrad 1275a15571 fix(i18n): mark missing toast messages for translation (#2274) 2025-12-04 14:00:25 +11:00
Lucas Smith 22d99c7410 v2.2.1 2025-12-04 11:39:19 +11:00
Lucas Smith 26a36487d4 fix: pass canvas context to napi-rs/canvas (#2276) 2025-12-04 11:19:44 +11:00
Lucas Smith 2ee6b90c99 fix: add debug logging for ai streaming (#2275) 2025-12-04 10:03:29 +11:00
Lucas Smith f70e6ac50a v2.2.0 2025-12-04 00:31:11 +11:00
Lucas Smith 7a94ee3b83 feat: add ai detection for recipients and fields (#2271)
Use Gemini to handle detection of recipients and fields within
documents.

Opt in using organisation or team settings.

Replaces #2128 since the branch was cursed and would include
dependencies that weren't even in the lock file.



https://github.com/user-attachments/assets/e6cbb58f-62b9-4079-a9ae-7af5c4f2e4ec
2025-12-03 23:39:41 +11:00
Filbert Wijaya e39924714a fix: invalid email display bug when recipient suggestions on select (#2198) 2025-12-03 12:10:38 +11:00
Konrad c9604fee64 chore(i18n): change recipient invitation messages (#2172) 2025-12-03 11:55:53 +11:00
Konrad 90f8340af4 fix(i18n): add pluralization to envelope items (#2183) 2025-12-03 11:30:43 +11:00
Eesh Midha 28b8d2d415 fix: disable browser autocomplete in typed signature input (#2269) 2025-12-03 11:22:35 +11:00
Timur Ercan 978a2047d4 chore: update readme 2025-12-03 11:20:15 +11:00
Catalin Pit 0dfa953f54 feat: add external ID to use template (#2264) 2025-12-02 18:53:42 +11:00
David Nguyen 4774324e07 fix: prevent client side distribution when missing signatures (#2260) 2025-12-02 11:29:48 +11:00
David Nguyen bc19699a58 feat: add dutch language (#2255) 2025-12-02 11:28:04 +11:00
Harishraju04 55480826de docs: add missing translate:compile step to setup guid 2025-12-01 12:05:51 +11:00
Konrad 327b0eaf86 fix(i18n): add pluralization to pagination (#2217) 2025-12-01 11:38:57 +11:00
Konrad 2de5c1992f chore(i18n): add message context to subscription status (#2220) 2025-12-01 11:34:43 +11:00
Konrad df0c03816e chore(i18n): add message context for "Free" and "Paid" (#2222) 2025-12-01 11:30:07 +11:00
Konrad a610a06372 fix(i18n): mark table headers for translation (#2174) 2025-12-01 11:20:18 +11:00
Konrad d5e085d7ee fix(i18n): mark document visibility strings for translation (#2263) 2025-12-01 11:02:55 +11:00
Timur Ercan c322356654 chore: remove cummulative mau (#2250) 2025-11-28 18:07:30 +11:00
Lucas Smith b16862b480 chore: update embed authoring docs (#2254) 2025-11-27 23:29:06 +11:00
Lucas Smith 7065b0dd88 chore: add translations (#2253)
Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
2025-11-27 21:36:48 +11:00
Lucas Smith dff9cfec05 chore: add translations (#2228) 2025-11-27 16:40:18 +11:00
David Nguyen d84cf0e58d chore: extract translations (#2252) 2025-11-27 16:04:22 +11:00
Ephraim Duncan 5d8b147199 fix: delay field tooltip scroll on envelope item switch (#2246) 2025-11-27 13:37:33 +11:00
Filbert Wijaya 7d28295d42 build: remove unsupported auto-install-peers from .npmrc (#2199) 2025-11-27 13:35:23 +11:00
Ephraim Duncan 94646cd48a perf: add database indexes for insights queries (#2211) 2025-11-26 21:21:01 +11:00
Ephraim Duncan 14db9b8203 feat: add navigation links between admin org pages (#2243) 2025-11-26 15:15:29 +11:00
Lucas Smith 6ae672c16b v2.1.0 2025-11-25 16:38:06 +11:00
Lucas Smith e9a9d65937 chore: telemetry (#2241) 2025-11-25 16:35:26 +11:00
David Nguyen d857dfdb38 feat: add webhook logs (#2237) 2025-11-25 16:03:52 +11:00
Lucas Smith 11a56f3228 chore: telemetry (#2240) 2025-11-25 16:01:31 +11:00
Lucas Smith 91642ddf0b fix: add missing properties for template/use (#2234)
Adds the `override` and `attachments` properties to the
`api/v2/templates/use` endpoint that were previously missing.
2025-11-25 11:44:47 +11:00
David Nguyen e364b08b6a fix: optimize webhook routing (#2236) 2025-11-25 11:43:23 +11:00
Catalin Pit 5df3932958 fix: update branding logic (#2238)
Update branding logic to ensure company details are displayed only when
branding is enabled
2025-11-24 21:45:31 +11:00
Lucas Smith ae31860b16 fix: USE_INTERNAL_URL_BROWSERLESS breaks builds (#2233) 2025-11-23 23:49:08 +11:00
Timur Ercan 16ee6b7a6d fix: give the possibility to use internal webapp url in browserless requests (get-certificate-pdf and get-audit-logs-pdf) (#2127) (#2230) 2025-11-22 20:49:34 +11:00
Matteo Sillitti 921c3d1ff3 fix: give the possibility to use internal webapp url in browserless requests (get-certificate-pdf and get-audit-logs-pdf) (#2127) 2025-11-22 20:36:24 +11:00
Ephraim Duncan 2d7a4d0dde docs: add missing environment variables to self-hosting guide (#2225) 2025-11-22 20:28:51 +11:00
Lucas Smith d2176627ca chore: dependency updates (#2229) 2025-11-22 20:28:20 +11:00
Lucas Smith 17c6098638 v2.0.14 2025-11-20 15:12:40 +11:00
Lucas Smith e5bde53ee4 chore: add translations (#2223) 2025-11-20 15:09:13 +11:00
Lucas Smith 0663605ffd fix: handle loading files in embedded authoring update flows (#2218) 2025-11-20 15:07:41 +11:00
Lucas Smith 1bbe561162 chore: add pending ui to signing completion page (#2224)
Adds a pending UI state to the signing completion page for when all
recipients have finished signing but the document hasn't completed the
sealing background job.

<img width="695" height="562" alt="image"
src="https://github.com/user-attachments/assets/b015bc38-9489-4baa-ac0a-07cb1ac24b25"
/>
2025-11-20 15:07:26 +11:00
Dailson Allves fbc156722a feat: add Portuguese (Brazil) translation support version 2.0.6 (#2165)
Portuguese (Brazil) Translation Support for Documenso
2025-11-20 14:14:47 +11:00
Karlo f5d63fb76c feat: add option to change or disable OIDC login prompt parameter (#2037) 2025-11-20 13:08:36 +11:00
Catalin Pit 374477e692 refactor: improve layout of completed signing page (#2209) 2025-11-20 11:04:41 +11:00
David Nguyen 11d9bde8f8 fix: improve sealing speed (#2210) 2025-11-19 14:15:12 +11:00
Lucas Smith fa1680aaf1 v2.0.13 2025-11-18 16:59:02 +11:00
David Nguyen 798b6bd750 feat: add japanese chinese and korean support (#2202)
## Description

Adds the following languages since we updated our PDF sealing to support
special characters
- Japanese
- Korean
- Chinese (Simplified)

## Tests

Ran through the signing process in these new languages.
2025-11-18 16:57:38 +11:00
Lucas Smith 8fbace0f61 fix: viewed webhook had stale data (#2208) 2025-11-18 16:57:14 +11:00
David Nguyen 1bbd04be9b feat: add field dev mode (#2203) 2025-11-18 16:57:06 +11:00
Lucas Smith 6aa56fe7e0 chore: add translations (#2182) 2025-11-17 15:48:02 +11:00
Lucas Smith a07f3090cf v2.0.12 2025-11-15 00:48:27 +11:00
Lucas Smith de3e6d2115 fix: embed editing updates (#2197)
Allows empty recipients for embed template authoring.

Also allows fixing the step to editing fields only for embedded
authoring updates.
2025-11-15 00:47:50 +11:00
David Nguyen dabd2564cd feat: add ability to change field recipient (#2194)
## Description

Add ability to change recipients for a given field.

<img width="336" height="224" alt="image"
src="https://github.com/user-attachments/assets/c122672d-68ab-4652-9c76-1a1bc874c16a"
/>

<img width="716" height="465" alt="image"
src="https://github.com/user-attachments/assets/a8e8636c-c780-4d56-910b-5522161b12d3"
/>
2025-11-15 00:46:33 +11:00
Tanushree Ahir 5811716d12 fix(email): preserve word wrap and line breaks in email body (#2139) (#2159) 2025-11-14 15:12:36 +11:00
David Nguyen 56526f9448 feat: extend use envelope response (#2192) 2025-11-14 13:52:19 +11:00
Lucas Smith 6ec1c3a3fb fix: hide overflow on envelope download dialog (#2193) 2025-11-14 13:17:55 +11:00
Timur Ercan 47466a2db9 chore: Update README.md (#2188)
We are launching Documenso 2.0 on Product Hunt, come say hi!
2025-11-13 20:52:34 +11:00
Ephraim Duncan e4e04cdddc feat: simplify billing ux (#2117) 2025-11-13 15:58:16 +11:00
samuel-cglg 74a03077b7 fix: placeholders translations (#2020) 2025-11-13 14:26:19 +11:00
samuel-cglg 58bff33275 fix: add context to signature pad translations (#2051) 2025-11-13 13:35:23 +11:00
Konrad 0cb23be27a chore: add question mark to message (#2176) 2025-11-13 12:08:39 +11:00
David Nguyen 4304fc1d35 chore: add envelope docs (#2186) 2025-11-13 11:50:06 +11:00
Lucas Smith ce53bcea8c v2.0.11 2025-11-13 10:56:58 +11:00
Lucas Smith 5a3d5b8b4a fix: persist missed meta values for envelopes (#2185) 2025-11-13 10:44:59 +11:00
Lucas Smith 3d1fe85d62 fix: add foreign key indexes (#2184)
Can't believe we missed some of these ☠️
2025-11-13 10:43:11 +11:00
Lucas Smith 1772c3ee36 v2.0.10 2025-11-12 18:57:24 +11:00
Lucas Smith f55b902a01 fix: openapi path for envelope item download 2025-11-12 18:57:03 +11:00
Lucas Smith 50db4e39be v2.0.9 2025-11-12 18:22:46 +11:00
David Nguyen 2802813c76 fix: add default values for envelope field meta (#2181)
🙏
2025-11-12 18:22:30 +11:00
Lucas Smith 29d40f1cca v2.0.8 2025-11-12 17:19:53 +11:00
Lucas Smith d67f32eae2 chore: add translations (#2166)
Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
2025-11-12 17:17:44 +11:00
David Nguyen a33233443b chore: extract translations (#2179) 2025-11-12 17:09:50 +11:00
Lucas Smith 68a3608aee fix: handle bracket notation arrays (#2178)
Co-authored-by: David Nguyen <davidngu28@gmail.com>
2025-11-12 16:38:06 +11:00
Lucas Smith 378dd605b9 v2.0.7 2025-11-12 13:09:18 +11:00
Lucas Smith 211ae6c9e9 fix: prefill arcoforms with formdata endpoints (#2169) 2025-11-12 12:41:10 +11:00
David Nguyen f931885a95 fix: remove redundant endpoint (#2170)
Remove duplicate redundant endpoint
2025-11-12 11:01:15 +11:00
Lucas Smith 4ade408001 fix: include cmaps for pdf viewer (#2177)
We were previously omitting cmaps meaning that
when signing documents with certain UTF-8 characters or CJK characters
they would appear as outlined squares in the pdf viewer despite the
actual pdf looking as expected with the characters displaying correctly.
2025-11-12 11:00:44 +11:00
David Nguyen 3d0e3c6e8e fix: update dropzone to create envelopes (#2168) 2025-11-11 20:49:42 +11:00
David Nguyen 936d8d90b3 fix: envelope auth not being passed (#2167) 2025-11-11 13:05:05 +11:00
Ephraim Duncan c6b08d8594 feat: org insights (#1937) 2025-11-11 12:09:58 +11:00
Konrad 575634e326 fix: add pluralization to document details (#2130) 2025-11-11 10:54:12 +11:00
Konrad c66eda4aae chore: add message context in user organisation table (#2138) 2025-11-11 10:44:20 +11:00
Konrad ef52b35f79 chore: change message in dropzone wrappers (#2137) 2025-11-11 10:43:22 +11:00
Konrad 95a647034a chore: add message context in envelope download dialog (#2136) 2025-11-11 10:42:30 +11:00
Konrad 34dba0b6ff chore: fix message formatting (#2135) 2025-11-11 10:41:54 +11:00
Konrad fccd97e124 fix: add pluralization to 2fa code template (#2131) 2025-11-11 10:39:05 +11:00
Konrad 3dbbcefddf fix: add pluralization to passkey page (#2129) 2025-11-11 10:37:54 +11:00
David Nguyen 2aea3c4de0 fix: rename envelope buttons (#2161) 2025-11-10 22:21:34 +11:00
Lucas Smith ff44ffbc03 v2.0.6 2025-11-10 19:08:43 +11:00
Lucas Smith 441842d2bd fix: use correct token for embeded template files (#2160) 2025-11-10 19:08:08 +11:00
David Nguyen ca0b83579f fix: auto insert prefilled text and number fields (#2157) 2025-11-10 18:04:21 +11:00
Eesh Midha 6c0d1da91e fix(input): prevent mobile zoom on input focus (#2079) 2025-11-10 12:43:06 +11:00
David Nguyen 805982f3e8 fix: envelope cc issues (#2158) 2025-11-10 11:42:57 +11:00
David Nguyen e2f5e570cf fix: envelope direct template (#2156) 2025-11-09 22:23:13 +11:00
David Nguyen 9fd9613076 feat: add additional field options (#2154) 2025-11-08 23:40:03 +11:00
Lucas Smith 0977c16e33 v2.0.5 2025-11-08 16:03:59 +11:00
Lucas Smith 88d5a636c3 fix: show legacy ids on template and document view page (#2153)
<img width="557" height="455" alt="image"
src="https://github.com/user-attachments/assets/7b669f4a-c6c5-4fdc-bf10-da0def7b0b3f"
/>
2025-11-08 16:03:26 +11:00
Lucas Smith 1e6292b1d9 v2.0.4 2025-11-08 13:58:11 +11:00
Lucas Smith d65866156d fix: remove parallel steps (#2152) 2025-11-08 13:57:26 +11:00
Lucas Smith fe8915162f v2.0.3 2025-11-08 12:53:50 +11:00
Lucas Smith 37a2634aca feat: support optimizeParallelism for inngest jobs (#2151) 2025-11-08 12:53:13 +11:00
Lucas Smith eff7d90f43 v2.0.2 2025-11-08 00:48:31 +11:00
Lucas Smith db5524f8ce fix: resolve issue with sealing task on inngest (#2146)
Currently on inngest the sealing task fails during decoration stating
that it can not find the step "xxx"

My running theory is that this was due to it being a
Promise.all(map(...)) even though that isn't explicitly disallowed.

This change turns it into a for loop collecting promises to be awaited
after the fact.

Local inngest testing looks promising.
2025-11-08 00:48:13 +11:00
Lucas Smith 3d539b20ad v2.0.1 2025-11-07 23:42:03 +11:00
Lucas Smith 48626b9169 fix: support utf8 filenames download (#2145) 2025-11-07 23:41:31 +11:00
David Nguyen 88371b665a fix: set correct envelope item cache url (#2144) 2025-11-07 16:50:58 +11:00
Lucas Smith 1650c55b19 v2.0.0 2025-11-07 15:40:24 +11:00
Lucas Smith 60d73e0921 chore: add translations (#2143)
Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
2025-11-07 14:45:21 +11:00
Lucas Smith 4a779ec81e fix: handle custom org limits with member invite 2025-11-07 14:24:05 +11:00
Lucas Smith 7f19ec1265 fix: embedded direct template recipient auth 2025-11-07 14:23:46 +11:00
Lucas Smith d6a2f5a4c9 chore: extract translations (#2070) 2025-11-07 14:20:53 +11:00
David Nguyen d05bfa9fed feat: add envelopes api (#2105) 2025-11-07 14:17:52 +11:00
David Nguyen d2a009d52e fix: allow direct template recipient dictation (#2108) 2025-11-01 12:44:34 +11:00
Lucas Smith 9350c53c7d chore: add code styleguide (#2089)
Co-authored-by: Ephraim Atta-Duncan <ephraimduncan68@gmail.com>
2025-10-28 22:25:27 +11:00
Ephraim Duncan ffce7a2c81 fix: filter document stats by folder (#2083)
This pull request refactors the filtering logic in the `getTeamCounts`
function within `get-stats.ts` to improve consistency and
maintainability. The main change is the consolidation of multiple filter
conditions into a single `AND` clause, which now includes search
filters, folder filters, and visibility filters. This ensures that all
relevant filters are applied in a unified way for document count
queries.
2025-10-28 21:16:12 +11:00
Ephraim Duncan 353bdce86b feat: admin member role updates (#2093) 2025-10-28 21:09:38 +11:00
David Nguyen e13b9f7c84 fix: hide banner for envelope editor (#2109) 2025-10-28 16:55:44 +11:00
David Nguyen 9908580bf1 fix: add envelopes flag (#2104)
## Description

Add a global flag override for envelopes
2025-10-28 11:42:03 +11:00
David Nguyen b0b07106b4 fix: envelope autosave (#2103) 2025-10-27 19:53:35 +11:00
Ephraim Duncan 35250fa308 feat: server port configurable via PORT env (#2097) 2025-10-27 17:24:24 +11:00
David Nguyen 5cdd7f8623 fix: envelope styling (#2102) 2025-10-27 16:11:10 +11:00
David Nguyen 47bdcd833f chore: extract translations (#2094) 2025-10-24 16:37:10 +11:00
David Nguyen 03eb6af69a feat: polish envelopes (#2090)
## Description

The rest of the owl
2025-10-24 16:22:06 +11:00
Lucas Smith 88836404d1 v1.13.1 2025-10-24 10:50:25 +11:00
Lucas Smith 2eebc0e439 feat: add attachments (#2091) 2025-10-23 23:07:10 +11:00
Ephraim Duncan 4a3859ec60 feat: signin with microsoft (#1998) 2025-10-22 12:05:11 +11:00
Ephraim Duncan 49b792503f fix: query envelope table for openpage stats (#2086) 2025-10-21 12:43:57 +00:00
Catalin Pit c3dc76b1b4 feat: add API support for folders (#1967) 2025-10-21 18:22:19 +11:00
David Nguyen daab8461c7 fix: email attachment names (#2085) 2025-10-21 12:59:40 +11:00
Lucas Smith 1ffc4bd703 v1.13.0 2025-10-21 11:21:04 +11:00
Lucas Smith f15c0778b5 fix: authoring token arg and null email settings 2025-10-21 10:42:44 +11:00
David Nguyen 06cb8b1f23 fix: email attachment formats (#2077) 2025-10-16 14:16:00 +11:00
David Nguyen 7f09ba72f4 feat: add envelopes (#2025)
This PR is handles the changes required to support envelopes. The new
envelope editor/signing page will be hidden during release.

The core changes here is to migrate the documents and templates model to
a centralized envelopes model.

Even though Documents and Templates are removed, from the user
perspective they will still exist as we remap envelopes to documents and
templates.
2025-10-14 21:56:36 +11:00
Lucas Smith 7b17156e56 v1.12.10 2025-10-09 15:32:35 +11:00
Lucas Smith 86e89e137e fix: bump search limit and path formatting (#2069) 2025-10-09 15:11:43 +11:00
Lucas Smith 26f65dbdd7 v1.12.9 2025-10-07 17:07:11 +11:00
Lucas Smith a902bec96d fix: use select account prompt for sso oidc (#2065)
Use the `select_account` prompt for SSO OIDC to avoid constantly asking
for credentials to be entered with a client has an existing session with
the SSO provider.
2025-10-07 17:06:28 +11:00
samuel-cglg 399f91de73 feat: improve invite email (#2030)
Improve the email sent to invite a user to approve/sign/assist/view a
document.
The current links "Reject Document" / "Sign Document" confuse some users
as they think the document will be rejected/signed just by clicking on
these buttons.
This change makes it more clear that they will have a chance to view the
document before they can reject/sign.
2025-10-06 16:19:16 +11:00
Lucas Smith 995bc9c362 feat: support 2fa for document completion (#2063)
Adds support for 2FA when completing a document, also adds support for
using email for 2FA when no authenticator has been associated with the
account.
2025-10-06 16:17:54 +11:00
David Nguyen 3467317271 chore: extract translations (#2056)
## Description

Extract translations to be translated
2025-10-02 13:20:30 +10:00
Lucas Smith a5eaa8ad47 v1.12.8 2025-09-29 23:22:59 +10:00
Lucas Smith 577691214b fix: add viewed call for embedded signing (#2055)
Adds the missing `viewedDocument` method call for embedded signing.

I believe this had previously been added but was lost as the result of a
merge conflict being resolved.
2025-09-29 23:22:36 +10:00
Catalin Pit c7d21c6587 fix: update personal organisation email settings (#2048) 2025-09-29 10:11:00 +03:00
Mythie 2aa391f917 v1.12.7 2025-09-26 09:57:34 +10:00
Lucas Smith 681540b501 fix: add removed date formats (#2049)
Add date formats that were removed in a prior pull request causing
issues with certain API requests.
2025-09-26 09:56:46 +10:00
Catalin Pit f3305ac306 feat: show branding logo on signing page (#2031)
If the team has the branding enabled & a logo uploaded, it'll show on
the document signing page view.
2025-09-25 22:41:17 +10:00
Catalin Pit 68b4305b6a feat: add max file size for uploaded documents (#2044) 2025-09-25 22:40:00 +10:00
Catalin Pit 3de1ea0a02 feat: resend dialog improvements (#2034)
The checkboxes were difficult to see and the "Send reminder" button
wasn't disabled when no recipients were selected. This PR disables the
sending button when there's no selected recipient and improves the
checkboxes visibility.
2025-09-25 22:23:07 +10:00
Lucas Smith b8fc47b719 v1.12.6 2025-09-25 22:10:20 +10:00
Lucas Smith cfceebd78f feat: change organisation owner in admin panel (#2047)
Allows changing the owner of an organisation within the admin panel,
useful for support requests to change ownership from a testing account
to the main admin account.

<img width="890" height="431" alt="image"
src="https://github.com/user-attachments/assets/475bbbdd-0f26-4f74-aacf-3e793366551d"
/>
2025-09-25 17:13:47 +10:00
Catalin Pit b9b3ddfb98 chore: update tests to use new date formats (#2045)
## Description

Update the tests to use the new date formats form this PR
https://github.com/documenso/documenso/pull/2038.
2025-09-25 16:55:31 +10:00
Catalin Pit 8590502338 fix: file upload error messages (#2041) 2025-09-24 16:06:41 +03:00
Catalin Pit 53f29daf50 fix: allow dates with and without time (#2038) 2025-09-24 14:46:04 +03:00
Lucas Smith 197d17ed7b v1.12.5 2025-09-23 21:00:48 +10:00
Lucas Smith 3c646d9475 feat: remove email requirement for recipients (#2040) 2025-09-23 17:13:52 +10:00
Lucas Smith ed4dfc9b55 v1.12.4 2025-09-13 18:08:55 +10:00
Lucas Smith 32ce573de4 fix: incorrect certificate health logic (#2028) 2025-09-13 18:07:39 +10:00
Lucas Smith 2ecfdbdde5 v1.12.3 2025-09-12 23:02:59 +10:00
Maximilian Schwerin a3005f8616 fix: Include NEXT_PRIVATE_SMTP_UNSAFE_IGNORE_TLS in docker compose file. (#2022) 2025-09-10 22:55:56 +10:00
Ephraim Duncan 2c0d4f8789 chore: self hosting docs update and certificate issues (#1847) 2025-09-09 21:26:42 +10:00
Catalin Pit 7c8e93b53e feat: implement recipients autosuggestions (#1923) 2025-09-09 20:57:26 +10:00
Ephraim Duncan 93a3809f6a fix: add maxLength limits to document input fields (#1988) 2025-09-09 17:52:03 +10:00
samuel-cglg 4550bca3d3 fix: signature pad translation (#2007) 2025-09-09 17:14:44 +10:00
David Nguyen 9ac7b94d9a feat: add organisation sso portal (#1946)
Allow organisations to manage an SSO OIDC compliant portal. This method
is intended to streamline the onboarding process and paves the way to
allow organisations to manage their members in a more strict way.
2025-09-09 17:14:07 +10:00
Timur Ercan 374f2c45b4 chore: add soc2 compliance (#2019)
added soc2 compliance to docs
2025-09-08 17:56:53 +02:00
Catalin Pit bb5c2edefd feat: implement auto-save functionality for signers in document edit form (#1792) 2025-09-02 21:01:16 +10:00
Ephraim Duncan 19565c1821 fix: access audit logs for documents in folder (#1989) 2025-08-31 12:17:31 +10:00
samuel-cglg 2603ae8b90 fix: send signing request email after the document status is updated (#1944)
When sending a document for signing, emails for recipients are sent
before the document status is updated.
In this case, the job "send.signing.requested.email" fails because it
cannot find the document with a PENDING status.
2025-08-31 11:37:49 +10:00
samuel-cglg 7d257236a6 fix: default pagination on documents list API (#1929) 2025-08-28 16:20:27 +10:00
Ephraim Duncan 31c1a9a783 fix: preserve existing recipient properties when adding new recipient (#1987) 2025-08-28 16:19:14 +10:00
Lucas Smith 657db3bc84 fix: improve mobile signing ux (#2003)
Improves the mobile signing UX making actions available via the floating
navbar more obvious.

Also adds an automatic switch to the complete button once all fields
have been signed.
2025-08-28 16:15:52 +10:00
Lucas Smith 184ebdedf1 v1.12.2-rc.6 2025-08-26 11:17:43 +10:00
Lucas Smith 4012022f55 fix: element visible race condition (#1996)
On larger documents we could accidentally start trying to render fields
while not all pages of the PDF have loaded due to us checking for a
single page existing. This would cause an error to be thrown, hard
locking those documents.

This change resolves this by grabbing the highest page number from the
given fields and using it for the visibility check instead.
2025-08-26 11:08:43 +10:00
David Nguyen 44f5da95b3 chore: refactor routes (#1992) 2025-08-25 21:00:35 +10:00
David Nguyen 7eb882aea8 fix: email domain sender logic (#1993) 2025-08-25 20:59:37 +10:00
David Nguyen dbf10e5b7b chore: add agents file (#1991) 2025-08-25 11:32:15 +10:00
Lucas Smith fe4d3ed1fd v1.12.2-rc.5 2025-08-25 09:48:04 +10:00
David Nguyen b8d07fd1a6 fix: refactor token router (#1981) 2025-08-25 08:25:01 +10:00
David Nguyen 49fabeb0ec fix: refactor auth router (#1983) 2025-08-25 08:24:32 +10:00
David Nguyen 5a5bfe6e34 fix: refactor admin router (#1982) 2025-08-25 08:23:48 +10:00
David Nguyen d7e5a9eec7 fix: refactor document router (#1990) 2025-08-25 08:23:12 +10:00
Ephraim Duncan adefac81e2 fix: outdated docs (#1985) 2025-08-24 16:48:30 +10:00
Catalin Pit 67501b45cf feat: create document in a specific folder (#1965) 2025-08-23 00:12:17 +10:00
Catalin Pit 17b36ac8e4 feat: sync organization name with stripe (#1974) 2025-08-22 23:28:04 +10:00
Lucas Smith 80e452afa2 fix: get accurate pdf page size (#1980)
Handles edge cases with PDF media boxes and crop boxes, deals with
certain documents that had been uploaded with weird combos of sizings.
2025-08-22 22:50:41 +10:00
Ephraim Duncan 1cb9de8083 chore: remove 'use client' directives (#1979) 2025-08-22 02:20:41 +00:00
Catalin Pit 231ef9c27e chore: add support option (#1853) 2025-08-19 20:59:03 +10:00
Catalin Pit 6f35342a83 feat: reset user 2fa from admin panel (#1943) 2025-08-19 13:09:05 +10:00
David Nguyen a51110d276 fix: prevent document unsigning on edit (#1963) 2025-08-18 13:48:51 +10:00
David Nguyen 7f81231467 fix: template e2e tests (#1969) 2025-08-18 12:42:36 +10:00
Lucas Smith 439262fd02 v1.12.2-rc.4 2025-08-16 19:16:29 +10:00
Lucas Smith 93a184355b chore: add translations (#1955) 2025-08-16 19:10:21 +10:00
David Nguyen 1dea0b8fab add dummy teamid (#1968) 2025-08-16 19:09:21 +10:00
David Nguyen ea7a2c2712 fix: create customer on signup (#1964) 2025-08-14 16:30:16 +10:00
Catalin Pit deb3a63fb8 feat: allow empty placeholder emails on templates (#1930)
Allow users to create template placeholders without the placeholder
emails.
2025-08-12 20:41:23 +10:00
Ephraim Duncan cc05af2062 feat: backport the embedded mobile signing ux to main application (#1919)
This PR improves the mobile experience of the document signing page by
implementing a collapsible widget design for the signing form. On mobile
devices, the form now appears as a fixed bottom sheet that can be
expanded/collapsed, while maintaining the sticky sidebar layout on
desktop.
2025-08-12 20:40:14 +10:00
David Nguyen 9026aabe3b fix: broken e2e tests (#1956) 2025-08-11 16:16:21 +10:00
David Nguyen b844e166a9 fix: build 2025-08-11 12:16:34 +10:00
David Nguyen 950951de75 fix: github actions 2025-08-11 12:05:41 +10:00
David Nguyen c37e10faab fix: add document page access logging (#1947)
Add logging when someone accesses a document page
2025-08-11 11:50:32 +10:00
David Nguyen fdf6efe94e chore: extract translations (#1949)
Extract translations
2025-08-11 11:49:30 +10:00
David Nguyen 4c1eb8f874 fix: translation extraction github action (#1950)
Fix checkout action for translation extraction
2025-08-11 11:48:19 +10:00
Konrad e547b0b410 fix: add special context to strings (#1954) 2025-08-11 11:47:21 +10:00
Catalin Pit 803edf5b16 feat: implement Drag-n-Drop for templates (#1791) 2025-08-07 15:37:55 +10:00
David Nguyen 86c133ae84 fix: remove field truncate logic (#1940)
Remove the truncation logic and render the text for preview/edit mode.

Text will now overflow, but it's up to the user to correct it
2025-08-07 11:55:25 +10:00
David Nguyen c28c5ab91d chore: correct the email domains documentation (#1941)
## Description

Update the documentation for email domains
2025-08-07 11:54:41 +10:00
Catalin Pit d1eb14ac16 feat: include audit trail log in the completed doc (#1916)
This change allows users to include the audit trail log in the completed
documents; similar to the signing certificate.


https://github.com/user-attachments/assets/d9ae236a-2584-4ad6-b7bc-27b3eb8c74d3

It also solves the issue with the text cutoff.
2025-08-07 11:44:59 +10:00
Novapixel1010 f24b71f559 feat: env for support email (#1945)
Add the ability to change the support email. For the signature
disclosure page.
2025-08-07 10:39:03 +10:00
David Nguyen 2ee0d77870 fix: correctly set stripe customer names (#1939)
Currently the Stripe customer name is set to the organisation name,
which in some cases is just the organisation name.

This update makes it so it uses the owner name instead.
2025-08-05 12:30:02 +10:00
Ephraim Duncan 9b01a2318f feat: download document via api v2 (#1918)
adds document download functionality to the API v2, returning
pre-signed S3 URLs that provide secure, time-limited access to document
files similar to what happens in the API v1 download document endpoint.
2025-08-05 12:29:21 +10:00
Catalin Pit 5689cd1538 feat: add tooltip to team member creation dialog for guidance (#1933) 2025-08-04 08:49:43 +03:00
Lucas Smith 9d5b573dda v1.12.2-rc.3 2025-08-02 00:46:22 +10:00
David Nguyen c48486472a fix: add missing email reply validation (#1934)
## Description

General fixes to the email domain features

Changes made:
- Add "email" validation for "Reply-To email" fields
- Fix issue where you can't remove the "Reply-To" email after it's set
- Fix issue where setting the "Sender email" back to Documenso would
still send using the org/team pref
2025-08-02 00:40:41 +10:00
Lucas Smith 1e2388519c hotfix: certificate pdfs are blank when using browserless (#1935)
Certificates have suddenly become blank when using browserless and
Chrome CDP.

This change introduces a workaround that involves reloading the
certificate pdf. Which is hacky but seems to work for now, a better
solution should be found in the future.
2025-08-02 00:39:48 +10:00
Ephraim Duncan 20198b5b6c feat: add european date format (#1925) 2025-07-28 12:32:10 +10:00
Tom 7cbf527eb3 chore: update French translations (#1762) 2025-07-25 10:52:18 +10:00
Lucas Smith 767b66672e chore: add translations (#1910) 2025-07-25 10:51:47 +10:00
David Nguyen 109a49826c chore: extract translations 2025-07-24 16:15:34 +10:00
David Nguyen 3409aae411 feat: add email domains (#1895)
Implemented Email Domains which allows Platform/Enterprise customers to
send emails to recipients using their custom emails.
2025-07-24 16:05:00 +10:00
David Nguyen 07119f0e8d fix: correctly render new lines in text fields (#1920)
Currently new lines are not rendered in text fields correctly on the
`/sign` page. This is an issue because when the field is inserted and
sealed we respect new lines.
2025-07-24 14:30:33 +10:00
Catalin Pit 7a5a9eefe8 feat: upload template via API (#1842)
Allow users to upload templates via both v1 and v2 APIs. Similar to
uploading documents.
2025-07-23 14:41:12 +10:00
samuel-cglg 5570690b3b fix: clicking on tooltip icon submit parent form (#1915) 2025-07-23 14:28:02 +10:00
Mythie 9ea56a77ff v1.12.2-rc.2 2025-07-20 17:05:19 +10:00
Mythie 32c94118ce fix: subscription update handler logic 2025-07-20 11:18:02 +10:00
Lucas Smith 512e3555b4 feat: horizontal checkboxes (#1911)
Adds the ability to have checkboxes align horizontally, wrapping when
they would go off the PDF
2025-07-19 22:06:50 +10:00
Catalin Pit c47dc8749a fix: handle unauthorized document move error (#1884) 2025-07-16 14:45:12 +10:00
David Nguyen 32a5d33a16 fix: invalid folder queries (#1898)
Currently the majority of folder mutations only work if the user is the
owner of the folder.
2025-07-16 14:37:55 +10:00
David Nguyen e5aaa17545 fix: restrict individual plans to upgrade only (#1900)
Prevent users from creating a separate organisation for individual
plans. Only applies to users who have 1 personal organisation and are
subscribing to the "Individual" plan.

The reason for this change is to keep the layout in the "Personal" mode
which means it doesn't show a bunch of unusable "organisation" related
UI.
2025-07-16 14:35:42 +10:00
Ephraim Duncan f9d7fd7d9a fix: resend document api v1 filtering logic (#1888)
The resend document API was not working correctly when filtering
recipients. The query was filtering recipients at the database level,
which could result in an empty recipients array being returned even when
the document had recipients. This prevented the API from properly
identifying which recipients needed reminder emails.
2025-07-16 14:31:40 +10:00
David Nguyen 5083ecb4b8 fix: allow resubscribing (#1901)
Currently users who cancel their plan are stuck without the ability to
resubscribe. This allows them to choose a plan to subscribe

This assumes that a Subscription in the "INACTIVE" state means that the
plan has been paid but canceled.

No tests have been done to determine the relation between "PAST_DUE" and
"INACTIVE" states within our context.
2025-07-16 14:26:21 +10:00
Catalin Pit 168648164b docs: add test webhook section (#1902) 2025-07-16 13:22:30 +10:00
Jan Piotrowski 202e9fedb9 fix: remove unsupported frontmatter from PULL_REQUEST_TEMPLATE.md (#1867) 2025-07-15 16:18:15 +10:00
Ephraim Duncan 939bbcdb33 docs: api rate limit (#1899) 2025-07-15 16:16:50 +10:00
Lucas Smith 70f6036525 chore: add translations (#1877) 2025-07-15 12:29:37 +10:00
Catalin Pit 122e25b491 feat: test webhook functionality (#1886) 2025-07-14 15:13:56 +10:00
Lucas Smith ca9a70ced5 fix: handle trials and resubscribing (#1897) 2025-07-14 12:31:06 +10:00
Ephraim Duncan 55abecc526 fix: isAssistantMode was incorrectly set to true for regular recipients (#1854) 2025-07-13 22:41:18 +10:00
Lucas Smith 49c70fc8a8 chore: update docs 2025-07-11 17:02:10 +10:00
Ephraim Duncan 4195a871ce chore: update gitginore (#1894) 2025-07-11 13:16:51 +10:00
Lucas Smith 37ed5ad222 v1.12.2-rc.1 2025-07-11 12:55:56 +10:00
Catalin Pit d6c11bd195 fix: sign-able readonly fields (#1885) 2025-07-10 16:47:36 +10:00
Catalin Pit cb73d21e05 chore: api tests (#1856) 2025-07-10 12:56:46 +10:00
David Nguyen 106f796fea fix: readonly field styling (#1887)
Changes:
- Updating styling of read only fields
- Removed truncation for fields and used overflow hidden instead
2025-07-10 12:35:18 +10:00
Lucas Smith 9917def0ca v1.12.2-rc.0 2025-07-03 10:31:22 +10:00
David Nguyen cdb9b9ee03 chore: add certificate error logs (#1875)
Add certificate logs
2025-07-03 10:13:12 +10:00
Lucas Smith 8d1d098e3a v1.12.1 2025-07-03 10:07:54 +10:00
Lucas Smith b682d2785f chore: add translations (#1835)
Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
2025-07-03 10:07:11 +10:00
Lucas Smith 1a1a30791e v1.12.0 2025-07-03 10:01:03 +10:00
David Nguyen ea1cf481eb chore: extract translations 2025-07-01 21:27:35 +10:00
Ephraim Duncan eda0d5eeb6 fix: open advanced settings when fields are added to templates (#1855) 2025-07-01 21:21:13 +10:00
Jan Piotrowski 8da4ab533f fix(add-subject): remove superfluous word (#1866) 2025-07-01 12:34:14 +10:00
Lucas Smith 8695ef766e v1.12.0-rc.8 2025-06-30 19:47:37 +10:00
David Nguyen 7487399123 feat: add more api logs (#1870)
Adds more detailed API logging using Pino
2025-06-30 19:46:32 +10:00
David Nguyen 0cc729e9bd feat: add sequential document view logs (#1871)
## Description

Add a new document audit log to detect when the document is viewed. This
should only be visible in the document audit log page

Notes:
1. I wanted to reuse the `DOCUMENT_OPENED` event and add an additional
paramter to track sequential views, but it's not query-able
2. This will log "DOCUMENT_VIEWED" before "DOCUMENT_OPENED" but i don't
think it matters
2025-06-30 19:11:16 +10:00
Lucas Smith 58d97518c8 v1.12.0-rc.7 2025-06-27 22:17:45 +10:00
Lucas Smith 20c8969272 fix: get real ip for rate limit key 2025-06-27 22:17:02 +10:00
Lucas Smith 85ac65e405 v1.12.0-rc.6 2025-06-27 21:46:16 +10:00
David Nguyen e07a497b69 feat: api logging by pino (#1865)
experiemental
2025-06-27 21:44:51 +10:00
Lucas Smith 21dc4eee62 v1.12.0-rc.5 2025-06-27 18:53:45 +10:00
David Nguyen dc2042a1ee fix: rate limit api endpoints (#1863)
Rate limit API endpoint
2025-06-27 18:50:22 +10:00
Ephraim Duncan bb9ba80edb fix: duplicate fields and recipients when you duplicate a document (#1852) 2025-06-23 16:43:07 +10:00
Catalin Pit bfe8c674f2 fix: globalAccessAuth error (#1851) 2025-06-23 10:10:57 +10:00
David Nguyen ebe1baf0a0 chore: extract translations 2025-06-19 15:16:44 +10:00
Ephraim Duncan 2345de679b feat: admin monthly active users metric (#1724) 2025-06-19 15:12:17 +10:00
Catalin Pit 1be0e2842c fix: refactor folders UI/UX (#1770)
- Add folder search
- Used correct HTML elements
- Added missing translations
- Removed automatic folder redirects
- Removed duplicate code
- Added folder loading skeletons and empty states
2025-06-19 14:57:32 +10:00
Ephraim Duncan 29a03d4ec7 feat: add inbox counter (#1849) 2025-06-18 13:30:01 +10:00
Ephraim Duncan 039cd7d449 fix: remove preconnect font links (#1798) 2025-06-18 12:42:54 +10:00
Ephraim Duncan 484f6c8b85 fix: admin metrics broken (#1845) 2025-06-17 21:15:11 +10:00
Timur Ercan 4fd8a767b2 chore: Update README.md (#1840) 2025-06-13 22:42:38 +10:00
David Nguyen b8e08e88ac fix: api keys not showing (#1839) 2025-06-13 17:20:03 +10:00
David Nguyen 031a7b9e36 fix: visibility 2025-06-13 01:02:40 +10:00
David Nguyen 12fe045195 fix: visiblity 2025-06-13 00:05:08 +10:00
David Nguyen 614106a5e4 fix: rework documents limits logic (#1836) 2025-06-12 13:42:31 +10:00
Lucas Smith 8be7137b59 v1.12.0-rc.4 2025-06-12 10:27:41 +10:00
Lucas Smith 31e2a6443e fix: legacy authOptions support for api v1 2025-06-12 10:21:41 +10:00
Ephraim Duncan 400d2a2b1a feat: sign out of all sessions (#1797) 2025-06-11 17:57:38 +10:00
David Nguyen e3ce7f94e6 chore: update build 2025-06-11 14:52:23 +10:00
Shubham Palriwala cad04f26e7 feat: sitemap auto-generation for docs (#1822) 2025-06-11 14:09:45 +10:00
Ephraim Duncan d27f0ee0ef fix: duplicate field bugs (#1685) 2025-06-11 13:26:19 +10:00
Ephraim Duncan fd2b413ed9 chore: increase wait times for tests (#1778) 2025-06-11 13:25:21 +10:00
Catalin Pit d11ec8fa2a feat: show field coordinates in devmode (#1802)
Show the fields coordinates when the `devmode` search param is present.
It's meant to help API users understand where to position the fields.
2025-06-11 12:28:39 +10:00
Damien B. b1127b4f0d chore: update readme 2025-06-11 10:42:32 +10:00
Lucas Smith be4244fb62 chore: add translations (#1832)
Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
2025-06-11 10:39:33 +10:00
David Nguyen 504a0893ab chore: add organisation docs (#1831) 2025-06-10 20:54:36 +10:00
Lucas Smith 22a37409c1 v1.12.0-rc.3 2025-06-10 12:49:37 +10:00
Lucas Smith 50605d5912 chore: add translations (#1830)
Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
2025-06-10 12:30:36 +10:00
David Nguyen 4609fc852d chore: extract translations 2025-06-10 11:52:59 +10:00
David Nguyen e6dc237ad2 feat: add organisations (#1820) 2025-06-10 11:49:52 +10:00
Lucas Smith 0b37f19641 chore: add translations (#1774) 2025-06-09 16:00:03 +10:00
Lucas Smith 64c6a51e04 v1.12.0-rc.2 2025-06-07 02:25:14 +10:00
Lucas Smith d1eddb02c4 fix: add missing awaits for font normalization 2025-06-07 02:24:59 +10:00
Lucas Smith 60a623fafd v1.12.0-rc.1 2025-06-07 00:56:40 +10:00
Lucas Smith 6059b79a8e fix: type error 2025-06-07 00:56:33 +10:00
Lucas Smith c73d61955b v1.12.0-rc.0 2025-06-07 00:47:49 +10:00
Lucas Smith 7c3ca72359 fix: track uninserted fields for multisign 2025-06-07 00:44:41 +10:00
Lucas Smith 55c8632620 feat: password reauthentication for documents and recipients (#1827)
Adds password reauthentication to our existing reauth providers,
additionally swaps from an exclusive provider to an inclusive type where
multiple methods can be selected to offer a this or that experience.
2025-06-07 00:27:19 +10:00
Lucas Smith ce66da0055 feat: multisign embedding (#1823)
Adds the ability to use a multisign embedding for cases where multiple
documents need to be signed in a convenient manner.
2025-06-05 12:58:52 +10:00
Lucas Smith 695ed418e2 fix: documents failing to seal (#1821)
During our field rework that makes fields appear
more accurately between signing and the completed pdf we swapped to
using text fields. Unfortunately as part of that we dropped using the
Noto font for the text field causing ANSI encoding issues when
encountering certain characters.

This change restores the font and handles a nasty issue we had with our
form flattening reverting our selected font.
2025-06-04 23:29:36 +10:00
Lucas Smith 93aece9644 chore: dependency updates (#1808) 2025-05-22 14:30:22 +10:00
Timur Ercan abd4fddf31 chore: test reo integration (#1806)
---
name: Pull Request
about: Submit changes to the project for review and inclusion
---

## Description

Experimental Short-Term Reo Integration
2025-05-21 15:24:46 +02:00
Lucas Smith 44bc769e60 v1.11.1 2025-05-20 22:37:46 +10:00
Lucas Smith c8f80f7be0 fix: reverse original document logic for api endpoint 2025-05-20 22:37:17 +10:00
Lucas Smith 8540f24de0 v1.11.0 2025-05-19 15:44:10 +10:00
Lucas Smith 67203d4bd7 fix: show powered by logic (#1801)
Previous powered by display logic was incorrect, likely due to a merge
conflict.
2025-05-19 14:31:24 +10:00
Lucas Smith 9d1e638f0f fix: pending tooltip click triggers field (#1800)
Makes it so clicking on the pending field tooltip will trigger the
underlying field it refers to on click if the field can be found within
the DOM.
2025-05-19 10:27:13 +10:00
Lucas Smith bd64ad9fef fix: improve multiselect for webhook triggers (#1795)
Replaces https://github.com/documenso/documenso/pull/1660 with the same
code but targeting our main branch.

## Demo

![CleanShot 2025-02-18 at 18 01
05](https://github.com/user-attachments/assets/5afeab95-1a80-4d54-b845-b32cb2e33266)
2025-05-15 13:01:45 +10:00
Ephraim Duncan 99b0ad574e feat: bulk add fields (#1683)
## Demo

![CleanShot 2025-03-04 at 02 17
47](https://github.com/user-attachments/assets/2cffaee3-9933-49e9-bdab-eadfd4c35030)

---------

Co-authored-by: Lucas Smith <me@lucasjamessmith.me>
2025-05-14 19:35:32 +00:00
Ephraim Duncan 9594e1fee8 chore: minor ui fixes (#1793) 2025-05-14 20:08:03 +10:00
Lucas Smith 5e3a2b8f76 fix: allow prefilling date field (#1794)
Allows the prefilling of date fields when creating a document from a
template.

Current implementation is super dirty and should be replaced asap.
2025-05-14 20:06:53 +10:00
Ephraim Duncan f928503a33 chore: update dropdown icons (#1790)
### Before

![CleanShot 2025-05-12 at 11 11
05@2x](https://github.com/user-attachments/assets/af2a60bf-9676-405d-8c3d-e6b2256b53ae)

### After

![CleanShot 2025-05-12 at 11 10
25@2x](https://github.com/user-attachments/assets/aec67e9c-f0f2-4b0d-9baa-7aa327680cf1)
2025-05-14 16:44:13 +10:00
Ephraim Duncan c389670785 fix: trigger webhook for duplicated documents (#1789) 2025-05-14 16:43:31 +10:00
Lucas Smith 99ad2eb645 fix: allow download of original document via api (#1788) 2025-05-14 08:22:11 +10:00
Lucas Smith 2f48679b0b fix: make lang cookie httpOnly (#1783) 2025-05-08 15:59:43 +10:00
Mythie e40c5d9d24 v1.10.3 2025-05-03 09:23:25 +10:00
Mythie ab323f149f fix: resolve issue with uploading templates 2025-05-03 09:23:17 +10:00
Mythie bf1c1ff9dc v1.10.2 2025-05-03 08:11:27 +10:00
Mythie 516e237966 fix: resolve issue with uploading templates 2025-05-03 08:09:44 +10:00
Mythie ac7d24eb12 v1.10.1 2025-05-03 07:39:19 +10:00
Mythie 0931c472a7 fix: resolve issue with uploading templates 2025-05-03 07:38:48 +10:00
Lucas Smith 8c9dd5e372 v1.10.0 2025-05-02 12:03:08 +10:00
Lucas Smith e108da546d fix: incorrect data for postMessage 2025-05-02 10:50:13 +10:00
Catalin Pit 17370749b4 feat: add folders (#1711) 2025-05-02 02:46:59 +10:00
Lucas Smith 12ada567f5 feat: embed authoring part two (#1768) 2025-05-01 23:32:56 +10:00
Ephraim Duncan bdb0b0ea88 feat: certificate qrcode (#1755)
Adds document access tokens and QR code functionality to enable secure
document sharing via URLs. It includes a new document access page that
allows viewing and downloading documents through tokenized links.
2025-04-28 11:30:09 +10:00
Ephraim Duncan 6a41a37bd4 feat: download original documents (#1742)
## Preview
![CleanShot 2025-04-10 at 14 26
11@2x](https://github.com/user-attachments/assets/d4984d85-ab40-4d38-8d5c-a1085bde21a2)
2025-04-25 22:44:03 +10:00
David Nguyen d78cfec00e fix: branding logos (#1759) 2025-04-24 16:15:06 +10:00
Ephraim Duncan f0dcf7e9bf fix: signing volume query (#1753)
This pull request updates the implementation of the admin leaderboard,
enhancing data handling and improving type safety. It introduces clearer
differentiation between users and teams, adds additional fields to track
more relevant information, and refactors the querying logic to optimize
performance and maintainability.
2025-04-24 16:14:38 +10:00
Ephraim Duncan 6540291055 feat: migrate webhook execution to background jobs (#1694) 2025-04-24 06:00:53 +00:00
David Nguyen 193325717d fix: rework fields (#1697)
Rework:
- Field styling to improve visibility
- Field insertions, better alignment, centering and overflows

## Changes

General changes:

- Set default text alignment to left if no meta found
- Reduce borders and rings around fields to allow smaller fields
- Removed lots of redundant duplicated code surrounding field rendering
- Make fields more consistent across viewing, editing and signing
- Add more transparency to fields to allow users to see under fields
- No more optional/required/etc colors when signing, required fields
will be highlighted as orange when form is "validating"

Highlighted internal changes:

- Utilize native PDF fields to insert text, instead of drawing text 
- Change font auto scaling to only apply to when the height overflows
AND no custom font is set

⚠️ Multiline changes:

Multi line is enabled for a field under these conditions

1. Field content exceeds field width
2. Field includes a new line
3. Field type is TEXT

## [BEFORE] Field UI Signing 


![image](https://github.com/user-attachments/assets/ea002743-faeb-477c-a239-3ed240b54f55)

## [AFTER] Field UI Signing 


![image](https://github.com/user-attachments/assets/0f8eb252-4cf3-4d96-8d4f-cd085881b78c)

## [BEFORE] Signing a checkbox


![image](https://github.com/user-attachments/assets/4567d745-e1da-4202-a758-5d3c178c930e)

![image](https://github.com/user-attachments/assets/c25068e7-fe80-40f5-b63a-e8a0d4b38b6c)

## [AFTER] Signing a checkbox


![image](https://github.com/user-attachments/assets/effa5e3d-385a-4c35-bc8a-405386dd27d6)

![image](https://github.com/user-attachments/assets/64be34a9-0b32-424d-9264-15361c03eca5)

## [BEFORE] What a 2nd recipient sees once someone else signed a
document


![image](https://github.com/user-attachments/assets/21c21ae2-fc62-4ccc-880a-46aab012aa70)

## [AFTER] What a 2nd recipient sees once someone else signed a document


![image](https://github.com/user-attachments/assets/ae51677b-f1d5-4008-a7fd-756533166542)

## **[BEFORE]** Inserting fields


![image](https://github.com/user-attachments/assets/1a8bb8da-9a15-4deb-bc28-eb349414465c)

## **[AFTER]** Inserting fields


![image](https://github.com/user-attachments/assets/c52c5238-9836-45aa-b8a4-bc24a3462f40)

## Overflows, multilines and field alignments testing

Debugging borders:
- Red border = The original field placement without any modifications
- Blue border = The available space to overflow

### Single line overflows and field alignments 

This is left aligned fields, overflow will always go to the end of the
page and will not wrap


![image](https://github.com/user-attachments/assets/47003658-783e-4f9c-adbf-c4686804d98f)

This is center aligned fields, the max width is the closest edge to the
page * 2


![image](https://github.com/user-attachments/assets/05a38093-75d6-4600-bae2-21ecff63e115)

This is right aligned text, the width will extend all the way to the
left hand side of the page


![image](https://github.com/user-attachments/assets/6a9d84a8-4166-4626-9fb3-1577fac2571e)

### Multiline line overflows and field alignments 

These are text fields that can be overflowed


![image](https://github.com/user-attachments/assets/f7b5456e-2c49-48b2-8d4c-ab1dc3401644)

Another example of left aligned text overflows with more text


![image](https://github.com/user-attachments/assets/3db6b35e-4c8d-4ffe-8036-0da760d9c167)
2025-04-23 21:40:42 +10:00
Catalin Pit b94645a451 fix: optional fields being required in direct links (#1752) 2025-04-21 16:34:29 +10:00
Mythie 7e6704faae chore: update tests 2025-04-21 16:23:50 +10:00
Mythie cf17fc61bc chore: update tests 2025-04-21 16:07:19 +10:00
Mythie 6df8b3aac8 chore: update ci 2025-04-21 14:29:40 +10:00
Mythie fdb31772db chore: update tests 2025-04-21 14:13:12 +10:00
Mythie a3dfd81870 chore: update playwright config 2025-04-21 13:27:19 +10:00
Mythie 755ef697ba chore: update playwright config 2025-04-21 13:03:29 +10:00
Mythie 37cc41d713 fix: skip immediate expiration presign test 2025-04-21 12:41:38 +10:00
Mythie dd2ef3a657 v1.10.0-rc.5 2025-04-17 23:01:43 +10:00
David Nguyen 435b3ca4f8 chore: remove legacy document update route (#1751)
Remove deprecated route
2025-04-17 16:36:10 +10:00
Mythie 278cd8a9de fix: always show ip and useragent in certificate 2025-04-17 12:55:03 +10:00
Catalin Pit f1526315f5 feat: limit free teams platform plan (#1673)
This pull request removes the `id` field from
`IsDocumentPlatformOptions` in `is-document-platform.ts` and updates the
billing logic in `create-team.ts`: platform plan users create their
first team free, but pay for subsequent teams; non-platform users need
an active team subscription if billing is enabled.
2025-04-15 21:32:15 +10:00
RefRexi 353a7e8e0d fix: dynamic route for team transfer (#1730)
fix: dynamic route handling for /team/verify/transfer/:token
2025-04-15 21:30:44 +10:00
Ephraim Duncan 34b2504268 chore: husky (#1706) 2025-04-15 21:29:03 +10:00
Catalin Pit 566abda36b chore: update render build command (#1748) 2025-04-15 19:06:06 +10:00
Mythie 9121a062b3 chore: add docs for authoring 2025-04-14 11:31:54 +10:00
Lucas Smith e613e0e347 feat: support embedded authoring for creation (#1741)
Adds support for creating documents and templates
using our embed components.

Support is super primitive at the moment and is being polished.
2025-04-11 00:20:39 +10:00
Lucas Smith 95aae52fa4 chore: add translations (#1715)
Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
2025-04-10 12:24:07 +10:00
Ephraim Duncan 5958f38719 chore: set the default value on the top (#1734) 2025-04-08 23:35:32 +10:00
Catalin Pit 419bc02171 docs: prefill fields (#1688) 2025-04-04 00:03:37 +11:00
Ephraim Duncan 5e4956f3a2 fix: zero month addition (#1733)
- Add zero month at the begining of each metric on the open page
2025-04-01 11:12:41 +00:00
Mythie da71613c9f v1.10.0-rc.4 2025-03-31 20:02:22 +11:00
Lucas Smith 4d6efe091e fix: pass document meta to readonly field component (#1737)
## Description

Previously we weren't passing the DocumentMeta to our readonly field
component which is used for displaying completed fields by other
recipients.

Due to this dates that were not using the default format were displaying
as invalid date adding confusion to the signing process.

## Related Issue

Reported via support email.

## Changes Made

- Pass the document meta to the readonly field component.
- Support showing completed fields within the embedding UI.

## Testing Performed

- Manual testing
2025-03-31 17:14:56 +11:00
David Nguyen 7e6ac4db40 fix: direct template redirects (#1727) 2025-03-28 14:45:54 +11:00
Mythie a87af910c7 v1.10.0-rc.2 2025-03-28 01:50:59 +11:00
Mythie e37b005d7f chore: update dockerfile 2025-03-28 01:28:49 +11:00
Mythie 73f8518b47 chore: update tests 2025-03-28 01:21:48 +11:00
Mythie ac3deb113e chore: update ci 2025-03-27 22:49:59 +11:00
Catalin Pit c82388c40a fix: remove console.log embed document completed (#1723) 2025-03-25 16:36:52 +02:00
David Nguyen 31be548939 fix: duplicate webhook calls on document complete (#1721)
Fix webhooks being sent twice due to duplicate frontend calls

Updated the assistant confirmation dialog so the next signer is always
visible (if dictate is enabled). Because if the form is invalid (due to
no name) there is no visual queue that the form is invalid (since it's
hidden)

## Notes

Didn't bother to remove the weird assistants form since it currently
works for now


![image](https://github.com/user-attachments/assets/47910fec-e05e-486a-a61d-16078d948893)

## Tests

- Currently running locally
- Tested webhooks via network tab and via webhook.site
2025-03-25 21:59:13 +11:00
David Nguyen 063fd32f18 feat: add signature configurations (#1710)
Add ability to enable or disable allowed signature types:
- Drawn
- Typed
- Uploaded

**Tabbed style signature dialog**

![image](https://github.com/user-attachments/assets/a816fab6-b071-42a5-bb5c-6d4a2572431e)

**Document settings**

![image](https://github.com/user-attachments/assets/f0c1bff1-6be1-4c87-b384-1666fa25d7a6)

**Team preferences**

![image](https://github.com/user-attachments/assets/8767b05e-1463-4087-8672-f3f43d8b0f2c)

- Add multiselect to select allowed signatures in document and templates
settings tab
- Add multiselect to select allowed signatures in teams preferences
- Removed "Enable typed signatures" from document/template edit page
- Refactored signature pad to use tabs instead of an all in one
signature pad

Added E2E tests to check settings are applied correctly for documents
and templates
2025-03-24 17:13:11 +11:00
Mythie 231f51bd1f v1.10.0-rc.1 2025-03-22 17:34:33 +11:00
Mythie a8de8368a2 fix: hide powered by on certificate for platform documents 2025-03-22 12:04:08 +11:00
Mythie 7dd331addf fix: allow blank rejection reasons 2025-03-22 12:01:18 +11:00
Mythie c6743a7cec v1.10.0-rc.0 2025-03-22 03:23:23 +11:00
Mythie efbc097191 fix: unblock last signer when using dictation 2025-03-22 02:34:12 +11:00
Lucas Smith f1525991dc feat: dictate next signer (#1719)
Adds next recipient dictation functionality to document signing flow,
allowing assistants and signers to update the next recipient's
information during the signing process.

## Related Issue

N/A

## Changes Made

- Added form handling for next recipient dictation in signing dialogs
- Implemented UI for updating next recipient information
- Added e2e tests covering dictation scenarios:
  - Regular signing with dictation enabled
  - Assistant role with dictation
  - Parallel signing flow
  - Disabled dictation state

## Testing Performed

- Added comprehensive e2e tests covering:
  - Sequential signing with dictation
  - Assistant role dictation
  - Parallel signing without dictation
  - Form validation and state management
- Tested on Chrome and Firefox
- Verified recipient state updates in database
2025-03-21 13:27:04 +11:00
Mythie fb173e4d0e chore: update docker build scripts 2025-03-20 10:52:33 +11:00
Catalin Pit d422ffa873 chore: add terms and privacy policy link (#1707) 2025-03-19 19:29:09 +11:00
Catalin Pit 55b7697316 chore: update d script in package.json (#1703)
Add the `translate:compile` command to the `d` script.
2025-03-14 16:15:57 +11:00
Catalin Pit 67bbb6c6f4 fix: autosigning fields with direct links (#1696)
## Description

The changes in `sign-direct-template.tsx` automatically fill in field
values for text, number, and dropdown fields when default values are
present or if the fields are read-only. In `checkbox-field.tsx`, the
changes fix the checkbox signing by checking if the validation is met
and improving how it saves or removes checkbox choices.

## Testing Performed

I tested the code locally with a variety of documents/fields.

## Checklist

<!--- Please check the boxes that apply to this pull request. -->
<!--- You can add or remove items as needed. -->

- [x] I have tested these changes locally and they work as expected.
- [ ] I have added/updated tests that prove the effectiveness of these
changes.
- [ ] I have updated the documentation to reflect these changes, if
applicable.
- [x] I have followed the project's coding style guidelines.
- [ ] I have addressed the code review feedback from the previous
submission, if applicable.
2025-03-13 11:18:01 +02:00
Lucas Smith 63a4bab0fe feat: better document rejection (#1702)
Improves the existing document rejection process by actually marking a
document as completed cancelling further actions.

## Related Issue

N/A

## Changes Made

- Added a new rejection status for documents
- Updated a million areas that check for document completion
- Updated email sending, so rejection is confirmed for the rejecting
recipient while other recipients are notified that the document is now
cancelled.

## Testing Performed

- Ran the testing suite to ensure there are no regressions.
- Performed manual testing of current core flows.
2025-03-13 15:08:57 +11:00
Jenil Savani 9f17c1e48e fix: adjust desktop nav search button width and spacing (#1699) 2025-03-13 10:52:01 +11:00
Catalin Pit 91ae818213 fix: missing prefillfields property from the api v2 documentation (#1700) 2025-03-12 22:54:58 +11:00
David Nguyen a0ace803cf fix: admin signing page crash 2025-03-12 16:53:09 +11:00
Ephraim Duncan b3db3be8e9 fix: signing field disabled when pointer is out of canvas (#1652) 2025-03-12 16:44:21 +11:00
Jenil Savani 44cdbeecb4 fix: improve layout and truncate document information in logs page (#1656) 2025-03-12 16:31:03 +11:00
Tom 7214965c0c chore: update French translations (#1679) 2025-03-12 16:22:06 +11:00
Ephraim Duncan 8d6bf91d12 fix: persist theme cookie for a much longer time (#1693) 2025-03-12 16:09:37 +11:00
Ephraim Duncan fec078081b fix: correct signer deletion (#1596) 2025-03-12 16:05:45 +11:00
David Nguyen c646afcd97 fix: tests 2025-03-09 15:10:19 +11:00
Catalin Pit 63d990ce8d fix: optional fields in embeds (#1691) 2025-03-09 14:41:17 +11:00
eddielu aa7d6b28a4 docs: Update documentation to match reality. colorPrimary, colorBackground,… (#1666)
Update documentation to match reality. colorPrimary, colorBackground,
and borderRadius do not exist according to the schema:
https://github.com/documenso/embeds/blob/280251cfddb56a6aeeb0d767098915ae7058c376/packages/react/src/css-vars.ts
2025-03-09 14:38:51 +11:00
David Nguyen b990532633 fix: remove refresh on focus 2025-03-08 15:30:13 +11:00
Catalin Pit 65be37514f fix: prefill fields (#1689)
Users can now selectively choose which properties to pre-fill for each
field - from just a label to all available properties.
2025-03-07 09:09:15 +11:00
Catalin Pit 0df29fce36 fix: invalid request body (#1686)
Fix the invalid request body so the webhooks work again.
2025-03-06 19:47:24 +11:00
Ephraim Duncan ba5b7ce480 feat: hide signature ui when theres no signature field (#1676) 2025-03-06 19:47:02 +11:00
Catalin Pit 422770a8c7 feat: allow fields prefill when generating a document from a template (#1615)
This change allows API users to pre-fill fields with values by
passing the data in the request body. Example body for V2 API endpoint
`/api/v2-beta/template/use`:

```json
{
    "templateId": 1,
    "recipients": [
        {
            "id": 1,
            "email": "signer1@mail.com",
            "name": "Signer 1"
        },
        {
            "id": 2,
            "email": "signer2@mail.com",
            "name": "Signer 2"
        }
    ],
    "prefillValues": [
        {
            "id": 14,
            "fieldMeta": {
                "type": "text",
                "label": "my label",
                "placeholder": "text placeholder test",
                "text": "auto-sign value",
                "characterLimit": 25,
                "textAlign": "right",
                "fontSize": 94,
                "required": true
            }
        },
        {
            "id": 15,
            "fieldMeta": {
                "type": "radio",
                "label": "radio label",
                "placeholder": "new radio placeholder",
                "required": false,
                "readOnly": true,
                "values": [
                    {
                        "id": 2,
                        "checked": true,
                        "value": "radio val 1"
                    },
                    {
                        "id": 3,
                        "checked": false,
                        "value": "radio val 2"
                    }
                ]
            }
        },
        {
            "id": 16,
            "fieldMeta": {
                "type": "dropdown",
                "label": "dropdown label",
                "placeholder": "DD placeholder",
                "required": false,
                "readOnly": false,
                "values": [
                    {
                        "value": "option 1"
                    },
                    {
                        "value": "option 2"
                    },
                    {
                        "value": "option 3"
                    }
                ],
                "defaultValue": "option 2"
            }
        }
    ],
    "distributeDocument": false,
    "customDocumentDataId": ""
}
```
2025-03-06 19:45:33 +11:00
David Nguyen 083a706373 fix: duplex and 2fa refresh 2025-03-04 11:41:38 +11:00
David Nguyen db326cb4a9 fix: posthog reverse proxy 2025-03-04 10:48:19 +11:00
David Nguyen d664f571d6 fix: posthog reverse proxy 2025-03-04 10:46:59 +11:00
David Nguyen 7c38970ee8 fix: update error logging 2025-03-04 01:41:39 +11:00
David Nguyen e08d62c844 fix: remove invalid prisma zod schemas 2025-03-04 01:20:13 +11:00
David Nguyen 25bb6ffe77 fix: imports 2025-03-03 14:49:28 +11:00
Catalin Pit e79d762710 chore: add label for checkbox and radio fields (#1607) 2025-03-03 13:46:29 +11:00
Mythie d970976299 fix: remove auto-expand in embeddding 2025-02-28 14:46:15 +11:00
David Nguyen 3dce814ab2 fix: stripe price fetch (#1677)
Currently Stripe prices search is omitting a price for an unknown
reason.

Changed our fetch logic to use `list` instead of `search` allows us to
work around the issue.

It's unknown on the performance impact of using `list` vs `search`
2025-02-28 14:44:06 +11:00
David Nguyen ad520bb032 fix: remove oauth from embeds 2025-02-27 14:08:59 +11:00
David Nguyen 596d30e2e5 fix: remove lazy pdf loader 2025-02-26 21:48:06 +11:00
David Nguyen 6474b4a524 fix: add preferred team middleware 2025-02-26 19:42:42 +11:00
David Nguyen 5b4db51051 fix: react-pdf canvas build 2025-02-26 18:39:21 +11:00
Mythie cf58c80e31 fix: handle empty field meta for checkboxes 2025-02-26 15:30:51 +11:00
Catalin Pit 11dbb8873e docs: add the v2 api staging base url (#1671) 2025-02-26 15:30:32 +11:00
Mythie bc7907271b fix: unbreak build for docker 2025-02-25 21:46:51 +11:00
David Nguyen 9b376d34cf feat: add stripe dev cli 2025-02-25 21:22:28 +11:00
Mythie deea99d865 feat: search by externalId 2025-02-25 20:07:47 +11:00
Mythie 3328074f51 fix: early adopters can use platform features 2025-02-25 20:07:40 +11:00
David Nguyen 5e69665e00 fix: rr7 github build 2025-02-25 16:52:10 +11:00
David Nguyen c1c7cfaf8b chore: cleanup 2025-02-25 16:37:36 +11:00
David Nguyen 7e8955b89c fix: add posthog error monitor 2025-02-25 15:14:45 +11:00
David Nguyen cedd5e87b1 chore: update API documentation 2025-02-25 02:36:08 +11:00
David Nguyen 5255e8671f chore: refactor pdf worker loader 2025-02-24 21:47:06 +11:00
David Nguyen d4c1bad407 fix: add default oauth user url 2025-02-23 18:49:22 +11:00
David Nguyen 01dccb7916 chore: flattern routes 2025-02-21 15:53:23 +11:00
Lucas Smith 483d7caef7 feat: allow document rejection in embeds (#1662) 2025-02-21 01:27:03 +11:00
David Nguyen 139bc265c7 fix: migrate billing to RR7 2025-02-21 01:16:23 +11:00
David Nguyen 991ce5ff46 fix: update teams API tokens logic 2025-02-21 00:34:50 +11:00
David Nguyen 7728c8641c fix: share opengraph 2025-02-20 15:38:06 +11:00
David Nguyen 50a41d0799 fix: pdf viewer and embeds 2025-02-20 15:06:36 +11:00
David Nguyen 250381fec8 fix: billing 2025-02-20 12:17:55 +11:00
David Nguyen d2f3d24542 chore: update docs 2025-02-19 22:36:17 +11:00
David Nguyen ec07092bf6 fix: session refresh 2025-02-19 22:29:30 +11:00
David Nguyen 63e2ef0abf fix: static caching 2025-02-19 21:35:35 +11:00
David Nguyen 90ce52164c chore: add password tests 2025-02-19 18:41:53 +11:00
David Nguyen ac30654913 fix: add auth session lifetime 2025-02-19 18:04:36 +11:00
David Nguyen 24f3ecd94f fix: remove marketing url 2025-02-19 16:45:54 +11:00
David Nguyen a319ea0f5e fix: add public profiles tests 2025-02-19 16:07:04 +11:00
David Nguyen 5ce2bae39d fix: resolve internal pdf translations 2025-02-19 14:43:35 +11:00
David Nguyen 5d86e84217 fix: prepare auth migration (#1648)
Add schema session migration in preparation for auth migration.
2025-02-18 15:19:42 +11:00
David Nguyen 79e26a9a46 fix: remove session migration 2025-02-18 15:19:39 +11:00
David Nguyen dd602a7e1c fix: themes 2025-02-18 15:17:13 +11:00
Ephraim Duncan fb16214dc5 chore: add asssitant role to the docs (#1638) 2025-02-17 23:28:00 +11:00
David Nguyen 5fc724b247 fix: rework sessions 2025-02-17 22:46:36 +11:00
David Nguyen 1ed1cb0773 chore: refactor sessions 2025-02-16 00:44:01 +11:00
David Nguyen 8d5fafec27 feat: add static cache 2025-02-15 00:08:36 +11:00
David Nguyen 0f6f236e0c fix: firefox fouc 2025-02-14 23:02:45 +11:00
David Nguyen e518985833 fix: migrate 2fa to custom auth 2025-02-14 22:00:55 +11:00
David Nguyen 595e901bc2 fix: make auth migration more flexible 2025-02-14 19:22:11 +11:00
David Nguyen df8ea09021 fix: add oidc env variables 2025-02-14 18:11:54 +11:00
David Nguyen 180656978b feat: add themes 2025-02-14 17:50:23 +11:00
David Nguyen 28f5177064 fix: dialogs with search params 2025-02-14 16:14:02 +11:00
David Nguyen 31de86e425 feat: add oidc 2025-02-14 16:01:16 +11:00
Mythie 113ab293bb chore: make all the docker stuff work 2025-02-14 14:53:01 +11:00
David Nguyen 1c4878e526 fix: documentation build 2025-02-13 21:21:51 +11:00
David Nguyen 92db4d68db fix: cleanup env variables 2025-02-13 20:56:44 +11:00
David Nguyen 7379391f92 fix: migrate translations 2025-02-13 20:24:27 +11:00
David Nguyen ebc2b00067 fix: add sign up hook 2025-02-13 20:21:23 +11:00
Ephraim Duncan 87dcdd44cd chore: update local seed data (#1622)
Add multiple example documents, pending documents, and templates for
both admin and example users
2025-02-13 19:50:05 +11:00
Catalin Pit b205f7e5f3 fix: typed signature not working (#1635)
The `typedSignatureEnabled` prop was removed from the `SignatureField`
component, which broke the typed signature meaning that nobody could
sign documents by typing their signature.
2025-02-13 19:47:38 +11:00
Mythie c5d5355cf7 fix: assistant mode breaks for number fields 2025-02-13 19:46:14 +11:00
Mythie 5fac29a07f fix: add css targets for embeds 2025-02-13 19:45:54 +11:00
Catalin Pit 1aaacab6ca fix: temp field label/text truncation (#1565)
TEMP: Fix the truncation of the field label/text.
2025-02-13 19:43:35 +11:00
Ephraim Duncan 06076c1809 fix: unable to check on the checkbox field (#1593)
This change prevents race conditions between state updates and API
operations by updating local state immediately before making async
calls.
2025-02-13 19:42:08 +11:00
Ephraim Duncan c0ae68c28b feat: assistant role (#1588)
Introduces the ability for users with the **Assistant** role to prefill
fields on behalf of other signers. Assistants can fill in various field
types such as text, checkboxes, dates, and more, streamlining the
document preparation process before it reaches the final signers.
2025-02-13 19:37:34 +11:00
Timur Ercan 3e106c1a2d chore: api v2 docs (#1620)
chore update docs for api v2 announce
2025-02-13 18:49:37 +11:00
Mythie 741639ee78 fix: improve move to team display logic 2025-02-13 18:49:03 +11:00
David Nguyen 0b3638c42c feat: add Polish and Italian (#1618) 2025-02-13 18:48:37 +11:00
Catalin Pit 0f50110853 fix: create global settings on team creation (#1601)
The global team settings weren't created when creating a new team.

## Changes Made

The global team settings are now created when a new team is created.
2025-02-13 18:47:59 +11:00
Catalin Pit b0f8c83134 chore: add cancelled webhook event (#1608) 2025-02-13 18:47:43 +11:00
Lucas Smith c9e8a32471 feat: bulk send templates via csv (#1578)
Implements a bulk send feature allowing users to upload a CSV file to
create multiple documents from a template. Includes CSV template
generation, background processing, and email notifications.
2025-02-13 18:44:29 +11:00
Lucas Smith 84b193d99c fix: tidy document invite email render logic (#1597)
Updates one of our confusing ternaries to use `ts-pattern` for rendering
the conditional blocks making it easy to follow the logic occurring.
2025-02-13 18:34:38 +11:00
Ephraim Duncan b03c5ab1a7 fix: admin leaderboard query sorting (#1548) 2025-02-13 18:32:38 +11:00
Lucas Smith 9db42accf3 feat: add text align option to fields (#1610)
Adds the ability to align text to the left, center or right for relevant
fields.

Previously text was always centered which can be less desirable.

See attached debug document which has left, center and right text
alignments set for fields.

<img width="614" alt="image"
src="https://github.com/user-attachments/assets/361a030e-813d-458b-9c7a-ff4c9fa5e33c"
/>

N/A

- Added text align option
- Update the insert in pdf method to support different alignments
- Added a debug mode to field insertion

- Ran manual tests using the debug mode
2025-02-13 18:28:33 +11:00
David Nguyen 383b5f78f0 feat: migrate nextjs to rr7 2025-02-13 14:10:38 +11:00
Mythie 9183f668d3 chore: bump node version for docker 2025-01-27 12:20:04 +11:00
Ephraim Duncan 54ea96391a fix: correct redirect after document duplication (#1595) 2025-01-23 16:34:22 +11:00
Ephraim Duncan 42d24fd1a1 feat: copy, paste, duplicate template fields (#1594) 2025-01-23 14:28:26 +11:00
Mythie dc36a8182c v1.9.0-rc.11 2025-01-21 09:49:22 +11:00
Mythie 0ef85b47b1 fix: handle empty object as fieldMeta 2025-01-21 09:46:54 +11:00
Mythie 058d9dd0ba v1.9.0-rc.10 2025-01-20 19:54:39 +11:00
David Nguyen 74bb230247 fix: add empty success responses (#1600) 2025-01-20 19:47:39 +11:00
Mythie 7c1e0f34e8 v1.9.0-rc.9 2025-01-20 16:08:15 +11:00
Mythie 7e31323faa fix: add team context to more vanilla client usages 2025-01-20 15:53:28 +11:00
David Nguyen a28cdf437b feat: add get field endpoints (#1599) 2025-01-20 15:53:12 +11:00
Ephraim Duncan 80dfbeb16f feat: add angular embedding docs (#1592) 2025-01-20 09:35:47 +11:00
Mythie 9de3a32ceb fix: pass team id to vanilla trpc client 2025-01-20 09:30:36 +11:00
David Nguyen 0d3864548c fix: bump trpc and openapi packages (#1591) 2025-01-19 22:07:02 +11:00
David Nguyen 9e03747e43 feat: add create document beta endpoint (#1584) 2025-01-16 13:36:00 +11:00
David Nguyen 5750f2b477 feat: add prisma json types (#1583) 2025-01-15 13:46:45 +11:00
David Nguyen 901be70f97 feat: add consistent response schemas (#1582) 2025-01-14 00:43:35 +11:00
David Nguyen 7d0a9c6439 fix: refactor prisma relations (#1581) 2025-01-13 13:41:53 +11:00
Samuel Raub 48b55758e3 feat: ignore unrecognized fields from authorization response (#1479)
When authenticating using OIDC some IDPs send additional fields in their
authorization response. 

This leads to an error because these fields can't be persisted to the DB 
through the auth.js prisma adapter. 

This PR solves this by deleting all unrecognized fields from the 
authorization response before persisting. 

This behaviour is also compliant to 
[RFC6749 Section 4.1.2](https://datatracker.ietf.org/doc/html/rfc6749#section-4.1.2)
2025-01-13 11:05:37 +11:00
Mythie dcaccb65f2 v1.9.0-rc.8 2025-01-13 10:21:05 +11:00
Mythie 723e1b4ea2 fix: include all template meta in findTemplates 2025-01-13 09:34:23 +11:00
David Nguyen 08a69c6168 fix: pending document edit (#1580)
Fix issue where you cannot edit a pending document when there is a CCer
recipient.
2025-01-11 22:31:59 +11:00
David Nguyen 948d9c24cf fix: broken direct template webhook (#1579) 2025-01-11 21:42:33 +11:00
David Nguyen ebbe922982 feat: add template and field endpoints (#1572) 2025-01-11 15:33:20 +11:00
Timur Ercan 6520bbd5e3 Update FEATURES
chore: typo
2025-01-10 14:25:39 +01:00
Mythie 4e197ac24c v1.9.0-rc.7 2025-01-09 15:07:11 +11:00
Ephraim Duncan f707e5fb10 fix: update template field schema (#1575)
Co-authored-by: Lucas Smith <me@lucasjamessmith.me>
2025-01-09 12:06:17 +11:00
Catalin Pit 6fc5e565d0 fix: add document visibility to template (#1566)
Adds the visibility property to templates
2025-01-09 10:14:24 +11:00
Mythie 07c852744b v1.9.0-rc.6 2025-01-08 20:18:09 +11:00
Lucas Smith 4fab98c633 feat: allow switching document when using templates (#1571)
Adds the ability to upload a custom document when using a template.

This is useful when you have a given fixed template with placeholder
values that you want to decorate with Documenso fields but will then
create a final specialised document when sending it out to a given
recipient.
2025-01-07 16:13:35 +11:00
Lucas Smith 18ca0cf3d6 chore: add translations (#1564) 2025-01-02 10:36:05 +11:00
david-loe b3e044e278 fix: label stable releases as latest (#1567)
adds missing 'v' in regex  #1405
2025-01-02 10:07:25 +11:00
David Nguyen e2a250063f fix: crowdin config 2024-12-31 17:25:33 +11:00
David Nguyen 4085151f80 fix: merge common and web po files (#1563) 2024-12-31 17:20:58 +11:00
David Nguyen 0d3681e26a fix: remove marketing remains 2024-12-31 15:53:15 +11:00
David Nguyen cfe7b3a51f fix: remove marketing (#1562) 2024-12-31 15:45:22 +11:00
Mythie 08d3d6a80a fix: improve recipient status display
Improves the display of the recipients status when
distribution method is set to none.

Previously we had a ton of checks for sendStatus = SENT
which will never trigger when distributing manually causing
some confusion.
2024-12-31 14:54:19 +11:00
Mythie 9d83bda12c fix: standardise checkboxes
Checkboxes were previously styled super wonky due to
the usage of checkboxClassName which styled the checkbox
trigger.

This change reverts all that and leaves it with sensible defaults
across dark and light mode.
2024-12-31 11:55:49 +11:00
Catalin Pit 22fd1b5be1 fix: default to user timezone (#1559)
Passes the timezone of the user uploading the document/template via the
UI to the server.

If the user uploads a document/template via the API and doesn't set a
timezone, it defaults to `Etc/UTC`.
2024-12-31 10:27:24 +11:00
Catalin Pit df33fbf91b feat: admin ui for disabling users (#1547) 2024-12-30 14:45:33 +11:00
Ephraim Duncan ee6efc4cca fix: avoid having a drawn and typed signature at the same time (#1516) 2024-12-27 20:29:12 +11:00
Catalin Pit 6da15ab12b feat: open the advanced settings automatically (#1508) 2024-12-27 19:57:24 +11:00
Tom 7ef2a8769b chore: update French translations (#1555) 2024-12-27 19:39:57 +11:00
Catalin Pit 487f52e194 feat: enable optional fields (#1470) 2024-12-27 19:30:44 +11:00
Dunsin 39b1c5bbec feat: additional valid password (#1456) 2024-12-27 16:02:45 +11:00
Catalin Pit 32857bbfeb fix: make small fields draggable (#1551) 2024-12-27 15:22:56 +11:00
David Nguyen 41218e2585 chore: extract translations 2024-12-26 22:08:52 +11:00
Ephraim Duncan a1a2d0801b feat: notify owner when a recipient signs (#1549) 2024-12-26 22:04:13 +11:00
SYNO® c588c09b26 fix: remove unwanted semicolon (#1545) 2024-12-26 17:28:22 +11:00
David Nguyen 74382e21e7 feat: add get recipient route (#1553) 2024-12-26 17:25:14 +11:00
David Nguyen 8a7ec7e982 fix: billing page formatting (#1554) 2024-12-26 17:20:08 +11:00
David Nguyen 2948a33bf9 fix: tests (#1556) 2024-12-26 17:00:55 +11:00
Mythie 98b2da5018 v1.9.0-rc.5 2024-12-26 13:41:04 +11:00
Catalin Pit fc1f76b543 fix: checkbox logic (#1537)
## Description

<!--- Describe the changes introduced by this pull request. -->
<!--- Explain what problem it solves or what feature/fix it adds. -->

## Related Issue

<!--- If this pull request is related to a specific issue, reference it
here using #issue_number. -->
<!--- For example, "Fixes #123" or "Addresses #456". -->

## Changes Made

<!--- Provide a summary of the changes made in this pull request. -->
<!--- Include any relevant technical details or architecture changes.
-->

- Change 1
- Change 2
- ...

## Testing Performed

<!--- Describe the testing that you have performed to validate these
changes. -->
<!--- Include information about test cases, testing environments, and
results. -->

- Tested feature X in scenario Y.
- Ran unit tests for component Z.
- Tested on browsers A, B, and C.
- ...

## Checklist

<!--- Please check the boxes that apply to this pull request. -->
<!--- You can add or remove items as needed. -->

- [ ] I have tested these changes locally and they work as expected.
- [ ] I have added/updated tests that prove the effectiveness of these
changes.
- [ ] I have updated the documentation to reflect these changes, if
applicable.
- [ ] I have followed the project's coding style guidelines.
- [ ] I have addressed the code review feedback from the previous
submission, if applicable.

## Additional Notes

<!--- Provide any additional context or notes for the reviewers. -->
<!--- This might include details about design decisions, potential
concerns, or anything else relevant. -->
2024-12-23 12:06:47 +02:00
Mythie 22c9fb777b fix: perf improvements 2024-12-18 15:01:57 +11:00
Mythie 2da051a7f9 v1.9.0-rc.4 2024-12-18 08:14:50 +11:00
Mythie 390a317bd3 fix: normalize pdf on the server 2024-12-18 08:14:14 +11:00
Catalin Pit c161553d1d feat: add disabled property for user (#1546) 2024-12-17 22:35:59 +11:00
Ephraim Duncan c960a48b4f fix: z-index of field settings (#1469) 2024-12-17 17:09:58 +11:00
Catalin Pit 9502f4361d fix: fieldtooltip blocking the field click (#1538)
## Before (error)


https://github.com/user-attachments/assets/525e6c04-fc03-41a7-8299-2a753e9e9fa6

## After (fixed)


https://github.com/user-attachments/assets/67f7e592-c5ca-47f4-962c-e4a848522d43
2024-12-17 17:04:20 +11:00
Catalin Pit 82deab41f4 fix: move permission check outside the document visibility component (#1543)
PR created because of this comment
https://github.com/documenso/documenso/pull/1521#discussion_r1881895305.
2024-12-17 17:03:08 +11:00
Catalin Pit 2245812f0b fix: document visibility logic (#1521)
Update the logic of document visibility logic and added some tests &
updated some existing ones.
2024-12-16 09:10:40 +02:00
Mythie 861e9c976b v1.9.0-rc.3 2024-12-16 09:35:33 +11:00
David Nguyen f55808199b feat: make enterprise billing dynamic (#1539) 2024-12-14 13:44:25 +09:00
David Nguyen b4a7f1887d feat: add trpc openapi (#1535) 2024-12-14 01:23:35 +09:00
Luca Hagel f73441ee85 chore: prevent user selection within signature pad (#1530)
adds a `select-none` class to the signature pad in order to
prevent iPadOS from becoming too trigger happy with the context menu and
auto corrects. Please ensure this doesn't break anything by accident.
2024-12-13 16:02:26 +11:00
Doug Andrade d7de3b08c1 fix: darkmode on radio button and checkbox labels (#1518)
Fixed Radio Button and Checkbox Appearance in Dark Mode
2024-12-13 15:55:40 +11:00
Ephraim Duncan 7d201f05d9 fix: admin leaderboard query (#1522)
Co-authored-by: Lucas Smith <me@lucasjamessmith.me>
2024-12-13 15:50:52 +11:00
Mythie a21ee2cea6 v1.9.0-rc.2 2024-12-13 15:16:26 +11:00
Ephraim Duncan 4ad46b81c9 fix: prevent hidden layers from being toggled in pdf viewers (#1528)
https://github.com/user-attachments/assets/e10194ca-212b-40ee-b9a1-85ef54829a40

---------

Co-authored-by: Mythie <me@lucasjamessmith.me>
2024-12-13 14:19:55 +11:00
Ephraim Duncan 10b8e785e0 fix: clear invalid drawn signature when switching to typed signature (#1536) 2024-12-13 10:40:22 +11:00
Lucas Smith 5fbed783fc feat: add controls for sending completion emails to document owners (#1534)
Adds a new `ownerDocumentCompleted` to the email settings that controls
whether a document will be sent to the owner upon completion.

This was previously the only email you couldn't disable and didn't
account for users integrating with just the API and Webhooks.

Also adds a flag to the public `sendDocument` endpoint which will adjust
this setting while sendint the document for users who aren't using
`emailSettings` on the `createDocument` endpoint.
2024-12-12 14:24:07 +11:00
Mythie c9fe134852 v1.9.0-rc.1 2024-12-12 10:31:44 +11:00
Mythie f2149719e3 fix: resolve issue with embed css injection 2024-12-12 10:14:23 +11:00
David Nguyen 161d40cde7 fix: secure passkey cookies (#1533) 2024-12-12 01:16:29 +09:00
David Nguyen 76028771b8 fix: add billing leeway (#1532) 2024-12-12 01:10:01 +09:00
David Nguyen 5df1a6602e fix: refactor search routes (#1529)
Refactor find endpoints to be consistent in terms of input and output.
2024-12-11 19:39:50 +09:00
Mythie 3d7b28a92b chore: update tailwind config 2024-12-11 13:52:34 +11:00
Mythie ed862413b1 v1.9.0-rc.0 2024-12-11 09:48:01 +11:00
Ephraim Duncan 9d02ab4a5e feat: open page api (#1419) 2024-12-10 21:19:05 +11:00
Catalin Pit 34c0868d77 chore: add openapi description for enterprise field (#1520) 2024-12-10 20:26:28 +11:00
David Nguyen fae9c0ca24 fix: refactor routers (#1523) 2024-12-10 16:11:20 +09:00
Ephraim Duncan dd162205fa fix: prevent accidental signatures (#1515)
![CleanShot 2024-12-06 at 03 30
39](https://github.com/user-attachments/assets/d47dc820-f19d-43b7-a60d-914fc9ab24b8)

![CleanShot 2024-12-06 at 03 32
34](https://github.com/user-attachments/assets/0db98735-8c91-469b-873c-adb19d0fff7b)
2024-12-08 14:17:58 +11:00
David Nguyen a88ae1cc1e chore: extract translations 2024-12-06 16:11:54 +09:00
David Nguyen 904948e2bc fix: refactor trpc errors (#1511) 2024-12-06 16:01:24 +09:00
David Nguyen 3b6b96f551 chore: remove redundant translations on upload (#1510)
## Description

Clean redundant translations by default.

This should stop the AI from doing strange things to commented out
translations.
2024-12-06 09:04:15 +11:00
Etrenak 67e49c82a3 feat: return fields in GET /documents/:id endpoint (#1317)
To be able to use the PATCH `/api/v1/documents/{id}/fields/{fieldId}`
endpoint, we need to know the fields ID of a particular document. The
issue #1178 suggested to create a new endpoint for this. To be
consistent with the `/templates` endpoint, I propose in this PR to
directly add the `fields` field to the `/documents/:id` endpoint.
2024-12-06 09:03:32 +11:00
David Nguyen 9f45fe62e4 fix: refactor teams router (#1500) 2024-12-05 22:14:47 +09:00
Timur Ercan 9e8094e34c Update README.md (#1509)
🚨 WE ARE LIVE ON PH WITH OUR LATEST LAUNCH 🚀
2024-12-05 13:51:49 +01:00
Mythie 0e7e9e17c9 v1.8.1 2024-12-05 13:57:05 +11:00
Mythie b3ccb3d26f v1.8.1-rc.9 2024-12-05 13:53:35 +11:00
Luca Hagel b17370c153 chore: reword some german translations to increase clarity (#1507) 2024-12-05 09:42:10 +11:00
Mythie 0c53f5b061 v1.8.1-rc.8 2024-12-04 23:29:15 +11:00
Catalin Pit ed6157de80 feat: upload signature as img (#1496)
Allow users to upload their signature as an image.

https://github.com/user-attachments/assets/375faad2-f0db-4f44-83d2-d969c5ab4442
2024-12-04 23:22:18 +11:00
Mythie 5e08d0cffb v1.8.1-rc.7 2024-12-04 22:43:41 +11:00
Catalin Pit 5565aff7a3 fix: docs content (#1495) 2024-12-04 19:49:44 +09:00
Catalin Pit 428acf4ac3 fix: dateformat api bug (#1506) 2024-12-04 19:48:44 +09:00
David Nguyen f4b1e5104e feat: add platform plan pricing (#1505)
Add platform plan to the billing page.
2024-12-04 15:42:03 +09:00
Mythie a687064a42 v1.8.1-rc.6 2024-12-04 14:58:29 +11:00
Mythie 8ec69388a5 fix: add document rejection webhook
Adds the document rejection webhook since it was missing.

Additionally, normalises and standardises the webhook body.
2024-12-04 14:35:20 +11:00
Mythie f3da11b3e7 fix: e2e tests failing due to same-site cookies 2024-12-04 14:33:21 +11:00
Mythie fc84ee8ec2 fix: use default nextauth logic for secure cookies 2024-12-03 21:35:09 +11:00
Mythie 4282a96ee7 v1.8.1-rc.5 2024-12-03 15:44:10 +11:00
Lucas Smith 2aae7435f8 fix: auth cookies across iframes (#1501) 2024-12-03 15:28:30 +11:00
Ephraim Duncan bdd33bd335 feat: signing volume (#1358)
adds a signing volume and leaderboard section to the admin panel
2024-12-03 11:27:22 +11:00
Mythie 9e8d0ac906 v1.8.1-rc.4 2024-12-02 22:07:31 +11:00
Mythie f27d0f342c fix: putPdfFile to always include file extension 2024-12-02 22:06:53 +11:00
Mythie 4326e27a2a v1.8.1-rc.3 2024-12-02 07:48:03 +11:00
Catalin Pit 62806298cf fix: wrong signing invitation message (#1497) 2024-12-02 07:47:11 +11:00
Mythie 87186e08b1 v1.8.1-rc.2 2024-11-29 15:09:03 +11:00
Mythie b27fd800ed fix: add distribution settings to external api 2024-11-29 14:10:48 +11:00
David Nguyen 98d85b086d feat: add initial api logging (#1494)
Improve API logging and error handling between client and server side.
2024-11-28 16:05:37 +07:00
Mythie 04293968c6 chore: update embedding docs 2024-11-28 15:55:17 +11:00
Catalin Pit e6d4005cd1 fix: document title truncation (#1467)
Truncates the document title across various instances where it previously hadn't been truncated.
2024-11-27 10:53:48 +11:00
Mythie 337bdb3553 v1.8.0-rc.1 2024-11-26 21:26:12 +11:00
Catalin Pit ab654a63d8 chore: enable typed signature by default (#1436)
Enable typed signature by default and also add the option to set a typed
signature in the profile page.
2024-11-26 21:03:44 +11:00
Mythie dcb7c2436f fix: update prettier and tailwind 2024-11-26 11:47:28 +11:00
Catalin Pit fa33f83696 feat: download doc without signing certificate (#1477)
## Description

I added the option of downloading a document without the signing
certificate for teams. They can disable/enable the option in the
preferences tab.

The signing certificate can still be downloaded separately from the
`logs` page.
2024-11-25 15:47:26 +11:00
Lucas Smith b15e1d6c47 feat: support whitelabelling in the embedding (#1491)
## Description

Adds support for customising the theme and CSS for the embedding
components which is restricted to platform customers and above.

Additionally adds proper support for the platform plan which will let us
update our stripe products.

<img width="1040" alt="image"
src="https://github.com/user-attachments/assets/f694cd1e-ac93-4dc0-9f78-92fa813f6404">
<img width="1015" alt="image"
src="https://github.com/user-attachments/assets/4209972a-b2bd-40c9-9049-0367382a4de5">
<img width="1065" alt="image"
src="https://github.com/user-attachments/assets/fdbaaaa5-a028-4b1d-a58a-ea6224e21abe">


## Related Issue

N/A

## Changes Made

- Added support for using CSS Vars and CSS within the embedding route
- Added a guard for platform and enterprise plans to activate the custom
css
- Added support for the platform plan

## Testing Performed
Yes
2024-11-25 15:47:00 +11:00
Ephraim Duncan cd5adce7df fix: hardcode delete confirmation text to avoid translation mismatch (#1487) 2024-11-22 14:22:31 +07:00
Mythie 11e483f1c4 chore: update changelog 2024-11-21 13:10:31 +11:00
Mythie 2e2bc8382f v1.8.1-rc.0 2024-11-20 23:02:32 +11:00
Lucas Smith 1f3a9b578b chore: add translations (#1485)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

## Release Notes

- **New Features**
- Enhanced German, Spanish, French, and Polish translations for various
document management and marketing phrases.

- **Improvements**
- Updated translations for clarity and accuracy across multiple
languages, including user notifications and document actions.
- Added new translation entries to improve user experience and
localization in the Documenso application.

- **Chores**
- Updated revision dates in translation files to reflect recent changes.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
2024-11-20 23:00:59 +11:00
Lucas Smith 83e7a3c222 fix: improve field sizing (#1486)
## Description

Allows for smaller field sizing in addition to improving our styling
when displaying labels on smaller fields.

This is the minimum currently supported field size until we perform a
more extensive refactor of our current drag and drop system.

## Related Issue

Reported via support channels

## Changes Made

- Updated our minimum size constraints
- Attempted to add a general autosizing component for text and failed
- Updated styling in a bunch of places to use the css `clamp()` method
for dynamic sizing.
2024-11-20 22:49:30 +11:00
Lucas Smith 9ef8b1f0c3 feat: automatically sign fields in large documents (#1484)
## Description

Adds a dialog that will display when a certain field threshold is
reached asking the user if they would like to sign non-critical fields
such as name, date, initials, and email with information that is already
available.

This has not been added to direct templates since we would often not
have all the pre-requisite knowledge since users are mostly anonymous.
Additionally, this has not been added to the embedding view since it may
detract from the experience for some.

Will not prompt the user if there is action authentication on the
document.

See the below demo:


https://github.com/user-attachments/assets/71739b5c-1323-4da9-89fd-a1145c9714d5

## Related Issue

#1281 (Older PR relating to the feature)

## Changes Made

- Added a new auto-sign dialog that will automatically trigger once
certain criteria is met.

## Testing Performed

- Tested that the dialog displays when the threshold is met
- Tested that the dialog is hidden when the threshold is not met
- Tested that the messaging during errors is correct
- Tested that the dialog does not display when 2FA or Passkeys are
required
2024-11-20 10:59:09 +11:00
Mythie 0eff336175 v1.8.0-rc.4 2024-11-19 16:44:25 +11:00
Ephraim Duncan 9bdd5c31cc fix: sort recipients for template with signing order (#1468) 2024-11-18 15:54:51 +07:00
Lucas Smith 57ad7c150b chore: add translations (#1474) 2024-11-18 08:40:25 +11:00
Mythie b0829e6cdf v1.8.0-rc.3 2024-11-16 09:23:05 +11:00
Lucas Smith 08a446fefd feat: support windows for 2fa tokens (#1478)
## Description

When using 2fa enabled authentication on direct templates we run into an
issue where a 2fa token has been attached to a field but it's submitted
at a later point.

To better facilitate this we have introduced the ability to have a
window of valid tokens.

This won't affect other signing methods since tokens are verified
immediately after they're entered.

## Related Issue

N/A

## Changes Made

- Updated our validate2FAToken method to use a window based approach
rather than the default verify method.

## Testing Performed

- Created a series of tokens and tested upon different intervals and
windows to confirm functionality works as expected.
2024-11-16 09:17:45 +11:00
David Nguyen f15f9ecdd1 chore: update docs 2024-11-15 21:47:22 +07:00
David Nguyen 979e3f3e71 fix: always allow access to billing (#1476) 2024-11-15 21:34:39 +07:00
Mythie 876803b5db fix: handle team invites being accepted but not added 2024-11-15 13:27:36 +11:00
Mythie 1c87cb1e0d v1.8.0-rc.2 2024-11-15 01:56:22 +11:00
Lucas Smith 5398026b80 feat: signature rejection (#1472)
## Description

Adds support for rejecting a given document informing the document
owner.

Flows for resolving a rejection don't currently exist so it's up to the
document owner to reach out to the recipient and work out a way to move
forward via a new document or offline agreement.

## Related Issue


## Changes Made

- Added new rejection properties to the recipient schema
- Added API endpoints to support rejection
- Added email templates for notifying the document owner and recipient
- Added a dialog on the signing page to start the rejection flow.

## Testing Performed

- Manually tested the flow end to end
- Automated tests are planned
2024-11-14 21:37:42 +11:00
David Nguyen f2439abbc9 chore: update docs 2024-11-12 23:12:13 +07:00
Lucas Smith 5a6e031c90 chore: add translations (#1463) 2024-11-12 15:50:22 +07:00
Ephraim Duncan bcc3b70335 fix: errors moving fields (#1429) 2024-11-12 15:49:31 +07:00
david-loe 5a26610a01 fix: update publish workfow to only tag stable versions latest (#1405)
## Description

This pull request introduces modifications to the GitHub Actions
workflow to ensure that the `latest` Docker tag is only pushed for
stable releases. It prevents the `latest` tag from being assigned to
release candidates (`-rc`), beta versions, or other pre-release tags.
This enhancement improves version management by keeping the `latest` tag
reserved exclusively for fully stable versions (e.g., `1.0.0`).

## Related Issue

Fixes #1404

## Changes Made

- Added a conditional check to verify if the release version follows the
format `X.Y.Z` (stable release format).
- Updated the Docker manifest creation steps to only push the `latest`
tag if the version is a stable full release.
- Modified both DockerHub and GitHub Container Registry push steps to
reflect the new versioning conditions.
2024-11-12 17:37:34 +11:00
Lucas Smith 5d7a979baf chore: add translations (#1461) 2024-11-12 13:00:56 +07:00
David Nguyen 552825b79e chore: extract translations 2024-11-12 12:37:34 +07:00
David Nguyen 786566bae4 fix: certificate translations (#1460)
## Description

Currently certificate translations on production sometimes does not show
the required language.

This could not be replicated when creating certificates on staging
(Browserless.io) and local development (Chromium), which means this fix
ultimately cannot be tested unless on live.

This is an attempt to fix it by isolating the certificate generation
into it's own context, and applying a cookie to define the required
language.

This fix is based on the assumption that there is some sort of error
which pushes the certificate to be generated on the client side, which
ultimately will render in English due to constraints on nextjs.

## Changes Made

- Apply language into cookie instead purely dynamically on SSR
- Minor unrelated fixes

## Testing Performed

Tested to ensure certificates could still be generated
2024-11-12 15:26:14 +11:00
Catalin Pit cb23357b42 fix: document url in the command menu search (#1453) 2024-11-12 00:12:15 +07:00
Timur Ercan 0078162159 chore: project babel (#1420)
blogpost babel
2024-11-08 16:42:25 +01:00
Mythie 19e23d8ef3 v1.8.0-rc.0 2024-11-08 23:09:56 +11:00
Lucas Smith e3b7ec82a3 chore: add translations (#1451) 2024-11-08 23:06:57 +11:00
Catalin Pit 23a0537648 feat: add global settings for teams (#1391)
## Description

This PR introduces global settings for teams. At the moment, it allows
team admins to configure the following:
* The default visibility of the documents uploaded to the team account
* Whether to include the document owner (sender) details when sending
emails to the recipients.

### Include Sender Details

If the Sender Details setting is enabled, the emails sent by the team
will include the sender's name:

> "Example User" on behalf of "Example Team" has invited you to sign
"document.pdf"

Otherwise, the email will say:

> "Example Team" has invited you to sign "document.pdf"

### Default Document Visibility

This new option allows users to set the default visibility for the
documents uploaded to the team account. It can have the following
values:
* Everyone
* Manager and above
* Admins only

If the default document visibility isn't set, the document will be set
to the role of the user who created the document:
* If a user with the "User" role creates a document, the document's
visibility is set to "Everyone".
* Manager role -> "Manager and above"
* Admin role -> "Admins only"

Otherwise, if there is a default document visibility value, it uses that
value.

#### Gotcha

To avoid issues, the `document owner` and the `recipient` can access the
document irrespective of their role. For example:
* If a team member with the role "Member" uploads a document and the
default document visibility is "Admins", only the document owner and
admins can access the document.
  * Similar to the other scenarios.

* If an admin uploads a document and the default document visibility is
"Admins", the recipient can access the document.

* The admins have access to all the documents.
* Managers have access to documents with the visibility set to
"Everyone" and "Manager and above"
* Members have access only to the documents with the visibility set to
"Everyone".

## Testing Performed

Tested it locally.
2024-11-08 22:50:49 +11:00
David Nguyen f6bcf921d5 feat: add document distribution setting (#1437)
Add a document distribution setting which will allow us to further
configure how recipients currently receive documents.
2024-11-08 13:32:13 +09:00
David Nguyen 451723a8ab chore: extract translations 2024-11-08 00:34:25 +09:00
David Nguyen 9b769e7e33 fix: email translations (#1454) 2024-11-08 00:33:48 +09:00
David Nguyen 61ea4971ad fix: custom team email subject (#1450)
Fixed issue where custom email subjects for teams were being ignored.
2024-11-06 22:16:31 +09:00
David Nguyen ffc61af904 chore: extract translations 2024-11-06 22:03:51 +09:00
David Nguyen efbe94aea8 feat: add signing link copy (#1449) 2024-11-06 21:34:06 +09:00
David Nguyen 1b10c55758 fix: update docker environment (#1438) 2024-11-06 19:21:52 +09:00
Mythie 3da4603a47 fix: content pages breaking during ssr on vercel 2024-11-06 21:02:35 +11:00
Jordan Labrosse dcc2ac8a71 feat(email): support configurable SMTP service (#1447) 2024-11-06 19:00:59 +09:00
David Nguyen 5158584955 fix: checkout loading button (#1445) 2024-11-05 20:10:10 +09:00
David Nguyen 54c0c6be14 fix: open page 2024-11-05 19:36:36 +09:00
Lucas Smith 927a24249c chore: add translations (#1444) 2024-11-05 18:53:33 +09:00
David Nguyen a50c758b07 chore: extract translations 2024-11-05 18:26:09 +09:00
David Nguyen cc249357b3 feat: add certificate translations (#1440)
Add translations for audit logs and certificates.
2024-11-05 18:25:23 +09:00
David Nguyen 011dabcc04 chore: extract translations 2024-11-05 17:37:05 +09:00
David Nguyen 4fa6dc1e21 feat: add template page (#1395)
Add a template page view to allow users to see more details about a
template at a glance.
2024-11-05 17:36:30 +09:00
Mythie 32b65c4d49 fix: blog posts breaking during ssr on vercel 2024-11-05 18:34:27 +11:00
Mythie de880aa821 v1.7.2-rc.4 2024-11-05 13:50:01 +11:00
Mythie dc5723c386 chore: add i18n lang to document deleted email 2024-11-05 13:44:00 +11:00
Lucas Smith c57d1dc55d chore: add translations (#1443)
Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
2024-11-05 13:07:55 +11:00
Lucas Smith 4dd95016b1 feat: i18n for emails (#1442)
## Description

Support setting a document language that will control the language used
for sending emails to recipients. Additional work has been done to
convert all emails to using our i18n implementation so we can later add
controls for sending other kinds of emails in a users target language.

## Related Issue

N/A

## Changes Made

- Added `<Trans>` and `msg` macros to emails
- Introduced a new `renderEmailWithI18N` utility in the lib package
- Updated all emails to use the `<Tailwind>` component at the top level
due to rendering constraints
- Updated the `i18n.server.tsx` file to not use a top level await

## Testing Performed

- Configured document language and verified emails were sent in the
expected language
- Created a document from a template and verified that the templates
language was transferred to the document
2024-11-05 11:52:54 +11:00
David Nguyen 04b1ce1aab fix: missing not found page for deleted documents (#1424) 2024-11-04 22:09:52 +09:00
David Nguyen 885349ad94 fix: missing signing order when using templates (#1425) 2024-11-03 20:17:41 +09:00
David Nguyen 28514ba2e7 fix: duplicate templates (#1434) 2024-11-01 21:29:38 +11:00
Lucas Smith 8aa6d8e602 chore: add translations (#1433) 2024-11-01 13:22:51 +09:00
David Nguyen 378e515843 chore: extract translations 2024-11-01 12:56:07 +09:00
David Nguyen f42e600e3f chore: update workflow 2024-11-01 12:37:54 +09:00
David Nguyen 88eaec91c9 chore: extract translations 2024-11-01 11:27:09 +09:00
David Nguyen f199183c78 feat: improve translation coverage (#1427)
Improves translation coverage across the app.
2024-11-01 10:57:32 +11:00
Mythie 0cee07aed3 v1.7.2-rc.3 2024-10-31 15:33:03 +11:00
Mythie f76f87ff1c fix: use key for expansion on embeds 2024-10-31 15:31:40 +11:00
Mythie 6020336792 v1.7.2-rc.2 2024-10-30 14:37:50 +11:00
Mythie 634b30aa54 fix: signature flickering during embed 2024-10-30 14:36:35 +11:00
David Nguyen 7fc497a642 fix: translation upload token (#1423) 2024-10-29 19:55:49 +09:00
Andre G e30ceeb038 style: update common.po (#1402)
Update translations
2024-10-28 11:26:12 +09:00
Andre G 872762661a style: Update web.po (#1403)
Update translations
2024-10-28 11:23:08 +09:00
David Nguyen 5fcd8610c9 fix: translate extract command (#1394)
Change how the translate extract command is run on build
2024-10-28 11:21:49 +09:00
Mythie b8310237e4 v1.7.2-rc.1 2024-10-23 13:28:54 +11:00
Ephraim Duncan 4a6238dc52 chore: show signing order when creating a document from template (#1410)
### Templates without signing order
![CleanShot 2024-10-18 at 01 27
24@2x](https://github.com/user-attachments/assets/222181e4-25a8-409b-aa8b-8452ddd32f6b)


### Template with signing order
![CleanShot 2024-10-18 at 01 26
12@2x](https://github.com/user-attachments/assets/bcee6213-20b5-44d8-90ed-881825f49756)
2024-10-23 10:20:27 +11:00
Ephraim Duncan 6fa5f63b69 fix: trigger webhook when a direct link signer signs a document (#1409) 2024-10-23 09:50:23 +11:00
Lucas Smith c7564ba8f7 chore: enable spanish (#1417)
Enables the spanish translation of the application:


![image](https://github.com/user-attachments/assets/eacf4800-272e-4458-abcc-4d6c6f3071cf)
2024-10-23 09:01:14 +11:00
Lucas Smith eafd7c551b feat: add team user management endpoints to api (#1416)
## Description

Adds user management capabilities to our current API. Allows for adding,
removing, listing and updating members of a given team using a valid API
token.

## Related Issue

N/A

## Changes Made

- Added an endpoint for inviting a team member
- Added an endpoint for removing a team member
- Added an endpoint for updating a team member
- Added an endpoint for listing team members

## Testing Performed

Tests were written for this feature request
2024-10-22 22:53:31 +11:00
Lucas Smith 514edf01d3 chore: add translations (#1406) 2024-10-22 14:02:51 +11:00
Ephraim Duncan 1a73c68d07 fix: close direct link dialog when you click on save (#1412) 2024-10-21 15:33:21 +11:00
Catalin Pit 1a9dcadba5 feat: add typed signature (#1357)
Add the ability to insert typed signatures.

Once the signature field is placed on the document, a checkbox appears
in the document editor where the document owner can allow signers to add
typed signatures. Typed signatures are disabled by default.

![CleanShot 2024-09-30 at 14 57
54](https://github.com/user-attachments/assets/c388abb5-bcb1-49d0-aad8-9148c3020420)
2024-10-18 14:25:19 +11:00
Ephraim Duncan e0c948c2ac feat: add custom font sizes to fields (#1376)
Adds custom font sizes to fields

https://github.com/user-attachments/assets/1473a4d7-8dc6-4ead-acf5-dd78be7782a0
2024-10-16 16:05:41 +11:00
Catalin Pit 0bd2760792 feat: start the work on the API reference (#1392)
`later`

## Description

<!--- Describe the changes introduced by this pull request. -->
<!--- Explain what problem it solves or what feature/fix it adds. -->

## Related Issue

<!--- If this pull request is related to a specific issue, reference it
here using #issue_number. -->
<!--- For example, "Fixes #123" or "Addresses #456". -->

## Changes Made

<!--- Provide a summary of the changes made in this pull request. -->
<!--- Include any relevant technical details or architecture changes.
-->

- Change 1
- Change 2
- ...

## Testing Performed

<!--- Describe the testing that you have performed to validate these
changes. -->
<!--- Include information about test cases, testing environments, and
results. -->

- Tested feature X in scenario Y.
- Ran unit tests for component Z.
- Tested on browsers A, B, and C.
- ...

## Checklist

<!--- Please check the boxes that apply to this pull request. -->
<!--- You can add or remove items as needed. -->

- [ ] I have tested these changes locally and they work as expected.
- [ ] I have added/updated tests that prove the effectiveness of these
changes.
- [ ] I have updated the documentation to reflect these changes, if
applicable.
- [ ] I have followed the project's coding style guidelines.
- [ ] I have addressed the code review feedback from the previous
submission, if applicable.

## Additional Notes

<!--- Provide any additional context or notes for the reviewers. -->
<!--- This might include details about design decisions, potential
concerns, or anything else relevant. -->


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **New Features**
	- Introduced comprehensive documentation for the Documenso public API.
	- Added detailed guides for the following API endpoints:
		- Uploading documents
		- Generating documents from templates
		- Adding fields to documents
- Included example payloads and response structures for better
understanding.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-10-15 14:05:39 +03:00
Timur Ercan abc559d923 chore: cal.com customer story article (#1396)
We got cal.com 🚀

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **New Features**
- Introduced a new blog post detailing Cal.com's use of Documenso for
enhancing DPA and BAA processes.
- The blog outlines the challenges and solutions related to compliance
document management.
- Features images and captions to illustrate key points and improve
engagement.

- **Documentation**
- Added insights into Cal.com's journey as an open-source scheduling
solution and their commitment to transparency.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-10-11 16:01:57 +02:00
David Nguyen 9ffdbe9c81 fix: improve lingui configuration (#1388)
## Description

Currently merge conflicts arise due to the compiled JS and PO
translation files.

This PR is a rework on how we handle extracting and compiling
translations to streamline PRs and merging branches.

## Changes Made

- Remove compiled translation files from being committed
- Extract and compile translations only on build
- Extract will still occur when commits land on main to sync and pull
new translations with Crowdin
2024-10-09 14:13:52 +11:00
Ephraim Duncan 2c1a18bafc fix: stacked avatar colors (#1361) 2024-10-09 12:25:56 +11:00
Mythie a2db5e9642 chore: update changelog 2024-10-09 12:23:38 +11:00
Lucas Smith 4ec9dc78c1 chore: add translations (#1359) 2024-10-09 10:55:21 +11:00
Mythie faf2bd5384 v1.7.2-rc.0 2024-10-08 21:56:44 +11:00
Catalin Pit d40ed94b74 feat: highlight problematic fields (#1330) 2024-10-08 21:55:20 +11:00
Ephraim Duncan cd3d9b701b fix: external id null for documents created from templates (#1362) 2024-10-08 21:45:16 +11:00
Catalin Pit e40f47a73c feat: search documents by name or recipient name or recipient email (#1384) 2024-10-08 21:44:02 +11:00
David Nguyen 64ea4a6f9f chore: add translation contribution docs (#1379) 2024-10-08 14:05:55 +11:00
Catalin Pit 18115e95d7 feat: add recipient email in activity log (#1386) 2024-10-08 14:05:12 +11:00
Catalin Pit e736261056 fix: show the full count of documents (#1382)
![doc-count](https://github.com/user-attachments/assets/aad4fe92-e2d8-4b78-ac93-5f6ada73b03a)

A client requested it, and it makes sense showing the full count.

This is how it was before.

![CleanShot 2024-10-04 at 08 47
16@2x](https://github.com/user-attachments/assets/bd4c97a5-1805-4faa-bae7-feeb932ed614)


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **New Features**
- Updated document status tab counts to display actual numbers without
capping at 99 or using '+' symbols.

- **Bug Fixes**
- Improved clarity and accuracy of document status counts in the user
interface.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-10-04 16:07:20 +10:00
Ephraim Duncan 2e57da7549 chore: open page data update (#1380) 2024-10-04 13:14:54 +10:00
Timur Ercan 574454db0a chore: Go Fork Yourself blog article (#1375)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **New Features**
- Introduced a new blog post titled "Go Fork Yourself," discussing the
philosophy of open-source software and the significance of forking
within the OSS community, along with real-world examples and an
invitation for reader engagement.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-10-03 14:25:32 +02:00
Ephraim Duncan f05b670d93 fix: carousel slide change handling and video reset (#1364) 2024-10-03 10:52:43 +10:00
Ephraim Duncan 318149fbf3 chore: field fonts (#1350)
Before
![CleanShot 2024-09-16 at 12 25
44](https://github.com/user-attachments/assets/9ca7672d-b132-4c24-80b0-03fa13822e50)


After
![CleanShot 2024-09-16 at 12 24
07](https://github.com/user-attachments/assets/9e17b025-8064-4151-a9e2-817108b8da2a)


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **New Features**
- Introduced a new font style for signature fields, enhancing visual
distinction.
	- Increased text size for signature fields to improve prominence.

- **Bug Fixes**
- Adjusted the text size for signature display on larger screens for
better visual hierarchy.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-10-02 17:45:16 +10:00
Catalin Pit 5f19dcf25c fix: dateformat bug (#1372)
## Description

It used the wrong property for finding the document's dateFormat in the
`DATE_FORMATS` array.


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **New Features**
- Improved date format selection in the settings form to ensure accurate
formatting based on value.
- Default timezone now automatically set to the user's local timezone
for better user experience.

- **Bug Fixes**
- Corrected initialization of the timezone field to enhance form
accuracy.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-10-02 17:42:15 +10:00
Timur Ercan c99cf4b848 chore: prisma customer story on blog (#1366)
prisma customer story on blog

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **New Features**
- Introduced a customer story blog post detailing why Prisma chose
Documenso for their signing needs, highlighting four key reasons.
- Added author information and metadata for enhanced content engagement.
- Included links to additional resources and social media for reader
interaction.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-09-27 18:35:50 +02:00
David Nguyen 18ec40f6af fix: set lang cookie expiry (#1365)
## Description

Currently the language cookie is set to session, so restarting browser
will reset it.

This sets the expiry for two years.


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **New Features**
- Enhanced language preference functionality with extended cookie
lifespan for improved user experience.
  
- **Bug Fixes**
	- Resolved issues related to cookie expiration for language settings.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-09-25 13:10:24 +10:00
David Nguyen ddee8a8272 feat: allow editing pending documents (#1346)
## Description

Adds the ability for the document owner to edit recipients and their
fields after the document has been sent.

A recipient can only be updated or deleted if:
- The recipient has not inserted any fields
- Has not completed the document

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

## Release Notes

- **New Features**
- Added new localization messages to clarify user actions regarding
document signing.
  - Enhanced French translations for improved user interaction.

- **Improvements**
- Updated localization strings in German and English for clearer
feedback on signer and recipient statuses.
- Improved overall structure of localization files for better
maintainability.

- **Dependency Updates**
- Upgraded `next-axiom` and `remeda` libraries to their latest versions,
potentially enhancing performance and stability.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Mythie <me@lucasjamessmith.me>
2024-09-20 13:58:21 +10:00
David Nguyen efb2bc94ab feat: add french (#1355)
## Description

Add initial French translations

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **New Features**
- Added support for the French language, enhancing accessibility for
French-speaking users.
- Introduced localized French messages for various application
functionalities, improving user experience.
  
- **Bug Fixes**
- Minor formatting updates in French translation files to remove
extraneous newline characters.

- **Chores**
- Updated line references in French translation files to maintain
alignment with code changes.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Lucas Smith <me@lucasjamessmith.me>
Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
Co-authored-by: github-actions <github-actions@documenso.com>
2024-09-19 19:37:17 +10:00
Lucas Smith 97ee69e7a0 chore: add translations (#1354)
Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
Co-authored-by: github-actions <github-actions@documenso.com>
2024-09-19 16:17:16 +10:00
Mythie 3da344fc5f v1.7.1-rc.3 2024-09-19 13:55:35 +10:00
Mythie 404ca3202f chore: update action auth 2024-09-19 13:45:39 +10:00
David Nguyen c043fa9c06 fix: add check for invalid locales (#1353)
## Description

Currently invalid or missing `accept-language` headers will cause issues
rendering Plural components since we do not validate them.

This adds a check to try filter out invalid locales.

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **New Features**
- Enhanced locale filtering process to ensure only valid locales are
processed.
  
- **Bug Fixes**
- Improved data integrity by preventing invalid locales from affecting
application functionality.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-09-19 09:58:59 +10:00
Mythie 9852e8971f v1.7.1-rc.2 2024-09-18 11:05:19 +10:00
Mythie 5091112e4b fix: dont nullify externalId if not passed to update document settings 2024-09-18 11:00:48 +10:00
Ephraim Duncan e76f732990 fix: completed signing page layout (#1349) 2024-09-18 10:54:00 +10:00
Ephraim Duncan b7c3deb6cd chore: smaller text in signature pad (#1351) 2024-09-18 10:44:12 +10:00
Lucas Smith 08114f7b97 chore: add translations (#1327) 2024-09-18 10:43:43 +10:00
Catalin Pit 6e368cc333 chore: add document visibility section (#1352) 2024-09-18 02:41:57 +10:00
Mythie 4ce4ca3f34 v1.7.1-rc.1 2024-09-17 15:26:38 +10:00
Lucas Smith 7644c0d855 feat: support smaller field bounds (#1344)
Currently this won't always display super well since
our insertion solution isn't amazing but our current
minimum bounds within the UI are a bit large and can be
smaller.

This change makes it smaller and uses container queries to
support dynamically displaying labels based on the container
size.
2024-09-17 00:29:42 +10:00
Catalin Pit fa6453e811 feat: document visibility (#1262)
Adds the ability to set a visibility scope for documents within teams.
2024-09-17 00:14:16 +10:00
Ajeet Pratap Singh f7a20113e5 fix: fix passkeys page-breaking error (#1348) 2024-09-16 22:57:31 +10:00
Ephraim Duncan 3d644db286 feat: signing order (#1290)
Adds the ability to specify an optional signing order for documents.
When specified a document will be considered sequential with recipients
only being allowed to sign in the order that they were specified in.
2024-09-16 22:36:45 +10:00
David Nguyen 357bdd374f feat: add language switcher (#1337)
## Description

Web changes:

- Enabled i18n for web
- Add option to change language in command menu
- Add option to change language in menu-switcher

Web and marketing changes:

- Stop setting 'en' preference into cookie if the user's language is not
supported
- Dropped middleware changes
- Rotated cookie from 'i18n' to 'language'

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **New Features**
- Introduced a language switcher in the footer for improved language
selection.
	- Added dynamic language change functionality in the command menu.
- Implemented a dropdown menu item for quick access to the language
switcher.

- **Bug Fixes**
- Resolved issues related to language change notifications and state
management.

- **Translations**
- Added new translation entries for improved language support, including
"Search languages..." in English and German.
	- Updated existing translations to enhance clarity and accuracy.

- **Chores**
	- Simplified internationalization handling in middleware.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: github-actions <github-actions@documenso.com>
2024-09-11 13:22:43 +10:00
Mythie 7b06b68572 v1.7.1-rc.0 2024-09-10 23:15:02 +10:00
Catalin Pit 9ee89346b1 fix: template with empty advanced fields backend (#1340)
extension of https://github.com/documenso/documenso/pull/1339
2024-09-10 21:35:35 +10:00
Catalin Pit 77da7847d9 fix: template with empty advanced fields (#1339)
Templates can be created and sent with advanced fields that have empty
values. That will cause an error when the user tries to sign the
document.

For example, you can create a template with a checkbox field and save
it. Then, you can click the "Use template" button and send the document
by clicking "Send document." However, this shouldn't be possible if the
advanced field doesn't have any values.
2024-09-10 16:23:16 +10:00
Lucas Smith c36306d2c9 feat: add authOptions to the API (#1338)
Add the authOptions property to the document and
recipient related API endpoints.

These were previously missing so the only way API
users could set the authOptions was via templates
and using the generateTemplate endpoint.
2024-09-10 15:07:40 +10:00
Etrenak f6f893fbf7 fix: prefill advanced field settings in templates (#1332)
## Description

Seems like I was overconfident in #1323 and I did not test properly.
Currently, the advanced settings for a field in a **template** is not
pre-filled with the current fieldMeta, although it is correctly
pre-filled in a **draft document** (That's probably where I messed up my
testing).

In this PR, I propose to directly use the fieldMeta provided by the
field prop in `FieldAdvancedSettings`, instead of multiplying tRPCs to
request the fieldMeta while we already have it.

I apologize for the wasted time in reviewing my previous PR which was
only correcting the display of the field label in the template view.

## Testing Performed

- This time, I correctly checked that the advanced settings for a field
is correctly pre-filled both in a document draft and in a template.
- `npm run build` builds correctly.
2024-09-10 13:22:03 +10:00
Catalin Pit e1b2206d28 fix: select field ux (#1334)
When the Select field has a default value, it automatically signs with
it. If you change it, you need to refresh the page to re-sign again with
that value. This PR improves the UX by making the default value
"selectable" in the dropdown menu.

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit


- **New Features**
- Updated the `DropdownField` component to simplify the handling of
default values, ensuring the dropdown starts without a pre-selected
option.
- Improved the clarity of the placeholder text in the dropdown,
enhancing user experience.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-09-10 13:15:47 +10:00
Catalin Pit ad135b72d8 feat: marketing cta (#1335)
---
name: Pull Request
about: Submit changes to the project for review and inclusion
---

## Description

<!--- Describe the changes introduced by this pull request. -->
<!--- Explain what problem it solves or what feature/fix it adds. -->

## Related Issue

<!--- If this pull request is related to a specific issue, reference it
here using #issue_number. -->
<!--- For example, "Fixes #123" or "Addresses #456". -->

## Changes Made

<!--- Provide a summary of the changes made in this pull request. -->
<!--- Include any relevant technical details or architecture changes.
-->

- Change 1
- Change 2
- ...

## Testing Performed

<!--- Describe the testing that you have performed to validate these
changes. -->
<!--- Include information about test cases, testing environments, and
results. -->

- Tested feature X in scenario Y.
- Ran unit tests for component Z.
- Tested on browsers A, B, and C.
- ...

## Checklist

<!--- Please check the boxes that apply to this pull request. -->
<!--- You can add or remove items as needed. -->

- [ ] I have tested these changes locally and they work as expected.
- [ ] I have added/updated tests that prove the effectiveness of these
changes.
- [ ] I have updated the documentation to reflect these changes, if
applicable.
- [ ] I have followed the project's coding style guidelines.
- [ ] I have addressed the code review feedback from the previous
submission, if applicable.

## Additional Notes

<!--- Provide any additional context or notes for the reviewers. -->
<!--- This might include details about design decisions, potential
concerns, or anything else relevant. -->


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **New Features**
- Introduced a new `CallToAction` component to enhance user engagement
in the self-hosting documentation.
- Added interactive call-to-action elements in the self-hosting
documentation pages to guide users towards specific actions.

- **Documentation**
- Updated self-hosting documentation to include the new call-to-action
feature, improving usability and interactivity.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-09-10 12:42:12 +10:00
David Nguyen e81023f8d4 fix: refactor dates (#1321)
## Description

Refactor the current date formatting system to utilize Lingui.

## Changes Made

- Remove redundant `LocaleData` component with Lingui dates

## Important notes

For the internal pages for certificates, default to en-US to format any
dates.

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit


- **New Features**
- Enhanced internationalization support across various components by
utilizing the `i18n` object for date formatting.
- Streamlined locale management by removing cookie-based language
handling and adopting a more centralized approach.

- **Bug Fixes**
- Improved date formatting consistency by replacing the `LocaleDate`
component with direct calls to `i18n.date()` in multiple components.

- **Documentation**
- Updated localization strings in the `web.po` files to reflect recent
changes in the source code structure.

- **Chores**
- Minor formatting adjustments and code organization improvements across
various files to enhance readability and maintainability.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: github-actions <github-actions@documenso.com>
2024-09-10 12:38:08 +10:00
Mythie bfb09e7928 v1.7.0 2024-09-09 11:20:33 +10:00
Mythie d7e5aa1d26 v1.7.0-rc.5 2024-09-09 08:47:26 +10:00
Lucas Smith 8cb3ad4f3c chore: embedding blog post (#1329) 2024-09-06 22:11:55 +10:00
david-loe 6c3acb1c2d feat: add and use NEXT_PRIVATE_INTERNAL_WEBAPP_URL (#1298)
Introduces `NEXT_PRIVATE_INTERNAL_WEBAPP_URL` used for requesting the
app by itself (backend) [e.g. for background jobs]
2024-09-06 20:37:10 +10:00
Catalin Pit 3f82720383 feat: allow recipient to select signature color (#1325)
Allow users to select a colour for the signature. The allowed colours
are black, white, red, blue, and green.
2024-09-06 15:23:34 +10:00
Imran Khan a6f93698b4 fix: changed the default file path for local certs (#1277)
Changed the default value of NEXT_PRIVATE_SIGNING_LOCAL_FILE_PATH env
variable
2024-09-06 14:09:25 +10:00
David Nguyen bdc4ec1a31 chore: compile translations 2024-09-06 13:30:45 +10:00
Lucas Smith bc471fcd9f chore: add translations (#1308)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit


- **Chores**
- Updated the metadata revision dates in multiple German translation
files for consistency.
- Added extraneous blank lines in multiple translation files for cleaner
formatting.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
2024-09-06 12:54:18 +10:00
Kaiwalya Koparkar f4e98ae03a feat: Added Elestio as one-click deploy option (#1302)
This PR introduces new one-click deployment option Elestio
2024-09-05 15:30:46 +10:00
David Nguyen 0298e79e8c chore: add docs for translations (#1310)
Add developer documentation for translations.
2024-09-05 15:28:47 +10:00
Etrenak 8ab7464b84 fix: broken endpoint to update a field in a document (#1319)
Fixes #1318 and allows to submit a partial `fieldMeta` when updating a
field instead of replacing the current `fieldMeta`, to be consistent
with other endpoints.
2024-09-05 14:14:02 +10:00
Etrenak ad4cff937d fix: show the existing field meta when editing a template fields (#1323)
Fixes #1259. I literally just used the exact same line of code than from
the document page so it is consistent.

The bug is extremely frustrating because if you make change to the
fields meta on the template and refresh the page, you can't see field
meta (label, default value, required), and neither do your co-workers.

Of course, I tested the change and it now displays correctly the
existing field meta on the template page.
2024-09-05 14:10:17 +10:00
Mythie 921617b905 v1.7.0-rc.4 2024-09-05 10:46:23 +10:00
Lucas Smith a1a8a174bf feat: embed signing experience (#1322) 2024-09-04 23:13:00 +10:00
Mythie 3657050b02 fix: translation related crashes on marketing 2024-09-04 20:28:43 +10:00
Ajeet Pratap Singh 210081c520 fix: a grammer error (#1316)
## Description

<!--- Describe the changes introduced by this pull request. -->
In this PR, I've fixed a small grammar error.

## Related Issue

Fixes: #1315 

## Changes Made

It replaces `"wont"` with `"won't"` and `"Only your signing experience
is"` with `"Only your signing experience will be"`

## Checklist

- [x] I have tested these changes locally and they work as expected.
- [x] I have added/updated tests that prove the effectiveness of these
changes.
- [x] I have updated the documentation to reflect these changes, if
applicable.
- [x] I have followed the project's coding style guidelines.
- [x] I have addressed the code review feedback from the previous
submission, if applicable.


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit


- **Bug Fixes**
- Updated text in the Document Share Button for enhanced clarity and
grammatical accuracy.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: ajeet <109718740+ajeetcode@users.noreply.github.com>
2024-09-03 13:16:14 +03:00
Lucas Smith fd7c1fea1c chore: upgrade next (#1300) 2024-09-03 09:48:54 +10:00
Mythie 5f4972d63b v1.7.0-rc.3 2024-09-03 09:27:51 +10:00
Catalin Pit 4c13176c52 feat: update createFields api endpoint (#1311)
Allow users to add 1 or more fields to a document via the /document/<id>/fields API Endpoint.
2024-09-02 21:16:48 +10:00
Mythie d599ab0630 v1.7.0-rc.2 2024-08-29 11:01:21 +10:00
Ephraim Duncan 9e714d607e feat: disable 2fa with backup codes (#1314)
Allow disabling two-factor authentication (2FA) by using either their
authenticator app (TOTP) or a backup code.
2024-08-29 11:00:57 +10:00
Mythie 81479b5b55 v1.7.0-rc.1 2024-08-28 18:00:43 +10:00
Catalin Pit 15efc6c36d fix: broken pages by translation tags (#1312) 2024-08-28 17:58:56 +10:00
Mythie 9638dfbf37 v1.7.0-rc.0 2024-08-28 14:31:30 +10:00
Lucas Smith dfa89ffe44 fix: make invite and confirmations long lived (#1309)
Previously we would delete all invites and confirmation tokens upon
completing the action that they represent.

This change instead adds a flag on each token indicating whether it has
been completed so we can action a
completed token differently in the UI to reduce confusion for users.

This had been brought up a number of times where confirmation emails,
team member invites and other items
may have been actioned and forgotten about causing an error toast/page
upon subsequent revisit.
2024-08-28 14:08:35 +10:00
Lucas Smith 7943ed5353 chore: add translations (#1306) 2024-08-28 09:44:19 +10:00
David Nguyen cb50274450 fix: typo 2024-08-27 23:22:27 +09:00
Lucas Smith 04b92eac1d chore: add translations (#1305) 2024-08-27 23:37:05 +10:00
David Nguyen 38a4b0f299 fix: dialog close on refresh (#1135)
Previously dialogs would be closed upon refocusing the browser tab due to router refetches occuring which would cause data-table columns to re-render. This is now resolved by extracting the column definitions outside of the returning render and into a memo hook.
2024-08-27 23:13:52 +10:00
David Nguyen 75c8772a02 feat: web i18n (#1286) 2024-08-27 20:34:39 +09:00
Catalin Pit 0829311214 feat: prefill fields via api (#1261)
## Description

Configure the advanced field via API.

## Checklist

<!--- Please check the boxes that apply to this pull request. -->
<!--- You can add or remove items as needed. -->

- [x] I have tested these changes locally and they work as expected.
- [ ] I have added/updated tests that prove the effectiveness of these
changes.
- [x] I have updated the documentation to reflect these changes, if
applicable.
- [x] I have followed the project's coding style guidelines.
- [ ] I have addressed the code review feedback from the previous
submission, if applicable.


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **New Features**
- Enhanced API functionality to support field metadata during field
creation.
- Introduced validation checks for field metadata to ensure necessary
information is provided for advanced field types.

- **Bug Fixes**
- Improved error handling during field creation to return properly
formatted error responses.

- **Documentation**
- Updated API schemas to include field metadata, enhancing data
validation and response structures.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-08-26 12:37:56 +03:00
Yigit Kerem Oktay 9223527b6f docs: fix documentation regarding the webhook secret header (#1278) 2024-08-21 14:03:21 +10:00
TKB Studios 66fdc1d659 chore: update readme for manual self-hosting (#1270) 2024-08-21 11:08:04 +10:00
Lucas Smith 27066e2022 chore: add translations (#1295) 2024-08-21 11:06:26 +10:00
Mythie 9178dbd3c1 chore: update marketing site 2024-08-20 23:23:36 +10:00
Ephraim Duncan 2c9136498c feat: update team email templates. (#1229)
Updates the email templates to include team information when sent
from a team context.
2024-08-20 15:41:19 +10:00
Rene Steen 7a1341eb74 feat: automatically set public profile url for OIDC users (#1225)
Adds a hook to automatically set profile urls for OIDC users
2024-08-20 13:58:56 +10:00
Ephraim Duncan 06c0a50401 feat: copy and paste fields (#1193)
Adds keyboard shortcuts for copying and pasting fields, additionally adds the ability
to duplicate a field via the UI.
2024-08-20 13:32:53 +10:00
Catalin Pit 025e73e640 feat: advanced fields article (#1276) 2024-08-19 19:18:54 +10:00
Mythie 73800d1503 fix: don't send too much data to background job provider 2024-08-15 13:57:54 +10:00
Mythie 063ed966df fix: support custom inngest app ids 2024-08-14 16:26:58 +10:00
Mythie f568025a0b fix: support inngest vercel integration 2024-08-14 13:49:47 +10:00
Lucas Smith ab8701526c fix: move sealing to a background job (#1287)
When signing a document the final signer is often
greeted with a super long completing spinner since
we are synchronously signing the document and sending
emails to all recipients. This is frustrating and
has caused issues for customers and self-hosters.

Moving sealing to a background job resolves this
and improves the overall snappiness of the app while
also supporting retrying the sealing if it were to
fail in the future.

This has the implication of a document no longer
immediately being in a "completed" state once all
signers have signed. To assist with this we now
refetch the page every 5 seconds upon signing
completion until the document status as shifted to
completed.
2024-08-14 13:12:32 +10:00
Mythie 20ec2dde3d chore: update changelog 2024-08-13 11:49:12 +10:00
Mythie 3b8914da83 v1.6.1-rc.1 2024-08-13 09:57:50 +10:00
Catalin Pit 29910ab2a7 feat: add initials field type (#1279)
Adds a new field type that enables document recipients to add
their `initials` on the document.
2024-08-12 23:29:32 +10:00
Mythie ef3ecc33f1 v1.6.1-rc.0 2024-08-09 15:49:41 +10:00
Catalin Pit 0244f021ab fix: download audit log certificate (#1268)
Previously, it wasn't possible to download an audit log of a document
uploaded by another user because the function used the ID of the user
making the request to retrieve the document. However, the document
uploaded by another user has that user's ID, not the ID of the user
making the request.
2024-08-09 12:19:48 +10:00
Lucas Smith e5f73452b3 fix: support dynamic external ids for direct templates (#1274)
Adds support for an `externalId` query param to be passed when linking a
user to a direct template. This external id will then be stored on the
document upon signing completion.
2024-08-09 11:06:17 +10:00
Catalin Pit c605877924 fix: radio and checkbox fields issues with empty values (#1273)
Since we allow checkboxes and radio fields without a label (which we use for the value) we 
had an issue where multiple checkboxes with no value would exist and items would not end
up checked on the resulting document.

This change fixes that by adding a placeholder value for these empty checkboxes and labels.
2024-08-09 10:46:07 +10:00
Ephraim Duncan e0065a8731 fix: show signup option only to users without existing accounts (#1221)
Changes the signup CTA to only display if the recipient doesn't already have an account.
2024-08-08 10:47:00 +10:00
Jacob Flaherty f74265850b chore: Update .env.example commenting (#1257)
Adds documentation on how to setup Google for OAuth when self hosting Documenso.
2024-08-08 09:58:27 +10:00
Catalin Pit 909c38f47e fix: fields name/label on dark mode (#1242)
Updates the dark mode styling for field editing to improve readability.
2024-07-31 23:07:39 +10:00
emmpaz 1beb434a72 fix: limits syncing issue (#1195)
Exposes `refreshLimits()` to be able to keep the limit in sync when
deleting/creating a document.
2024-07-31 22:57:27 +10:00
Rene Steen 5582f29bda feat: make oidc sign in button text configurable (#1209)
Adds a configurable label for the OIDC connection's button.
2024-07-31 22:22:52 +10:00
Rene Steen 7ed0a909eb feat: allow oidc only signup and trust mail addresses (#1208)
This change will allow for user registration when users are federated
through oidc provider even if the general signup is disabled
additionally the users email address can now be automatically set as
trusted. This will force corporate users to signin using SSO instead of
creating manual accounts.
2024-07-31 15:38:12 +10:00
aeris a9025b5d97 fix: use native URL parser instead of wrong regex (#1206)
Updates the current regex based approach for validating redirect urls to 
instead use the native URL constructor which is available in browsers and 
Node.js and handles several valid cases that were previously not working.
2024-07-31 15:26:05 +10:00
Timur Ercan 0c744a1123 chore: last touches (#1263)
fair use policy and support page

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **New Features**
- Added a "Support" documentation page outlining various support options
for users, including Community, Paid Account, and Enterprise support.
- Introduced a "Fair Use Policy" documentation page, providing
guidelines and reassurance regarding usage of the service.
- Enhanced the account creation documentation with additional
information about the Fair Use Policy.

- **Improvements**
- Updated the documentation structure with new sections for easier
navigation, including "Support" and "Fair Use Policy."

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-07-30 18:21:58 +02:00
Ephraim Duncan 0f86eed6ac fix: add new environmental variables for render deployment (#1174)
Updates the `render.yaml` configuration file by adding new environment
variables
2024-07-30 16:14:31 +10:00
Catalin Pit 4b485268ca fix: dateformat api bug (#1238)
Fixes support for date formats when using the API
2024-07-30 16:13:22 +10:00
rhit-daviscl f31caaab08 fix: truncation of titles to fix UI breaks (#1162)
Updates various areas of the application to handle longer titles and content
more gracefully.
2024-07-29 13:13:35 +10:00
Roni Äikäs 71a8a3eaa6 chore: rename "none" document access to "no restrictions" (#1138)
## Description

Renames the "None" document access option to "No restrictions".
2024-07-29 12:40:36 +10:00
Timur Ercan 0ff3844f18 chore: translation typo (#1255)
chore: translation typo


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **New Features**
- Enhanced the `Header` component for improved internationalization by
enabling translation of the "Documentation" text.
  
- **Documentation**
- Added comments in translation files to link translation entries to the
`Header` component, improving maintainability and traceability for
future updates.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-07-26 17:47:13 +02:00
Lucas Smith 3421515452 chore: add translations (#1253)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **New Features**
- Enhanced clarity and accuracy of translation strings for the German
and Romanian languages, including the Enterprise License description.

- **Bug Fixes**
- Corrected translation errors in both German and Romanian, ensuring
proper grammar and terminology.

- **Chores**
- Updated revision dates across multiple translation files to reflect
the latest changes for better tracking.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
Co-authored-by: github-actions <github-actions@documenso.com>
2024-07-26 16:09:44 +10:00
David Nguyen 1028184cf2 feat: initial i18n marketing implementation (#1223)
## Description

This PR introduces an initial i18n implementation using
[Lingui](https://lingui.dev).

We plan to combine it with Crowdin which will provide AI translations
when PRs are merged into main.

We plan to rollout i18n to only marketing for now, and will review how
everything goes before continuing to introduce it into the main
application.

## Reasoning

Why not use i18n-next or other alternatives?

To hopefully provide the best DX we chose Lingui because it allows us to
simply wrap text that we want to translate in tags, instead of forcing
users to do things such as:

- Update the text to `t('some-text')`
- Extract it to the file
- The text becomes a bit unreadable unless done correctly

Yes, plugins such as i18n-ally and Sherlock exist to simplify these
chores, but these require the user to be correctly setup in vscode, and
it also does not seem to provide the required configurations for our
multi app and multi UI package setup.

## Super simple demo

```html
// Before
<p>Text to update</p>

// After
<p>
  <Trans>Text to update</Trans>
</p>
```

## Related Issue

Relates to #885 but is only for marketing for now.

Another branch is slowly being prepared for the changes required for the
web application while we wait to see how this goes for marketing.

## Changes Made

Our configuration does not follow the general standard since we have
translations that cross:
- Web app
- Marketing app
- Constants package
- UI package

This means we want to separate translations into:
1. Marketing - Only translations extracted from `apps/marketing`
2. Web - Only translations extracted from `apps/web`
3. Common - Translations from `packages/constants` and `packages/ui`

Then we bundle, compile and minify the translations for production as
follows:
1. Marketing = Marketing + Common
2. Web = Web + Common

This allows us to only load the required translations when running each
application.

Overall general changes: 
- Add i18n to marketing
- Add core i18n setup to web
- Add pre-commit hook and GH action to extract any new <Trans> tags into
the translation files

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit


- **New Features**
- Added Romanian localization for marketing messages to improve
accessibility for Romanian-speaking users.
- Introduced German and English translation modules and PO files to
enhance the application's internationalization capabilities.
- Integrated internationalization support in the RootLayout component
for dynamic language settings based on server-side configurations.
- Enhanced the Enterprise component with translation support to adapt to
user language preferences.
- Added a `<meta>` tag to prevent Google from translating the page
content, supporting internationalization efforts.

- **Bug Fixes**
- Resolved minor issues related to the structure and accessibility of
translation files.

- **Chores**
- Updated project dependencies to support the new localization features
and ensure stability.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Lucas Smith <me@lucasjamessmith.me>
Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
Co-authored-by: github-actions <github-actions@documenso.com>
2024-07-26 14:56:42 +10:00
Mark Pitblado 277a870580 fix: correct grammar on enterprise page (#1252)
---
name: Pull Request
about: Submit changes to the project for review and inclusion
---

## Description
Corrects grammar on `/pricing` page of main website.

## Related Issue

N/A

## Changes Made

Added the word "for" (grammar)
Pluralized "offer" to "offers" (grammar)


## Testing Performed

No testing should be required for this change.

## Checklist


- [x] I have tested these changes locally and they work as expected.
- [x] I have added/updated tests that prove the effectiveness of these
changes.
- [x] I have updated the documentation to reflect these changes, if
applicable.
- [x] I have followed the project's coding style guidelines.
- [x] I have addressed the code review feedback from the previous
submission, if applicable.

## Additional Notes




<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **Bug Fixes**
- Improved grammatical accuracy in the Enterprise component, enhancing
readability and professionalism.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-07-26 13:12:36 +10:00
Ephraim Duncan a8febae87e chore: team stuff (#1228)
- Added functionality to decline team invitations
- Added email notifications for when team is deleted
- Added email notifications for team members joining and leaving
2024-07-25 14:27:19 +10:00
Timur Ercan b366ab8736 chore: changelog-160 (#1247)
changelog 1.6.0
2024-07-24 13:19:32 +02:00
Chirag Chandrashekhar 994f6867f5 fix: API token deletion not reflected in cache until page reload (#1128)
Stops the API token copy card from continuing to appear when a newly created
token has been subsequently deleted.
2024-07-24 13:31:56 +10:00
Timur Ercan c2374a9d65 Update standards-and-regulations.mdx
link to blog
2024-07-23 15:14:48 +02:00
Paul Koeck 7a1b9feee3 fix: typo in pricing table (#1239) 2024-07-23 13:08:55 +00:00
Timur Ercan ddc704518f Chore/blog-basic-signing-and-roles (#1241)
blostpost basic roles
2024-07-23 15:08:15 +02:00
Ephraim Duncan f647244e07 chore: update signup text (#1234)
Co-authored-by: Lucas Smith <me@lucasjamessmith.me>
2024-07-23 08:24:21 +00:00
Ephraim Duncan f8349bb927 chore: add new colors (#1224)
Adds the colors from our design system revamp into our current CSS vars to be used
at a later point.
2024-07-23 14:51:37 +10:00
David Nguyen d6ec3f252a feat: add upload translation workflow 2024-07-23 13:08:43 +10:00
Mythie 043aff3ca9 v1.6.0 2024-07-23 12:53:02 +10:00
Samyak Shah 8abc749dad fix: replace default favicon with documenso logo (#1237)
Adds the documenso favicon and touch icon to the documentation website
keeping it on brand with our other websites and applications.
2024-07-23 12:33:53 +10:00
David Nguyen 5b488c2ae4 feat: add pull translation workflow 2024-07-23 12:05:35 +10:00
Timur Ercan e8c325c683 chore: add docs to nav (#1235)
---
name: Pull Request
about: Submit changes to the project for review and inclusion
---

## Description

<!--- Describe the changes introduced by this pull request. -->
<!--- Explain what problem it solves or what feature/fix it adds. -->

## Related Issue

<!--- If this pull request is related to a specific issue, reference it
here using #issue_number. -->
<!--- For example, "Fixes #123" or "Addresses #456". -->

## Changes Made

<!--- Provide a summary of the changes made in this pull request. -->
<!--- Include any relevant technical details or architecture changes.
-->

- Change 1
- Change 2
- ...

## Testing Performed

<!--- Describe the testing that you have performed to validate these
changes. -->
<!--- Include information about test cases, testing environments, and
results. -->

- Tested feature X in scenario Y.
- Ran unit tests for component Z.
- Tested on browsers A, B, and C.
- ...

## Checklist

<!--- Please check the boxes that apply to this pull request. -->
<!--- You can add or remove items as needed. -->

- [ ] I have tested these changes locally and they work as expected.
- [ ] I have added/updated tests that prove the effectiveness of these
changes.
- [ ] I have updated the documentation to reflect these changes, if
applicable.
- [ ] I have followed the project's coding style guidelines.
- [ ] I have addressed the code review feedback from the previous
submission, if applicable.

## Additional Notes

<!--- Provide any additional context or notes for the reviewers. -->
<!--- This might include details about design decisions, potential
concerns, or anything else relevant. -->
2024-07-22 17:14:09 +02:00
Timur Ercan f26449c6bf chore: links new docs (#1233)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **New Features**
- Added "Documentation" and "Support" links to the footer for enhanced
resource accessibility.
    - Updated the "Changelog" link position for improved navigation.
- **Bug Fixes**
- Replaced dynamic URL handling with a direct link to API documentation
for clarity and consistency.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-07-22 14:12:39 +02:00
Catalin Pit 8367878395 feat: documentation site (#1101)
## Description

<!--- Describe the changes introduced by this pull request. -->
<!--- Explain what problem it solves or what feature/fix it adds. -->

## Related Issue

<!--- If this pull request is related to a specific issue, reference it
here using #issue_number. -->
<!--- For example, "Fixes #123" or "Addresses #456". -->

## Changes Made

<!--- Provide a summary of the changes made in this pull request. -->
<!--- Include any relevant technical details or architecture changes.
-->

- Change 1
- Change 2
- ...

## Testing Performed

<!--- Describe the testing that you have performed to validate these
changes. -->
<!--- Include information about test cases, testing environments, and
results. -->

- Tested feature X in scenario Y.
- Ran unit tests for component Z.
- Tested on browsers A, B, and C.
- ...

## Checklist

<!--- Please check the boxes that apply to this pull request. -->
<!--- You can add or remove items as needed. -->

- [ ] I have tested these changes locally and they work as expected.
- [ ] I have added/updated tests that prove the effectiveness of these
changes.
- [ ] I have updated the documentation to reflect these changes, if
applicable.
- [ ] I have followed the project's coding style guidelines.
- [ ] I have addressed the code review feedback from the previous
submission, if applicable.

## Additional Notes

<!--- Provide any additional context or notes for the reviewers. -->
<!--- This might include details about design decisions, potential
concerns, or anything else relevant. -->


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **Documentation**
- Enhanced project README for clarity and improved environment variables
section.
- Added comprehensive developer and user documentation, including guides
on local development, public API, self-hosting, and compliance
standards.
- Introduced specific guides for contributing, creating API keys, using
webhooks, and setting up security measures.
- Detailed documentation on various fields available for document
signing to improve user understanding.
- Added metadata structuring to improve navigation within the
documentation site.

- **Chores**
  - Updated `.gitignore` to better handle project files.

- **New Features**
- Introduced detailed metadata and documentation for various Documenso
functionalities, including signing documents, user profiles, and
compliance levels.
- Added functionality for Direct Link Signing, enabling easy sharing for
document signing.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Timur Ercan <timur.ercan31@gmail.com>
Co-authored-by: Lucas Smith <me@lucasjamessmith.me>
Co-authored-by: David Nguyen <davidngu28@gmail.com>
2024-07-22 13:34:37 +02:00
Mythie ae5ae111a6 chore: update failing tests 2024-07-22 20:52:17 +10:00
Mythie 414b1b7287 v1.6.0-rc.3 2024-07-19 13:27:01 +10:00
Mythie 7ac4cd25e7 fix: update template limits 2024-07-19 13:16:26 +10:00
Mythie 40428f40e1 fix: only send cancelled emails to recipients who have received the document 2024-07-19 12:41:04 +10:00
Mythie 3a57f97218 chore: update failing tests 2024-07-19 11:32:49 +10:00
Timur Ercan 6208a9754f Chore/vial-blog (#1231)
vial 21 cfr blogpost
2024-07-18 16:05:29 +02:00
Catalin Pit 7b5c57e8af chore: add more field types (#1141)
Adds a number of new field types and capabilities to existing fields.

A massive change with far too many moving pieces to document in a single commit.
2024-07-18 23:45:44 +10:00
Mythie a3ee732a9b v1.6.0-rc.2 2024-07-15 10:50:49 +10:00
Lucas Smith c3035dbd15 feat: add external id to documents and templates (#1227)
## Description

Adds the external ID column to documents and templates with an option to
configure it in the API or UI.

External ID's can be used to link a document or template to an external
system and identify them via webhooks, etc.
2024-07-13 16:45:09 +10:00
Catalin Pit 7f5b27372f feat: resend document via API (#1226)
Allow users to re-send documents via the API.
2024-07-12 21:03:52 +10:00
Rene Steen b0c081683f feat: allow anonymous smtp authentication (#1204)
Introduces the ability to use anonymous SMTP authentication where no username or password is provided.

Also introduces a new flag to disable TLS avoiding cases also where STARTTLS is used despite `secure` being
set to `false`
2024-07-09 10:39:59 +10:00
Mythie 6b5e4da424 v1.6.0-rc.1 2024-07-05 14:24:40 +10:00
Ephraim Duncan cb892bcbb2 feat: add user conversion count to admin panel (#1150)
Displays the count of users who signed up after signing at least one
document in the admin panel
2024-07-05 14:02:22 +10:00
Ephraim Duncan a757ab2303 feat: move template to team (#1217)
Allows users to move templates from their personal account to a team
account.
2024-07-05 13:20:27 +10:00
Ephraim Duncan 2c320e8b92 fix: use team avatar everywhere (#1220)
Expands team avatar support across various components and pages of
the application.
2024-07-05 13:05:22 +10:00
Ephraim Duncan 2eee2b4d2a feat: send custom email to signers of direct template documents (#1215)
Introduces customization options for the document completion email
template to allow for custom email bodies and subjects for documents
created from direct templates.


## Testing Performed
- Verified correct rendering of custom email subject and body for direct
template documents
- Verified the all other completed email types are sent correctly
2024-07-05 13:03:22 +10:00
Timur Ercan 06b1d4835e Update signing-an-nda-faster-with-documenso.mdx
fix nda article after git switch
2024-07-04 13:57:57 +02:00
Timur Ercan 5f2dc1fe31 chore: final touches (#1219)
chore Top 3 Signing Efficiency Hacks for Freelancers

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **New Features**
- Introduced a blog post titled "Top 3 Signing Efficiency Hacks for
Freelancers" with tips on streamlining contract signing using Documenso.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-07-04 13:55:08 +02:00
Timur Ercan b3cb9a10be Chore/freelancer-3-hacks (#1218)
Top 3 Signing Efficiency Hacks for Freelancers article
2024-07-04 13:48:01 +02:00
Timur Ercan 7cff035f8a Chore/changelog-156 (#1214)
fix typo
2024-07-02 15:07:08 +02:00
Timur Ercan 7ac899eb8d chore: changelog 156 (#1213)
changelog for v 1.5.6

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **New Features**
	- Display document creation time in the documents view.
	- Introduced direct template links for easier access.
- Added support for OpenID Connect (OIDC) for improved authentication
options.

- **Enhancements**
- Transitioned to a new rust-based library for signing documents,
enhancing performance and security.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-07-02 14:42:23 +02:00
Ephraim Duncan 92c09c5850 feat: move document to team (#1210)
Introduces a new dialog component allowing users to move documents
between teams with included audit logging.
2024-07-02 12:47:24 +10:00
Timur Ercan 90c43dcd0a Update announcing-profiles.mdx 2024-07-01 15:27:06 +02:00
Timur Ercan 48bf57d3aa chore: last text touches (#1212)
final touches for profiles announce
2024-07-01 14:59:33 +02:00
Timur Ercan fc0c0a9754 chore: last text touches 2024-07-01 14:58:30 +02:00
Timur Ercan 455c3a63f9 Update announcing-profiles.mdx 2024-07-01 14:41:06 +02:00
Timur Ercan 780e91b055 Update signing-an-nda-faster-with-documenso.mdx 2024-07-01 14:33:00 +02:00
Timur Ercan 611e495e16 chore: profiles announce blogpost (#1211)
announcing profiles blogpost

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **New Features**
- Introduced "Documenso Profiles" that allow users to share digital
signature templates publicly.
- Recipients can sign documents directly via public links, streamlining
the signing process.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-07-01 14:29:37 +02:00
Timur Ercan 6361dd5fe5 Merge branch 'main' into chore/profiles-announce 2024-07-01 14:21:52 +02:00
Timur Ercan e2674456d4 chore: last text touches 2024-07-01 14:16:29 +02:00
Mythie dc34e81a7e chore: downgrade sharp 2024-06-28 12:12:15 +10:00
Mythie a42fc3cbaa chore: hoist sharp dependency 2024-06-28 11:08:31 +10:00
Timur Ercan 9242e7ab3a chore: nda-blog (#1202)
How to Sign an NDA online (fast) blog article

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **New Features**
- Published a new blog post on signing NDAs faster with Documenso,
highlighting the use of direct links, templates, and basic signing for
efficiency.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-06-27 16:38:00 +02:00
Timur Ercan 6a7c20fe07 Merge branch 'main' into chore/nda-blog 2024-06-27 16:23:04 +02:00
Timur Ercan 1d8f99a6ce chore: last text touches 2024-06-27 16:22:07 +02:00
Timur Ercan bc54636d82 chore: grammarly fr fr 2024-06-27 16:11:03 +02:00
Timur Ercan 00365ea7ec chore: description 2024-06-27 16:03:59 +02:00
Timur Ercan 5c843d3465 chore: grammarly 2024-06-27 16:00:24 +02:00
Lucas Smith b08e153ca2 feat: add public profiles (#1180)
## Description

Add public profiles

## Changes

- Add profiles settings page for users and teams
- Add profiles page `/p/<url>`

## Not completed

- Pending tests
- UI changes to promote public profiles (sign up, etc)
2024-06-27 22:47:20 +10:00
Mythie d85f207d59 fix: add button type 2024-06-27 22:32:48 +10:00
Mythie 22c02aac02 feat: avatar images 2024-06-27 21:50:42 +10:00
Timur Ercan 68b7c64b29 chore: video controls 2024-06-27 13:48:45 +02:00
Timur Ercan 6520f72cf2 chore: images and video and link 2024-06-27 13:45:41 +02:00
David Nguyen 963ba13aa6 feat: add more template API endpoints (#1198)
## Description

Update the API endpoint to support more actions for templates


## Changes Made

Add the following endpoints for templates:
- Get template
- Get templates
- Delete template

Get template(s) returns associated recipients and fields. 

UI:
- Updated template delete button to have the destructive delete variant

## Testing Performed

Tested endpoints via /api/v1/openapi

Tested deleting templates via UI manually

## Test data


<details>
  <summary>Delete template response</summary>

```json
{
  "id": 32,
  "type": "PRIVATE",
  "title": "documenso-supporter-pledge.pdf",
  "userId": 3,
  "teamId": null,
  "templateDocumentDataId": "clxva9b4h0001rrh7v0wdw97h",
  "createdAt": "2024-06-26T03:35:45.065Z",
  "updatedAt": "2024-06-26T03:35:45.065Z"
}
```
</details>

<details>
  <summary>Get template response</summary>

```json
{
  "id": 28,
  "type": "PRIVATE",
  "title": "blank_long.pdf",
  "userId": 3,
  "teamId": null,
  "templateDocumentDataId": "clxu4vyty0003rrr52ue5ee4d",
  "createdAt": "2024-06-25T08:17:38.418Z",
  "updatedAt": "2024-06-26T03:36:33.890Z",
  "templateMeta": {
    "id": "clxvaacte0004rrh7s2k910nw",
    "subject": "",
    "message": "",
    "timezone": "Australia/Melbourne",
    "dateFormat": "yyyy-MM-dd hh:mm a",
    "templateId": 28,
    "redirectUrl": ""
  },
  "directLink": {
    "token": "tBJHVFR75sC8m6hPfBTZd",
    "enabled": true
  },
  "templateDocumentData": {
    "id": "clxu4vyty0003rrr52ue5ee4d",
    "type": "BYTES_64",
    "data": "<PDF DATA>"
  },
  "Field": [
    {
      "id": 327,
      "recipientId": 357,
      "type": "SIGNATURE",
      "page": 1,
      "positionX": "55.8431952662722",
      "positionY": "21.39588100686499",
      "width": "29.58579881656805",
      "height": "6.864988558352403"
    },
    {
      "id": 328,
      "recipientId": 357,
      "type": "EMAIL",
      "page": 1,
      "positionX": "28.03254437869823",
      "positionY": "72.99771167048056",
      "width": "29.58579881656805",
      "height": "6.864988558352403"
    }
  ],
  "Recipient": [
    {
      "id": 357,
      "email": "direct.link@documenso.com",
      "name": "Direct link recipient",
      "authOptions": {
        "accessAuth": null,
        "actionAuth": null
      },
      "role": "SIGNER"
    },
    {
      "id": 359,
      "email": "example@documenso.com",
      "name": "Example User",
      "authOptions": {
        "accessAuth": null,
        "actionAuth": null
      },
      "role": "SIGNER"
    }
  ]
}
```
</details>


<details>
  <summary>Get templates response</summary>

```json
{
  "templates": [
    {
      "id": 33,
      "type": "PRIVATE",
      "title": "documenso-supporter-pledge.pdf",
      "userId": 3,
      "teamId": null,
      "templateDocumentDataId": "clxva9oaj0003rrh7hwdyg60o",
      "createdAt": "2024-06-26T03:36:02.130Z",
      "updatedAt": "2024-06-26T03:36:02.130Z",
      "directLink": null,
      "Field": [],
      "Recipient": []
    },
    {
      "id": 28,
      "type": "PRIVATE",
      "title": "blank_long.pdf",
      "userId": 3,
      "teamId": null,
      "templateDocumentDataId": "clxu4vyty0003rrr52ue5ee4d",
      "createdAt": "2024-06-25T08:17:38.418Z",
      "updatedAt": "2024-06-26T03:36:33.890Z",
      "directLink": {
        "token": "tBJHVFR75sC8m6hPfBTZd",
        "enabled": true
      },
      "Field": [
        {
          "id": 327,
          "recipientId": 357,
          "type": "SIGNATURE",
          "page": 1,
          "positionX": "55.8431952662722",
          "positionY": "21.39588100686499",
          "width": "29.58579881656805",
          "height": "6.864988558352403"
        },
        {
          "id": 328,
          "recipientId": 357,
          "type": "EMAIL",
          "page": 1,
          "positionX": "28.03254437869823",
          "positionY": "72.99771167048056",
          "width": "29.58579881656805",
          "height": "6.864988558352403"
        }
      ],
      "Recipient": [
        {
          "id": 357,
          "email": "direct.link@documenso.com",
          "name": "Direct link recipient",
          "authOptions": {
            "accessAuth": null,
            "actionAuth": null
          },
          "role": "SIGNER"
        },
        {
          "id": 359,
          "email": "example@documenso.com",
          "name": "Example User",
          "authOptions": {
            "accessAuth": null,
            "actionAuth": null
          },
          "role": "SIGNER"
        }
      ]
    }
  ],
  "totalPages": 2
}
```
</details>

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **New Features**
  - Added support for team-based template deletion in the dashboard.
- Enhanced API to manage templates, including fetching and deleting
templates by team ID.

- **Bug Fixes**
- Improved error handling for template operations, ensuring better
feedback when templates are not found.

- **Refactor**
- Updated various components and functions to include `teamId` for more
robust template management.

- **Documentation**
- Expanded schema definitions to detail new structures for template and
team interactions.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-06-27 15:44:16 +10:00
David Nguyen d1a53544c1 fix: enable yearly team pricing (#1199)
## Description

**Pending testing on preview**

Enable yearly team pricing during checkout.

## Changes Made

- Enable selecting yearly team pricing during checkout
- Update pricing on marketing to $480 for yearly team plan

## Testing Performed

- Stripe simulations

Pending manual testing


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **New Features**
- Updated the savings message in the pricing table to reflect new
savings amounts.
  - Adjusted yearly pricing from $500 to $480.
  - Modified user addition costs based on subscription periods.

- **Improvements**
- Simplified button text in the Create Team Checkout Dialog to
consistently display "Checkout".

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-06-27 15:36:33 +10:00
David Nguyen e2055e50df fix: docker ci (#1201)
## Description

Fix issue with the docker image being built in the CI
2024-06-27 15:13:06 +10:00
Lucas Smith 5b4e6e530b Merge branch 'main' into feat/public-profiles 2024-06-27 12:10:45 +10:00
Timur Ercan b8cc2a2e0f chore: typo 2024-06-26 13:22:43 +02:00
Lucas Smith 93842ba604 fix: show correct authentication action for account required (#1191)
## Description

When using account required auth for a given document this change now
shows the sign up or sign in button depending on if an account actually
exists within
Documenso.

This change should reduce friction and confusion when a recipient has
been invited to a document.

## Related Issue

<!--- If this pull request is related to a specific issue, reference it
here using #issue_number. -->
<!--- For example, "Fixes #123" or "Addresses #456". -->

## Changes Made

- Updated the ssr for the signing page to fetch whether a user account
exists when document auth is required
- Pass the user exists flag to the document auth required page

## Testing Performed

- Created and sent a document to a user with an account and one without an account in both a logged in and logged out state and confirmed that the dialogs are displayed as expected.
2024-06-26 12:03:01 +10:00
Lucas Smith d6f9c701fc fix: direct links for teams are generated wrong (#1197)
use `NEXT_PUBLIC_WEBAPP_URL()` for the base URL.
2024-06-26 11:50:20 +10:00
Lucas Smith 1f59266e08 Merge branch 'main' into fix/show-sign-in-or-sign-up-for-account-required 2024-06-26 11:48:15 +10:00
Ephraim Atta-Duncan 51ad6a6ff8 fix: direct links for teams are generated wrong 2024-06-25 16:09:19 +00:00
Timur Ercan a177ca48d9 feat: admin activation metrics (#1080)
![CleanShot 2024-05-21 at 09 42
42@2x](https://github.com/documenso/documenso/assets/55143799/8d9d972b-6ebd-4e42-adba-62edba188460)


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **New Features**
- Introduced user statistics display including metrics on document
creation and signing in the admin dashboard.
- Added a bar chart visualizing monthly growth data of users with
documents.

- **Enhancements**
- Updated dashboard stats page to provide more detailed user-related
metrics and charts.
- Added new CSS variable `--gold` for consistent theming across light
and dark modes.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-06-25 17:37:52 +02:00
Ephraim Atta-Duncan 7e065764ec chore: use luxon for dates 2024-06-25 15:10:58 +00:00
Ephraim Duncan db827b749d Merge branch 'main' into admin/stats 2024-06-25 15:06:27 +00:00
Timur Ercan bbd68f37c2 Update README.md
chore alt
2024-06-25 15:43:28 +02:00
Timur Ercan 817103ebba Update README.md
chore: add shiny badges
2024-06-25 15:42:25 +02:00
Timur Ercan 2315785bc9 chore: add direct link video (#1194)
added direct link video to documenso.com
2024-06-24 17:36:07 +02:00
Timur Ercan b6a2fe88cb chore: add direct link video 2024-06-24 17:34:52 +02:00
Lucas Smith e527058322 Merge branch 'main' into fix/show-sign-in-or-sign-up-for-account-required 2024-06-24 19:44:23 +10:00
Catalin Pit 62cd4c019f feat: force signature fields for document signers (#1139)
## Description

Show a dialog when the document has signers with no signature fields
placed.

## Changes Made

Created a new dialog that'll be triggered when the document owner tries
to send a document to the signers without placing signature fields. The
document owners can't proceed to the next step unless they add signature
fields.

## Checklist

- [x] I have tested these changes locally and they work as expected.
- [ ] I have added/updated tests that prove the effectiveness of these
changes.
- [ ] I have updated the documentation to reflect these changes, if
applicable.
- [x] I have followed the project's coding style guidelines.
- [ ] I have addressed the code review feedback from the previous
submission, if applicable.




https://github.com/documenso/documenso/assets/25515812/f1b5c34e-2ce0-40e3-804c-f05d23045710




<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **New Features**
- Introduced "Direct Links" for async signing, allowing users to create
documents from templates using public links.
- Added `MissingSignatureFieldDialog` component to ensure users don't
miss adding signature fields.

- **Enhancements**
- Updated blog content to provide guidance on contract management and
announce new pricing plans.

- **Bug Fixes**
  - Improved async signing process for better efficiency and control.

- **Refactor**
- Improved internal code structure and import order for stripe-related
functionality.

- **Tests**
- Enhanced e2e tests to verify signature presence before document
creation and updated test flows for document approval.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: David Nguyen <davidngu28@gmail.com>
2024-06-24 18:01:57 +10:00
Ephraim Duncan 16c6d4a8bd fix: show field on pending document (#1158)
## Description

This pull request introduces the functionality to display pending fields
on the document page view. This enhancement allows users to see which
fields are pending and need to be completed.

![CleanShot 2024-05-14 at 23 31
29@2x](https://github.com/documenso/documenso/assets/55143799/ffea0b29-d251-4dd5-9742-5416ac8262ad)


## Changes Made

- Added `getPendingFieldsForDocument` function in
`packages/lib/server-only/field/get-pending-fields-for-document.ts` to
fetch pending fields for a document.
- Created a new component `DocumentPendingFields` in
`document-pending-fields.tsx` to display the pending fields with options
to hide individual fields.

## Testing Performed

- Tested the new feature by creating documents with pending fields and
verifying their display on the document page view.
- Verified that the pending fields are correctly hidden when the "Hide
field" button is clicked.
- Ran unit tests for the new functionality and existing components to
ensure no regressions.

## Checklist

- [x] I have tested these changes locally and they work as expected.
- [x] I have added/updated tests that prove the effectiveness of these
changes.
- [x] I have updated the documentation to reflect these changes, if
applicable.
- [x] I have followed the project's coding style guidelines.
- [ ] I have addressed the code review feedback from the previous
submission, if applicable.

## Additional Notes

No additional notes.


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **New Features**
- Introduced logic for handling pending and completed document fields
based on signing status.

- **Refactor**
- Replaced `getCompletedFieldsForDocument` with `getFieldsForDocument`.
- Updated `DocumentReadOnlyFields` component to `DocumentPendingFields`.

- **Bug Fixes**
- Improved field retrieval accuracy and display based on recipient
signing status.

- **Style**
- Enhanced UI elements with new icons and button adjustments for better
user interaction.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: David Nguyen <davidngu28@gmail.com>
2024-06-24 16:08:06 +10:00
Lucas Smith 19d8b4b80d Merge branch 'main' into feat/public-profiles 2024-06-21 20:14:32 +10:00
Lucas Smith 9a48da5270 feat: background tasks (#1160)
## Description

Currently a work in progress but this adds background tasks to Documenso
for handling tasks that take a little longer and aren't part of the
overall critical path.

## Related Issue

N/A

## Changes Made

Added a pluggable jobs provider supporting both a local provider and a
Trigger.dev provider.

## Testing Performed

- Verified job level retries work
- Verified task level retries work without incrementing job retries


![image](https://github.com/documenso/documenso/assets/13398220/3bbfbc7f-28ef-43ab-a539-ae0d4e900b43)

![image](https://github.com/documenso/documenso/assets/13398220/fd012169-4986-4653-b852-ba6e19a5d131)


**This will still have a lot of rough edges but is a perfect MVP for
local _durable_ compute which may accept more providers later on**

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **New Features**
- Added background job management functionalities to handle email
sending and job processing.
- Introduced support for triggering and managing jobs using various
providers.

- **Chores**
- Updated environment configuration files to support new job management
features.
- Added and updated scripts and dependencies for job management and CLI
commands.
  
- **Refactor**
- Refactored email sending functionalities to utilize the new job queue
mechanism.

- **Documentation**
- Updated documentation to reflect the new environment variables and
configurations related to background jobs.

- **Configuration**
- Updated Docker configurations to support new services for job
management.
- Updated VSCode settings for improved development experience with new
dependencies and formatting rules.
  
- **Database**
- Added new database schemas and migrations to support background job
management and tracking.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-06-21 14:32:29 +10:00
Mythie 2c3c067eb4 chore: add inngest:dev command 2024-06-21 14:25:45 +10:00
Lucas Smith 5d417ee67f Merge branch 'main' into feat/public-profiles 2024-06-21 13:59:13 +10:00
Lucas Smith 1ad64b43db Merge branch 'main' into feat/background-tasks 2024-06-21 13:58:56 +10:00
Mythie ffb890fdf6 chore: force pin turbo to resolve docker issues for now 2024-06-21 13:52:22 +10:00
Mythie 8e19c89fae chore: add packageManager field 2024-06-21 13:07:30 +10:00
Mythie 6b3c0afe25 chore: add prebuild to handle prisma build cache 2024-06-21 12:55:17 +10:00
Mythie 3e5dcca027 fix: remove extra frontmatter from changelog.mdx 2024-06-21 12:34:45 +10:00
Mythie 93ea3e2644 fix: dirty type safe job definitions 2024-06-21 12:18:11 +10:00
Lucas Smith 6f8d8b908d Merge branch 'main' into feat/background-tasks 2024-06-21 10:31:16 +10:00
Timur Ercan ef07bb4dec chore: freelancer blog article #2 (#1181)
documenso for freelancer contracts article

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **New Features**
- Published a new blog post: "How Documenso Enhances Contract Management
for Freelancers, Helping Them Close More Clients Efficiently." This post
offers insights into contract management and the benefits of digital
signatures using Documenso.

- **Documentation**
- Updated a hyperlink in the conclusion section of the blog post titled
"How Documenso Helps Freelancers Close More Clients Efficiently" to
direct users to a new URL related to signing freelance contracts with
Documenso.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-06-20 14:21:04 +02:00
Timur Ercan f0f21955fb chore date 2024-06-20 14:17:56 +02:00
Timur Ercan 6b53a76bd0 Merge branch 'main' into chore/freelance-blog-2 2024-06-20 14:16:59 +02:00
Timur Ercan 6573b41b92 chore: bump date correctly 2024-06-20 14:14:19 +02:00
Timur Ercan 75bba68857 chore: typo and link 2024-06-20 14:11:50 +02:00
Timur Ercan d5bb92b839 chore: bump date 2024-06-20 14:08:23 +02:00
Timur Ercan 134e241357 feat: add changelog to marketing (#1190)
added changelog page to marketing site

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **New Features**
  - Introduced a changelog page to detail recent updates and features.
  - Added a link to the changelog in the website footer for easy access.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-06-20 13:00:14 +02:00
Timur Ercan a2a10b0ee4 chore: typo and format 2024-06-20 12:59:53 +02:00
David Nguyen dfd165330c Merge branch 'main' into feat/public-profiles 2024-06-20 11:35:59 +10:00
Mythie cc667233c6 fix: show correct authentication action for account required
When using account required auth for a given document
this change now shows the sign up or sign in button
depending on if an account actually exists within
Documenso.

This change should reduce friction and confusion when a
recipient has been invited to a document.
2024-06-20 10:59:07 +10:00
Timur Ercan a727abdcf1 feat: add changelog to marketign 2024-06-19 16:24:27 +02:00
Mythie 664b9284bd chore: feedback from pull request 2024-06-19 13:28:14 +10:00
Timur Ercan 81d86559eb Merge branch 'main' into admin/stats 2024-06-18 17:01:17 +02:00
Mythie 4077d02ccd fix: use readonly modifiers for generics 2024-06-18 22:38:53 +10:00
Timur Ercan fbf4bd605f chore: bump date (#1189) 2024-06-17 13:38:14 +02:00
Timur Ercan c869ad23f9 chore: bump date 2024-06-17 13:37:12 +02:00
Timur Ercan 16406b3aae chore: direct links announce (#1177)
direct links account blogarticle


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **New Features**
- Introduced Direct Links for templates, allowing asynchronous document
signing via unique shareable links for easy access.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-06-17 13:36:23 +02:00
Timur Ercan f7cb468176 Merge branch 'main' into chore/direct-links-announce 2024-06-17 13:27:32 +02:00
Timur Ercan d86c5fee42 chore: typo 2024-06-17 13:27:04 +02:00
Lucas Smith 2516377cbf Merge branch 'main' into feat/background-tasks 2024-06-17 17:12:12 +10:00
Mythie 8bb936aa51 chore: add env vars to example .env 2024-06-17 17:02:00 +10:00
Mythie b8d6484ff0 fix: improve inngest support 2024-06-17 16:59:14 +10:00
Timur Ercan 46a7dce320 chore: freelance-blog (#1175)
"How Documenso Helps Freelancers Close More Clients Efficiently" blog
article

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **Documentation**
- Added a new blog post titled "How Documenso Helps Freelancers Close
More Clients Efficiently," discussing the benefits of using Documenso to
streamline the proposal process with digital signatures for enhanced
speed and security in closing deals.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-06-14 12:11:42 +02:00
Timur Ercan 09d1c1bc33 chore: bump 2024-06-14 11:26:04 +02:00
Timur Ercan 36d7e3c8c4 chore: final polish 2024-06-14 11:18:23 +02:00
Timur Ercan 24d0dfa65a text 2024-06-14 11:10:23 +02:00
Timur Ercan 55dc14f7dc Merge branch 'main' into chore/freelance-blog 2024-06-14 11:08:35 +02:00
Mythie 6977381e00 feat: inngest provider 2024-06-14 13:53:48 +10:00
Mythie 1c5da46335 fix: update signing email job 2024-06-14 13:53:08 +10:00
Timur Ercan 232dc96eb5 chore: update open page
update open page
2024-06-13 14:02:02 +02:00
Timur Ercan 7b594b303d fix: carousel on mobile screen (#1186)
## Description

Adjusts the styling to improve the layout and appearance of the carousel
controls and thumbnails on smaller screens.

## Changes Made

- Updated the carousel control styling to be more responsive.
- Adjusted the font size and padding of the slide component for better
display on mobile screens.

## Screenshot
![CleanShot 2024-06-13 at 08 18
55@2x](https://github.com/documenso/documenso/assets/55143799/1bcb31a3-2b4f-48bc-8a22-9d8e16b71d17)


## Checklist

- [x] I have tested these changes locally and they work as expected.
- [ ] I have added/updated tests that prove the effectiveness of these
changes.
- [ ] I have updated the documentation to reflect these changes, if
applicable.
- [x] I have followed the project's coding style guidelines.
- [ ] I have addressed the code review feedback from the previous
submission, if applicable.

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->



<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-06-13 13:39:33 +02:00
Ephraim Atta-Duncan 3356934590 fix: carousel on mobile screen 2024-06-13 08:09:06 +00:00
Ephraim Duncan c470e4d516 Merge branch 'main' into admin/stats 2024-06-13 05:47:17 +00:00
Ephraim Atta-Duncan 1bbfd9d0f3 fix: remove redundant cards 2024-06-13 05:46:34 +00:00
Mythie f28334bff7 feat: make jobs client type safe 2024-06-13 15:32:56 +10:00
Mythie 002dc0fdae fix: make local provider robust to random input 2024-06-13 15:24:53 +10:00
Mythie 2e41ecf825 fix: remove dummy code from email job 2024-06-13 15:24:53 +10:00
Mythie 991f808890 feat: ghetto durable compute 2024-06-13 15:24:51 +10:00
Mythie 61827ad729 fix: make trigger.dev work properly 2024-06-13 15:23:52 +10:00
Mythie 108054a133 wip: background tasks 2024-06-13 15:23:19 +10:00
Lucas Smith cfb52161d9 Merge branch 'main' into feat/public-profiles 2024-06-13 15:20:26 +10:00
Lucas Smith 1647f7c4a0 fix: correctly insert fields on rotated pages (#1183)
## Description

PDFs can have pages that are rotated, which are correctly rendered in
the frontend. However, when we load the PDF in the backend, the rotation
is applied which causes issues when we want to insert fields.

To account for this, we swap the width and height for pages that are
rotated by 90/270 degrees. This is so we can calculate the virtual
position the field was placed if it was correctly oriented in the
frontend.

Then when we insert the fields, we apply a transformation to the
position of the field so it is rotated correctly.

**Test document with 0/90/180/270 rotated pages**


[rotated_test.pdf](https://github.com/user-attachments/files/15798138/rotated_test.pdf)
2024-06-12 21:54:45 +10:00
Lucas Smith eca66a7c1d fix: add regular plan to price type enum (#1184)
Adds the regular plan to our current plan type enum so we can use it for
user limit calculations.
2024-06-12 21:54:11 +10:00
Lucas Smith 6f2de54640 Merge branch 'main' into fix/regular-plan 2024-06-12 21:49:39 +10:00
Mythie e62fa6cc92 fix: update plans on the billing page 2024-06-12 21:33:17 +10:00
Mythie 8c2f61a004 fix: add regular plan to price type enum 2024-06-12 21:27:05 +10:00
Timur Ercan b25683c086 Chore/sunset-early-adopters (#1182)
chore: sunset early adopters

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **New Features**
- Introduced a new `Carousel` component with video autoplay
functionality.
  - Added a `Thumb` component for carousel navigation.
- Introduced a new `Enterprise` component detailing enterprise licensing
and compliance.
  
- **Updates**
- Updated the `Hero` component to replace the `Widget` with the new
`Carousel`.
- Revised the `PricingTable` component to reflect new pricing plans and
details.
  - Changed tooltip text in the marketing app for better clarity.
- Updated button texts and links in the `Callout` component to promote
the "Free Plan".

- **Content**
- Published a blog post announcing the end of the Early Adopters Plan
and introducing new pricing plans.
  
- **Dependencies**
- Added Embla Carousel dependencies for enhanced carousel functionality.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-06-12 12:48:29 +02:00
Timur Ercan 383c62e7e6 chore: typo+text 2024-06-12 12:30:12 +02:00
Timur Ercan e41c12fcbf chore: update date 2024-06-12 12:24:14 +02:00
Timur Ercan c8d56104c5 fix: build/ cleanup 2024-06-12 12:05:00 +02:00
Timur Ercan 71f7717f0b fix: theme issues and cleanup 2024-06-12 11:52:38 +02:00
David Nguyen 6174415339 fix: add comment 2024-06-12 14:00:45 +10:00
David Nguyen 9fbc61a04d fix: insert fields correctly for rotated pdfs 2024-06-11 19:04:55 +10:00
Ephraim Atta-Duncan 2bf0d42fbd chore: rename to slide 2024-06-10 13:44:43 +00:00
Ephraim Atta-Duncan 1fda9ed2a6 chore: show each slide based on video time 2024-06-10 13:43:50 +00:00
David Nguyen 5cdfdb1a5f fix: ui 2024-06-10 21:25:25 +10:00
Timur Ercan 1b849d1fb8 chore: fix package lock 2024-06-10 12:59:02 +02:00
David Nguyen 5a76a601d5 fix: error message 2024-06-10 20:54:29 +10:00
David Nguyen 6bb86944f7 fix: remove price id 2024-06-10 20:28:50 +10:00
David Nguyen cd8c42914f fix: add tooltip 2024-06-10 20:07:32 +10:00
Timur Ercan 59193ab40d chore: remove badge 2024-06-10 10:32:48 +02:00
Timur Ercan 817638c24a chore: add darkmode videos and zapier 2024-06-10 10:28:55 +02:00
David Nguyen d8d9a3be77 feat: add profile tooltips 2024-06-08 13:22:51 +10:00
Timur Ercan 68f7a7f090 chore: announcing profiles, first draft 2024-06-07 13:39:08 +02:00
Ephraim Atta-Duncan a278cd6b58 chore: show video on dark theme and light theme 2024-06-06 23:43:51 +00:00
Timur Ercan aa5beafe59 chore: profiles article file 2024-06-06 17:47:30 +02:00
Timur Ercan acb9eb66a5 Merge branch 'main' into chore/sunset-early-adopters 2024-06-06 17:46:00 +02:00
Timur Ercan 8ab9b0df7c chore: first video tries 2024-06-06 17:14:56 +02:00
Timur Ercan 069c1a3085 chore: update links 2024-06-06 15:13:27 +02:00
Timur Ercan 2c035dfa31 chore: images 2024-06-06 15:09:09 +02:00
Timur Ercan bddf460e93 chore: grammarly 2024-06-06 14:50:43 +02:00
Timur Ercan 4c09f46038 chore: freelance contract article text 2024-06-06 14:46:03 +02:00
David Nguyen 95a600001a fix: migration 2024-06-06 19:14:53 +10:00
David Nguyen 783e47d297 fix: migration 2024-06-06 18:57:00 +10:00
David Nguyen 6e4a4c38a1 fix: add migration 2024-06-06 16:58:37 +10:00
David Nguyen 5514dad4d8 feat: add public profiles 2024-06-06 15:28:02 +10:00
Lucas Smith cc43139573 fix: downloaded files should have _signed (#1149)
Modifies the generated filename for the downloaded PDF by appending
"_signed" to the base title.

## Changes Made

- Update the filename in the downloadFile function call to append
"_signed" to the baseTitle variable.

## Testing Performed

Tested the `downloadPDF` function locally to ensure that the downloaded
PDF file has the correct filename with "_signed" appended.
2024-06-05 14:56:02 +10:00
David Nguyen 0c2306b745 fix: add correct role names for direct templates (#1179)
## Description

Update the direct template signing process and emails to correctly
reflect the role of the recipient who actioned the direct template.


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **New Features**
- Dynamic updating of title and description based on recipient role in
the document signing process.
- Enhanced email templates to include recipient roles, providing more
context in email notifications.

- **Improvements**
- More descriptive actions in email templates based on recipient roles,
improving clarity for recipients.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-06-05 14:40:45 +10:00
Timur Ercan fa9310db01 chore: cta 2024-06-04 17:46:44 +02:00
Timur Ercan 2dfc37754e chore: direct links article 2024-06-04 17:38:44 +02:00
Timur Ercan 317ebea8ad Merge branch 'main' into chore/freelance-blog 2024-06-03 17:32:24 +02:00
Timur Ercan 0502181d0f chore: grammarly 2024-06-03 17:28:03 +02:00
Timur Ercan b010fa3682 chore: date 2024-06-03 10:21:39 +02:00
Timur Ercan 65f10d267f chore: typo 2024-06-03 10:21:05 +02:00
Timur Ercan b25bbff3f2 chore: video 2024-06-03 10:19:46 +02:00
Timur Ercan cd2cb6e9d7 chore: typo 2024-06-03 09:53:12 +02:00
David Nguyen d11a68fc4c feat: add direct templates links (#1165)
## Description

Direct templates links is a feature that provides template owners the
ability to allow users to create documents based of their templates.

## General outline

This works by allowing the template owner to configure a "direct
recipient" in the template.

When a user opens the direct link to the template, it will create a flow
where they sign the fields configured by the template owner for the
direct recipient. After these fields are signed the following will
occur:

- A document will be created where the owner is the template owner
- The direct recipient fields will be signed
- The document will be sent to any other recipients configured in the
template
- If there are none the document will be immediately completed

## Notes

There's a custom prisma migration to migrate all documents to have
'DOCUMENT' as the source, then sets the column to required.

---------

Co-authored-by: Lucas Smith <me@lucasjamessmith.me>
2024-06-02 15:49:09 +10:00
Lucas Smith c346a3fd6a feat: add oidc support (#1103)
## Description

This PR adds generic OIDC as an authentication provider. This allows
personal users and companies potentially to define whatever IdP they
want as long as it supports the OIDC well known format. (Azure, Zitadel,
Authentik, KeyCloak, Google, etc. all support it)

## Related Issue

Fixes #1090 

## Changes Made

- Adds OIDC buttons to the signin and registration pages
- Adds appropriate environment variables
- Adds migration to add OIDC to the `IdentityProvider` Enum

## Testing Performed

#### Zitadel
- Created application in Zitadel as an web app, with Client auth
- Enabled `User Info inside ID Token` in Token settings
- Copied client id and client secret to the new .ENV variables
- Copied the well-known URL from the URLs section to .ENV
- Created new account with OIDC provider button
- Verified email manually
- Signed into account with OIDC provider
- Logged out
- Signed into accounting again with OIDC provider

#### Authentik
- Created application in Authentik
- Copied client id and client secret to the new .ENV variables
- Copied the well-known URL from the URLs section to .ENV
- Created new account with OIDC provider button
- Verified email manually
- Signed into account with OIDC provider
- Logged out
- Signed into accounting again with OIDC provider

#### Azure AD
- Created application in Azure AD using OAuth2
- Copied client id and client secret to the new .ENV variables
- Copied the well-known URL from the URLs section to .ENV
- Created new account with OIDC provider button
- Verified email manually
- Signed into account with OIDC provider
- Logged out
- Signed into accounting again with OIDC provider
2024-05-31 11:45:17 +10:00
Mythie 70eeb1a746 chore: improve oidc provider support
Adds fields to the Account model to support various pieces
of data returned by OIDC providers such as AzureAD and GitLab.

Additionally passes through the email verification status and handles
retrieving the email for providers such as AzureAD who use a different
claim instead.
2024-05-30 22:15:45 +10:00
Lucas Smith d8d0734680 Merge branch 'main' into mk/oidc-auth 2024-05-30 15:41:36 +10:00
Sam Poder 6bd2f68014 fix: Capitalise "Stripe" (#1173)
Small fix, I noticed on the marketing site
2024-05-30 13:33:01 +10:00
Lucas Smith ede6eea88d feat: add kysely for raw type-safe SQL queries (#1041) 2024-05-29 22:46:20 +10:00
Mythie ebc547684a fix: inline the remember package 2024-05-29 22:25:23 +10:00
Mythie 5724e73d49 chore: revert find-documents change for now
Reverts the change to find-documents to use Kysely. I'd like to gain
confidence by using it in smaller pieces before commiting to doing
what is one of our most complicated queries in Documenso.
2024-05-29 20:54:43 +10:00
Mythie 4a6b5ceaf8 fix: re-add removed types 2024-05-29 20:53:50 +10:00
Mythie ab949afbb6 fix: convert to kysely queries 2024-05-29 20:03:51 +10:00
Ephraim Atta-Duncan 3b2d184f05 chore: custom tooltip since it's hiding values under other charts 2024-05-29 08:26:58 +00:00
Mythie 3d81b15d71 chore: tidy code 2024-05-29 14:47:33 +10:00
Lucas Smith 27fe8c7f8f Merge branch 'main' into feat/add-kysely 2024-05-28 14:53:29 +10:00
Lucas Smith 0c18f27b3f feat: remove the existing empty signer if its the only one (#1127)
Removes the existing empty signer if its the only one
2024-05-28 14:15:01 +10:00
Lucas Smith b394e99f7a Merge branch 'main' into feat/start-selfSign 2024-05-28 12:53:57 +10:00
Lucas Smith c21e30d689 chore: tidy code 2024-05-28 02:45:57 +00:00
Ephraim Duncan 9b92e38c52 chore: add more tests (#1079) 2024-05-27 11:17:03 +07:00
Lucas Smith ac41086e1a Merge branch 'main' into feat/start-selfSign 2024-05-24 23:48:20 +10:00
Lucas Smith 94cf412f29 fix: show team url in dropdown menu on hover (#1122)
fixes: #943 

<img width="330" alt="Screenshot 2024-02-19 211732"
src="https://github.com/documenso/documenso/assets/75713174/724078ca-e107-4acb-a75d-c7d2cdd29b80">


Video Link:
https://www.loom.com/share/35328504cf3f46e9be78bd485252e8dc?sid=1f309776-8b52-4af4-b86b-652b762fef5b
2024-05-24 23:46:57 +10:00
Mythie 6650a1d72e feat: optional email sending for api users
Introduces the ability to not send an email when sending
(publishing) a document using the API.

Additionally returns the signing link for each recipient
when working with recipient API endpoints and returns
the document object including recipients when sending
documents via API.
2024-05-24 23:36:28 +10:00
Mythie 82848e3d2e fix: animate transition 2024-05-24 18:47:03 +10:00
Lucas Smith 22b8c2044b Merge branch 'main' into fix/show-teams-url-new 2024-05-24 14:58:42 +10:00
Lucas Smith ef5d267e96 fix: Remove document on go back click on step 1 (#910)
 Fixes #903 
 Invoke `onBackStep` on "Go Back" click and conditionally render
Go back label string.
2024-05-24 14:17:53 +10:00
Lucas Smith 518ddea081 feat: pin input component (#936)
https://github.com/documenso/documenso/assets/55143799/fa3d14d6-59e6-4984-9287-7375198fcea0
2024-05-24 14:13:28 +10:00
Lucas Smith 805758f716 Merge branch 'main' into reattach-pdf 2024-05-24 14:07:43 +10:00
Lucas Smith 04ebb26a0b chore: update wording 2024-05-24 04:02:58 +00:00
Lucas Smith 9cb80aa0bc chore: add pin input to all 2FA components
Adds the pin input to the currently used 2FA components sunsetting
the standard input that was previously used.
2024-05-24 03:31:19 +00:00
Lucas Smith 0985206088 Merge branch 'main' into 2fa-input 2024-05-24 12:53:41 +10:00
Lucas Smith aadb22cdbf fix: use shadcn pin input and revert changes 2024-05-24 02:51:25 +00:00
Ephraim Atta-Duncan 25f870ccc0 feat: dark mode 2024-05-23 14:39:43 +00:00
Ephraim Atta-Duncan c86edbefb7 fix: reset autoplay timer when you manually click on a new slide 2024-05-23 13:10:42 +00:00
Timur Ercan c2c0d4d259 chore: update callout CTAs 2024-05-23 14:22:28 +02:00
Ephraim Atta-Duncan 76e6adcf59 fix: progres slide count 2024-05-23 11:44:03 +00:00
Ephraim Atta-Duncan 7fa3069d8c chore: classname typo 2024-05-23 11:20:13 +00:00
Ephraim Atta-Duncan 4e6e4a0016 feat: add progress at the bottom of the slide 2024-05-23 11:18:21 +00:00
Ephraim Atta-Duncan 907cc3a74e chore: add what's new label 2024-05-23 10:33:47 +00:00
Ephraim Atta-Duncan c14cd2dcc5 fix: show slide content based on image or video 2024-05-23 10:21:29 +00:00
Ephraim Atta-Duncan 7fdda0a840 feat: replace signup widget with carousel 2024-05-23 10:09:36 +00:00
Lucas Smith 3e304b37b2 feat: sealing robustness (#1170)
A series of changes to improve sealing robustness avoiding errors that
have appeared during monitoring.

Additionally handles the recently published CVE affecting the
`pdfjs-dist` library.
2024-05-23 15:35:05 +10:00
Mythie 1f3df51371 fix: update font variable typo 2024-05-23 15:13:12 +10:00
Lucas Smith 6e2363d48c Merge branch 'main' into fix/sealing-robustness 2024-05-23 15:11:23 +10:00
Mythie 64bec5f29c fix: remove console.log statements 2024-05-23 15:10:28 +10:00
Mythie 311328471e fix: bump react-pdf and pdfjs-dist to handle cve
Bumps ReactPDF and pdfjs-dist to avoid the CVE that allows
for code execution in pdf's. This change doesn't specifically
upgrade to the latest pdfjs-dist due to issues with top level
await, instead disabling the evaluation of javascript within
the PDF.
2024-05-23 14:47:32 +10:00
Mythie d58a88196a fix: use noto sans for text insertion on pdfs
Use Noto Sans to gracefully handle inserting custom text
on PDF's. Previously we were using Helvetica which is a
standard PDF font but that would fail for any character
that couldn't be encoded in WinANSI.

Noto Sans was chosen as it has support for a large number
of languages and glyphs with challenges now being adding
support for CJK glyphs.
2024-05-23 13:07:37 +10:00
Ephraim Duncan f1c6fc6fb7 chore: update gitpod config (#1151)
## Description
Remove deprecated config from `gitpod.yaml`

The output when it is run in Gitpod

```
HISTFILE=/workspace/.gitpod/cmd-0 history -r; {
npm i &&
npm run dx:up &&
cp .env.example .env &&
set -a; source .env &&
export NEXTAUTH_URL="$(gp url 3000)" &&
export NEXT_PUBLIC_WEBAPP_URL="$(gp url 3000)" &&
export NEXT_PUBLIC_MARKETING_URL="$(gp url 3001)"

} && {
npm run d
}
gitpod /workspace/documenso (chore/update-gitpod) $  HISTFILE=/workspace/.gitpod/cmd-0 history -r; {
> npm i &&
> npm run dx:up &&
> cp .env.example .env &&
> set -a; source .env &&
> export NEXTAUTH_URL="$(gp url 3000)" &&
> export NEXT_PUBLIC_WEBAPP_URL="$(gp url 3000)" &&
> export NEXT_PUBLIC_MARKETING_URL="$(gp url 3001)"
> 
> } && {
> npm run d
> }

> prepare
> husky install

install command is deprecated

added 1842 packages, and audited 1859 packages in 1m

438 packages are looking for funding
  run `npm fund` for details

16 vulnerabilities (1 low, 11 moderate, 3 high, 1 critical)

To address issues that do not require attention, run:
  npm audit fix

To address all issues possible (including breaking changes), run:
  npm audit fix --force

Some issues need review, and may require choosing
a different dependency.

Run `npm audit` for details.
npm notice 
npm notice New minor version of npm available! 10.5.2 -> 10.8.0
npm notice Changelog: https://github.com/npm/cli/releases/tag/v10.8.0
npm notice Run npm install -g npm@10.8.0 to update!
npm notice 

> dx:up
> docker compose -f docker/development/compose.yml up -d

[+] Running 33/3
 ✔ minio Pulled                                                                                                                                          6.6s 
 ✔ database Pulled                                                                                                                                      11.3s 
 ✔ inbucket Pulled                                                                                                                                       6.1s 
[+] Running 5/5
 ✔ Network documenso-development_default  Created                                                                                                        0.1s 
 ✔ Volume "documenso-development_minio"   Created                                                                                                        0.0s 
 ✔ Container database                     Started                                                                                                        1.0s 
 ✔ Container minio                        Started                                                                                                        1.0s 
 ✔ Container mailserver                   Started                                                                                                        1.0s 

> d
> npm run dx && npm run dev


> dx
> npm i && npm run dx:up && npm run prisma:migrate-dev && npm run prisma:seed


> prepare
> husky install

install command is deprecated

up to date, audited 1859 packages in 4s

438 packages are looking for funding
  run `npm fund` for details

18 vulnerabilities (1 low, 11 moderate, 5 high, 1 critical)

To address issues that do not require attention, run:
  npm audit fix

To address all issues possible (including breaking changes), run:
  npm audit fix --force

Some issues need review, and may require choosing
a different dependency.

Run `npm audit` for details.

> dx:up
> docker compose -f docker/development/compose.yml up -d

[+] Running 3/0
 ✔ Container mailserver  Running                                                                                                                         0.0s 
 ✔ Container minio       Running                                                                                                                         0.0s 
 ✔ Container database    Running                                                                                                                         0.0s 

> prisma:migrate-dev
> npm run with:env -- npm run prisma:migrate-dev -w @documenso/prisma


> with:env
> dotenv -e .env -e .env.local -- npm run prisma:migrate-dev -w @documenso/prisma


> @documenso/prisma@1.0.0 prisma:migrate-dev
> prisma migrate dev --skip-seed

Prisma schema loaded from schema.prisma
Datasource "db": PostgreSQL database "documenso", schema "public" at "127.0.0.1:54320"

Applying migration `20230404095503_initial_migration`
Applying migration `20230411134605_doc_208`
Applying migration `20230421134018_doc_214_add_signed_at_field`
Applying migration `20230505085625_create_subscription_table`
Applying migration `20230505085908_update_unique_constraint`
Applying migration `20230505091928_add_past_due_value`
Applying migration `20230605122017_password_reset`
Applying migration `20230605164015_expire_password_reset_token`
Applying migration `20230617040606_add_name_field`
Applying migration `20230617041623_add_email_field`
Applying migration `20230621130930_add_width_and_height_for_fields`
Applying migration `20230621131348_add_document_id_and_email_index`
Applying migration `20230621133446_migrate_field_position_to_float`
Applying migration `20230829165148_user_sharing_link`
Applying migration `20230829180915_recipient_id_for_user_id`
Applying migration `20230830053354_add_service_user`
Applying migration `20230901083000_add_user_signature_column`
Applying migration `20230907041233_add_document_data_table`
Applying migration `20230907074451_insert_old_data_into_document_data_table`
Applying migration `20230907075057_user_roles`
Applying migration `20230907080056_add_created_at_and_updated_at_columns`
Applying migration `20230907082622_remove_old_document_data`
Applying migration `20230912011344_reverse_document_data_relation`
Applying migration `20230914031347_remove_redundant_created_column`
Applying migration `20230917190854_password_reset_token`
Applying migration `20230918111438_update_subscription_constraints_and_columns`
Applying migration `20230920052232_document_meta`
Applying migration `20230920060743_update_share_link_schema`
Applying migration `20230920124941_fix_documentmeta_relation`
Applying migration `20230922121421_fix_document_meta_schema`
Applying migration `20231013012902_add_document_share_link_delete_cascade`
Applying migration `20231025074705_add_email_confirmation_registration`
Applying migration `20231028094931_add_user_timestamp_columns`
Applying migration `20231028095542_use_now_for_last_signed_in`
Applying migration `20231030055821_add_database_indexes`
Applying migration `20231031072857_verify_existing_users`
Applying migration `20231103044612_add_completed_date`
Applying migration `20231105184518_add_2fa`
Applying migration `20231123132053_public_api_api_token`
Applying migration `20231202134005_deletedocuments`
Applying migration `20231202220928_add_recipient_roles`
Applying migration `20231205000309_add_cascade_delete_for_verification_tokens`
Applying migration `20231206073509_add_multple_subscriptions`
Applying migration `20231207134820_add_document_meta_dateformat_timezone`
Applying migration `20231220124343_add_cascade_delete_user_apitoken`
Applying migration `20231221101005_add_templates`
Applying migration `20240115031508_add_password_to_document_meta`
Applying migration `20240131004516_add_user_security_audit_logs`
Applying migration `20240131132916_verify_paid_users`
Applying migration `20240205040421_add_teams`
Applying migration `20240205120648_create_delete_account`
Applying migration `20240206051948_add_teams_templates`
Applying migration `20240206111230_add_document_meta_redirect_url`
Applying migration `20240206131417_add_user_webhooks`
Applying migration `20240208135802_make_expiry_date_optional_api_tokens`
Applying migration `20240209023519_add_document_audit_logs`
Applying migration `20240220115435_add_public_profile_url_bio`
Applying migration `20240221055920_support_team_tokens`
Applying migration `20240222183156_display_banner`
Applying migration `20240222183231_banner_show`
Applying migration `20240222185936_remove_custom`
Applying migration `20240222230527_change_banner_to_site_settings_model`
Applying migration `20240222230604_add_site_banner_to_site_settings`
Applying migration `20240224085633_extend_webhook_trigger_events`
Applying migration `20240226035048_add_recipient_referential_action_for_fields`
Applying migration `20240227003622_migrate_to_cuids_for_webhooks`
Applying migration `20240227015420_add_webhook_call_table`
Applying migration `20240227023747_add_team_webhooks`
Applying migration `20240227031228_add_event_to_webhook_call_model`
Applying migration `20240227111633_rework_user_profiles`
Applying migration `20240306060259_add_passkeys`
Applying migration `20240311113243_add_document_auth`
Applying migration `20240327074701_add_secondary_verification_id`
Applying migration `20240408083413_add_form_values_column`
Applying migration `20240408142543_add_recipient_document_delete`
Applying migration `20240418140819_remove_impossible_field_optional_states`
Applying migration `20240424072655_update_foreign_key_constraints`

The following migration(s) have been applied:

migrations/
  └─ 20230404095503_initial_migration/
    └─ migration.sql
  └─ 20230411134605_doc_208/
    └─ migration.sql
  └─ 20230421134018_doc_214_add_signed_at_field/
    └─ migration.sql
  └─ 20230505085625_create_subscription_table/
    └─ migration.sql
  └─ 20230505085908_update_unique_constraint/
    └─ migration.sql
  └─ 20230505091928_add_past_due_value/
    └─ migration.sql
  └─ 20230605122017_password_reset/
    └─ migration.sql
  └─ 20230605164015_expire_password_reset_token/
    └─ migration.sql
  └─ 20230617040606_add_name_field/
    └─ migration.sql
  └─ 20230617041623_add_email_field/
    └─ migration.sql
  └─ 20230621130930_add_width_and_height_for_fields/
    └─ migration.sql
  └─ 20230621131348_add_document_id_and_email_index/
    └─ migration.sql
  └─ 20230621133446_migrate_field_position_to_float/
    └─ migration.sql
  └─ 20230829165148_user_sharing_link/
    └─ migration.sql
  └─ 20230829180915_recipient_id_for_user_id/
    └─ migration.sql
  └─ 20230830053354_add_service_user/
    └─ migration.sql
  └─ 20230901083000_add_user_signature_column/
    └─ migration.sql
  └─ 20230907041233_add_document_data_table/
    └─ migration.sql
  └─ 20230907074451_insert_old_data_into_document_data_table/
    └─ migration.sql
  └─ 20230907075057_user_roles/
    └─ migration.sql
  └─ 20230907080056_add_created_at_and_updated_at_columns/
    └─ migration.sql
  └─ 20230907082622_remove_old_document_data/
    └─ migration.sql
  └─ 20230912011344_reverse_document_data_relation/
    └─ migration.sql
  └─ 20230914031347_remove_redundant_created_column/
    └─ migration.sql
  └─ 20230917190854_password_reset_token/
    └─ migration.sql
  └─ 20230918111438_update_subscription_constraints_and_columns/
    └─ migration.sql
  └─ 20230920052232_document_meta/
    └─ migration.sql
  └─ 20230920060743_update_share_link_schema/
    └─ migration.sql
  └─ 20230920124941_fix_documentmeta_relation/
    └─ migration.sql
  └─ 20230922121421_fix_document_meta_schema/
    └─ migration.sql
  └─ 20231013012902_add_document_share_link_delete_cascade/
    └─ migration.sql
  └─ 20231025074705_add_email_confirmation_registration/
    └─ migration.sql
  └─ 20231028094931_add_user_timestamp_columns/
    └─ migration.sql
  └─ 20231028095542_use_now_for_last_signed_in/
    └─ migration.sql
  └─ 20231030055821_add_database_indexes/
    └─ migration.sql
  └─ 20231031072857_verify_existing_users/
    └─ migration.sql
  └─ 20231103044612_add_completed_date/
    └─ migration.sql
  └─ 20231105184518_add_2fa/
    └─ migration.sql
  └─ 20231123132053_public_api_api_token/
    └─ migration.sql
  └─ 20231202134005_deletedocuments/
    └─ migration.sql
  └─ 20231202220928_add_recipient_roles/
    └─ migration.sql
  └─ 20231205000309_add_cascade_delete_for_verification_tokens/
    └─ migration.sql
  └─ 20231206073509_add_multple_subscriptions/
    └─ migration.sql
  └─ 20231207134820_add_document_meta_dateformat_timezone/
    └─ migration.sql
  └─ 20231220124343_add_cascade_delete_user_apitoken/
    └─ migration.sql
  └─ 20231221101005_add_templates/
    └─ migration.sql
  └─ 20240115031508_add_password_to_document_meta/
    └─ migration.sql
  └─ 20240131004516_add_user_security_audit_logs/
    └─ migration.sql
  └─ 20240131132916_verify_paid_users/
    └─ migration.sql
  └─ 20240205040421_add_teams/
    └─ migration.sql
  └─ 20240205120648_create_delete_account/
    └─ migration.sql
  └─ 20240206051948_add_teams_templates/
    └─ migration.sql
  └─ 20240206111230_add_document_meta_redirect_url/
    └─ migration.sql
  └─ 20240206131417_add_user_webhooks/
    └─ migration.sql
  └─ 20240208135802_make_expiry_date_optional_api_tokens/
    └─ migration.sql
  └─ 20240209023519_add_document_audit_logs/
    └─ migration.sql
  └─ 20240220115435_add_public_profile_url_bio/
    └─ migration.sql
  └─ 20240221055920_support_team_tokens/
    └─ migration.sql
  └─ 20240222183156_display_banner/
    └─ migration.sql
  └─ 20240222183231_banner_show/
    └─ migration.sql
  └─ 20240222185936_remove_custom/
    └─ migration.sql
  └─ 20240222230527_change_banner_to_site_settings_model/
    └─ migration.sql
  └─ 20240222230604_add_site_banner_to_site_settings/
    └─ migration.sql
  └─ 20240224085633_extend_webhook_trigger_events/
    └─ migration.sql
  └─ 20240226035048_add_recipient_referential_action_for_fields/
    └─ migration.sql
  └─ 20240227003622_migrate_to_cuids_for_webhooks/
    └─ migration.sql
  └─ 20240227015420_add_webhook_call_table/
    └─ migration.sql
  └─ 20240227023747_add_team_webhooks/
    └─ migration.sql
  └─ 20240227031228_add_event_to_webhook_call_model/
    └─ migration.sql
  └─ 20240227111633_rework_user_profiles/
    └─ migration.sql
  └─ 20240306060259_add_passkeys/
    └─ migration.sql
  └─ 20240311113243_add_document_auth/
    └─ migration.sql
  └─ 20240327074701_add_secondary_verification_id/
    └─ migration.sql
  └─ 20240408083413_add_form_values_column/
    └─ migration.sql
  └─ 20240408142543_add_recipient_document_delete/
    └─ migration.sql
  └─ 20240418140819_remove_impossible_field_optional_states/
    └─ migration.sql
  └─ 20240424072655_update_foreign_key_constraints/
    └─ migration.sql

Your database is now in sync with your schema.

✔ Generated Prisma Client (v5.4.2) to ./../../node_modules/@prisma/client in 433ms



> prisma:seed
> npm run with:env -- npm run prisma:seed -w @documenso/prisma


> with:env
> dotenv -e .env -e .env.local -- npm run prisma:seed -w @documenso/prisma


> @documenso/prisma@1.0.0 prisma:seed
> prisma db seed

Running seed command `ts-node --transpileOnly --project ./tsconfig.seed.json ./seed-database.ts` ...
[SEEDING]: initial-seed.ts
Database seeded

🌱  The seed command has been executed.
┌─────────────────────────────────────────────────────────┐
│  Update available 5.4.2 -> 5.14.0                       │
│  Run the following to update                            │
│    npm i --save-dev prisma@latest                       │
│    npm i @prisma/client@latest                          │
└─────────────────────────────────────────────────────────┘

> dev
> turbo run dev --filter=@documenso/web --filter=@documenso/marketing

Turborepo did not find the correct binary for your platform.
We will attempt to install it now.
Installation has succeeded.
• Packages in scope: @documenso/marketing, @documenso/web
• Running dev in 2 packages
• Remote caching disabled
@documenso/marketing:dev: cache bypass, force executing 8e2b04584367b8ee
@documenso/web:dev: cache bypass, force executing 62825fff83b7cfc4
@documenso/marketing:dev: 
@documenso/marketing:dev: > @documenso/marketing@1.2.3 dev
@documenso/marketing:dev: > next dev -p 3001
@documenso/marketing:dev: 
@documenso/web:dev: 
@documenso/web:dev: > @documenso/web@1.2.3 dev
@documenso/web:dev: > next dev -p 3000
@documenso/web:dev: 
@documenso/web:dev:    ▲ Next.js 14.0.3
@documenso/web:dev:    - Local:        http://localhost:3000
@documenso/web:dev:    - Experiments (use at your own risk):
@documenso/web:dev:      · outputFileTracingRoot
@documenso/web:dev: 
@documenso/marketing:dev:    ▲ Next.js 14.0.3
@documenso/marketing:dev:    - Local:        http://localhost:3001
@documenso/marketing:dev:    - Experiments (use at your own risk):
@documenso/marketing:dev:      · outputFileTracingRoot
@documenso/marketing:dev: 
@documenso/web:dev: Attention: Next.js now collects completely anonymous telemetry regarding usage.
@documenso/web:dev: This information is used to shape Next.js' roadmap and prioritize features.
@documenso/web:dev: You can learn more, including how to opt-out if you'd not like to participate in this anonymous program, by visiting the following URL:
@documenso/web:dev: https://nextjs.org/telemetry
@documenso/web:dev: 
@documenso/web:dev:  ✓ Ready in 1868ms
@documenso/marketing:dev: Contentlayer config change detected. Updating type definitions and data...
@documenso/marketing:dev:  ✓ Ready in 2.9s
@documenso/marketing:dev:  ○ Compiling / ...
@documenso/marketing:dev: Generated 28 documents in .contentlayer
@documenso/marketing:dev: Browserslist: caniuse-lite is outdated. Please run:
@documenso/marketing:dev:   npx update-browserslist-db@latest
@documenso/marketing:dev:   Why you should do it regularly: https://github.com/browserslist/update-db#readme
@documenso/marketing:dev:  ✓ Compiled / in 10.8s (2046 modules)
@documenso/web:dev:  ○ Compiling /src/middleware ...
@documenso/web:dev:  ✓ Compiled /src/middleware in 973ms (257 modules)
@documenso/web:dev:  ○ Compiling /documents ...
@documenso/web:dev: Browserslist: caniuse-lite is outdated. Please run:
@documenso/web:dev:   npx update-browserslist-db@latest
@documenso/web:dev:   Why you should do it regularly: https://github.com/browserslist/update-db#readme
@documenso/web:dev:  ✓ Compiled /documents in 17.7s (4376 modules)
@documenso/web:dev: *********************************************************************
@documenso/web:dev: *
@documenso/web:dev: *
@documenso/web:dev: Please change the encryption key from the default value of "CAFEBABE"
@documenso/web:dev: *
@documenso/web:dev: *
@documenso/web:dev: *********************************************************************
@documenso/web:dev:  ○ Compiling /signin ...
@documenso/web:dev:  ✓ Compiled /signin in 10.3s (4380 modules)
@documenso/web:dev: *********************************************************************
@documenso/web:dev: *
@documenso/web:dev: *
@documenso/web:dev: Please change the encryption key from the default value of "CAFEBABE"
@documenso/web:dev: *
@documenso/web:dev: *
@documenso/web:dev: *********************************************************************

```
2024-05-23 10:06:11 +07:00
Timur Ercan babdbccbd3 chore: change default sender name to match prod (#1161)
change the default sender to sth. nicer
2024-05-22 19:19:29 +07:00
Ephraim Duncan 3e634fd975 chore: update docker compose command (#1159) 2024-05-22 19:15:31 +07:00
Mythie 4c0b772fc9 fix: rewrite form flattening handler
Previously we used the form flattening method from PDF-Lib
but unfortunately when it encountered orphaned form items
or other PDF oddities it would throw an error.

Because of this certain documents would fail to seal and
be stuck in a pending state with no recourse available.
This change rewrites the form flattening handler to be
more lenient when coming across the unknown opting to skip
items it can't handle rather than abort.
2024-05-22 21:58:30 +10:00
Ephraim Atta-Duncan 72d0a1b69c chore: custom tooltip 2024-05-21 22:53:31 +00:00
Ephraim Atta-Duncan 39e7eb0568 fix: remove cummulative 2024-05-21 22:45:32 +00:00
Timur Ercan 24b228acf7 feat: show time in documents table (#1123)
---
name: Pull Request
about: Submit changes to the project for review and inclusion
---

## Description

Display time in 12h format in the documents table.
<!--- Describe the changes introduced by this pull request. -->
<!--- Explain what problem it solves or what feature/fix it adds. -->

## Related Issue

<!--- If this pull request is related to a specific issue, reference it
here using #issue_number. -->
<!--- For example, "Fixes #123" or "Addresses #456". -->
Fixes #1077 
## Changes Made

<!--- Provide a summary of the changes made in this pull request. -->
<!--- Include any relevant technical details or architecture changes.
-->

- Use DateTime.DATETIME_SHORT
- ...

## Testing Performed

<!--- Describe the testing that you have performed to validate these
changes. -->
<!--- Include information about test cases, testing environments, and
results. -->

- Tested time in different timezone.
- Ran tests in web and mobile browser

1. Login 
2. Add a document
3. Verify that you see date and time in 12h format as per your locale.

## Checklist

<!--- Please check the boxes that apply to this pull request. -->
<!--- You can add or remove items as needed. -->

- [x] I have tested these changes locally and they work as expected.
- [x] I have added/updated tests that prove the effectiveness of these
changes.
- [x] I have updated the documentation to reflect these changes, if
applicable.
- [x] I have followed the project's coding style guidelines.
- [x] I have addressed the code review feedback from the previous
submission, if applicable.

## Additional Notes
<img width="1512" alt="Screenshot 2024-04-29 at 04 21 53"
src="https://github.com/documenso/documenso/assets/29673073/778155d4-a920-40bd-acdc-7451c9c5d4b7">


<img width="300" alt="Screenshot 2024-04-29 at 04 22 18"
src="https://github.com/documenso/documenso/assets/29673073/3471de0f-f426-4ea1-be1e-220462aff9e4">
2024-05-21 14:14:11 +02:00
Timur Ercan c1449e01b1 chore: remove cummulative for clarity 2024-05-21 14:07:27 +02:00
Timur Ercan 7da5535667 chore: grammarly 2024-05-21 13:04:48 +02:00
Ephraim Atta-Duncan 95a94d4fc1 chore: use single chart graphs 2024-05-21 09:28:23 +00:00
Rushat Gabhane e072e270f8 Merge branch 'main' into show-time 2024-05-21 14:19:27 +05:30
Lucas Smith d37edc4351 fix: syntax in production compose.yml (#1143) 2024-05-20 12:51:56 +10:00
Timur Ercan 09ead88d74 feat: sunsetting early adopters blog article 2024-05-17 11:59:25 +02:00
Timur Ercan 6f9906164d chore: save text 2024-05-16 19:14:52 +02:00
Timur Ercan fb8ab9719b chore: ex ea customer label on open page 2024-05-16 18:58:37 +02:00
Timur Ercan 9f9c0c10e9 chore: remove the plan, it's cleaner 2024-05-16 18:41:33 +02:00
Timur Ercan f8b51a7ac2 chore: add teams pricing and move enterprise cta 2024-05-16 18:39:40 +02:00
Rushat Gabhane a877c64aca Merge branch 'main' into show-time 2024-05-12 21:07:15 +05:30
David Nguyen 2f86bb523b feat: add template enhancements (#1154)
## Description

General enhancements for templates.

## Changes Made

Added the following changes to the template flow:
- Allow adding document meta settings
- Allow adding email settings
- Allow adding document access & action authentication
- Allow adding recipient action authentication
- Save the state between template steps similar to how it works for
documents

Other changes:
- Extract common fields between document and template flows
- Remove the title field from "Use template" since we now have it as
part of the template flow
- Add new API endpoint for generating templates

## Testing Performed

Added E2E tests for templates and creating documents from templates
2024-05-10 19:45:19 +07:00
Rushat Gabhane 788933b75d Merge branch 'main' into show-time 2024-05-08 19:18:24 +05:30
Rushat Gabhane bbcbc56e70 feat: 12h format 2024-05-08 19:17:47 +05:30
Adithya Krishna 8f9c07aa8e chore: updated triage label (#1152)
Description:

This PR updates the triage label for new issues
2024-05-08 17:56:23 +05:30
Adithya Krishna cc4efddabf chore: updated triage label 2024-05-08 17:03:57 +05:30
Adithya Krishna 98672560ca chore: update self signer logic
Signed-off-by: Adithya Krishna <aadithya794@gmail.com>
2024-05-08 17:02:01 +05:30
Adithya Krishna 6f6ed05569 Merge branch 'feat/start-selfSign' of https://github.com/documenso/documenso into feat/start-selfSign 2024-05-08 15:35:43 +05:30
Adithya Krishna 5e3f55c616 Merge branch 'main' of https://github.com/documenso/documenso into feat/start-selfSign 2024-05-08 15:34:18 +05:30
Adithya Krishna 968b116012 Merge branch 'main' into show-time 2024-05-08 15:27:30 +05:30
Catalin Pit 2ba0f48c61 fix: unauthorized access error api tokens page team (#1134) 2024-05-08 12:03:21 +07:00
Adithya Krishna 5d5d0210fa chore: update github actions (#1085)
**Description:**

This PR updates and adds a new action to assign `status: assigned` label

---------

Signed-off-by: Adithya Krishna <aadithya794@gmail.com>
2024-05-08 11:52:26 +07:00
David Nguyen e50ccca766 fix: allow template recipients to be filled (#1148)
## Description

Update the template flow to allow for entering recipient placeholder
emails and names

## Changes Made

- General refactoring
- Added advanced recipient settings for future usage
2024-05-07 17:22:24 +07:00
Ephraim Atta-Duncan f363dee761 fix: downloaded files should have _signed 2024-05-07 10:19:09 +00:00
Ephraim Atta-Duncan 50b57d5aa5 fix: minor changes based on review 2024-05-07 09:35:59 +00:00
David Nguyen d7a3c40050 feat: add general template enhancements (#1147)
## Description

Refactor the "use template" flow

## Changes Made

- Add placeholders for recipients
- Add audit log when document is created
- Trigger DOCUMENT_CREATED webhook when document is created
- Remove role field when using template
- Remove flaky logic when associating template recipients with form
recipients
- Refactor to use `Form` 

### Using template when document has no recipients

<img width="529" alt="image"
src="https://github.com/documenso/documenso/assets/20962767/a8494ac9-0397-4e3b-a0cf-818c8454a55c">

### Using template with recipients 

<img width="529" alt="image"
src="https://github.com/documenso/documenso/assets/20962767/54d949fc-ed6a-4318-bfd6-6a3179896ba9">

### Using template with the send option selected

<img width="529" alt="image"
src="https://github.com/documenso/documenso/assets/20962767/541b2664-0540-43e9-83dd-e040a45a44ea">
2024-05-07 15:04:12 +07:00
Timur Ercan dc11676d28 fix: profile claim name length (#1144)
fixes the caim name length on the profile claim popup
2024-05-07 14:42:16 +07:00
Catalin Pit e8d4fe46e5 fix: custom email message for self-signers (#1120) 2024-05-06 09:22:50 +03:00
Adithya Krishna 55d8afe870 Merge branch 'main' into feat/start-selfSign 2024-05-06 11:37:16 +05:30
David Nguyen 64e3e2c64b fix: disable encrypted pdfs (#1130)
## Description

Currently if you complete a pending encrypted document, it will prevent
the document from being sealed due to the systems inability to decrypt
it.

This PR disables uploading any documents that cannot be loaded as a
temporary measure.

**Note**
This is a client side only check

## Changes Made

- Disable uploading documents that cannot be parsed
- Refactor putFile to putDocumentFile
- Add a flag as a backup incase something goes wrong
2024-05-03 22:25:24 +07:00
david-loe e4620efa4a fix syntax in production compose.yml 2024-05-03 14:48:39 +02:00
Rushat Gabhane 84bbcea7bb Merge branch 'main' into show-time 2024-05-03 12:29:23 +05:30
Lucas Smith 15dee5ef35 fix: enforce users to have stripe account (#1131)
## Description

Currently users who sign in via Google SSO do not get assigned a Stripe
customer account.

This enforces the Stripe customer requirement on sign in.

There might be a better place to put this so it's open to any
suggestions.
2024-05-01 16:48:05 +10:00
Lucas Smith 28d6f6e2e8 fix: improve sealing process (#1133)
## Description

Improves the sealing process by being strict on how long certificate
generation can take, opting to fail generation and continue sealing.

Also changes the ordering of sealing so an error in the process won't
also cause a document to be "COMPLETED" since it hasn't been
cryptographically sealed yet.

The downside to this change is that documents that fail during sealing
will require manual intervention as a signer or owner won't be able to
*complete* the document.

## Testing Performed

- Modified code to force specific failure modes to occur and verified
that documents were either gracefully sealed without a certificate or
not sealed and not completed.
2024-05-01 16:47:11 +10:00
Mythie 78dc57a6eb fix: improvements from review 2024-05-01 16:16:04 +10:00
Mythie d3528f74f0 fix: improve sealing process
Improves the sealing process by being strict on how
long certificate generation can take, opting to fail
generation and continue sealing.

Also changes the ordering of sealing so an error in the
process won't also cause a document to be "COMPLETED"
since it hasn't been cryptographically sealed yet.

The downside to this change is that documents that fail
during sealing will require manual intervention as a signer
or owner won't be able to *complete* the document.
2024-05-01 14:18:01 +10:00
David Nguyen dbd452be97 fix: delete pending documents (#1118)
## Description

Currently deleting a pending document where you are a recipient off will
delete the document, but will also throw an error.

This is due to the recipient being updated after the document deleted,
which is only supposed to happen for completed documents.
2024-04-30 20:53:18 +07:00
Adithya Krishna 5109bb17d6 chore: fix button styling (#1132)
**Description:**

This PR fixes the button styling issue

**Before:**


![image](https://github.com/documenso/documenso/assets/23498248/0af045aa-3714-48d8-9c22-6cd171b07079)

**After:**

<img width="1280" alt="Screenshot 2024-04-30 at 6 48 47 PM"
src="https://github.com/documenso/documenso/assets/23498248/e7dd99de-60fc-4cc2-aefc-21b130aa0116">
2024-04-30 18:57:29 +05:30
Adithya Krishna 6974a76ed4 chore: fix button styling 2024-04-30 18:47:49 +05:30
Adithya Krishna 5efb0894e6 chore: updated dark mode text (#1129)
Description:

This PR updates the dark mode text for this article,
https://app.documenso.com/articles/signature-disclosure
2024-04-30 17:14:28 +05:30
David Nguyen cfec366c1a fix: refactor 2024-04-30 15:54:24 +07:00
David Nguyen 8622e68853 fix: add logging 2024-04-30 15:50:22 +07:00
Adithya Krishna 6df525b670 feat: updated signer logic
Signed-off-by: Adithya Krishna <aadithya794@gmail.com>
2024-04-30 12:05:42 +05:30
Adithya Krishna 0e16a86e74 chore: updated dark mode text 2024-04-30 11:55:01 +05:30
Rushat Gabhane dca4b8eaec Merge branch 'main' into show-time 2024-04-30 09:31:42 +05:30
Adithya Krishna db9e605031 chore: fix lint issues
Signed-off-by: Adithya Krishna <aadithya794@gmail.com>
2024-04-30 01:32:58 +05:30
David Nguyen 97d334a1da fix: force users to have a Stripe customer on sign in 2024-04-29 20:15:40 +07:00
Adithya Krishna bde0f5893f feat: update add self signer logic 2024-04-29 17:49:50 +05:30
Adithya Krishna 6b5750c7bf chore: revert previous changes 2024-04-29 17:48:00 +05:30
Adithya Krishna 917c83fc5f chore: refactor removal logic 2024-04-29 17:30:01 +05:30
Adithya Krishna e82e402540 feat: remove the existing empty signer if its the only one 2024-04-29 17:10:56 +05:30
Mythie 345e42537a fix: include all document meta when using the public api 2024-04-29 12:42:22 +10:00
Rushat Gabhane 80c03fcf3f feat: show time in documents table 2024-04-29 04:28:13 +05:30
Sumit Bisht c98c1b9467 added teams url under a team name in teams section 2024-04-28 19:35:57 +05:30
Lucas Smith 8a24ca2065 fix: complete document when all recipients are CC (#1113)
## Description

Automatically marks the document as completed if all the recipients are
CC.

## Changes Made

Added an if statement in the last form step (`onAddSubjectFormSubmit`)
that checks if all the recipients are CC. If so, the document status is
updated to `COMPLETED`.

## Testing Performed

Tested the changes and they work as expected.

## Checklist

<!--- Please check the boxes that apply to this pull request. -->
<!--- You can add or remove items as needed. -->

- [x] I have tested these changes locally and they work as expected.
- [ ] I have added/updated tests that prove the effectiveness of these
changes.
- [ ] I have updated the documentation to reflect these changes, if
applicable.
- [x] I have followed the project's coding style guidelines.
- [ ] I have addressed the code review feedback from the previous
submission, if applicable.


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **New Features**
- Enhanced document sending logic to update document status based on
recipient roles.

- **Bug Fixes**
- Removed redundant form submission handling in the document editing
feature.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-04-27 21:39:25 +10:00
Lucas Smith 06dd8219a5 fix: increase trpc max duration (#1121)
## Description

Increase the max duration of the TRPC API endpoint to 120 seconds.
2024-04-27 21:38:21 +10:00
David Nguyen 74b9bc786b fix: extend 2024-04-27 18:29:52 +07:00
David Nguyen 364c499927 fix: increase trpc max duration 2024-04-27 15:21:46 +07:00
David Nguyen b0ce06f6fe Merge branch 'main' into fix/doc-status-cc-role 2024-04-26 17:17:07 +07:00
David Nguyen 20edee7f1a fix: ssr feature flags (#1119)
## Description

Feature flags are broken on SSR due to this error

```
TypeError: fetch failed
    at Object.fetch (node:internal/deps/undici/undici:11731:11)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
  cause: RequestContentLengthMismatchError: Request body length does not match content-length header
      at write (node:internal/deps/undici/undici:8590:41)
      at _resume (node:internal/deps/undici/undici:8563:33)
      at resume (node:internal/deps/undici/undici:8459:7)
      at [dispatch] (node:internal/deps/undici/undici:7704:11)
      at Client.Intercept (node:internal/deps/undici/undici:7377:20)
      at Client.dispatch (node:internal/deps/undici/undici:6023:44)
      at [dispatch] (node:internal/deps/undici/undici:6254:32)
      at Pool.dispatch (node:internal/deps/undici/undici:6023:44)
      at [dispatch] (node:internal/deps/undici/undici:9343:27)
      at Agent.Intercept (node:internal/deps/undici/undici:7377:20) {
    code: 'UND_ERR_REQ_CONTENT_LENGTH_MISMATCH'
  }
}
```

I've removed content-length header since it isn't mandatory to my
knowledge for get requests.

## Changes

- Add fallback local flags when individual flag request fails
- Add error logging
- Remove `content-length` from headers being passed to Posthog
2024-04-26 16:01:09 +07:00
Lucas Smith 9bc5818d19 fix: use cdp and upgrade playwright again (#1117)
## Description

Upgrade playwright once again and use CDP for remote connections to
avoid version lock-in with `playwright.connect`

Resolves the issue where all CI is failing currently due to downgrading
playwright.
2024-04-26 15:56:55 +10:00
Mythie 481d739c37 chore: update package-lock 2024-04-26 13:25:16 +10:00
Mythie 88dedc9829 fix: use cdp and upgrade playwright again 2024-04-26 13:18:31 +10:00
Lucas Smith 4080806606 fix: minor updates 2024-04-26 02:17:56 +00:00
Lucas Smith e949fb14ae fix: hide team webhooks from users (#1116)
## Description

Currently if you create a team webhook, you can see it in your personal
webhooks.

However, interacting with them will throw errors because there is server
side logic preventing any interaction with them since they are outside
of the correct context.

So the solution is to either:
- Allow the user to edit the team webhooks that they created on their
personal webhooks page
- Hide team webhooks for personal webhooks pages

This PR goes with the second option, but is open to suggestions.
2024-04-26 11:14:52 +10:00
David Nguyen e1573465f6 fix: hide team webhooks from users 2024-04-25 23:32:59 +07:00
Lucas Smith 0062359977 feat: add visible completed fields (#1109)
## Description

Added the ability for recipients to see fields from other recipients who
have completed the document when they are signing the document

Added the ability for the document owner to see fields from recipients
who have completed the field on the document page view (only visible
when the document is pending)


## 🚨🚨 Migrations🚨🚨

- Drop all `Fields` that do not have a `Recipient` set (not sure how it
was possible in the first place)
- Remove optional `Recipient` field on `Field` which doesn't make sense 

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

## Summary by CodeRabbit

- **New Features**
- Enhanced document viewing by adding read-only fields based on document
status.
- Improved signing page by fetching and displaying completed fields for
tokens.
- Updated avatar component to show recipient status with tooltips for
better user interaction.

- **Bug Fixes**
- Made `recipientId` a required field in the database to ensure data
consistency.

- **Refactor**
- Optimized popover functionality in UI components for better
performance and user experience.

- **Documentation**
- Added detailed component and function descriptions for new features in
the system.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-04-25 20:53:13 +10:00
Lucas Smith 03727bfad2 fix: disable cert download (#1114)
## Description

Disable the document certificate download button when the document is
not complete

## Changes Made

- Disable UI button
- Disable TRPC API endpoint

## Testing Performed

Tested locally for pending, draft and completed documents
2024-04-25 20:43:52 +10:00
Lucas Smith c4a680caf7 fix: hide account action reauth (#1115)
## Description

Hide the account reauth option

<img width="527" alt="image"
src="https://github.com/documenso/documenso/assets/20962767/ee2169c7-856b-41ae-b756-43f15c2e8f69">

<img width="527" alt="image"
src="https://github.com/documenso/documenso/assets/20962767/42ecc50a-2a7d-461b-9994-1af8f4a147ed">
2024-04-25 20:42:39 +10:00
David Nguyen 1e33bc2aa3 Merge branch 'main' into fix/doc-status-cc-role 2024-04-24 20:30:10 +07:00
David Nguyen 4de122f814 fix: hide account action reauth 2024-04-24 20:07:38 +07:00
David Nguyen e4cf9c8251 fix: add server logic 2024-04-24 19:51:18 +07:00
David Nguyen 41ed6c9ad7 fix: disable cert download when document not complete 2024-04-24 19:49:10 +07:00
Mythie 713cd09a06 fix: downgrade playwright 2024-04-24 19:07:18 +10:00
Mythie 87423e240a chore: update foreign key constraints 2024-04-24 17:32:11 +10:00
Catalin Pit d7959950e2 fix: edit-document line 2024-04-24 09:41:34 +03:00
Catalin Pit bb43547a45 fix: complete document when all recipients are CC 2024-04-24 09:39:47 +03:00
Catalin Pit 3fb69422e8 Merge branch 'main' into fix/doc-status-cc-role 2024-04-23 14:26:37 +03:00
Catalin Pit 4d5365bddc fix: complete document when all recipients are CC 2024-04-23 14:24:58 +03:00
Adithya Krishna 9298213177 chore: added filename extension check (#1106)
**Description:**

This PR adds a check for filename title and if the title ends with
`.pdf` then the extension isnt added or else its added

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit


- **Bug Fixes**
- Enhanced email attachment handling to ensure PDF files are correctly
identified with a ".pdf" extension.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-04-23 15:04:38 +05:30
Catalin Pit 0eee570781 fix: complete document when all recipients are CC 2024-04-23 12:33:40 +03:00
David Nguyen afaeba9739 fix: resize fields 2024-04-22 13:31:49 +07:00
Catalin Pit 4b90adde6b feat: download completed docs via api (#1078)
## Description

Allow users to download a completed document via API.

## Testing Performed

Tested the code locally by trying to download both draft and completed
docs. Works as expected.

## Checklist

- [x] I have tested these changes locally and they work as expected.
- [ ] I have added/updated tests that prove the effectiveness of these
changes.
- [ ] I have updated the documentation to reflect these changes, if
applicable.
- [x] I have followed the project's coding style guidelines.
- [ ] I have addressed the code review feedback from the previous
submission, if applicable.


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **New Features**
- Implemented functionality to download signed documents directly from
the app.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-04-19 18:04:11 +07:00
David Nguyen f6e6dac46c fix: update migration to drop invalid fields 2024-04-19 17:58:32 +07:00
David Nguyen a97ffa97a4 Merge branch 'main' into feat/visible-fields 2024-04-19 17:54:32 +07:00
Catalin Pit fceb0eaac9 feat: update emails for self-signer (#1108)
## Description

Updated the email content based on whether the document owner is a
recipient or not.

If the document owner is a recipient (self-signer):
* the email subject will be `Please view/sign/approve your document`
* the email header will be `Please view/sign/approve your document
"<your-doc-title>"`
* the email content will be `You have initiated the document
"<your-doc-title>" that requires you to view/sign/approve it.`

Otherwise:
* the email subject will be `Please view/sign/approve this document`
* the email header will be `<doc-owner> has invited you to
view/sign/approve "<doc-title>"`
* the email content will be `<doc-owner> has invited you to
view/sign/approve the document "<doc-title>".`


## Related Issue

Related to #1091 

## Testing Performed

Tested the feature with a different number of recipients (including and
excluding the document owner - self-signer). Tested both the sending and
resending functionality.

## Checklist

- [x] I have tested these changes locally and they work as expected.
- [ ] I have added/updated tests that prove the effectiveness of these
changes.
- [ ] I have updated the documentation to reflect these changes, if
applicable.
- [x] I have followed the project's coding style guidelines.
- [ ] I have addressed the code review feedback from the previous
submission, if applicable.

## UI Screenshots

![CleanShot 2024-04-18 at 12 26
11@2x](https://github.com/documenso/documenso/assets/25515812/ca80f625-befb-4cbc-a541-f2186379d2e8)
![CleanShot 2024-04-18 at 12 27
40@2x](https://github.com/documenso/documenso/assets/25515812/8bcbb6fc-ba98-4fa1-8538-2d062febd27b)
![CleanShot 2024-04-18 at 12 27
53@2x](https://github.com/documenso/documenso/assets/25515812/25d77d98-b5ec-4270-8ffa-43774fe70526)
![CleanShot 2024-04-18 at 12 30
00@2x](https://github.com/documenso/documenso/assets/25515812/a90bb8e3-3ea8-42ff-9971-559b3e81ae6f)


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

## Summary by CodeRabbit

- **New Features**
- Enhanced the document invitation components to support scenarios where
the recipient is also the sender, providing customized email content and
subject lines.
- Introduced new properties in email templates to improve clarity and
relevance based on the user's role in the document signing process.

- **Refactor**
- Updated components to use a more flexible `headerContent` property for
displaying invitation headers, replacing previous individual inviter
details.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-04-19 17:45:33 +07:00
David Nguyen bd40e63392 fix: update document deletion logic (#1100) 2024-04-19 17:37:38 +07:00
David Nguyen 6e09a4700b fix: prevent signing draft documents (#1111)
## Description

Currently users can sign and complete draft documents, which will result
in a completed document in an invalid state.

## Changes Made

- Prevent recipients from inserting or uninserting fields for draft
documents
- Prevent recipients from completing draft documents 
- Remove ability to copy signing tokens unless document is pending

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **New Features**
- Enhanced document status visibility and control across various
components in the application. Users can now see and interact with
document statuses more dynamically in views like `DocumentPageView`,
`DocumentEditPageView`, and `DocumentsDataTable`.
- Improved document signing process with updated status checks, ensuring
actions like signing, completing, and removing fields are only available
under appropriate document statuses.

- **Bug Fixes**
- Adjusted document status validation logic in server-side operations to
prevent actions on incorrectly stated documents, enhancing the overall
security and functionality of document processing.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-04-19 16:17:32 +07:00
David Nguyen 6526377f1b feat: add visible completed fields 2024-04-18 21:56:31 +07:00
Adithya Krishna f8ddb0f922 chore: update filename for bulk recipients 2024-04-18 18:12:08 +05:30
Adithya Krishna 96e4797cdd Merge branch 'main' into chore/pdf-extension 2024-04-18 18:02:58 +05:30
Catalin Pit 3d3c53db02 feat: add extra info for recipient roles (#1105)
## Description

Add additional information for each role to help document owners
understand what each role involves.

## Changes Made

![CleanShot 2024-04-16 at 10 24
19](https://github.com/documenso/documenso/assets/25515812/bac6cd7d-fbe2-4987-ac17-de08db882eda)
![CleanShot 2024-04-16 at 10 24
27](https://github.com/documenso/documenso/assets/25515812/1bd23021-e971-451a-8e36-df5db57687f7)
![CleanShot 2024-04-16 at 10 24
35](https://github.com/documenso/documenso/assets/25515812/e658e86e-7fa1-4a40-9ed9-317964388e61)

## Testing Performed

Tested the changes locally.

## Checklist

<!--- Please check the boxes that apply to this pull request. -->
<!--- You can add or remove items as needed. -->

- [x] I have tested these changes locally and they work as expected.
- [ ] I have added/updated tests that prove the effectiveness of these
changes.
- [ ] I have updated the documentation to reflect these changes, if
applicable.
- [x] I have followed the project's coding style guidelines.
- [ ] I have addressed the code review feedback from the previous
submission, if applicable.


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **New Features**
- Updated recipient role terminology and added tooltips in the
`AddSignersFormPartial` component:
		- "Signer" changed to "Needs to sign" with tooltip
		- "Receives copy" changed to "Needs to approve" with tooltip
		- "Approver" changed to "Needs to view" with tooltip
		- "Viewer" changed to "Receives copy" with tooltip
- Enhanced select dropdown options with icons and tooltips for different
recipient roles in the `AddTemplatePlaceholderRecipients` component.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Timur Ercan <timur.ercan31@gmail.com>
2024-04-17 19:36:54 +07:00
David Nguyen 8fe67e167c fix: duplicate templates (#1104)
## Description

Fix the issue where duplicate templates can be created

## Changes Made

- Prevent duplicate templates by correctly disabling elements
- Clear the PDF when the form is reset
- General UI changes to new template dialog for consistency
- Add description for new template dialog
- Add close button for new template dialog

## Testing Performed

Manual testing

## Checklist

- [X] I have tested these changes locally and they work as expected.
- [X] I have followed the project's coding style guidelines.

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **New Features**
- Introduced new components in the template creation dialog for better
usability: `DialogClose`, `DialogDescription`, and `DialogFooter`.
	- Enhanced file upload handling and display.
- Added a cancel button and a create template button to the dialog
footer for improved navigation.

- **Refactor**
- Updated the dialog content and form layout for a more intuitive user
experience.
	- Refactored form structure and labels for clarity.

- **Removed Features**
	- Removed the `Label` component from the dialog.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-04-17 19:13:54 +07:00
Timur Ercan 18b39eb538 chore: fix text padding (#1107)
**Description:**

This PR fixes the text padding 

**Before:**

<img width="639" alt="Screenshot 2024-04-17 at 4 10 51 AM"
src="https://github.com/documenso/documenso/assets/23498248/a46fdb12-4ec6-4084-af3a-ae794e535e6f">

**After:**

<img width="680" alt="Screenshot 2024-04-17 at 4 09 44 AM"
src="https://github.com/documenso/documenso/assets/23498248/0b9c6e8c-4116-4bde-a19d-f907fb93ad5d">


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **Style**
- Improved the layout by adding top margin to the message display on the
signing completion page.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-04-17 12:39:35 +02:00
Adithya Krishna 3bc9b5ada0 chore: fix text padding 2024-04-17 04:08:41 +05:30
Adithya Krishna 1126fe4bff chore: added filename extension check 2024-04-17 03:52:59 +05:30
Deep Golani db9899d293 fix: duplicate modal instances from hotkey activation (#1058)
## Description
Currently, when the command menu is opened using the Command+K hotkey,
two modals are getting rendered.
This is because the modals are mounted in two components: header and
desktop-nav. Upon triggering the hotkey, both modals are rendered.

## Related Issue
#1032 

## Changes Made
The changes I made are in the desktop nav component. If the desktop nav
receives the command menu state value and the state setter function, it
will trigger only that. If not, it will trigger the state setter that is
defined in the desktop nav. This way, we are preventing the modal from
mounting two times.

## Testing Performed
- Tested behaviour of command menu in the portal
- Tested on browsers chrome, arc, safari, chrome, firefox

## Checklist
- [x] I have tested these changes locally and they work as expected.
- [ ] I have added/updated tests that prove the effectiveness of these
changes.
- [ ] I have updated the documentation to reflect these changes, if
applicable.
- [x] I have followed the project's coding style guidelines.
- [ ] I have addressed the code review feedback from the previous
submission, if applicable.



<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **New Features**
- Enhanced the navigation experience by integrating command menu state
management directly within the `DesktopNav` component, allowing for
smoother interactions and control.
- **Refactor**
- Simplified the handling of the command menu by removing the
`CommandMenu` component and managing its functionality within
`DesktopNav`.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: David Nguyen <davidngu28@gmail.com>
2024-04-16 19:42:28 +07:00
Catalin Pit 0eeccfd643 feat: add myself as signer (#1091)
## Description

This PR introduces the ability to add oneself as a signer by simply
clicking a button, rather than filling the details manually.

### "Add Myself" in the document creation flow


https://github.com/documenso/documenso/assets/25515812/0de762e3-563a-491f-a742-9078bf1d627d

### "Add Myself" in the document template creation flow


https://github.com/documenso/documenso/assets/25515812/775bae01-3f5a-4b24-abbf-a47b14ec594a


## Related Issue

Addresses
[#113](https://github.com/documenso/backlog-internal/issues/113)

## Changes Made

Added a new button that grabs the details of the logged-in user and
fills the fields *(email, name, and role)* automatically when clicked.

## Testing Performed

Tested the changes locally through the UI.

## Checklist

- [x] I have tested these changes locally and they work as expected.
- [ ] I have added/updated tests that prove the effectiveness of these
changes.
- [ ] I have updated the documentation to reflect these changes, if
applicable.
- [x] I have followed the project's coding style guidelines.
- [ ] I have addressed the code review feedback from the previous
submission, if applicable.



<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **New Features**
- Introduced the ability for users to add themselves as signers within
documents seamlessly.
- **Enhancements**
- Improved form handling logic to accommodate new self-signer
functionality.
- Enhanced user interface elements to support the addition of self as a
signer, including a new "Add myself" button and disabling input fields
during the process.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-04-16 15:18:06 +07:00
Adithya Krishna aa4b6f1723 feat: updated mobile header (#1004)
**Description:**

- Updated mobile header with respect to latest designs 

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **New Features**
- Added a new `showText` property to the `MenuSwitcher` component to
control text visibility.
- Added a `textSectionClassName` property to the `AvatarWithText`
component for conditional text section styling.
- Updated the `CommandDialog` and `DialogContent` components with new
positioning and styling properties.

- **Style Updates**
- Adjusted text size responsiveness in the `Hero` component for various
screen sizes.
- Modified text truncation and input styling in the `Widget` component.
- Changed the width of the `SheetContent` element in `MobileNavigation`
and adjusted footer layout.

- **Documentation**
  - Added instructions for certificate placement in `SIGNING.md`.

- **Refactor**
- Standardized type imports across various components and utilities for
improved type checking.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Signed-off-by: Adithya Krishna <adithya@documenso.com>
Signed-off-by: Adithya Krishna <aadithya794@gmail.com>
Co-authored-by: David Nguyen <davidngu28@gmail.com>
2024-04-15 15:52:34 +07:00
Catalin Pit c8a09099a3 fix: mask recipient token (#1051)
The searchDocuments function is used for the shortcuts commands, afaik.
The function returns the documents that match the user query (if any),
alongside all their recipients.

The reason for that is so it can build the path for the document. E.g.
if you're the document owner, the document path will be
`..../documents/{id}`. But if you're a signer for example, the document
path (link) will be `..../sign/{token}`.

So instead of doing that on the frontend, I moved it to the backend.

At least that's what I understood. If I'm wrong, please correct me.

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **New Features**
- Enhanced the `CommandMenu` component to simplify search result
generation and improve document link management based on user roles.
- **Refactor**
- Updated document search logic to include recipient token masking and
refined document mapping.
- **Style**
	- Minor formatting improvement in document routing code.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-04-15 14:29:56 +07:00
Catalin Pit 0f87dc047b fix: swagger documentation authentication (#1037)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit


- **Refactor**
- Enhanced the API specification generation process to include operation
IDs, security schemes, and security definitions more efficiently.


<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Lucas Smith <me@lucasjamessmith.me>
2024-04-15 14:27:46 +07:00
Matt Kilgore 788c6269a2 fix: signup page oidc function 2024-04-13 21:16:39 -04:00
Matt Kilgore bd4a1c4c09 fix: update .env.example 2024-04-13 21:06:24 -04:00
Matt Kilgore e0440fd8a2 feat: add oidc support 2024-04-13 20:46:08 -04:00
Timur Ercan 80c758fb62 chore: audit log menu item label (#1102) 2024-04-12 20:37:08 +07:00
David Nguyen 7705dbae0c feat: add document log page link (#1099)
## Description

Adds a link from the document page view to the document page log view

<img width="289" alt="image"
src="https://github.com/documenso/documenso/assets/20962767/335af85a-26c3-4849-a54e-25eb62373574">
2024-04-11 15:04:36 +07:00
Catalin Pit 8b58f10cbe feat: add cta on complete page (#1028)
![CleanShot 2024-03-18 at 11 45
40](https://github.com/documenso/documenso/assets/25515812/ae3b88de-359d-4019-866a-a76097bbb0fe)
![CleanShot 2024-03-18 at 11 46
25](https://github.com/documenso/documenso/assets/25515812/b5ff7078-623e-476c-8800-17d14bc8efa9)


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **New Features**
- Introduced a "Claim Account" feature allowing new users to sign up by
providing their name, email, and password.
- Enhanced user experience for both logged-in and non-logged-in users
with improved UI/UX and additional functionality.

- **Enhancements**
- Implemented form validation and error handling for a smoother sign-up
process.
	- Integrated analytics to track user actions during account claiming.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Lucas Smith <me@lucasjamessmith.me>
Co-authored-by: David Nguyen <davidngu28@gmail.com>
2024-04-11 10:09:04 +03:00
Timur Ercan fe1f0e6a76 fix: remove status widget for now (#1098)
- removing widget since stability fix seems somehow worse in prod
2024-04-10 18:25:56 +02:00
Timur Ercan a82975fd78 chore: keep import until fix or complete remove 2024-04-10 18:24:32 +02:00
Timur Ercan a4967f19e8 fix: remove status widget for now 2024-04-10 18:22:46 +02:00
Timur Ercan a311869c9b fix: status widget rerendering (#1097)
---
name: Pull Request
about: Submit changes to the project for review and inclusion
---

## Description

Should fix the rerendering of the status widget 
## Related Issue

<!--- If this pull request is related to a specific issue, reference it
here using #issue_number. -->
<!--- For example, "Fixes #123" or "Addresses #456". -->

## Changes Made

<!--- Provide a summary of the changes made in this pull request. -->
<!--- Include any relevant technical details or architecture changes.
-->

- Change 1
- Change 2
- ...

## Testing Performed

<!--- Describe the testing that you have performed to validate these
changes. -->
<!--- Include information about test cases, testing environments, and
results. -->

- Tested feature X in scenario Y.
- Ran unit tests for component Z.
- Tested on browsers A, B, and C.
- ...

## Checklist

<!--- Please check the boxes that apply to this pull request. -->
<!--- You can add or remove items as needed. -->

- [ ] I have tested these changes locally and they work as expected.
- [ ] I have added/updated tests that prove the effectiveness of these
changes.
- [ ] I have updated the documentation to reflect these changes, if
applicable.
- [ ] I have followed the project's coding style guidelines.
- [ ] I have addressed the code review feedback from the previous
submission, if applicable.

## Additional Notes

<!--- Provide any additional context or notes for the reviewers. -->
<!--- This might include details about design decisions, potential
concerns, or anything else relevant. -->
2024-04-10 17:52:20 +02:00
Mythie 6f3cea52e8 fix: handle older cert data 2024-04-10 22:34:14 +07:00
Timur Ercan 732827f81d Merge branch 'main' into main 2024-04-10 17:32:32 +02:00
Mythie bfff1234bb fix: handle older cert data 2024-04-10 22:32:25 +07:00
Mythie 93a149d637 fix: handle older cert data 2024-04-10 22:10:20 +07:00
Thibault Le Ouay f7ae3104ea fix: status widget rerendering 2024-04-10 17:05:22 +02:00
Lucas Smith 64870f22b9 feat: add certificate and audit log pdfs (#1092) 2024-04-10 20:42:21 +07:00
Catalin Pit 12e4bc918d fix: marketing header darkmode (#1096)
Co-authored-by: Adithya Krishna <aadithya794@gmail.com>
2024-04-10 16:30:11 +03:00
Catalin Pit e36763a85d feat: update marketing banner (#1095)
![CleanShot 2024-04-10 at 15 51
27](https://github.com/documenso/documenso/assets/25515812/d2ad275c-4e68-42f2-8882-a20129c0b0bd)
2024-04-10 16:07:14 +03:00
Mythie 0bc9c590a7 fix: use ts-match 2024-04-10 20:03:01 +07:00
Mythie 4d4dfd3c5f fix: implement review feedback, resolve build errors 2024-04-10 17:39:16 +07:00
Mythie c9b4915fc8 fix: remove hardcoded ids 2024-04-10 15:30:04 +07:00
Mythie 110f9bae12 feat: add certificate and audit log pdfs 2024-04-10 15:13:18 +07:00
Timur Ercan 6285ef2cc0 feat: building documenso part 2 (#1083)
- blog article "building documenso part 2"
2024-04-09 16:13:47 +02:00
Timur Ercan e2987b3ef1 chore: phrasing, typos 2024-04-09 16:08:13 +02:00
Timur Ercan d97ab04d57 Merge branch 'main' into feat/building-documenso-part-2 2024-04-09 15:56:39 +02:00
Timur Ercan 665c943d8f chore: grammarly 2024-04-09 15:54:57 +02:00
David Nguyen 8fe6533ef5 fix: document audit log field security migration (#1081)
## Description

When document audit logs were first introduced, we by default set the
`fieldSecurity` to `NONE`

Now that document auth has been added, this is causing issues since we
do not use `NONE` to define field that has no migrations required, but
rather have the `fieldSecurity` field itself be undefined.

To keeps things consistent, this migration replaces `NONE` with
undefined.

There are a few ways to approach this:
- Run a prisma migration on the JSON
- Modify the data before we pass the data to the schema in
`parseDocumentAuditLogData`
- Use `NONE` instead of undefined

If anyone thinks there's a better way to do this, please drop a comment
🙇
2024-04-09 18:48:15 +07:00
Adithya Krishna fd170f095b chore: add @documenso/pdf-sign to the tech stack (#1084)
**Description:**

This PR adds the package to our tech stack

---------

Signed-off-by: Adithya Krishna <aadithya794@gmail.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2024-04-09 18:47:14 +07:00
David Nguyen 1400c335a5 fix: improve document loading ui consistency (#1082)
## Description

General UI updates

## Changes Made

- Add consistent spacing between document edit/view/log pages
- Add document status to document audit log page
- Update document loading page to reserve space for the document status
below the title
- Update the document audit log page to show full dates in the correct
locale
2024-04-09 11:31:53 +07:00
Ephraim Atta-Duncan 32348dd6f1 fix: pr review changes 2024-04-08 17:26:25 +00:00
Lucas Smith 03bf16522d feat: add prefilling pdf form fields via api (#1086)
## Description

Adds the ability to prefill native PDF form fields via the API using
either normal documents or templates.

Since we won't always know when a document is uploaded and has forms we
opt to do this on creation for templates and on sending the document to
recipients in all cases. This means that for a created document it can
look a little funky since the form fields are missing the data until the
document is sent.

This should be improved in a later change but since we've scoped this to
an API only workflow for now we are less concerned with the visual
issues.

## Related Issue

N/A

## Changes Made

- Added the `formValues` field the document model
- Added a new method for finding and filling form fields based on a `key
| value` pair
- Updated the API input shapes to take the new field.

## Testing Performed

- Have created and tested a document using the API both for creation and
usage with a template.
- Have verified that the fields display as expected either during
creation or sending depending on the document type.
2024-04-08 20:55:54 +07:00
Catalin Pit 627265f016 fix: return updated doc (#1089)
## Description

Fetch the updated version of the document after sealing it and return
it. Previously, the `document.documentData.data` wasn't up to date. Now
it is.

## Related Issue

Fixes #1088.

## Testing Performed

* Added console.logs in the code to make sure it returns the proper data
* Set up a webhook and tested that the webhook receives the updated data

## Checklist

<!--- Please check the boxes that apply to this pull request. -->
<!--- You can add or remove items as needed. -->

- [x] I have tested these changes locally and they work as expected.
- [ ] I have added/updated tests that prove the effectiveness of these
changes.
- [ ] I have updated the documentation to reflect these changes, if
applicable.
- [x] I have followed the project's coding style guidelines.
- [ ] I have addressed the code review feedback from the previous
submission, if applicable.
2024-04-08 19:28:50 +07:00
Mythie 08b693ff95 feat: add prefilling pdf form fields via api 2024-04-08 17:01:11 +07:00
Timur Ercan 97ce3530e0 Merge branch 'main' into feat/building-documenso-part-2 2024-04-06 10:45:34 +02:00
Ephraim Atta-Duncan fdf4d03c14 fix: grid on mobile 2024-04-05 17:54:36 +00:00
Ephraim Atta-Duncan 7615c9d2fa feat: add chat to admin dashboard 2024-04-05 17:49:32 +00:00
Timur Ercan 33f3565715 feat: blog article building documenso part 2 2024-04-05 17:21:49 +02:00
Timur Ercan 950a697115 fix: description part 1 2024-04-05 17:21:29 +02:00
Timur Ercan fc70f78e61 chore: add status widget (#1068)
![CleanShot 2024-03-29 at 11 16
30@2x](https://github.com/documenso/documenso/assets/55143799/aae94a4b-e12e-4ce5-b0ff-45f4fc8911ac)
![CleanShot 2024-03-29 at 11 16
23@2x](https://github.com/documenso/documenso/assets/55143799/fb60c159-78e1-40f9-b596-b1a43682f57a)
2024-04-05 14:43:22 +02:00
Ephraim Duncan aa52316ee3 Merge branch 'main' into chore/status-widget-new 2024-04-05 12:03:16 +00:00
Ephraim Atta-Duncan ea64ccae29 fix: unnecesary requests 2024-04-05 12:02:05 +00:00
Anik Dhabal Babu b87154001a feat: Ability to send team invitation in bulk (#930)
fixes #923 



https://github.com/documenso/documenso/assets/81948346/9f7cf419-91ec-4f43-b2c7-6fd3d0c13bfe

---------

Co-authored-by: David Nguyen <davidngu28@gmail.com>
2024-04-04 23:30:39 +07:00
David Nguyen d4a7eb299e chore: add 2FA reauth docs (#1076)
## Description

Update the tooltips to show documentation for 2FA
2024-04-04 20:18:55 +07:00
Adithya Krishna 2ef619226e chore: remove duplicate env vars (#1075)
**Description:**

The `.env.example` had duplicate keys so removed them in this PR

Signed-off-by: Adithya Krishna <aadithya794@gmail.com>
2024-04-04 19:05:24 +07:00
Catalin Pit 02921e53de chore: trying to fix the issues 2024-04-04 10:51:41 +03:00
Lucas Smith 65c07032de fix: improve error log coverage (#1070)
## Description

Increase coverage of error logging in TRPC routes.
2024-04-04 11:12:06 +07:00
Catalin Pit 60c26a9f75 chore: finished converting to kysely 2024-04-03 14:53:40 +03:00
David Nguyen 56c550c9d2 fix: refactor tests (#1066)
## Changes Made

- Refactor/optimise tests
- Reduce flakiness
- Add parallel tests (if there's enough CPU capacity)
- Removed explicit worker count when running parallel tests. Defaults to
50% of CPU capacity.

Might want to consider sharding the test across runners in the future as
our tests grows.
2024-04-03 16:13:35 +07:00
Catalin Pit 7f7e7da3af chore: format the final query data and return it 2024-04-03 11:23:19 +03:00
David Nguyen d1ffcb00f3 feat: add axiom web vitals (#1071)
## Description

Added support for Axiom web vitals

https://axiom.co/docs/apps/vercel#web-vitals
2024-04-03 14:32:34 +07:00
David Nguyen 58481f66b8 fix: enforce 2FA for email password SSO linked accounts (#1072)
## Description

Fixed issue where accounts that were initially created via
email/password, then linked to an SSO account, can bypass the 2FA during
login if they use their email password.

## Testing Performed

Tested locally, and 2FA is now required for linked SSO accounts
2024-04-03 14:18:36 +07:00
Adithya Krishna 484f603a6b chore: remove coming soon (#1074)
**Description:**

This PR removes the coming soon text from the connections bento card

---------

Signed-off-by: Adithya Krishna <aadithya794@gmail.com>
2024-04-03 12:35:47 +07:00
Catalin Pit 82792864de chore: remove unintended console logs 2024-04-02 16:18:07 +03:00
Catalin Pit 409d8aa5a2 chore: almost done? 2024-04-02 16:13:03 +03:00
Mythie 48a8f5fe07 chore: add disclosure 2024-04-02 14:16:36 +07:00
David Nguyen cbe6270494 feat: add passkey and 2FA document action auth options (#1065)
## Description

Add the following document action auth options:
- 2FA
- Passkey

If the user does not have the required auth setup, we onboard them
directly.

## Changes made

Note: Added secondaryId to the VerificationToken schema

## Testing Performed

Tested locally, pending preview tests

## Checklist

- [X] I have tested these changes locally and they work as expected.
- [X] I have added/updated tests that prove the effectiveness of these
changes.
- [X] I have followed the project's coding style guidelines.

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **New Features**
- Introduced components for 2FA, account, and passkey authentication
during document signing.
- Added "Require passkey" option to document settings and signer
authentication settings.
- Enhanced form submission and loading states for improved user
experience.
- **Refactor**
- Optimized authentication components to efficiently support multiple
authentication methods.
- **Chores**
- Updated and renamed functions and components for clarity and
consistency across the authentication system.
- Refined sorting options and database schema to support new
authentication features.
- **Bug Fixes**
- Adjusted SignInForm to verify browser support for WebAuthn before
proceeding.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-03-31 15:49:12 +08:00
David Nguyen b436331d7d fix: improve error log coverage 2024-03-30 14:00:34 +08:00
David Nguyen 81ee582f1c fix: linting warnings (#1069)
## Description

Cleaned up code that was being highlighted in the dev tools
2024-03-30 13:43:28 +08:00
Catalin Pit f520e0a7a6 chore: converting to kysely 2024-03-29 17:23:42 +02:00
Ephraim Atta-Duncan 81ab220f1e fix: wrap use with suspense
skill issue
2024-03-29 11:14:44 +00:00
Ephraim Atta-Duncan cc60437dcd fix: correct slug 2024-03-29 10:20:09 +00:00
Ephraim Atta-Duncan 171b8008f8 chore: credit
Co-authored-by: mxkaske <maximilian@kaske.org>
2024-03-29 10:15:12 +00:00
Ephraim Atta-Duncan 5c00b82894 chore: add status widget 2024-03-29 10:10:35 +00:00
Lucas Smith 369357aadd fix: passkey login (#1067)
## Description

Fixed issue where passkeys do not work on https deployments.
2024-03-29 12:56:23 +07:00
David Nguyen 117d9427c3 fix: passkey login 2024-03-28 19:06:19 +08:00
Catalin Pit 462e1348a8 chore: test queries 2024-03-28 12:02:51 +02:00
Lucas Smith 7a689aecae feat: document super delete (#1023)
Added a dialog button at the bottom of the admin/documents/[id] page
with confirmation popup.

Confirmation popup have validation for reason to input.

On confirmation document is deleted, and an email is triggred to the
owner of document with the reason stated.

Let me know if there is any more requirement or correction is needed in
this pr. :) #1020
2024-03-28 14:15:06 +07:00
Lucas Smith 1c54f69a5a fix: build error from renaming 2024-03-28 07:01:57 +00:00
Lucas Smith a56bf6a192 fix: update email template and tidy code 2024-03-28 06:55:01 +00:00
David Nguyen a54eb54ef7 feat: add document auth (#1029) 2024-03-28 13:13:29 +08:00
Mythie 956562d3b4 fix: change flattening order 2024-03-27 23:05:40 +07:00
Sai Suhas Sawant f386dd31a7 fix: user preview to lowercase (#1064)
changed the user preview in user-profile-skeleton to lowercase to match
ui of other components
2024-03-27 20:37:11 +08:00
David Nguyen c644d527df fix: remove scrollbar gutter (#1063)
## Description

Currently opening modals, clicking select boxes or using anything from
radix that overlays the screen in some way will shift the screen.

This can be easily noticeable when changing the document "Period"
selector on the /documents page.

## Changes Made

Undo the gutter change for now. Can find a proper solution another time.



https://github.com/documenso/documenso/assets/20962767/5bcae576-2944-4ae5-a2c3-0589e7f61bdb
2024-03-27 19:10:12 +08:00
Lucas Smith 47cf20931a fix: normalize and flatten annotations (#1062)
This change flattens and normalizes annotation and widget layers within
the PDF document removing items that can be accidentally modified after
signing which would void the signature attached to the document.

Initially this change was just to assign to an ArcoForm object in the
document catalog if it existed but quickly turned into the above.

When annotations aren't flattened Adobe PDF will say that the signature
needs to be validated and upon doing so will become invalid due to the
annotation layers being touched.

To resolve this I set out to flatten and remove the annotations by
pulling out their normal appearances if they are present, converting
them into xobjects and then drawing those using the drawObject operator.

This resolves a critical issue the users experienced during the signing
flow when they had marked up a document using annotations in pdf
editors.
2024-03-27 17:41:26 +07:00
Mythie b491bd4db9 fix: normalize and flatten annotations 2024-03-27 17:20:52 +07:00
David Nguyen 038370012f fix: render fields on document load (#1054)
## Description

Currently if you try to load the document edit page when fields need to
be rendered, you will not be able to see the fields until you proceed to
the next step.

This is because the fields require the document PDF to be loaded prior
to rendering them.

This PR resolves that issue by only rendering the fields after the PDF
is loaded.

## Changes Made

- Add a state to track whether the PDF is loaded
- Render the fields only after the PDF is loaded

## Testing Performed

Tested document flow manually and the fields are rendered correctly on
load.

## Checklist

- [X] I have tested these changes locally and they work as expected.
- [X] I have updated the documentation to reflect these changes, if
applicable.
2024-03-27 14:10:29 +08:00
Lucas Smith 4d2228f679 feat: add forcePathStyle to S3Client (#1052)
I tried to resolve issue
[#1048](https://github.com/documenso/documenso/issues/1048)
2024-03-27 11:31:06 +07:00
Rohit Saluja 0aa111cd6e fix: fixed the no document error 2024-03-27 09:55:30 +05:30
Lucas Smith ba30d4368d fix: build error 2024-03-27 03:37:13 +00:00
Lucas Smith 899205dde8 Merge branch 'main' into main 2024-03-27 10:11:53 +07:00
Rohit Saluja 9eaecfcef2 Merge branch 'main' of https://github.com/documenso/documenso into document-super-delete#1020 2024-03-26 20:44:47 +05:30
Rohit Saluja 26141050b7 fix: document super delete function calling 2024-03-26 20:42:33 +05:30
Rohit Saluja 5b4152ffc5 fix: updated the super delete file 2024-03-26 20:36:45 +05:30
Rohit Saluja bd703fb620 fix: return of document after delete 2024-03-26 19:19:02 +05:30
Rohit Saluja 2296924ef6 fix: reason for delete document is changed 2024-03-26 19:01:52 +05:30
Rohit Saluja 6603aa6f2e fix: removed the condition for deletedAt flag inside the document 2024-03-26 18:57:19 +05:30
Rohit Saluja a6ddc114d9 fix: a condition is added for the reason in the handler 2024-03-26 18:53:03 +05:30
Rohit Saluja abb49c349c fix: delete document file is changed to super delete document file 2024-03-26 18:48:35 +05:30
David Nguyen 006b732edb fix: update document flow fetch logic (#1039)
## Description

**Fixes issues with mismatching state between document steps.**

For example, editing a recipient and proceeding to the next step may not
display the updated recipient. And going back will display the old
recipient instead of the updated values.

**This PR also improves mutation and query speeds by adding logic to
bypass query invalidation.**

```ts
export const trpc = createTRPCReact<AppRouter>({
  unstable_overrides: {
    useMutation: {
      async onSuccess(opts) {
        await opts.originalFn();

        // This forces mutations to wait for all the queries on the page to reload, and in
        // this case one of the queries is `searchDocument` for the command overlay, which
        // on average takes ~500ms. This means that every single mutation must wait for this.
        await opts.queryClient.invalidateQueries(); 
      },
    },
  },
});
```

I've added workarounds to allow us to bypass things such as batching and
invalidating queries. But I think we should instead remove this and
update all the mutations where a query is required for a more optimised
system.

## Example benchmarks

Using stg-app vs this preview there's an average 50% speed increase
across mutations.

**Set signer step:**
Average old speed: ~1100ms
Average new speed: ~550ms

**Set recipient step:**
Average old speed: ~1200ms
Average new speed: ~600ms

**Set fields step:**
Average old speed: ~1200ms
Average new speed: ~600ms

## Related Issue

This will resolve #470

## Changes Made

- Added ability to skip batch queries
- Added a state to store the required document data.
- Refetch the data between steps if/when required
- Optimise mutations and queries

## Checklist

- [X] I have tested these changes locally and they work as expected.
- [X] I have followed the project's coding style guidelines.

---------

Co-authored-by: Lucas Smith <me@lucasjamessmith.me>
2024-03-26 21:12:41 +08:00
David Nguyen 5210fe2963 feat: add passkeys (#989)
## Description

Add support to login with passkeys.

Passkeys can be added via the user security settings page.

Note: Currently left out adding the type of authentication method for
the 'user security audit logs' because we're using the `signIn`
next-auth event which doesn't appear to provide the context. Will look
into it at another time.

## Changes Made

- Add passkeys to login
- Add passkeys feature flag
- Add page to manage passkeys
- Add audit logs relating to passkeys
- Updated prisma schema to support passkeys & anonymous verification
tokens

## Testing Performed

To be done.

MacOS:
- Safari  
- Chrome  
- Firefox 

Windows:
- Chrome [Untested] 
- Firefox [Untested]

Linux:
- Chrome [Untested]
- Firefox [Untested]

iOS:
- Safari 

## Checklist

<!--- Please check the boxes that apply to this pull request. -->
<!--- You can add or remove items as needed. -->

- [X] I have tested these changes locally and they work as expected.

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **New Features**
- Introduced Passkey authentication, including creation, sign-in, and
management of passkeys.
- Added a Passkeys section in Security Settings for managing user
passkeys.
- Implemented UI updates for Passkey authentication, including a new
dialog for creating passkeys and a data table for managing them.
- Enhanced security settings with server-side feature flags to
conditionally display new security features.
- **Bug Fixes**
	- Improved UI consistency in the Settings Security Activity Page.
- Updated button styling in the 2FA Recovery Codes component for better
visibility.
- **Refactor**
- Streamlined authentication options to include WebAuthn credentials
provider.
- **Chores**
- Updated database schema to support passkeys and related functionality.
	- Added new audit log types for passkey-related activities.
- Enhanced server-only authentication utilities for passkey registration
and management.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-03-26 21:11:59 +08:00
Valentin Lestoille 994368156f Additional comment 2024-03-25 08:23:28 +01:00
Lucas Smith 3eddfcc805 chore: add test for multiple recipient (#1045) 2024-03-25 13:57:32 +07:00
David Nguyen 43400c07de feat: remove 2FA password requirement (#1053) 2024-03-25 11:34:50 +08:00
Lucas Smith 715c14a6ae chore: set default PR template (#1055)
## Details

Currently there's no way to have a proper PR template selector. Since we
rarely use the E2E template, I've opted to move the generic PR template
to be the default template.
2024-03-25 12:57:55 +11:00
Lucas Smith 606966b357 feat: add sticky behavior to pricing options container (#1042)
Fixes #894
2024-03-25 12:55:33 +11:00
Juan Sebastián Mendoza 24852f3c68 feat: modify periods menu horizontal alignment on mobile 2024-03-24 19:07:26 -05:00
Juan Sebastián Mendoza 48ee977617 Merge branch 'main' of https://github.com/JuanSebastianM/documenso into feat/894-pricing-section-ux-improvement 2024-03-24 18:35:08 -05:00
David Nguyen fc34f1c045 chore: set default PR template 2024-03-24 17:01:21 +08:00
Ephraim Duncan 1725af71b6 chore: add test to update username (#1049) 2024-03-23 13:41:12 +08:00
Valentin Lestoille c71347aeb9 S3Client: Add forcePathStyle 2024-03-22 15:46:22 +01:00
Timur Ercan 007687bdee fix: monthly count instead of cummulative (#1047) 2024-03-22 09:19:53 +01:00
Ephraim Atta-Duncan f5a1d9a625 fix: monthly count instead of cummulative 2024-03-22 08:08:37 +00:00
Ephraim Duncan 72fd1eead2 fix: use correct date format (#1046)
### Before
![CleanShot 2024-03-21 at 17 23
09@2x](https://github.com/documenso/documenso/assets/55143799/d1cd22ca-399b-4ba2-bb82-b4dc869605c8)

### After
![CleanShot 2024-03-21 at 17 23
17@2x](https://github.com/documenso/documenso/assets/55143799/cdb814ea-01be-4bcb-9bad-df41030f320a)
2024-03-22 14:25:12 +08:00
Ephraim Atta-Duncan 5289ae2fbc Merge branch 'main' into test/sign-redirect-url 2024-03-21 16:36:48 +00:00
Ephraim Atta-Duncan c4c6e67249 chore: prod playwright config 2024-03-21 16:36:10 +00:00
Ephraim Atta-Duncan 5377d27c6a chore: test for redirect url 2024-03-21 16:28:42 +00:00
Ephraim Atta-Duncan 1cd7dd236b chore: test signing a document 2024-03-21 16:15:29 +00:00
Catalin Pit 6b73899ecc chore: re-arrange stuff 2024-03-21 15:46:53 +02:00
Catalin Pit fdbac9fc03 feat: update next-auth-options to use the kysely adapter 2024-03-21 15:07:05 +02:00
Timur Ercan 67beb8225c chore: minor update to open page (#1043) 2024-03-21 13:17:47 +01:00
Timur Ercan 94198e7584 chore: text 2024-03-21 13:16:17 +01:00
Ephraim Atta-Duncan facafe0997 feat: place card titles in the box 2024-03-21 01:44:32 +00:00
Ephraim Atta-Duncan 8c1686f113 feat: add total signed documents 2024-03-21 01:25:23 +00:00
Ephraim Atta-Duncan a8752098f6 fix: invalid datetime on graph 2024-03-21 00:48:49 +00:00
Juan Sebastián Mendoza 3e15b5d745 feat: add sticky behavior to pricing options container 2024-03-20 15:05:17 -05:00
Catalin Pit 5e8d93f24b feat: add kysely for raw type-safe SQL queries 2024-03-20 15:42:17 +02:00
Timur Ercan 0dfdf36bda feat: restructure open page (#1040) 2024-03-20 12:48:44 +01:00
Timur Ercan 574cd176c2 chore: update copy to have more swag 2024-03-20 12:34:03 +01:00
Ephraim Atta-Duncan 48858cfdd0 chore: restructure open page 2024-03-20 10:31:19 +00:00
Ephraim Atta-Duncan 2facc0e331 feat: add completed documents per month graph 2024-03-20 10:17:31 +00:00
Lucas Smith e7071f1f5a fix: username overflow issue (#1036)
Before:-
![Screenshot 2024-03-19
000255](https://github.com/documenso/documenso/assets/81948346/169bf207-3e0f-419c-bf72-ff25347c6814)

Now:-

![Screenshot 2024-03-18
235807](https://github.com/documenso/documenso/assets/81948346/17cd30d3-d6ef-4e31-b174-142c06491c4a)
2024-03-19 14:04:19 +11:00
Anik Dhabal Babu b95f7176e2 fix: username overflow issue 2024-03-18 18:25:04 +00:00
David Nguyen 6d754acfcd fix: disable edit signer inputs (#1035)
## Description

Update the add signer form to disable the signers when required.

I assume the actual issue is that `{...field}` was spreading a disabled
prop which was overriding our one.

## Changes Made

- Use fieldset to disable inputs
- Manually disable select since fieldset doesn't work for that select
for some reason
2024-03-18 19:59:39 +08:00
Lucas Smith 796456929e feat: improve lint-staged performance (#1006)
Right now, the eslint command runs separately for each staged file. This
PR aims to change that by running just one eslint command for all the
files that have been changed.
2024-03-18 15:18:20 +11:00
Lucas Smith de9c9f4aab chore: tidying 2024-03-18 02:44:39 +00:00
Lucas Smith b972056c8f Merge branch 'main' into improve-lint 2024-03-18 13:31:43 +11:00
Lucas Smith 69871e7d39 fix: update codespaces on create script (#1034)
## Description

Updates the `on-create.sh` script to use our `dx` command resolving
issues where it couldn't find the docker compose file due to changes
that have happened since publishing the Documenso docker image.

## Related Issue

Resolves #1026

## Test Details

N/A

## Checklist

- [x] I have written the new test and ensured it works as intended.
- [x] I have added necessary documentation to explain the purpose of the
test.
- [x] I have followed the project's testing guidelines and coding style.
- [x] I have addressed any review feedback from previous submissions, if
applicable.

## Additional Notes

N/A
2024-03-18 13:29:47 +11:00
Lucas Smith 9cfd769356 chore: use rust based cms signing (#1030) 2024-03-18 12:33:10 +11:00
Lucas Smith bd20c5499f fix: update codespaces on create script 2024-03-18 01:28:26 +00:00
Lucas Smith 3c6cc7fd46 Merge branch 'main' into chore/add-rust-signer 2024-03-18 12:24:59 +11:00
Lucas Smith 4ac800fa78 feat: added custom dark mode styling for swagger ui (#1022)
**Description:**

Updated the OpenAPI doc dark mode styling here
https://app.documenso.com/api/v1/openapi

**Before:**

<img width="1473" alt="Screenshot 2024-03-13 at 09 48 36"
src="https://github.com/documenso/documenso/assets/23498248/a4fa1fef-699f-40e9-a06d-e513fc786399">

**After:**

<img width="1471" alt="Screenshot 2024-03-13 at 12 40 08"
src="https://github.com/documenso/documenso/assets/23498248/39c606b5-ab8b-4031-9821-a57c8bb80b7d">
2024-03-16 23:37:03 +11:00
Lucas Smith 3598bd0139 fix: use tailwind for menu switcher ring 2024-03-16 12:18:12 +00:00
Lucas Smith d62838f4a0 fix: pagination discrepancy (#1024)
- This PR fixes the pagination discrepancy in the `DataTablePagination`
component.
ref #1021
2024-03-16 22:32:18 +11:00
Lucas Smith 8de8139b85 chore: send email to document owner (#1031)
**Description:**

This PR sends an email to the document owner once the signing has been
completed
2024-03-16 22:29:28 +11:00
Lucas Smith a7594c9b3c fix: update sending logic 2024-03-16 11:06:33 +00:00
Adithya Krishna f012826b6b chore: send document owner email
Signed-off-by: Adithya Krishna <aadithya794@gmail.com>
2024-03-15 22:26:31 +05:30
Gautam-Hegde 38752f95f3 Merge branch 'fix/pagination' of https://github.com/Gautam-Hegde/documenso into fix/pagination 2024-03-15 22:11:06 +05:30
Gautam-Hegde 4379b43ad9 chore: tidy code 2024-03-15 22:09:58 +05:30
Mythie 8859b2779f chore: use rust based cms signing 2024-03-15 22:29:15 +11:00
Adithya Krishna e29bfbf5e0 chore: updated focus custom css
Signed-off-by: Adithya Krishna <aadithya794@gmail.com>
2024-03-15 09:19:47 +05:30
Adithya Krishna 17c6a4bd55 chore: updated focus state of menu switcher
Signed-off-by: Adithya Krishna <aadithya794@gmail.com>
2024-03-15 09:18:51 +05:30
Adithya Krishna d6668ad204 Merge branch 'main' of https://github.com/documenso/documenso into feat/swagger-styling 2024-03-15 09:17:01 +05:30
Gautam Hegde 91e1fe5e8f Merge branch 'main' into fix/pagination 2024-03-14 18:41:09 +05:30
Lucas Smith fd4d5468cf fix: use gif for readme 2024-03-14 23:52:49 +11:00
Lucas Smith d5c4885c67 fix: update signup form to handle password managers better 2024-03-14 12:39:58 +00:00
Lucas Smith 564f0dd945 fix: avoid opengraph image limit (#1027) 2024-03-14 23:27:19 +11:00
Lucas Smith 524a7918d5 fix: toss the signature 2024-03-14 10:41:59 +00:00
Lucas Smith 0db2e6643d fix: final final v2 2024-03-14 10:39:48 +00:00
Lucas Smith f5967e28c3 fix: without protection? 2024-03-14 10:02:09 +00:00
Lucas Smith 4926b6de50 fix: boring sign/verify approach 2024-03-14 09:40:26 +00:00
Lucas Smith d6c8a3d32c fix: what happens if we use a dynamic import? 2024-03-14 09:20:01 +00:00
Catalin Pit a9bb559568 fix: avoid opengraph image limit 2024-03-14 10:56:46 +02:00
Adithya Krishna 8d1da3df72 Merge branch 'main' of https://github.com/documenso/documenso into feat/swagger-styling 2024-03-14 09:53:48 +05:30
Adithya Krishna 00c71fd66c chore: fixed focus ring
Signed-off-by: Adithya Krishna <aadithya794@gmail.com>
2024-03-14 01:02:48 +05:30
Adithya Krishna df8d394c28 chore: updated to resolvedTheme
Signed-off-by: Adithya Krishna <aadithya794@gmail.com>
2024-03-14 00:47:54 +05:30
Lucas Smith bc3c9424c4 docs: add article about public api (#1005) 2024-03-13 21:23:44 +11:00
Catalin Pit 6643c4b9fc update author description 2024-03-13 12:00:42 +02:00
Catalin Pit ec7b69f1a4 implement feedback 2024-03-13 11:59:12 +02:00
Gautam-Hegde 0488442652 fix: pagination discrepancy 2024-03-13 13:45:10 +05:30
Adithya Krishna cc483016d8 chore: updated styling
Signed-off-by: Adithya Krishna <aadithya794@gmail.com>
2024-03-13 13:24:09 +05:30
Adithya Krishna 025af6e9f4 chore: added eol
Signed-off-by: Adithya Krishna <aadithya794@gmail.com>
2024-03-13 12:41:08 +05:30
Adithya Krishna e5497efe7c chore: updated dark mode styling
Signed-off-by: Adithya Krishna <aadithya794@gmail.com>
2024-03-13 12:38:56 +05:30
Rohit Saluja bba1ea81d6 feat: updated the condition of the delete dialog in the detail page 2024-03-13 11:40:12 +05:30
Rohit Saluja 364aaa4cb6 feat: reason label is changed 2024-03-13 11:32:14 +05:30
Rohit Saluja af6ec5df42 feat: reason is added to the email 2024-03-13 11:30:20 +05:30
Rohit Saluja 35c1b0bcee feat: corrected the document redirection after delete 2024-03-13 11:15:06 +05:30
Rohit Saluja 487bc026f9 feat: reason is added to the component props 2024-03-13 11:06:35 +05:30
Rohit Saluja 3fb57c877e feat: send delete email is added 2024-03-13 10:54:53 +05:30
Adithya Krishna 27e7e51789 Merge branch 'main' of https://github.com/documenso/documenso into feat/swagger-styling 2024-03-13 09:56:16 +05:30
Adithya Krishna 52afae331e chore: updated to send email to doc owners
Signed-off-by: Adithya Krishna <aadithya794@gmail.com>
2024-03-13 09:50:37 +05:30
Adithya Krishna 27a69819f9 feat: added custom styling for swagger ui
Signed-off-by: Adithya Krishna <aadithya794@gmail.com>
2024-03-13 09:49:31 +05:30
Rohit Saluja 4dc9e1295b feat: added the templates for the delete of the documents from the admin 2024-03-12 21:15:17 +05:30
Rohit Saluja a8413fa031 feat: disabled reason condition is updated on the dialog form 2024-03-12 20:42:13 +05:30
Rohit Saluja 3b65447b0f feat: updating the dialog and page of document 2024-03-12 20:38:11 +05:30
Rohit Saluja d8911ee97b feat: added the dialog delete file 2024-03-12 20:16:48 +05:30
Rohit Saluja c10cfbf6e1 feat: adding the router for the delete document in the admin router 2024-03-12 20:03:34 +05:30
Rohit Saluja 884eab36eb feat: adding the schema for the admin delete document mutation 2024-03-12 20:02:05 +05:30
Rohit Saluja d0b9cee500 feat: created the dialog file for delete of document 2024-03-12 18:55:59 +05:30
Lucas Smith a178e1d86f feat: add website cta (#1007)
![hover](https://github.com/documenso/documenso/assets/25515812/9132ef8c-f956-4370-8e20-cc01bc196664)

![notover](https://github.com/documenso/documenso/assets/25515812/a12e72f0-84eb-43bd-bb95-828fef8e8819)
2024-03-12 14:17:38 +11:00
Lucas Smith 1fd29f7e89 feat: require confirmation for user account deletion (#1009)
### This PR adds the necessary user friction in the Delete Dialog,
ensuring that users are intentionally deleting their accounts.

- User must disable 2FA to delete the account.


![2fa](https://github.com/documenso/documenso/assets/85569489/634fd9dd-2aea-4dd8-a231-ade82b71fc7d)

- Explicit user confirmation


![!2FA](https://github.com/documenso/documenso/assets/85569489/11a074b6-7ec7-4568-ba1a-ee884766047b)


fixes #998
2024-03-12 14:15:53 +11:00
Lucas Smith d3f4e20f1c fix: update styling and e2e test 2024-03-12 02:57:22 +00:00
Lucas Smith 3ebeb347c5 chore: updated url regex (#1017)
**Description:**

- Fixes #1016 

**Scenarios Tested:**

- https://info.adikris.in
- https://www.info.adikris.in
- http://www.info.adikris.in
- https://adikris.in
- http://adikris.in
- https://adikris.com.au
2024-03-12 13:40:45 +11:00
Lucas Smith f6c2b6c1c5 fix: minor updates 2024-03-12 01:52:16 +00:00
Gautam-Hegde efb90ca5fb chore: use email confirmation 2024-03-11 23:17:11 +05:30
Catalin Pit 9ac346443d Merge branch 'main' into feat/add-website-cta 2024-03-11 13:06:46 +02:00
Adithya Krishna f2aa0cd714 Merge branch 'main' into feat/typeInDeletion 2024-03-11 15:20:19 +05:30
Adithya Krishna bbcb90d8a5 chore: updated url regex
Signed-off-by: Adithya Krishna <aadithya794@gmail.com>
2024-03-11 15:00:58 +05:30
Lucas Smith c2cf25b138 fix: templates incorrectly linking when in a team 2024-03-11 01:46:19 +00:00
Lucas Smith 63c23301a9 Merge branch 'main' into feat/typeInDeletion 2024-03-11 12:19:10 +11:00
Lucas Smith 1a23744d2a fix: table layout shift while changing tabs (#921)
fixes: #875 



https://github.com/documenso/documenso/assets/28510494/083fd87a-ef62-40e6-9696-9c04b4411502
2024-03-11 12:16:19 +11:00
Lucas Smith 7f31ab1ce3 fix: add scrollbar gutter property 2024-03-11 00:52:56 +00:00
Lucas Smith 7ac34099ee fix: ensure password input is cleared when 2fa enable dialog is closed (#1014)
Issue found by guatam in Documenso Discord.

https://discord.com/channels/1132216843537485854/1133420505030987857/1215716399822147664

Bug Loom:

https://www.loom.com/share/b7defde91dfb437580c13c7f166f59ff?sid=cbca746f-174a-44ad-997c-cf3a2eef8380

Fix Loom:

https://www.loom.com/share/8748ac47459247a49ddf7d5379e2a0a0?sid=02977122-c150-44e8-9a19-4c8356c298d7
2024-03-11 11:26:35 +11:00
Lucas Smith c744482b84 fix: add conditional to useEffects 2024-03-11 10:55:46 +11:00
Lucas Smith b71cb66dd3 fix: show close icon on notification in mobile (#996)
As per the requirement on the mobile, the close icon will always be
visible

On the desktop, close icon will be visible on hover.

fixes #965
2024-03-10 22:12:29 +11:00
Brayden Brayden afe99e5ec9 fix: revert reset changes, reset on open state change instead 2024-03-10 09:36:54 +00:00
Brayden Brayden 6f958b9320 fix: update the dialog cancel to reset 2024-03-10 09:28:08 +00:00
Brayden Brayden f646fa29d7 fix: ensure password input is cleared when 2fa enable dialog is closed 2024-03-10 07:01:18 +00:00
Lucas Smith 373e806bd9 fix: eslint config file parseOptions.project path is updated (#1008)
I found out that the problem of slow down is the use of
parseOption.project with multiple tsconfig files which increases usage
of memory consumption quite a lot.

Here is the reference I found to resolve this issue:

[reference
link](https://github.com/typescript-eslint/typescript-eslint/issues/1192)
[Doc
link](https://typescript-eslint.io/getting-started/typed-linting/monorepos/)

Based on this reference I created the solution and tested out locally it
does reduce the eslint time.

#1002
2024-03-10 15:32:59 +11:00
Lucas Smith c3c00dfe05 fix: update docker documentation and include cert env vars (#1013)
## Description

Updates the docker documentation and compose files to include key file
related configuration for self hosters. This was missed as the key file
environment variables weren't documented in the `.env.example` file
which was used for creating the docker documentation.

## Related Issue

#1012

## Changes Made

- Updated the docker configuration to include key file environment
variables
- Updated the .env.example to include key file env vars
- Updated the compose images to use volumes for key files

## Testing Performed

- I have used the containers with the updated values and confirmed that
they work as expected

## Checklist

- [x] I have tested these changes locally and they work as expected.
- [x] I have added/updated tests that prove the effectiveness of these
changes.
- [x] I have updated the documentation to reflect these changes, if
applicable.
- [x] I have followed the project's coding style guidelines.
- [x] I have addressed the code review feedback from the previous
submission, if applicable.

## Additional Notes

N/A
2024-03-10 14:11:47 +11:00
Mythie 9e1b2e5cc3 fix: update sharp dependency 2024-03-10 13:48:25 +11:00
Mythie 608e622f69 fix: update testing compose config 2024-03-10 13:48:09 +11:00
Mythie 415f79f821 fix: update docker docs and compose files 2024-03-10 11:13:05 +11:00
nafees nazik 62b4a13d4d feat: upgrade packages 2024-03-09 00:32:08 +05:30
nafees nazik 19714fb807 feat: update packages 2024-03-09 00:29:42 +05:30
nafees nazik 7631c6e90e feat: add prettier to lint 2024-03-09 00:17:04 +05:30
nafees nazik d462ca0b46 feat: remove prettier plugin 2024-03-09 00:16:16 +05:30
Gautam Hegde b433225762 Update command.tsx 2024-03-08 22:12:05 +05:30
Gautam-Hegde ad92b1ac23 feat: typeIn confirmation 2024-03-08 21:56:17 +05:30
Gautam-Hegde a4806f933e Merge branch 'main' of https://github.com/Gautam-Hegde/documenso 2024-03-08 21:33:19 +05:30
Rohit Saluja 3b5f8d149a fix: eslint config file parseOptions.project path is updated 2024-03-08 21:14:37 +05:30
Ephraim Atta-Duncan 0d41c6babf Merge branch 'main' into test/sign-redirect-url 2024-03-08 15:03:21 +00:00
Ephraim Atta-Duncan 9b5346efef chore: add test for multiple recipient 2024-03-08 14:54:18 +00:00
Catalin Pit e8b209eb82 fix: fixed cta component 2024-03-08 15:46:44 +02:00
Lucas Smith 4476cf8fd1 Merge branch 'main' into fix/layout-shift-on-table 2024-03-09 00:41:20 +11:00
Catalin Pit 0fdb7f7a8d fix: changed to card component 2024-03-08 15:30:08 +02:00
Lucas Smith 05aa52b44a fix: fixed the recipients viewing issue on touch screens (#773)
## Description

This pull request addresses the issue where users on touchscreen devices
couldn't properly see the Recipients list. I have implemented a two-easy
solution to address this problem, offering a seamless user experience
across device types:

1. Popover for Touchscreen: For touchscreen devices, I have added a
popover that displays the Recipients list when users tap on the avatars.

2. Tooltip for Larger Screens: On larger screens (desktops and laptops),
I have added a tooltip that appears when users hover over the avatars.

## Changes
1. Added `Popover` for smaller devices and keep the `Tooltip` for larger
devices.
2. Renamed the component `stack-avatars-wtih-tooltip` to
`stack-avatars-wtih-ui` because now it contains both Tooltip and
Popover.
3. Used the `useWindowSize` hook to conditionally render the `Tooltip`
and `Popover`
4. To avoid repeating the same code, I've created a new component named
`stack-avatars-components.tsx` to show the recipient's details. This
component uses both Popover and Tooltip.


## PR Preview



https://github.com/documenso/documenso/assets/87828904/2dc9b056-b4bd-43dd-b427-a0e803dee55a


## Issue

Closes #756
2024-03-08 23:59:11 +11:00
Lucas Smith 40343d1c72 fix: add use client directive 2024-03-08 12:34:49 +00:00
Lucas Smith 08201240d2 Merge branch 'main' into update-documents-avatar 2024-03-08 23:26:28 +11:00
Lucas Smith 32b0b1bcda fix: revert api change and use mouseenter/mouseleave 2024-03-08 12:21:32 +00:00
Catalin Pit 61ca34eee1 removed unused cn 2024-03-08 13:46:22 +02:00
Catalin Pit 41843691e8 feat: add website cta 2024-03-08 13:44:25 +02:00
nafees nazik c463d5a0ed fix: add double quote 2024-03-08 16:47:38 +05:30
nafees nazik 8afe669978 feat: improve lint staged performance 2024-03-08 16:26:47 +05:30
Lucas Smith fd4ea3aca5 fix: update docker docs 2024-03-08 20:00:24 +11:00
Catalin Pit ee2cb0eedf docs: add article about public api 2024-03-08 10:20:58 +02:00
premiare 1b32c5a17f fix: fix blog post date (#1003)
Fixing the blog date for
https://documenso.com/blog/removing-server-actions
(I assume it was meant to be March 7th)


![image](https://github.com/documenso/documenso/assets/64188227/a7b96168-b094-46c0-877a-da26c9d140d4)
2024-03-08 09:27:30 +02:00
Lucas Smith 6376112f9d fix: overflow issue with user name input (#991)
Before:-

![Screenshot 2024-03-06
203158](https://github.com/documenso/documenso/assets/81948346/17050582-454b-49af-8124-294d0a0be5bc)

After:-

![Screenshot 2024-03-06
202332](https://github.com/documenso/documenso/assets/81948346/7c346699-3bff-4847-95ef-fd7fdc8a89af)
2024-03-08 15:24:17 +11:00
Lucas Smith ddfd4b9e1b fix: update styling 2024-03-08 03:59:15 +00:00
Lucas Smith 5bec549868 feat: improved ui of document dropzone for max quota state (#997)
**Description:**


[Dropzone.webm](https://github.com/documenso/documenso/assets/23498248/df2d3a54-0e39-4d2d-b792-bf4cd4a1e19d)
2024-03-08 14:38:27 +11:00
Lucas Smith 2f728f401b chore: add e2e test for deleting a user (#1001) 2024-03-08 14:32:06 +11:00
Lucas Smith bc60278bac fix: remove useless ternaries 2024-03-08 03:30:57 +00:00
Lucas Smith e9664d6369 chore: tidy code 2024-03-08 03:23:27 +00:00
Lucas Smith 3b3346e6af fix: remove data-testid attributes 2024-03-08 13:47:59 +11:00
Lucas Smith ee35b4a24b fix: update test to use getByRole 2024-03-08 02:46:25 +00:00
Lucas Smith 47b06fa290 Merge branch 'main' into test/delete-user 2024-03-08 13:30:24 +11:00
Lucas Smith b9dccdb359 chore: updated code of conduct link (#999)
**Description:**

Updated broken link to code of conduct in the Readme
2024-03-08 12:54:23 +11:00
Lucas Smith 5e00280486 fix: add seed script to dx setup (#1000) 2024-03-08 12:53:08 +11:00
Lucas Smith f0fd5506fc fix: skip seeding when running migrate dev
When prisma:migrate-dev needs to reset the database it will run the seed script to repopulate data. Now that we've added the seed script to our root setup command we will want to avoid this behaviour since we will end up double seeding the database which currently can cause issues.
2024-03-08 12:49:55 +11:00
Ephraim Atta-Duncan ff3b49656c chore: remove unused function 2024-03-08 00:07:11 +00:00
Ephraim Atta-Duncan e47ca1d6b6 chore: add e2e test for deleting a user 2024-03-08 00:04:27 +00:00
Ephraim Atta-Duncan 59cdf3203e fix: add seed script to dx setup 2024-03-07 20:09:29 +00:00
Adithya Krishna 92f44cd304 chore: remove trailing slash
Signed-off-by: Adithya Krishna <adithya@documenso.com>
2024-03-08 00:36:18 +05:30
Adithya Krishna 3ce5b9e0a0 chore: updated code_of_conduct link
Signed-off-by: Adithya Krishna <adithya@documenso.com>
2024-03-08 00:33:15 +05:30
Adithya Krishna e7f8f4e188 Merge branch 'main' of https://github.com/documenso/documenso into feat/doc-limit-improvement 2024-03-07 21:08:04 +05:30
Adithya Krishna 6c9303012c chore: updated animation
Signed-off-by: Adithya Krishna <adithya@documenso.com>
2024-03-07 21:06:16 +05:30
Gautam-Hegde 6fc3803ad2 Merge branch 'main' of https://github.com/Gautam-Hegde/documenso 2024-03-07 20:54:55 +05:30
Anik Dhabal Babu f7e7c6dedf fix: overflow issue 2024-03-07 20:08:11 +05:30
Adithya Krishna 0c426983bb chore: updated initial animation state
Signed-off-by: Adithya Krishna <adithya@documenso.com>
2024-03-07 19:28:35 +05:30
Adithya Krishna 9ae51a0072 feat: improved ui of document dropzone for max quota state
Signed-off-by: Adithya Krishna <adithya@documenso.com>
2024-03-07 19:04:58 +05:30
Rohit Saluja d694f4a17b fix: show close icon on notification inmobile 2024-03-07 18:48:23 +05:30
Lucas Smith 80f767b321 chore: update docker section in readme 2024-03-07 23:36:34 +11:00
Lucas Smith 4ec8eeeac1 docs: add article on removing server actions (#994) 2024-03-07 23:11:32 +11:00
Mythie 8e813ab2ac fix: use docker manifests for multiarch 2024-03-07 22:16:37 +11:00
Lucas Smith 51f60926ce fix: re-add buildx and qemu 2024-03-07 10:27:14 +00:00
Lucas Smith 2ccc2f22de chore: back to docker buildx 2024-03-07 10:24:17 +00:00
David Nguyen f6eddaa9f6 fix: remove duplicate neon pooler (#990)
## Description

Fixes the issue with Vercel preview deployments failing.

It appears that the old `PGHOST` environment variable injected by neon
was:

`ep-snowy-snowflake-a2vc5pa2.eu-central-1.aws.neon.tech`

It is now:

`ep-snowy-snowflake-a2vc5pa2.eu-central-1-pooler.aws.neon.tech`

Notice the `-pooler` being attached automatically to the `PGHOST`.

## References

> The following changes were made to the [Neon Vercel
Integration](https://vercel.com/integrations/neon):
>
>To ensure that users accessing a Neon database from a serverless
environment have enough connections, the DATABASE_URL and PGHOST
environment variables added to a Vercel project by the Neon integration
are now set to a pooled Neon connection string by default. Pooled
connections support up to 10,000 simultaneous connections. Previously,
these variables were set to an unpooled connection string supporting
fewer concurrent connections.

https://neon.tech/docs/changelog

https://neon.tech/docs/guides/vercel#manage-vercel-environment-variables
2024-03-07 18:17:28 +08:00
Lucas Smith 35b2405921 chore: use warpbuild for docker publishing 2024-03-07 10:02:33 +00:00
Catalin Pit 7b77084dee fix: deleted files that shouldn't have been committed 2024-03-07 11:34:19 +02:00
Catalin Pit a34334c4dc docs: add article on removing server actions 2024-03-07 11:32:01 +02:00
Lucas Smith 0c8b24ba75 chore: remove bcrypt (#993)
Remove `bcrypt` in favor of `@node-rs/bcrypt` which includes precompiled
binaries for many platforms reducing the number of tasks to run post
`npm install`.

Resolves #986
2024-03-07 19:58:53 +11:00
Mythie 8dad3607cf fix: add @node-rs/bcrypt to server component externals 2024-03-07 18:48:06 +11:00
Mythie cffb7907b5 chore: remove bcrypt 2024-03-07 18:30:22 +11:00
Lucas Smith b9b57f16c0 fix: use matrix build 2024-03-07 05:05:35 +00:00
Lucas Smith 03d2a2a278 fix: update buildx platform arg 2024-03-07 04:35:25 +00:00
Lucas Smith 82efc5f589 fix: use docker buildx and push 2024-03-07 04:07:55 +00:00
Lucas Smith 8a9588ca65 fix: fetch tags for publish action 2024-03-07 03:49:03 +00:00
Lucas Smith f723a34464 chore: remove launch week quote 2024-03-07 14:12:10 +11:00
Lucas Smith dd1d657057 feat: tidy docker setup (#988)
Tidy the docker setup and include a Github Action
for publishing docker containers to DockerHub and
Github Container Registry.

Also add a small README file with docker hosting instructions.
2024-03-07 14:11:03 +11:00
Lucas Smith 10ef5b6e51 fix: improvements from testing 2024-03-07 02:57:02 +00:00
Anik Dhabal Babu b5b74a788c fix: overflow issue with user name input 2024-03-06 14:52:59 +00:00
Lucas Smith 9525b9bd63 fix: resolve issue with testing compose file 2024-03-06 23:48:28 +11:00
Adithya Krishna d382e03085 feat: add typefully card to open page (#979)
**Description:**

The new card for typefully looks like the below screenshot

<img width="960" alt="Screenshot 2024-03-01 at 12 53 00"
src="https://github.com/documenso/documenso/assets/23498248/925d3362-f883-48b2-8870-83b8115bac7d">
2024-03-06 13:30:35 +05:30
Adithya Krishna b8fa45380b Merge branch 'main' into feat/typefully 2024-03-06 13:28:52 +05:30
Mythie 2cce6dc2e5 feat: tidy docker setup
Tidy the docker setup and include a Github Action
for publishing docker containers to DockerHub and
Github Container Registry.

Also add a small README file with docker hosting instructions.
2024-03-06 15:46:51 +11:00
Lucas Smith 927cb1a934 fix: incorrect download filename logic 2024-03-05 23:05:32 +00:00
Lucas Smith 579a2f96e5 chore: rename community => early adopter 2024-03-05 13:04:46 +00:00
Adithya Krishna 8a82952b34 Merge branch 'main' into feat/typefully 2024-03-05 16:42:29 +05:30
David Nguyen 70494fa5bb feat: add offline development support (#987)
## Description

Add support to develop without network access since TRPC by default will
prevent network requests when offline.

https://tanstack.com/query/v4/docs/framework/react/guides/network-mode#network-mode-always

## Changes Made

- Add dynamic logic to toggle offline development
- Removed teams feature flag
2024-03-05 22:06:48 +11:00
Adithya Krishna 41ccefe212 chore: remove twt logo asset
Signed-off-by: Adithya Krishna <adithya@documenso.com>
2024-03-05 15:43:33 +05:30
Adithya Krishna e83a4becee chore: update twitter logo
Signed-off-by: Adithya Krishna <adithya@documenso.com>
2024-03-05 15:41:34 +05:30
Adithya Krishna a03ce728f3 chore: remove ssr
Signed-off-by: Adithya Krishna <adithya@documenso.com>
2024-03-05 15:34:42 +05:30
Adithya Krishna d29caaf823 Merge branch 'feat/typefully' of https://github.com/documenso/documenso into feat/typefully 2024-03-05 14:59:18 +05:30
Adithya Krishna 7e9b96f059 Merge branch 'main' of https://github.com/documenso/documenso into feat/typefully 2024-03-05 14:58:27 +05:30
Adithya Krishna 691255da3f chore: updated styling of tooltips and margins
Signed-off-by: Adithya Krishna <adithya@documenso.com>
2024-03-05 14:57:29 +05:30
Lucas Smith f6f9c301da feat(ci): cache github workflow actions (#804) 2024-03-05 10:04:06 +11:00
Mythie a17d4a2a39 fix: handle signature annotations 2024-03-03 11:36:28 +11:00
Mythie 73aae6f1e3 feat: improve admin panel 2024-03-03 01:55:33 +11:00
Lucas Smith 328d16483c chore: update profile claim dialog and modal (#983)
**Description:**

**Settings Page:**

<img width="668" alt="Screenshot 2024-03-01 at 19 12 40"
src="https://github.com/documenso/documenso/assets/23498248/08e48432-39a6-4ef0-bc53-931fc3c81545">

**Claim Modal:** 

<img width="588" alt="Screenshot 2024-03-01 at 19 14 17"
src="https://github.com/documenso/documenso/assets/23498248/69bc2d02-97c6-4a29-88a4-55ed8898ccf5">
2024-03-02 12:45:22 +11:00
Lucas Smith 6dd2abfe51 fix: username min length + fixed condition (#982)
fixed #981 

`url.length <= 6` >>> `url.length < 6`

also removed debug message from the form component
2024-03-02 12:43:44 +11:00
Prajwal Kulkarni 870de02efa Merge branch 'main' into reattach-pdf 2024-03-01 21:23:17 +05:30
Adithya Krishna 452545dab1 chore: updated button text
Signed-off-by: Adithya Krishna <adithya@documenso.com>
2024-03-01 19:12:09 +05:30
Adithya Krishna 437410c73a chore: updated text color
Signed-off-by: Adithya Krishna <adithya@documenso.com>
2024-03-01 19:11:47 +05:30
Adithya Krishna 36a95f6153 chore: updated text color
Signed-off-by: Adithya Krishna <adithya@documenso.com>
2024-03-01 19:10:15 +05:30
Adithya Krishna 0f03ad4a6b chore: updated wordings for claimed ursers
Signed-off-by: Adithya Krishna <adithya@documenso.com>
2024-03-01 19:05:16 +05:30
Samyak Shah 8674ad4c88 docs: add node version minimum requirement (#975)
## PR fixes which issue ? 

This PR fixes #974 

## Description: 

- Have added minimum node version required to setup the Documenso
project locally which will ensure to save time of new contributors
setting up their project. 💚

## Reference for the minimum requirement decision: 


https://nextjs.org/docs/app/building-your-application/upgrading/version-14#v14-summary

---------

Co-authored-by: Adithya Krishna <aadithya794@gmail.com>
Co-authored-by: Catalin Pit <25515812+catalinpit@users.noreply.github.com>
2024-03-01 15:12:08 +02:00
Catalin Pit 98e00739c8 Merge branch 'main' into feat/typefully 2024-03-01 15:05:14 +02:00
Lucas Smith 00c36782ff fix: why didn't prettier catch this 2024-03-01 22:59:52 +11:00
McPizza 665ccd7628 update username min characters 2024-03-01 11:30:42 +00:00
McPizza e5fe3d897d remove fixed true condition
from auth signup router
2024-03-01 11:27:24 +00:00
McPizza bfb1c65f98 remove debug logs
console.log on signup form
2024-03-01 11:25:21 +00:00
Timur Ercan 3b8b87a90b Chore/blog (#980)
day 5
2024-03-01 11:14:26 +01:00
Timur Ercan 819e58dd61 chore: image 2024-03-01 11:11:52 +01:00
Timur Ercan 8c435d48b7 chore: day5 2024-03-01 10:22:10 +01:00
Adithya Krishna 0c8a89a2ea feat: add typefully card
Signed-off-by: Adithya Krishna <adithya@documenso.com>
2024-03-01 12:53:51 +05:30
Mythie 85885b5ad5 fix: api documentation errors on ssr 2024-03-01 14:54:41 +11:00
Mythie 5cc4204788 fix: add early return to webhook trigger 2024-03-01 14:12:06 +11:00
Timur Ercan e226f012a9 chore: ctas (#978) 2024-02-29 14:25:53 +01:00
Timur Ercan 4ad722ba00 chore: ctas 2024-02-29 14:25:21 +01:00
Timur Ercan 1927cc4067 chore: typos and links (#977) 2024-02-29 14:15:18 +01:00
Timur Ercan c2ec092404 chore: typos and links 2024-02-29 14:14:35 +01:00
Catalin Pit ebe23335f8 fix: return the recipient as an array to match other formats from zapier (#971)
Return the recipient as an array to match the other formats for Zapier.
Otherwise, Zaps with the "DOCUMENT_OPENED" hooks won't work.

All the other webhooks return the "Recipient" field as an array.
2024-02-29 08:37:01 +02:00
Lucas Smith e5be219b99 feat: claim profile (#972)
Signed-off-by: Adithya Krishna <adithya@documenso.com>
2024-02-29 15:29:47 +11:00
Mythie aa87a86a5f fix: update e2e tests 2024-02-29 15:19:38 +11:00
Mythie 1cc7c95a33 fix: update e2e test 2024-02-29 14:26:37 +11:00
Mythie 9f576eb47c fix: update signup mutation schema 2024-02-29 14:13:37 +11:00
Mythie bd82ad7a0b fix: revert settings-header changes 2024-02-29 14:12:00 +11:00
Mythie cc1b888174 chore: tidy changes 2024-02-29 14:09:17 +11:00
Lucas Smith 5576cdc2b0 Merge branch 'main' into feat/public-profile-1 2024-02-29 14:08:19 +11:00
Mythie ecc9dc63ea feat: the rest of the owl 2024-02-29 13:22:21 +11:00
Timur Ercan 11fe380338 chore: typo (#970) 2024-02-28 13:38:47 +01:00
Timur Ercan f376c7b951 chore: typo 2024-02-28 13:38:10 +01:00
Timur Ercan 90477dfd00 chore: cta (#969) 2024-02-28 12:23:52 +01:00
Timur Ercan dd81f946b4 chore: cta 2024-02-28 12:23:21 +01:00
Timur Ercan f4e1df7f3a Chore/blog (#968) 2024-02-28 12:14:46 +01:00
Timur Ercan 3510d8b6b0 chore: text 2024-02-28 12:14:19 +01:00
Timur Ercan 1590fa9457 chore: text 2024-02-28 12:13:48 +01:00
Timur Ercan ce09c32bf5 Chore/blog (#967)
day 3 lgtm
2024-02-28 11:59:56 +01:00
Lucas Smith 077da72b68 feat: implement webhooks (#913) 2024-02-28 18:31:48 +11:00
Catalin Pit c8869b3088 chore: fixed UI for webhooks team 2024-02-28 09:18:05 +02:00
Catalin Pit 8bd1647a2d chore: fixed UI 2024-02-28 09:14:10 +02:00
Catalin Pit 00a7389af3 chore: implemented feedback 2024-02-28 08:13:28 +02:00
Lucas Smith ae00290b6f fix: add reference to swagger docs 2024-02-28 04:34:33 +00:00
Mythie e3e2cfbcfd fix: refactor and implement design 2024-02-28 14:43:09 +11:00
Timur Ercan 8ab77e0e55 chore: day 3 2024-02-27 19:30:01 +01:00
Catalin Pit 93e34a5abd Merge branch 'main' into feat/webhook-implementation 2024-02-27 16:37:29 +02:00
Catalin Pit f0a511e238 chore: refactor code 2024-02-27 15:22:02 +02:00
Timur Ercan 837ff531a9 chore: format 2024-02-27 11:55:10 +01:00
Timur Ercan b02263eea1 Chore/blog (#964)
day 2 blogpost
2024-02-27 11:49:16 +01:00
Timur Ercan f5a0c1733f chore: tags 2024-02-27 11:47:52 +01:00
Timur Ercan 18368b5801 chore: day 2 blogpost 2024-02-27 11:47:22 +01:00
Adithya Krishna b225cc8139 chore: updated styles
Signed-off-by: Adithya Krishna <adithya@documenso.com>
2024-02-27 20:40:43 +11:00
Adithya Krishna b498f8edb7 feat: update ui
Signed-off-by: Adithya Krishna <adithya@documenso.com>
2024-02-27 20:40:42 +11:00
Adithya Krishna b1261510d2 feat: update signin signup pages
Signed-off-by: Adithya Krishna <adithya@documenso.com>
2024-02-27 20:39:20 +11:00
Adithya Krishna 65d762dd4b feat: update signin signup ui
Signed-off-by: Adithya Krishna <adithya@documenso.com>
2024-02-27 20:39:19 +11:00
Adithya Krishna deea6b1535 feat: update marketing site
Signed-off-by: Adithya Krishna <adithya@documenso.com>
2024-02-27 20:36:40 +11:00
Lucas Smith af30443f5a Merge branch 'main' into feat/webhook-implementation 2024-02-27 18:17:54 +11:00
Mythie a4b1f7c983 feat: support team webhooks 2024-02-27 16:56:32 +11:00
Mythie 7dd2bbd8ab feat: update webhook handling and triggering 2024-02-27 15:16:14 +11:00
Mythie 488464e3e7 chore: add team to webhook model 2024-02-27 13:38:12 +11:00
Mythie 1ec549b869 chore: add webhook-call model 2024-02-27 13:37:24 +11:00
Mythie c2daa964c0 chore: use cuids for webhooks 2024-02-27 12:13:56 +11:00
Timur Ercan 53d18eb3c8 chore: typo (#963) 2024-02-26 17:13:19 +01:00
Timur Ercan 21016216b6 chore: typo 2024-02-26 17:13:01 +01:00
Timur Ercan b5b0aeef6d chore: typo (#962)
---
name: Pull Request
about: Submit changes to the project for review and inclusion
---

## Description

<!--- Describe the changes introduced by this pull request. -->
<!--- Explain what problem it solves or what feature/fix it adds. -->

## Related Issue

<!--- If this pull request is related to a specific issue, reference it
here using #issue_number. -->
<!--- For example, "Fixes #123" or "Addresses #456". -->

## Changes Made

<!--- Provide a summary of the changes made in this pull request. -->
<!--- Include any relevant technical details or architecture changes.
-->

- Change 1
- Change 2
- ...

## Testing Performed

<!--- Describe the testing that you have performed to validate these
changes. -->
<!--- Include information about test cases, testing environments, and
results. -->

- Tested feature X in scenario Y.
- Ran unit tests for component Z.
- Tested on browsers A, B, and C.
- ...

## Checklist

<!--- Please check the boxes that apply to this pull request. -->
<!--- You can add or remove items as needed. -->

- [ ] I have tested these changes locally and they work as expected.
- [ ] I have added/updated tests that prove the effectiveness of these
changes.
- [ ] I have updated the documentation to reflect these changes, if
applicable.
- [ ] I have followed the project's coding style guidelines.
- [ ] I have addressed the code review feedback from the previous
submission, if applicable.

## Additional Notes

<!--- Provide any additional context or notes for the reviewers. -->
<!--- This might include details about design decisions, potential
concerns, or anything else relevant. -->
2024-02-26 17:11:53 +01:00
Timur Ercan 8faf3afbbe chore: typo 2024-02-26 17:11:09 +01:00
Timur Ercan 0044b1f617 Update README.md (#961) 2024-02-26 14:22:00 +01:00
Timur Ercan 75f8305023 Update README.md 2024-02-26 14:20:44 +01:00
Timur Ercan 36e32639c9 chore: blog day 1 (#960)
deploy day 1
2024-02-26 13:12:10 +01:00
Timur Ercan 25164abc14 chore: capitals 2024-02-26 13:11:44 +01:00
Timur Ercan 1b8b81b16c chore: capitals 2024-02-26 13:11:08 +01:00
Timur Ercan 4bdd41c7c5 chore: blog day 1 2024-02-26 13:09:15 +01:00
Mythie a31057d0d1 fix: add updated badge 2024-02-26 22:35:10 +11:00
Mythie 70165c4469 chore: ui updates 2024-02-26 22:24:23 +11:00
Timur Ercan 8dceeffff7 chore: pricing update (#952)
new pricing, ready to be merged when the launchweek day 1 article drops
2024-02-26 12:09:28 +01:00
Catalin Pit 15c22d3897 feat: updated the triggerWebhook function 2024-02-26 12:52:30 +02:00
Timur Ercan a54d09ab19 Merge branch 'main' into chore/pricing-update 2024-02-26 09:44:16 +01:00
Lucas Smith 15ebe6dbaf fix: add cascade delete to recipient fields 2024-02-26 03:51:28 +00:00
Lucas Smith 5805d8a903 Merge branch 'main' into feat/webhook-implementation 2024-02-26 12:47:21 +11:00
Lucas Smith f7c6b53258 feat: public api start (#674)
This PR adds the public-facing API.

![API high-level
workings](https://github.com/documenso/documenso/assets/25515812/9f866889-164f-401f-bf4e-d3e69b6382f1)

The public API will allow users to interact with Documenso
programmatically. At the moment, there are 5 available endpoints:
1. `GET /documents`
    - get all documents of the user making the API call
- it accepts 2 URL query parameters - `page` and `perPage`, but they are
not mandatory
2. `GET /documents/:id`
    - get a specific document of the user making the API call
- it requires 1 URL parameter, which represents the ID of the document
that needs to be retrieved
3. `DELETE /documents/:id`
    - delete a specific document of the user making the API call
- it requires 1 URL parameter, which represents the ID of the document
that needs to be deleted
4. `POST /documents`
- making a POST request to this endpoint will return an S3 pre-signed
URL where you can upload the document
    - it requires you to pass the file name and the file content type
5. `PATCH /documents/:id/send-for-signing`
    - send a document for signing
    - it allows you to pass the following:
        - signer email *(required)*
        - signer name *(optional)*
        - field type (signature, email, name, etc.) *(required)*
        - page number where to insert the field *(required)*
        - page X *(required)*
        - page Y *(required)*
        - page width *(required)*
        - page height *(required)*
        - email subject *(optional)*
        - email body *(optional)*

The users are authenticated through API tokens. The users can create one
or more tokens in their account settings, and each token will be
available for 1 year _(duration open to suggestions/changes)_.

Each time the user makes a request, the app checks if the token exists
and if it's valid. The app will return `401` *(unauthorized)* and the
appropriate error message if either is false. If both are true AND the
user uses the correct HTTP verb and passes the required URL parameters
and body, the API call will be successful.

Code overview:
- `@documenso/packages/lib/trpc/api-contract` - this folder contains the
`contract` and `schema` files. The `contract.ts` file describes the
structure of the API, the format of the requests and responses, and how
to authenticate your API calls, among others. The `schema.ts` file
contains the Zod schemas used in the API contract.
- `@documenso/packages/trpc/server/api-token-router` - this folder
contains the `router.rs` and `schema.ts` files. Here are the tRPC
procedures used on the frontend. That is, the user's settings page,
where the user can list/create/delete API tokens.
- `@documenso/packages/trpc/tsconfig.json` - I added `"strict": true`
because that's what's suggested in the `ts-rest` documentation.
*([source](https://ts-rest.com/docs/quickstart#create-a-contract))*
- `[...ts-rest].tsx` - This file contains the implementation of the API.
You can see the logic behind each route.
- the rest of the code represents the code for the API tokens page in
the user's settings.
2024-02-26 12:41:16 +11:00
Mythie 4778270d3c fix: use template dialog to pass teamId 2024-02-26 12:20:50 +11:00
Lucas Smith 3c51a1bc3d Merge branch 'main' into feat/public-api 2024-02-26 12:15:33 +11:00
Lucas Smith fcfb741363 feat: edit recipients when creating document from template (#953)
https://github.com/documenso/documenso/assets/55143799/85a840e3-4fb4-4c02-ba63-b9626f4cea58
2024-02-26 12:00:23 +11:00
Mythie a54159a9ec fix: add missing teamId references 2024-02-26 11:59:32 +11:00
David Nguyen 5bd0dde4a5 fix: e2e tests 2024-02-26 10:50:46 +11:00
Mythie 6b8e11b535 fix: template router update 2024-02-26 10:31:24 +11:00
Mythie c7dac2f4de fix: update delete endpoint and add limits 2024-02-26 10:01:13 +11:00
Mythie 4cb0d6999d fix: build errors from merge 2024-02-26 09:13:46 +11:00
Lucas Smith 2a74ce06ef Merge branch 'main' into feat/public-api 2024-02-26 00:21:25 +11:00
Lucas Smith 6ea6dda99d feat: add transparent background to fields (#899) 2024-02-26 00:10:35 +11:00
Lucas Smith 187a988f9c Merge branch 'main' into transparent-fields 2024-02-26 00:02:56 +11:00
Lucas Smith 5bef2fba91 fix: follow figma design 2024-02-25 13:02:09 +00:00
Lucas Smith df3ba11655 feat: account deletion (#846)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **New Features**
	- Added two-factor authentication form handling in profile settings.
- Introduced account deletion functionality, including Stripe customer
data removal.
- Updated UI components and styles for improved user interaction, such
as enhanced visual feedback for destructive actions.
- **Refactor**
- Improved code quality by updating import statements for type-only
imports.
- **Chores**
- Restructured the `forwardPorts` array in dev container configuration
for clarity.
- Removed a trailing comma in the `vscode` extensions list to adhere to
JSON format rules.
- **Documentation**
- Added comments to clarify the handling of undefined values in
two-factor authentication verification.
- **Database**
- Implemented a SQL migration script for creating a default deleted user
in the system.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-02-25 22:49:55 +11:00
Lucas Smith 9cf72e1442 chore: tidy code and extract alert-dialog 2024-02-25 11:12:18 +00:00
Lucas Smith 7226d5ac53 Merge branch 'main' into feat/account-deletion 2024-02-24 23:18:14 +11:00
Lucas Smith dbd63498e0 feat: custom text field (#945)
https://github.com/documenso/documenso/assets/55143799/c0f296ce-1e91-4b49-9c19-1bdffbd3163f
2024-02-24 22:55:16 +11:00
Lucas Smith 4ca154d88a fix: update e2e test? 2024-02-24 11:54:13 +00:00
Lucas Smith d34c862688 fix: switch custom text to input rather than textarea 2024-02-24 11:25:12 +00:00
Lucas Smith a5e51e63a1 Merge branch 'main' into custom-text-field 2024-02-24 22:23:17 +11:00
Lucas Smith 14c77d7c92 fix: update e2e test 2024-02-24 11:19:07 +00:00
Lucas Smith a5a0fd9187 fix: update e2e test 2024-02-24 10:55:48 +00:00
Lucas Smith 77193b93c4 fix: resolve build error and update dialog width 2024-02-24 10:36:27 +00:00
Lucas Smith a10957d909 Merge branch 'main' into feat/improve-create-document-from-template 2024-02-24 21:26:11 +11:00
Lucas Smith 688e32dfc2 feat: add roles to templates recipients (#935) 2024-02-24 21:24:26 +11:00
Lucas Smith b1b3b84d82 Merge branch 'main' into feat/template-recipient-roles 2024-02-24 21:01:45 +11:00
Lucas Smith b09acaf94e feat: custom banner (#956) 2024-02-24 20:40:41 +11:00
Catalin Pit fab4992e13 feat: add zapier support 2024-02-24 11:18:58 +02:00
Lucas Smith d103c68a73 fix: remove console logs 2024-02-24 08:08:14 +00:00
David Nguyen a06b40af3c fix: revert hardcoded env 2024-02-24 15:11:12 +11:00
David Nguyen 0900836040 fix: missing marketing env variables 2024-02-24 14:56:11 +11:00
Prajwal Kulkarni a58a117056 Merge branch 'main' into reattach-pdf 2024-02-23 23:58:58 +05:30
Timur Ercan 9ea56bddd1 chore: pricing update 2024-02-23 17:02:20 +01:00
Timur Ercan 0b83671c78 fix: hardcode signup until env issue is fixed (#958)
hotfix for broken signup links
2024-02-23 16:50:43 +01:00
Timur Ercan 41cbf3ba3c fix: hardcode signup until env issue is fixed 2024-02-23 16:49:17 +01:00
Lucas Smith 8165a090d1 feat: migrate to site-settings 2024-02-23 10:47:01 +00:00
Ephraim Atta-Duncan c436559787 feat: create a banner with custom text by admin 2024-02-22 20:20:49 +00:00
Lucas Smith 15e191f62d fix: e2e tests (#955) 2024-02-22 23:58:51 +11:00
Lucas Smith f973dfd09c feat: add document page view (#926)
## Description

This feature allows us to have a dedicated page to view details for a
document.

The current `/documents/[id]` page has been moved to
`/documents/[id]/edit`.

The new `/documents/[id]` page will now display general information on
the document itself.

This will allow us to provide more details relating to a document in the
future, such as version history.

## Examples

These may be outdated as deployment failed

Login via example@documenso.com

Draft document no recipients:

https://stg-7hpkvyc5i-documenso.vercel.app/documents/446

Draft document with recipients:

https://stg-7hpkvyc5i-documenso.vercel.app/documents/440

Pending document:

https://stg-7hpkvyc5i-documenso.vercel.app/documents/447

Completed document:

https://stg-7hpkvyc5i-documenso.vercel.app/documents/448

Pending teams document:

https://stg-7hpkvyc5i-documenso.vercel.app/t/hello/documents/449/

## Checklist

<!--- Please check the boxes that apply to this pull request. -->
<!--- You can add or remove items as needed. -->

- [ ] I have tested these changes locally and they work as expected.
- [ ] I have added/updated tests that prove the effectiveness of these
changes.
- [X] I have followed the project's coding style guidelines.

## Additional Notes

When a user "sends" a document (DRAFT -> PENDING), should we redirect
them to the document/id page, or keep it how it currently is and have it
redirect to `/documents` page?
2024-02-22 23:25:22 +11:00
David Nguyen a58fee2da6 fix: e2e tests 2024-02-22 22:58:51 +11:00
Lucas Smith 1232f54a23 Merge branch 'main' into feat/separate-document-page 2024-02-22 22:54:15 +11:00
Lucas Smith 306e5ff31f fix: add timeouts to longer transactions 2024-02-22 11:05:49 +00:00
David Nguyen 34825aaf3a feat: add separate document audit page 2024-02-22 19:14:01 +11:00
Sumit Bisht dd29845934 fix: put max height in teams section in profile dropdown (#947)
fixes: #942
2024-02-22 16:49:54 +11:00
Ephraim Duncan a48bda0d27 feat: add page numbers to documents (#946) 2024-02-22 16:36:34 +11:00
David Nguyen 48321f2f62 Merge branch 'main' into feat/separate-document-page 2024-02-22 16:13:33 +11:00
Mythie 2abcdd7533 feat: team api tokens 2024-02-22 13:39:34 +11:00
Lucas Smith df132a51ab feat: ability to download all the 2FA recovery codes (#944)
fixes #938 



https://github.com/documenso/documenso/assets/81948346/8bf807ae-41b0-417b-9f55-d96584e71acb
2024-02-21 13:39:08 +11:00
Lucas Smith 8287722f59 fix: update view dialog to use new download api 2024-02-21 02:29:19 +00:00
Lucas Smith aba6b58c14 fix: simplify download api 2024-02-21 02:19:35 +00:00
Lucas Smith b6c9213b66 fix: disable static generation of marketing site pages
Disables the generation of the blog and content pages using
generateStaticPaths to deal with a regression with routing
introduced with next-runtime-env.
2024-02-21 00:58:57 +00:00
Lucas Smith 22e3a79a72 Merge branch 'main' into feat/public-api 2024-02-21 11:29:36 +11:00
Ephraim Atta-Duncan 6ee896048e feat: dialog to enter custom recipients for creating document from template 2024-02-20 19:11:12 +00:00
Mythie 4d286e01d1 feat: allow recipients when creating document from template 2024-02-20 17:20:03 +00:00
Apoorv Taneja 3106c325d7 Merge branch 'main' into fix/layout-shift-on-table 2024-02-20 21:52:35 +05:30
Mythie b9e5905469 feat: create from template 2024-02-20 19:46:18 +11:00
Anik Dhabal Babu 39c6cbf66a feat: ability to download 2FA recovery codes 2024-02-19 11:25:15 +00:00
Catalin Pit c6dbaaea21 Merge branch 'main' into feat/webhook-implementation 2024-02-19 10:02:06 +02:00
David Nguyen ac6da9ab45 feat: add feature flag 2024-02-19 14:31:26 +11:00
David Nguyen 791a22cb5f refactor: add comments 2024-02-19 13:22:48 +11:00
Ephraim Atta-Duncan 11299d3f92 feat: add custom text to singleplayer 2024-02-17 11:24:47 +00:00
Ephraim Atta-Duncan 9301b8ef4d fix: multiple text fields sharing the same text value 2024-02-17 10:50:19 +00:00
Ephraim Atta-Duncan ad6fad1182 fix: custom text with multiline throwing an error
took me hours
2024-02-17 10:43:22 +00:00
Ephraim Atta-Duncan 5687503dfc feat: sign document with a custom text 2024-02-17 08:26:30 +00:00
Anik Dhabal Babu 0186f2dfed feat: ability to download 2FA recovery codes 2024-02-17 13:19:03 +05:30
Ephraim Atta-Duncan f98567ea87 feat: request usee to disable 2fa before deleting account 2024-02-17 07:34:21 +00:00
David Nguyen 2815b1a809 feat: add enterprise billing (#939)
## Description

Add support for enterprise billing plans.

Enterprise billing plans by default get access to everything early
adopters do:
- Unlimited teams
- Unlimited documents

They will also get additional features in the future.

## Notes

Pending webhook updates to support enterprise onboarding.
Rolled back env changes `NEXT_PUBLIC_PROJECT` since it doesn't seem to
work.
2024-02-17 12:42:00 +11:00
Ephraim Atta-Duncan 918e9ddc0b chore: use token input on enable 2fa 2024-02-16 21:20:16 +00:00
Ephraim Atta-Duncan 94eee8b913 chore: change font family 2024-02-16 20:49:52 +00:00
Anik Dhabal Babu 5d6cdbef89 feat: ability to download all the 2FA recovery codes 2024-02-16 20:46:27 +00:00
Catalin Pit 26d4bbf010 chore: ui updates 2024-02-16 13:58:03 +02:00
Lucas Smith 960914aeb5 fix: undo operation on signature pad (#868)
fixes: #864
2024-02-16 22:57:14 +11:00
Lucas Smith d83769b410 chore: use unsafe effect 2024-02-16 11:56:02 +00:00
Catalin Pit cd240ae8a4 chore: loading spinner 2024-02-16 13:55:47 +02:00
Catalin Pit a1459b41fd Merge branch 'main' into feat/webhook-implementation 2024-02-16 13:04:38 +02:00
Lucas Smith a0cf2a2c75 fix: improved document-dropzone ui for small vertical screens (#857)
improved document-dropzone ui for small vertical screens (screens less
than 800px vertically)
Although it can still become congested on really small vertical screens,
but possibility is really low.

fixes: #840
2024-02-16 22:03:24 +11:00
Lucas Smith a30b73ce86 fix: update css 2024-02-16 11:02:04 +00:00
Lucas Smith 46d163d9d6 fix: highlighting issue in recipient selection (#937)
fixes: #920 

<img width="391" alt="image"
src="https://github.com/documenso/documenso/assets/75713174/08b2f5ab-4a6f-423a-a2fa-8f7b04789bb8">
2024-02-16 21:50:53 +11:00
Lucas Smith 681a89cfe1 chore: minor lint fixes (#934) 2024-02-16 21:48:45 +11:00
Catalin Pit 4d6e780abe chore: merge main 2024-02-16 12:12:54 +02:00
Catalin Pit 7f3f6f5312 feat: hide secret field 2024-02-16 11:44:03 +02:00
Catalin Pit 019db27b1d feat: trigger webhook functionality 2024-02-16 11:04:11 +02:00
Lucas Smith e5f4edc120 chore: create security.txt (#878)
Adding a security.txt file enables security researchers to quickly and
easily see where they can submit security issues and know that they are
being taken serious. From the proposal website:

> "When security risks in web services are discovered by independent
security researchers who understand the severity of the risk, they often
lack the channels to disclose them properly. As a result, security
issues may be left unreported. security.txt defines a standard to help
organizations define the process for security researchers to disclose
security vulnerabilities securely.”

See also https://securitytxt.org
2024-02-16 12:34:41 +11:00
Sumit Bisht 25291b64eb fix: highlighting issue in recipient selection 2024-02-15 22:25:23 +05:30
Ephraim Atta-Duncan 345c4b8b14 feat: use pin-input on sign in 2024-02-15 16:00:13 +00:00
Ephraim Atta-Duncan 897f0dabde feat: 2fa pin input component 2024-02-15 14:21:40 +00:00
Ephraim Atta-Duncan fddd860d15 chore: code refactor to avoid repetitions 2024-02-15 11:33:43 +00:00
Lucas Smith fe2093fe7c feat: add next-runtime-env (#869)
This PR adds the package
[next-runtime-env](https://github.com/expatfile/next-runtime-env/) to
populate the public environment variables at runtime.
2024-02-15 22:10:21 +11:00
David Nguyen 7fbe9b519c fix: styling 2024-02-15 20:42:17 +11:00
David Nguyen bd3c64658a feat: add document version history UI 2024-02-15 20:39:26 +11:00
Ephraim Atta-Duncan 769eaa0ed9 feat: add roles to templates recipients 2024-02-15 07:01:41 +00:00
Ephraim Atta-Duncan 49cddfab38 chore: lint with oxc 2024-02-15 06:11:50 +00:00
Timur Ercan 3e12a05ab8 chore: more grammar 2024-02-14 17:19:48 +01:00
Timur Ercan a76504c0a4 Merge branch 'main' into chore-security-text 2024-02-14 17:16:44 +01:00
Timur Ercan abab0c0a22 chore: grammer and format 2024-02-14 17:14:43 +01:00
Ephraim Atta-Duncan c680cfc24f chore: update pr based on review 2024-02-14 14:55:46 +00:00
Ephraim Atta-Duncan cab875f68a fix: update create delete user sql script 2024-02-14 14:55:46 +00:00
Ephraim Duncan 6daaa3a6d4 Merge branch 'main' into feat/account-deletion 2024-02-14 14:54:26 +00:00
Catalin Pit 61958989b4 feat: more webhook functionality 2024-02-14 14:38:58 +02:00
Mythie 4c5b910a59 chore: add examples 2024-02-14 13:15:35 +11:00
Lucas Smith f72b669f67 feat: restrict app access for unverified users (#835) 2024-02-13 20:22:43 +11:00
Lucas Smith 536cafde31 Merge branch 'main' into feat/disable-access-unverified-users 2024-02-13 20:19:16 +11:00
Lucas Smith d052f02013 chore: refactor code 2024-02-13 06:01:25 +00:00
Catalin Pit 4878cf388f chore: add the missing signIn function 2024-02-13 07:53:36 +02:00
Catalin Pit 149f416be7 chore: refactor code 2024-02-13 07:50:22 +02:00
David Nguyen 524a2f4ea9 Merge branch 'main' into feat/separate-document-page 2024-02-13 11:15:31 +11:00
David Nguyen 82b87739d0 fix: update document links 2024-02-12 19:00:47 +11:00
Catalin Pit c432261dd8 chore: disable button while form is submitting 2024-02-12 09:49:59 +02:00
Catalin Pit 1852aa4b05 chore: add info 2024-02-12 09:49:59 +02:00
David Nguyen a868ecf2d2 fix: restrict team verification tokens (#927)
## Description

Currently we're not restricting team transfer and email verification
tokens from flowing into the frontend.

This changes restricts it to only return the required information
instead of the whole data object.
2024-02-12 18:23:07 +11:00
David Nguyen 071475769c feat: add document page view 2024-02-12 17:30:23 +11:00
David Nguyen b1bb345929 fix: redirect URL preventing document flow (#925)
## Description

Currently the document redirect URL feature is preventing documents from
being created unless a redirect URL is provided.

During the document edit flow, the redirect URL is hidden in an advanced
tab with the value of an empty string, which will always fail the
current Zod validation since `optional` requires undefined to pass.

There are multiple ways to fix this, but I think this is the easiest
method where we can assume an empty string is valid.
2024-02-12 15:23:15 +11:00
Mythie 1a82740d0f feat: support recipient roles 2024-02-12 15:16:09 +11:00
Lucas Smith 51608ed390 fix: lint issue 2024-02-12 02:02:43 +00:00
Lucas Smith 8ebef831ac Merge branch 'main' into feat/add-runtime-env 2024-02-12 12:30:35 +11:00
Lucas Smith 20e2976731 fix: build issues 2024-02-12 01:29:22 +00:00
David Nguyen 3a32bc62c5 feat: initial document audit logs implementation (#922)
Added initial implementation of document audit logs.
2024-02-12 12:04:53 +11:00
Prajwal Kulkarni d5867ae8de Merge branch 'main' into reattach-pdf 2024-02-09 20:51:15 +05:30
Catalin Pit 0209127136 feat: delete webhook functionality 2024-02-09 16:28:18 +02:00
Catalin Pit ddb9dd11d7 feat: added backend stuff 2024-02-09 16:07:33 +02:00
Catalin Pit b3ba77dfed feat: allow user to choose expiry date 2024-02-09 11:35:09 +02:00
Adithya Krishna 4f990a7030 feat: redirect users upon signing completion (#888)
**Description:** 

- This PR adds a feature to redirect the users to a specific URL upon
signing
2024-02-09 13:31:01 +05:30
Adithya Krishna e26debe836 Merge branch 'main' into feat/sign-redirect 2024-02-09 12:10:20 +05:30
Lucas Smith e91bb78f2d Merge branch 'main' into feat/public-api 2024-02-09 16:00:40 +11:00
David Nguyen 8641884515 fix: recipients with CC role not being editable (#918)
## Description

Fixed issue where setting a recipient role as CC will prevent any
further changes as it is considered as "sent" and "signed".

## Other changes

- Prevent editing document after completed
- Removed CC and Viewers from the field recipient list since they will
never be filled
- Minor UI issues

## Checklist

- [X] I have tested these changes locally and they work as expected.
- [X] I have added/updated tests that prove the effectiveness of these
changes.
- [X] I have followed the project's coding style guidelines.
2024-02-09 12:37:17 +11:00
Prajwal Kulkarni 5391dd91b0 Merge branch 'main' into reattach-pdf 2024-02-08 19:24:09 +05:30
Lucas Smith 748bf6de6b fix: add dropped constants from merge 2024-02-08 22:12:04 +11:00
Lucas Smith d13cf743bf Merge branch 'main' into feat/add-runtime-env 2024-02-08 22:06:59 +11:00
apoorv taneja 58f4b72939 added fixed width for status col 2024-02-08 13:31:38 +05:30
Adithya Krishna 09b5621542 Merge branch 'main' into feat/sign-redirect 2024-02-08 12:56:42 +05:30
Mythie 98df273ebc feat: add field and recipient endpoints 2024-02-08 16:58:44 +11:00
Lucas Smith 47b8cc598c fix: add validation and error message display 2024-02-08 04:28:16 +00:00
David Nguyen e97b9b4f1c feat: add team templates (#912) 2024-02-08 12:33:20 +11:00
Prajwal Kulkarni 4855882ae6 Update label render condition 2024-02-07 21:31:51 +05:30
Catalin Pit b3514bd0c7 add new webhook dialog 2024-02-07 16:04:12 +02:00
Timur Ercan e0889426bb feat: blog article why i started documenso (#914)
- New Blogarticle
- First Draft
- Input and impressions welcome
- Not Grammer fixed yet, will do that later (grammerly account broken)
2024-02-07 13:13:33 +01:00
Timur Ercan e2a5638f50 chore: fixed 2024-02-07 13:07:22 +01:00
Timur Ercan 33ab8797a5 chore: text 2024-02-07 12:22:07 +01:00
Timur Ercan c7e0b73c97 Merge branch 'main' into feat/why-i-started-documenso 2024-02-07 12:00:22 +01:00
Timur Ercan b6bdbf72a7 Update apps/marketing/content/blog/why-i-started-documenso.mdx
Co-authored-by: Adithya Krishna  <aadithya794@gmail.com>
2024-02-07 12:00:12 +01:00
Timur Ercan 718f5664ac Update apps/marketing/content/blog/why-i-started-documenso.mdx
Co-authored-by: Adithya Krishna  <aadithya794@gmail.com>
2024-02-07 12:00:01 +01:00
Timur Ercan 58477e060a Update apps/marketing/content/blog/why-i-started-documenso.mdx
Co-authored-by: Adithya Krishna  <aadithya794@gmail.com>
2024-02-07 11:41:40 +01:00
Timur Ercan 2e719288ff Update apps/marketing/content/blog/why-i-started-documenso.mdx
Co-authored-by: Adithya Krishna  <aadithya794@gmail.com>
2024-02-07 11:41:32 +01:00
Timur Ercan 2431db06f5 Update apps/marketing/content/blog/why-i-started-documenso.mdx
Co-authored-by: Adithya Krishna  <aadithya794@gmail.com>
2024-02-07 11:41:14 +01:00
Timur Ercan 754e9b15f7 Update apps/marketing/content/blog/why-i-started-documenso.mdx
Co-authored-by: Adithya Krishna  <aadithya794@gmail.com>
2024-02-07 11:40:11 +01:00
David Nguyen 7d39e3d065 feat: add team feature flag (#915)
## Description

Add the ability to feature flag the teams feature via UI.

Also added minor UI changes

## Checklist

- [X] I have tested these changes locally and they work as expected.
- [X] I have added/updated tests that prove the effectiveness of these
changes.
- [X] I have followed the project's coding style guidelines.
2024-02-07 21:32:44 +11:00
Adithya Krishna 7bb00c1c89 Merge branch 'main' into feat/why-i-started-documenso 2024-02-07 14:05:28 +05:30
Adithya Krishna 7ef771533a Merge branch 'main' into transparent-fields 2024-02-07 13:34:46 +05:30
Lucas Smith 70c58470c1 fix: update field remove logic (#916)
## Description

Fixed issue where you are prevented from removing fields for a recipient
that has multiple fields.

Example:

Recipient has 3 fields, you remove 1 and proceed to next step. In the
next step the field reappears as it was not deleted.

## Checklist

- [X] I have tested these changes locally and they work as expected.
- [X] I have added/updated tests that prove the effectiveness of these
changes.
- [X] I have followed the project's coding style guidelines.
2024-02-07 16:39:54 +11:00
David Nguyen cad48236a0 Merge branch 'main' into feat/disable-access-unverified-users 2024-02-07 16:30:22 +11:00
Sumit Bisht bf26f2cb9d fix: empty document titles (#917)
fixes: #909
2024-02-07 16:25:39 +11:00
David Nguyen 58e2eda5e9 fix: update field remove logic 2024-02-07 14:40:15 +11:00
Timur Ercan 94ddb0252b fix: stuff 2024-02-06 19:09:27 +01:00
Timur Ercan 2f696ddd13 feat: blog article why i started documenso 2024-02-06 18:55:16 +01:00
Prajwal Kulkarni c08768a330 Format code with prettier 2024-02-06 21:01:48 +05:30
Catalin Pit edeeaa5651 feat: implement webhooks 2024-02-06 16:12:31 +02:00
Adithya Krishna 1dd543247e chore: update branch
Signed-off-by: Adithya Krishna <adi@documenso.com>
2024-02-06 18:07:24 +05:30
Adithya Krishna 2636d5fd16 chore: finish and clean-up redirect post signing
Signed-off-by: Adithya Krishna <adi@documenso.com>
2024-02-06 18:04:56 +05:30
rajesh fe4345eeb9 fix: add responsive for blog preview mobile view (#906)
This Issue https://github.com/documenso/documenso/issues/904
2024-02-06 16:45:46 +11:00
David Nguyen 0c339b78b6 feat: add teams (#848)
## Description

Add support for teams which will allow users to collaborate on
documents.

Teams features allows users to:

- Create, manage and transfer teams
- Manage team members
- Manage team emails
- Manage a shared team inbox and documents

These changes do NOT include the following, which are planned for a
future release:

- Team templates
- Team API
- Search menu integration

## Testing Performed

- Added E2E tests for general team management
- Added E2E tests to validate document counts

## Checklist

- [X] I have tested these changes locally and they work as expected.
- [X] I have added/updated tests that prove the effectiveness of these
changes.
- [ ] I have updated the documentation to reflect these changes, if
applicable.
- [X] I have followed the project's coding style guidelines.
2024-02-06 16:16:10 +11:00
Prajwal Kulkarni 37e9db6626 Remove document on go back click on step 1
Invoke onBackStep on "go back" click and conditionally render go back label
2024-02-06 00:40:53 +05:30
Ephraim Atta-Duncan 30752815e7 feat: soft-delete transfered documents 2024-02-05 13:06:36 +00:00
Ephraim Duncan bc989075ba Merge branch 'main' into feat/account-deletion 2024-02-05 13:01:59 +00:00
Ephraim Atta-Duncan 4c09867b55 feat: transfer completed and pending documents to deleted email 2024-02-05 12:47:22 +00:00
Ephraim Atta-Duncan 4d93ed60c5 feat: add deleted account migration 2024-02-05 12:12:02 +00:00
Adithya Krishna 9ed16c64d8 Merge branch 'main' of https://github.com/documenso/documenso into feat/sign-redirect 2024-02-05 13:13:16 +05:30
Adithya Krishna 94e72534e0 chore: updated redirection
Signed-off-by: Adithya Krishna <adi@documenso.com>
2024-02-05 13:13:12 +05:30
Catalin Pit c6457e75e0 feat: migration for verifying paid users (#889) 2024-02-05 14:17:01 +11:00
Sumit Bisht f5930dc934 perf: mentioned type and size of the doc to be uploaded (#867)
explicitly mentioned "PDF" to upload, and added a toast if pdf size is
greater than 50mb

fixes: #621
2024-02-05 12:50:35 +11:00
apoorv taneja c970abc871 added onchange handler 2024-02-02 20:46:54 +05:30
apoorv taneja d5b3df1648 fixed variable declaration 2024-02-02 19:32:39 +05:30
apoorv taneja 142c1c003e changed useEffect variables 2024-02-02 18:16:54 +05:30
apoorv taneja a06c628653 Merge branch 'main' of https://github.com/plxity/documenso into fix/undo-button-in-canvas 2024-02-02 17:56:58 +05:30
apoorv taneja 7ca3697303 Merge branch 'main' of https://github.com/plxity/documenso into fix/undo-button-in-canvas 2024-02-02 14:49:06 +05:30
Ephraim Atta-Duncan d598677dc5 feat: add transparent background to fields 2024-02-02 08:36:54 +00:00
Lucas Smith 8ac2209493 Merge branch 'main' into chore-security-text 2024-02-02 16:16:25 +11:00
Lucas Smith 8f3a52e1fd fix: update e2e test 2024-02-02 04:49:42 +00:00
Ashraf Chowdury 861225b7c4 fix: Prevent users from bypassing document limitations (#898)
## Description

**Fixed document limitation bypassing issues through templates.**
Previously, users could bypass document restrictions by utilizing
templates even after reaching their limitations. This fix ensures that
templates will no longer function as a workaround when users reach their
document limits.

## Changes
1. imported `useLimits` hook on `data-table-templates.tsx`
2. Disabled the 'Use Template' button when the user reaches their limit.
3. Added an Alert Component on top of the templates page to notify users
that they can't use templates anymore because they have reached their
limit.
4. Used `getServerLimits` hook on `template-router` to a condition on
the server.

## Example

![image](https://github.com/documenso/documenso/assets/87828904/275e83ea-ca7b-4b0e-83f4-ac10da9aff6a)

## Issue
Closes #883
2024-02-02 15:48:42 +11:00
Lucas Smith 7210d48b64 fix: update dockerfile to support encryption keys 2024-02-02 04:37:29 +00:00
Lucas Smith 5cf2f0a30e fix: only throw crypto key errors on server 2024-02-02 04:24:49 +00:00
Lucas Smith 9c4ec34a3c fix: add precommit step for .well-known 2024-02-02 04:00:28 +00:00
Hani 7ece6ef239 feat: add recipient roles (#716)
Fixes #705

---------

Co-authored-by: Lucas Smith <me@lucasjamessmith.me>
Co-authored-by: David Nguyen <davidngu28@gmail.com>
2024-02-02 10:45:02 +11:00
Lucas Smith e42088a5bf feat: add user security audit logs (#884)
## Description

Adds the ability to see the events relating to the account.

Event data includes:
- Device
- IP Address
- Time
- Action

Actions are:

- Profile update
- Account linked to SSO (Example user signs in with Google after
creating a email/password account)
- Enable 2FA
- Disable 2FA
- Reset password
- Update password
- Sign out
- Sign in
- Sign in fail
- Sign in 2FA fail

## Changes

- Added audit logs
- Updated 2FA dialogs to have consistent footers
- Update `/settings/security/page` layout

## Testing Performed

Tested events:


![image](https://github.com/documenso/documenso/assets/20962767/8ab9e055-aa58-4621-86fe-24681cce6418)

More tested events:


![image](https://github.com/documenso/documenso/assets/20962767/b6b42e13-626e-4fed-8e1a-097e5324aa6d)

## Checklist

- [X] I have tested these changes locally and they work as expected.
- [X] I have followed the project's coding style guidelines.

## Additional Notes

- Not sure if we really want to record the sign out event or not
- Might want to design breadcrumbs for nested setting pages
2024-02-02 09:42:25 +11:00
Sumit Bisht ec3ba0e922 fix: active-tab changes correctly (#897)
fixes: #890
2024-02-02 08:30:02 +11:00
Apoorv Taneja 56683aa998 fix: Added signing pad disable state while submitting form (#892)
Fixes : #891
2024-02-01 19:14:37 +11:00
Lucas Smith 39be53ace8 fix: show fields on every step while editing documents (#881)
![CleanShot 2024-01-29 at 00 51
31@2x](https://github.com/documenso/documenso/assets/55143799/d577e027-92d1-48fa-940b-1359386367c5)

![CleanShot 2024-01-29 at 00 51
39@2x](https://github.com/documenso/documenso/assets/55143799/ce2df10e-e254-4854-89a1-ba86d7b05a42)
2024-02-01 12:55:31 +11:00
Lucas Smith 7fbf124b89 fix: use div instead of rnd for preview fields 2024-02-01 01:10:50 +00:00
Timur Ercan 1f142e334a Merge branch 'main' into chore-security-text 2024-01-31 20:31:34 +01:00
Adithya Krishna f4c24fd944 feat: add a feature for redirecting users on signing
Signed-off-by: Adithya Krishna <adi@documenso.com>
2024-01-31 18:17:43 +05:30
Adithya Krishna 3541a805e5 chore: add migration file
Signed-off-by: Adithya Krishna <adi@documenso.com>
2024-01-31 18:16:07 +05:30
Mythie 08f82b23dc fix: update env entries to evaluate at runtime 2024-01-31 22:32:42 +11:00
David Nguyen 27d8098511 fix: document count period filter (#882)
## Description

Currently the count for the documents table tabs do not display the
correct values when the period filter is applied.

## Changes Made

- Updated `getStats` to support filtering on period

## Testing Performed

- Tested to see if the documents tab count were being filtered based on
the period

## Checklist

- [X] I have tested these changes locally and they work as expected.
- [X] I have followed the project's coding style guidelines.
2024-01-31 12:40:37 +11:00
David Nguyen ada46a5f47 feat: add auth fail logs 2024-01-31 12:27:40 +11:00
Timur Ercan 747a7b0aea chore: security contacts and descr 2024-01-30 16:15:32 +01:00
Catalin Pit 6053a4a40a chore: refactor 2024-01-30 12:56:32 +02:00
Catalin Pit cc090adce0 chore: refactor 2024-01-30 12:54:48 +02:00
David Nguyen 1bda74b3aa fix: add cascade delete for audit logs 2024-01-30 18:37:48 +11:00
David Nguyen 9427143951 fix: remove account create log 2024-01-30 18:26:46 +11:00
David Nguyen 7e15058a3a feat: add user security audit logs 2024-01-30 17:32:20 +11:00
Adithya Krishna 620ae41fcc feat: added password validation (#469)
This PR Fixes #464
2024-01-30 14:26:47 +11:00
Ephraim Atta-Duncan f8125aec54 feat: show fields on other sections 2024-01-30 00:09:22 +00:00
Timur Ercan 375df71f5c Merge branch 'main' into chore-security-text 2024-01-29 16:43:57 +01:00
Ashraf Chowdury 7b6d6fb1b9 Merge branch 'main' into update-documents-avatar 2024-01-29 19:52:29 +08:00
Catalin Pit c0bb5205e1 chore: merged main 2024-01-29 10:14:56 +02:00
Catalin Pit 1676f5bf6c chore: removed unused code 2024-01-29 09:43:38 +02:00
Catalin Pit f514d55d27 chore: removed unused schema 2024-01-29 09:41:02 +02:00
Anik Dhabal Babu 9d6ee94708 chore: add title and description to individual pages (#847)
Add Title and Description to Individual Pages.
eg:- Security | Documenso, Profile | Documenso etc.
2024-01-29 17:53:44 +11:00
Lucas Smith f3df0d9c13 fix: add env example crypto defaults back 2024-01-29 16:24:13 +11:00
Ephraim Duncan a3a4480b03 Merge branch 'main' into fix/show-fields-subject 2024-01-29 01:40:49 +00:00
Ephraim Atta-Duncan 4af5ce3a6b chore: remove border color for field item 2024-01-29 01:38:44 +00:00
Ephraim Atta-Duncan 4ae19a9e63 chore: tidy code 2024-01-29 00:59:08 +00:00
Ephraim Atta-Duncan 6d5fe4eea3 fix: show the fields on the document at the subject selection page 2024-01-29 00:47:11 +00:00
Ephraim Duncan 354e16901c fix: sign dialog completed title color in dark mode (#879) 2024-01-29 11:08:31 +11:00
Ephraim Duncan 09aa10dad6 chore: rewording to avoid confusion between signed and original document (#880) 2024-01-29 11:04:57 +11:00
Ephraim Atta-Duncan 014c09bd91 fix: account deletion error for users without two factor authentication 2024-01-28 18:43:20 +00:00
Tangerine Kugelmann 927a656c57 Create security.txt
See also https://securitytxt.org
2024-01-28 01:00:07 +01:00
José Lima 671fd916b5 fix: resolve conflicting z-index values btwn avatar in document list and header (#872)
## Description

This pull request solves the problem where the avatar component within
the document list has the same z-index value as the header component,
causing the avatar to be above the header. When two elements have the
same z-index value, the last one takes priority!

## Related Issue
Fixes #870 

## Changes Made

1. Increases the value of the header's `z-index` by `10` (the current
value is `50`
2024-01-27 13:16:59 +11:00
Catalin Pit 751fb5275c Merge branch 'main' into feat/add-runtime-env 2024-01-26 14:04:54 +02:00
Timur Ercan a3ddbc15e9 Feat/commodifying signing (#874) 2024-01-26 12:36:33 +01:00
Catalin Pit b2cca9afb6 chore: refactor 2024-01-26 13:27:36 +02:00
Timur Ercan c7a04c7184 Merge branch 'main' into feat/commodifying-signing 2024-01-26 12:03:33 +01:00
Timur Ercan 8619e02d04 chore: quote fix 2024-01-26 12:02:30 +01:00
Timur Ercan 91c89e8bfb chore: quote fix 2024-01-26 12:01:53 +01:00
Timur Ercan fdeab19a7f chore: fix paragh quote break 2024-01-26 12:00:00 +01:00
Timur Ercan fd2a61f651 feat: commodifying signing (#865)
Adding the new blog article: Commodifying Signing
2024-01-25 17:01:30 +01:00
Catalin Pit e2fa01509d chore: avoid returning unnecessary info 2024-01-25 17:33:35 +02:00
Catalin Pit 311c8da8fc chore: encrypt and decrypt email addr 2024-01-25 17:24:37 +02:00
Timur Ercan 56f65f3bb3 chore: typos 2024-01-25 15:39:34 +01:00
Timur Ercan 75ad8a4885 chore: typos 2024-01-25 15:35:57 +01:00
Timur Ercan db36f69273 Merge branch 'main' into feat/commodifying-signing 2024-01-25 15:26:25 +01:00
Catalin Pit 49ecfc1a2c chore: refactor 2024-01-25 15:42:40 +02:00
Catalin Pit ffee2b2c9a chore: merged main 2024-01-25 13:43:11 +02:00
Catalin Pit 2f18518961 chore: merged main 2024-01-25 10:53:05 +02:00
Catalin Pit d451a7acce feat: add next-runtime-env 2024-01-25 10:48:20 +02:00
apoorv taneja d8aecc4092 fixed undo operation on signature pad 2024-01-25 13:21:55 +05:30
David Nguyen d766b58f42 feat: add server crypto (#863)
## Description

Currently we are required to ensure PII data is not passed around in
search parameters and in the open for GDPR reasons.

Allowing us to encrypt and decrypt values with expiry dates will allow
us to ensure this doesn't happen.

## Changes Made

- Added TPRC router for encryption method

## Testing Performed

- Tested encrypting and decrypting data with and without `expiredAt`
- Tested via directly accessing API and also via trpc in react
components
- Tested parsing en email search param in a page and decrypting it
successfully

## Checklist

- [X] I have tested these changes locally and they work as expected.
- [X] I have followed the project's coding style guidelines.
2024-01-25 16:07:57 +11:00
David Nguyen e90dd518df fix: auto verify google sso emails (#856) 2024-01-25 13:30:50 +11:00
Sumit Bisht ee0af566a9 fix: correct document tab count for pending and completed (#855)
completed/pending status gets incremented once if sender is one of the
recipients

fixes #853
2024-01-25 11:29:04 +11:00
Surya Pratap Singh 11dd93451a feat: sign up with Google (#862)
This PR links to this issue: #791 
Now users can see a new option to sign up with Google on the signup
page.
2024-01-25 11:22:19 +11:00
Timur Ercan 2be022b9fc feat: commodofying signing blogpost 2024-01-24 18:01:26 +01:00
Timur Ercan 0fac7d7b70 chore: add tags to manifest 2024-01-24 16:52:38 +01:00
Gautam-Hegde ab8c8e2a57 Merge branch 'main' of https://github.com/Gautam-Hegde/documenso 2024-01-24 12:08:21 +05:30
Apoorv Taneja b115d85fb7 fix: disabled signing pad when submitting form (#842)
fixes : #810
2024-01-24 17:12:33 +11:00
Gautam Hegde 51d140cf9a feat: command group distinction (#854)
fixes #836 

- Explicit `div` is used instead of `<CommandSeparator/>` , since it
failed to render borders for dynamic search results, but only works for
initial menu.

(initial menu)

![cgrp](https://github.com/documenso/documenso/assets/85569489/0ee0aabb-c780-4c03-97e7-cf9905bb9b61)

(search results)

![dyanmic](https://github.com/documenso/documenso/assets/85569489/74b0a714-a952-4516-9787-53d50a60b78c)
2024-01-24 17:03:57 +11:00
Lucas Smith caec2895cc chore: first small step to tracking growth mechanics (#859) 2024-01-24 14:03:16 +11:00
Anik Dhabal Babu 61967b22c1 fix: visibility of security fields using identityprovider (#709)
fixes #690
2024-01-24 11:34:30 +11:00
Adithya Krishna 8b8ca8578b chore: add adi to open page (#858)
name: Add addi to open page
2024-01-23 23:11:19 +05:30
Timur Ercan 576544344f chore: first small step to tracking growth mechanics 2024-01-23 16:20:25 +01:00
Timur Ercan 1efadb19f5 chore: add addi to open page 2024-01-23 15:54:57 +01:00
Sumit Bisht e5c2263e92 fix: imporoved document-dropzone ui for small vertical screens 2024-01-23 18:37:02 +05:30
Lucas Smith bc1d5cea0a fix: docker compose variable (#845)
Actually:

![Uz9ioXw](https://github.com/documenso/documenso/assets/26726263/553bb75a-a7fd-4707-9817-14a053ed75f4)
2024-01-23 19:50:49 +11:00
Anurag Sharma 6aed075c56 fix: add conditional rendering of OAuth providers (#736)
Now google OAuth provider is not rendered if client id is not provided
2024-01-23 17:08:48 +11:00
David Nguyen e63122a718 chore: update github feature template (#849) 2024-01-23 11:28:11 +11:00
Catalin Pit 08011f9545 chore: added target blank for github link: (#851) 2024-01-23 11:27:10 +11:00
Gautam-Hegde 6e22eff5a1 feat: command grp border 2024-01-23 00:02:04 +05:30
Mythie 4909eee401 feat: add viewing on completed page for pending documents 2024-01-22 21:36:46 +11:00
Mythie 5a28eaa4ff feat: add recipient creation 2024-01-22 17:38:02 +11:00
Gautam-Hegde 98667dac15 chore: code tidy 2024-01-22 12:03:14 +05:30
Mythie e8c2ca8890 fix: mask documents in search 2024-01-22 12:32:19 +11:00
Ephraim Atta-Duncan 9e433af112 feat: require 2fa code before account is deleted 2024-01-21 15:38:32 +00:00
Ephraim Atta-Duncan 7762b1db65 feat: add loading to button 2024-01-21 09:47:50 +00:00
Ephraim Atta-Duncan a3e560899a feat: delete user from db and unsubscribe from stripe 2024-01-20 23:30:56 +00:00
Ephraim Atta-Duncan f652ca9b73 feat: account deletion confirmation dialog 2024-01-20 19:07:47 +00:00
Tawagot0 9cc8bbdfc3 fix: docker compose variable 2024-01-20 17:45:59 +01:00
Lucas Smith 1191e1d9c3 feat: linear-gh blogpost (#827) 2024-01-20 12:18:23 +11:00
Lucas Smith 9c1e1f50a8 fix: mask recipient tokens for non-owners 2024-01-20 01:14:34 +00:00
Catalin Pit b6aface982 chore: update api description 2024-01-19 16:59:48 +02:00
Catalin Pit b28a7f9702 chore: add openapi 2024-01-19 16:55:16 +02:00
Timur Ercan efb9e9f3ec Merge branch 'main' into feature/linear-gh 2024-01-18 17:17:01 +01:00
Timur Ercan a7672545d7 Update apps/marketing/content/blog/linear-gh.mdx
Co-authored-by: Adithya Krishna  <aadithya794@gmail.com>
2024-01-18 17:16:49 +01:00
Timur Ercan 1a10cd2ae1 Update apps/marketing/content/blog/linear-gh.mdx
Co-authored-by: Adithya Krishna  <aadithya794@gmail.com>
2024-01-18 17:16:28 +01:00
Catalin Pit 204388888d fix: fix bug for completed document shortcut (#839)
When you're in the `/documents` page in the dashboard, if you hover over
a draft and a completed document, you'll see different URLs.

At the moment, the shortcut tries to go to the following URL for a
completed document `/documents/{doc-id}`.

However, that's the wrong URL, since the URL for a completed doc is
`/sign/{token}` when the user is the recipient, not the one that sent
the document for signing.

If it's the document owner & the document is completed, the URL is fine
as `/documents/{doc-id}`.

---------

Co-authored-by: Lucas Smith <me@lucasjamessmith.me>
2024-01-18 09:38:42 +02:00
Lucas Smith 0d977e783e refactor: download function to be reusable (#740) 2024-01-18 15:24:36 +11:00
Lucas Smith 0d15b80c2d fix: simplify code 2024-01-18 04:23:22 +00:00
Lucas Smith 4e9cce0df0 chore: improve request template (#833)
Ref #622 
Consolidated the template(removed redundant fields), added appropriate
validation.
2024-01-18 12:13:20 +11:00
Timur Ercan 6f726565e8 Update README.md
We are nominated for a Product Hunt Gold Kitty 😺 and appreciate any support: https://documen.so/kitty
2024-01-17 14:36:28 +01:00
Catalin Pit 3b82ba57f3 chore: implemented feedback plus some restructuring 2024-01-17 12:44:25 +02:00
Mythie 9ff44f10a6 chore: add incident blog post 2024-01-17 21:41:00 +11:00
Lucas Smith 16d97783f2 feat: improve the UX for password protected documents (#780) 2024-01-17 19:32:42 +11:00
Mythie 91dd10ec9b fix: add symmetric encryption to document passwords 2024-01-17 17:28:28 +11:00
Mythie a94b829ee0 fix: tidy code 2024-01-17 17:17:08 +11:00
Fatuma Abdullahi 1bc885478d fix: display the number of documents in mobile view (#837)
This PR fixes #782.
It now displays the document count on mobile view.
2024-01-17 11:10:28 +11:00
Gautam Hegde b4b146ee49 Merge branch 'main' into Gautam-Hegde/issue#622 2024-01-16 23:27:34 +05:30
Catalin Pit 4aefb80989 feat: restrict app access for unverified users 2024-01-16 14:25:05 +02:00
Lucas Smith 560352492d fix: keyboard shortcut ctrl+k fixed (#830) 2024-01-16 13:07:42 +11:00
Gautam Hegde 67aebaac1a Update improvement.yml code quality 2024-01-16 01:14:48 +05:30
Gautam Hegde a593e045b5 Update improvement.yml 2024-01-16 00:08:04 +05:30
Lucas Smith 84b0c2756b fix: fixed the deleting signature block issue on touchscreens (#809)
Fixed the deleting signature block issue on touchscreens, for some
reason the `onClick` event isn't working on the touchscreens that's why
I've added `onTouchEnd` event to delete the signature block when the
user clicks on it.
2024-01-15 19:33:40 +11:00
Adithya Krishna 58b3a127ea chore: fix color for light mode icon (#806) 2024-01-15 10:48:55 +11:00
hiteshwadhwani 7e71e06e04 fix: keyboard shortcut ctrl+k default behaviour fixed 2024-01-13 14:19:37 +05:30
harkiratsm 68953d1253 feat add documentPassword to documenet meta and improve the ux
Signed-off-by: harkiratsm <multaniharry714@gmail.com>
2024-01-12 20:54:59 +05:30
Timur Ercan 1a73f3e007 chore: feedback and phrasing 2024-01-11 14:27:44 +01:00
Ashraf Chowdury d73ef57794 Merge branch 'main' into fix/bug-798-signatures-block 2024-01-11 16:50:43 +08:00
Timur Ercan ea0120abc8 chore: typo 2024-01-10 16:51:42 +01:00
Timur Ercan b501ffdee9 chore: images 2024-01-10 16:37:53 +01:00
Timur Ercan 31050d6b7b chore: spelling 2024-01-10 16:14:28 +01:00
Timur Ercan ed1998278a feat: draft github blogpost 2024-01-10 16:14:02 +01:00
Harkirat Singh eeb6a072aa Merge branch 'main' into harkirat/Protect 2024-01-10 10:45:19 +05:30
Lucas Smith b09071ebc7 feat: jump to next field (#805)
When the fields are not filled, the button will say "Next field". Clicking on the button takes you to
the unfilled field.
2024-01-10 15:27:18 +11:00
Timur Ercan 66bb56047a chore: update roadmap links 2024-01-09 14:32:49 +01:00
Ashraf Chowdury 1d4e78e579 Merge branch 'main' into update-documents-avatar 2024-01-09 20:33:31 +08:00
Anik Dhabal Babu f9d26e6b3f fix: stepsRemaining value of the early adopters plan's input section (#803) 2024-01-08 19:09:34 +11:00
Catalin Pit 3054d84ba7 chore: implemented feedback 2024-01-08 09:58:34 +02:00
Ashraf Chowdury a71078cbd5 fix: fixed the deleting signature block issue on touchscreens 2024-01-08 13:17:30 +08:00
nafees nazik 6065140715 feat: cache layers 2024-01-06 15:29:19 +05:30
nafees nazik 34a59d2db3 fix: cache 2024-01-06 15:18:33 +05:30
nafees nazik ba37633ecd fix: revert 2024-01-06 15:18:09 +05:30
nafees nazik 46e83d65bb feat: cache docker 2024-01-06 15:14:28 +05:30
nafees nazik 142c93aa63 chore: revert force build error 2024-01-06 14:45:44 +05:30
nafees nazik 3eb1a17d3c chore: force build error 2024-01-06 14:42:49 +05:30
nafees nazik 6d1ad179d4 feat: add clean cache workflow 2024-01-06 13:30:21 +05:30
Catalin Pit 4fd6a0d5b6 chore: update onOpenChange 2024-01-05 13:06:16 +02:00
Catalin Pit fface15a22 feat: jump to next field 2024-01-05 12:56:07 +02:00
nafees nazik 8eed13e275 fix: remove additional workflow 2024-01-05 02:22:42 +05:30
nafees nazik 346078dbbe fix: e2e 2024-01-05 02:15:27 +05:30
nafees nazik c8337d7dcc fix: key 2024-01-05 02:13:42 +05:30
nafees nazik 75630ef19d fix: npm action 2024-01-05 01:58:00 +05:30
nafees nazik 634807328e fix: command 2024-01-05 01:38:14 +05:30
nafees nazik 2bbbe1098a fix: action 2024-01-05 01:32:47 +05:30
nafees nazik d24b9de254 fix: skip install 2024-01-05 01:19:22 +05:30
nafees nazik c86f79dd7b feat: add workflow call actions 2024-01-05 01:11:28 +05:30
nafees nazik 0c12e34c38 fix: remove call 2024-01-05 01:08:32 +05:30
nafees nazik 26b604dbd0 fix: add workflow call 2024-01-05 00:21:05 +05:30
nafees nazik 308f55f3d4 fix: key 2024-01-05 00:09:41 +05:30
nafees nazik e5b7bf81fa fix: add action to codeql 2024-01-05 00:06:16 +05:30
nafees nazik b35f050409 fix: add shell 2024-01-05 00:03:20 +05:30
nafees nazik ce6f523230 fix: key 2024-01-04 23:56:32 +05:30
nafees nazik 9e57de512a feat: use actions 2024-01-04 23:46:09 +05:30
nafees nazik 9b5d64cc1a feat: add playwright action 2024-01-04 23:44:27 +05:30
nafees nazik fc372d0aa9 feat: add node install action 2024-01-04 23:41:48 +05:30
nafees nazik e470020b16 feat: add cache build action 2024-01-04 23:41:24 +05:30
nafees nazik 0a9006430f fix: command 2024-01-04 23:40:35 +05:30
Ashraf Chowdury 8e754405f8 Merge branch 'main' into update-documents-avatar 2024-01-04 20:45:39 +06:00
David Nguyen 6be119ac95 fix: improve document meta logic 2024-01-03 20:10:50 +11:00
Adithya Krishna b8a45dd5e3 chore: fix package vulnerabilities (#802)
**Description:**

Fixes Dependabot Vulnerabilities listed here,
https://github.com/documenso/documenso/security/dependabot
2024-01-03 13:31:38 +05:30
Adithya Krishna 5660b99df7 chore: fix package vulnerabilities
Signed-off-by: Adithya Krishna <adi@documenso.com>
2024-01-03 13:23:13 +05:30
Adithya Krishna 8c5216cd44 feat: updated one-click deploys (#770)
**Description:**

- Added `railway.toml` to deploy from `/docker/Dockerfile`
- Added Koyeb as a deploy option
2024-01-03 13:13:48 +05:30
Adithya Krishna e646c4cf08 Merge branch 'main' into feat/1click-deploys 2024-01-03 12:49:59 +05:30
Adithya Krishna d8cbe1d5ba Merge branch 'main' into harkirat/Protect 2024-01-03 11:34:42 +05:30
Lucas Smith 5d56b152d6 fix: fixed padding in footer (#794)
fixes: #793
2024-01-03 13:29:13 +11:00
Lucas Smith 5c16b10dc2 fix: update footer to be responsive 2024-01-03 13:16:27 +11:00
Lucas Smith 9bcd6e39e7 docs: change url for cloning (#784) 2024-01-03 12:59:33 +11:00
Lucas Smith 2202fa3d04 chore: update the stale to prevent automatic closure of issues (#799)
Issues that have an open pull request and are currently in the review
period have been closed due to inactivity before.
2024-01-03 12:55:27 +11:00
Lucas Smith c1a6a327af chore: update stale workflows 2024-01-03 12:54:32 +11:00
Lucas Smith 837c17f1f3 chore: hide empty accordion for documents without date field (#800) 2024-01-03 12:44:57 +11:00
Ephraim Atta-Duncan d731532fbf chore: hide empty accordion for documents without date field 2024-01-02 04:58:35 +00:00
Ephraim Atta-Duncan 6a26ab4b2b fix: toast import errors 2024-01-02 04:52:15 +00:00
Ephraim Atta-Duncan b76d2cea3b fix: changes from code review 2024-01-02 04:38:35 +00:00
Anik Dhabal Babu d02f6774b2 chore: update the stale to prevent automatic closure of issues 2024-01-01 17:41:29 +00:00
Mythie a1215df91a refactor: extract api implementation to package
Extracts the API implementation to a package so we can
potentially reuse it across different applications in the
event that we move off using a Next.js API route.

Additionally tidies up the tokens page and form to be more simplified.
2023-12-31 13:58:15 +11:00
sadam 77facba8b4 docs(url): change URL for cloning 2023-12-30 18:27:24 -05:00
harkiratsm 53c570151f fix lint, description of dialog
Signed-off-by: harkiratsm <multaniharry714@gmail.com>
2023-12-29 22:11:44 +05:30
sadam e900706ab0 Merge branch 'documenso:main' into docs/change-url-for-cloning 2023-12-29 08:50:49 -05:00
sadam bed788f78f docs(url): change URL for cloning 2023-12-29 08:48:26 -05:00
harkiratsm 72a7dc6c05 fix the console error
Signed-off-by: harkiratsm <multaniharry714@gmail.com>
2023-12-29 17:26:33 +05:30
Ashraf 3fb711cb42 Merge branch 'update-documents-avatar' of https://github.com/ashrafchowdury/documenso into update-documents-avatar 2023-12-29 19:34:46 +08:00
Ashraf Chowdury 8a8a5510cb Merge branch 'main' into update-documents-avatar 2023-12-29 19:13:02 +06:00
Ashraf ce67de9a1c refactor: changed component name for better readability 2023-12-29 19:29:13 +08:00
Ashraf cf5841a895 Merge branch 'main' of https://github.com/ashrafchowdury/documenso into update-documents-avatar 2023-12-29 18:48:43 +08:00
Mohith Gadireddy 341481d6db fix: trimmed long file names for better UX (#760)
Fixes #755 

### Notes for Reviewers
- The max length of the title is set to be `16`
- If the length of the title is <16 it returns the original one.
- Or else the title will be the first 8 characters (start) and last 8
characters (end)
- The truncated file name will look like `start...end`

### Screenshot for reference


![image](https://github.com/documenso/documenso/assets/88539464/565e4868-7bb1-4b46-9cb0-886d542b8a01)

---------

Co-authored-by: Catalin Pit <25515812+catalinpit@users.noreply.github.com>
2023-12-29 12:18:19 +02:00
Lucas Smith 8f5634268d feat: add templates to command menu (#786) 2023-12-29 15:16:26 +11:00
apoorv taneja 5d6f69dc19 fixed padding issue in footer 2023-12-28 23:30:20 +05:30
apoorv taneja 5307fa6453 fixed padding issue in footer 2023-12-28 23:29:44 +05:30
apoorv taneja 0bb86963a9 rolled back to original file 2023-12-28 23:27:45 +05:30
apoorv taneja fb0d9b8ef9 fixed padding in footer 2023-12-28 23:14:46 +05:30
Surya Pratap Singh 918c6f19f2 fix: fixed the title box overlapping issue (#785)
The issue is fixed. Now the box is no more overlapping

<img width="305" alt="Screenshot 2023-12-26 at 10 20 32 AM"
src="https://github.com/documenso/documenso/assets/77022877/bd17ed92-7bb0-4f3a-b0f6-173e5f6b5029">
2023-12-28 11:36:46 +02:00
David Nguyen 3f89f8725b fix: resolve conflicting z-index values (#788)
## Description

Currently there are various z-index values that are causing:
- Toasts to be placed behind dialog blur background
- Menu being cropped off by header

## Changes Made

- Revert `z-[1000]` back to `z-50` for the header (not exactly sure why
it was bumped)
- Refactor z-indexes over 9000 to start from 1000
- Ensure z-index of toast is higher than dialog
2023-12-28 20:08:19 +11:00
David Nguyen c4800f74b9 feat: update disabled dropzone text (#787)
Update the dropzone so it will display the relevant disabled text based
on the reason it is disabled.
2023-12-28 20:07:29 +11:00
Ashraf Chowdury 2bc5d15af2 Merge branch 'main' into update-documents-avatar 2023-12-28 10:43:51 +06:00
Mythie d8eff192fe fix: update date format and add missing default 2023-12-27 14:05:50 +11:00
Mythie eb84d7ff3c fix: remove invalid migration 2023-12-27 14:05:49 +11:00
hallidayo 32633f96d2 feat: dateformat and timezone customization (#506) 2023-12-27 14:05:49 +11:00
18feb06 27b7e29be7 feat: added undo button while drawing signature (#480) 2023-12-27 14:05:49 +11:00
Mythie de4a0b2560 chore: update lint-staged config 2023-12-27 14:05:49 +11:00
Ephraim Atta-Duncan 5a11de1db9 feat: disable upload document animation for unverified users (#749) 2023-12-27 13:54:46 +11:00
Mohith Gadireddy f7cf33c61b fix: Layout issue in the singleplayer mode (#759)
Fixes #744
2023-12-26 14:08:05 +11:00
Timur Ercan 8f4fea2f14 chore: user metrics naming, adopters description (#769)
Rename Metrics
2023-12-26 13:25:45 +11:00
Apoorv Taneja 5a32b5cafd fix: added constants for theme variables (#777)
fixes: #776
2023-12-26 10:49:27 +11:00
Ephraim Atta-Duncan 8d1b960aa8 feat: add templates to command menu 2023-12-25 23:16:56 +00:00
sadam 2b25806c33 fix(url): change URL for cloning 2023-12-23 23:26:53 -05:00
sadam 6d58e60a65 fix(url): change URL for cloning 2023-12-23 23:18:32 -05:00
harkiratsm 2ae9e29903 feat: improve the ux for password protected documents
Signed-off-by: harkiratsm <multaniharry714@gmail.com>
2023-12-22 17:24:05 +05:30
Adithya Krishna dd56836121 chore: update url 2023-12-22 11:44:22 +05:30
Lucas Smith e9312ada51 feat: show document title for delete dialog - [DOC-387] (#772) 2023-12-22 15:09:03 +11:00
Lucas Smith 1c52c7ebcd chore: update copy 2023-12-22 03:43:12 +00:00
Lucas Smith 495cd35f7c refactor: forms (#697)
Updates our older forms to use the appropriate components bringing them in-line with the rest of our codebase.
2023-12-22 14:36:00 +11:00
JA 5a5d00fb2e fix(webapp): reset delete document dialog (#762)
This PR makes a small but useful tweak to the `DeleteDocumentDialog`.
Now, the input field gets cleared whenever the dialog is opened. Here’s
what’s changed:

1. **Clear Field After Deleting**: After you delete something and open
the dialog again, it won’t show the old, deleted text anymore. It’s
clean and ready for the next delete.

2. **Type Again to Confirm**: If you type something but close the dialog
without deleting, you’ll have to type it again next time. This way, it
makes sure the user really mean to delete something and didn't do it by
mistake.

Demo Link:
See the old vs. new in action here:
https://www.loom.com/share/80eca0d3b1994f7cbcab6f222db2dbfe?sid=ebc6135c-345e-4640-b395-daff190a96e7

It’s a small change, but it makes the delete process safer and smoother.
2023-12-22 14:14:33 +11:00
Lucas Smith 1aa0fc3101 fix: remove loadingText prop 2023-12-22 01:46:41 +00:00
Catalin Pit d283cc2d26 chore: implemented feedback 2023-12-21 16:02:02 +02:00
Lucas Smith 48cdf43dcb feat: templates (#537)
Adds the basically ability to create and use templates for repetitive document types
2023-12-21 22:05:09 +11:00
Lucas Smith 1d9593dd0f fix: hotkeys was overlapping with the browser hotkeys (#774)
Issue - The `Ctrl+K` hotkey in our application is conflicting with the
browser's default search hotkey, leading to unintended browser actions.

https://github.com/documenso/documenso/assets/71957674/180b6028-58f7-4cf8-841c-1e13c9d4d355
2023-12-21 21:40:07 +11:00
Mythie 9ad94f9862 fix: updates from review 2023-12-21 21:37:33 +11:00
Mythie 972c20f906 chore: tidy migrations 2023-12-21 21:20:37 +11:00
harkiratsm 519c645d06 fix: hotkeys was overlapping with the browser hotkeys
Signed-off-by: harkiratsm <multaniharry714@gmail.com>
2023-12-21 15:36:24 +05:30
Mythie 7babd82470 fix: updates from review 2023-12-21 20:42:45 +11:00
Catalin Pit 6a56905fea chore: merged main 2023-12-21 10:14:07 +02:00
Mythie 298396c86c fix: awaiting in promise.all array 2023-12-21 17:36:35 +11:00
Mythie 268a5c6508 fix: swap server-actions for trpc mutations 2023-12-21 17:01:12 +11:00
Lucas Smith c40c9b20ec Merge branch 'main' into feat/document-templates 2023-12-21 14:25:22 +11:00
Catalin Pit a22ada5f41 chore: add delete cascade 2023-12-20 14:44:43 +02:00
Catalin Pit fb46b09e4f chore: small changes 2023-12-20 12:47:46 +02:00
Ashraf 2a448fe06d fix: fixed the recipients viewing issue on touch screens 2023-12-20 17:08:09 +08:00
Adithya Krishna 84a0c39810 chore: made requested changes
Signed-off-by: Adithya Krishna <adi@documenso.com>
2023-12-20 10:36:06 +05:30
Adithya Krishna 1af909835d chore: updated title to double quotes
Signed-off-by: Adithya Krishna <adi@documenso.com>
2023-12-19 22:25:23 +05:30
Adithya Krishna 01caa949d9 feat: show document title for delete dialog
Signed-off-by: Adithya Krishna <adi@documenso.com>
2023-12-19 22:20:50 +05:30
Catalin Pit 17486b961d chore: refactor delete dialog 2023-12-19 15:51:43 +02:00
Adithya Krishna 775a1b774d chore: fix vulnerability with sharp
Signed-off-by: Adithya Krishna <adi@documenso.com>
2023-12-19 17:16:26 +05:30
Adithya Krishna c949c4701b chore: udpated railway template link
Signed-off-by: Adithya Krishna <adi@documenso.com>
2023-12-19 17:16:26 +05:30
Adithya Krishna eda635e2db feat: added custom railway config
Signed-off-by: Adithya Krishna <adi@documenso.com>
2023-12-19 17:16:25 +05:30
Adithya Krishna 2056de2e16 feat: added koyeb as a deploy option
Signed-off-by: Adithya Krishna <adi@documenso.com>
2023-12-19 17:16:25 +05:30
Catalin Pit da03fc1fd0 chore: finishing touches 2023-12-18 12:24:42 +02:00
Mythie 075fdd1f88 fix: lint errors 2023-12-16 15:09:02 +11:00
Lucas Smith 006a559026 Merge branch 'main' into refactor-forms 2023-12-16 13:26:33 +11:00
Lucas Smith ff64671e49 fix: stacking issue with notification/toast and header (#764)
Fixes: #763
2023-12-16 12:40:25 +11:00
Apoorv Taneja 089ba1c30e Merge branch 'main' into fix/css-stacking-notification 2023-12-16 00:35:38 +05:30
apoorv taneja cbcd893cfd fixed z-index 2023-12-16 00:30:52 +05:30
Apoorv Taneja 83dfe92d7a refactor: used constant for steps instead of strings (#751)
fixes #750
2023-12-15 15:07:45 +02:00
Lucas Smith e43e8f8c4a feat: environment variable to toggle signups (#747)
closes #732
2023-12-15 23:09:01 +11:00
Mythie 82da337a56 fix: remove templateToken 2023-12-15 22:07:27 +11:00
Lucas Smith 6e10947d00 Merge branch 'main' into feat/732-toggle-signup-form 2023-12-15 21:05:21 +11:00
Lucas Smith 682cb37786 fix: update auth-options 2023-12-15 20:41:54 +11:00
Lucas Smith 5809480f02 chore: fix workflows and update package.json file (#758) 2023-12-15 16:55:48 +11:00
Catalin Pit 19736ce60b chore: implemented feedback 2023-12-14 11:05:39 +02:00
Mythie 1eeb5fb103 fix: tidy code and base on main 2023-12-14 15:28:27 +11:00
David Nguyen 88534fa1c6 feat: add multi subscription support (#734)
## Description

Previously we assumed that there can only be 1 subscription per user.
However, that will soon no longer the case with the introduction of the
Teams subscription.

This PR will apply the required migrations to support multiple
subscriptions.

## Changes Made

- Updated the Prisma schema to allow for multiple `Subscriptions` per
`User`
- Added a Stripe `customerId` field to the `User` model
- Updated relevant billing sections to support multiple subscriptions

## Testing Performed

- Tested running the Prisma migration on a demo database created on the
main branch

Will require a lot of additional testing.

## Checklist

- [ ] I have tested these changes locally and they work as expected.
- [ ] I have added/updated tests that prove the effectiveness of these
changes.
- [X] I have followed the project's coding style guidelines.

## Additional Notes

Added the following custom SQL statement to the migration:

> DELETE FROM "Subscription" WHERE "planId" IS NULL OR "priceId" IS
NULL;

Prior to deployment this will require changes to Stripe products:
- Adding `type` meta attribute

---------

Co-authored-by: Lucas Smith <me@lucasjamessmith.me>
2023-12-14 15:22:54 +11:00
Ephraim Atta-Duncan 31a9127c9e feat: templates 2023-12-14 12:24:56 +11:00
Mythie 6d34ebd91b fix: no longer available client component 2023-12-13 22:49:58 +11:00
Adithya Krishna f2d4c0721d chore: removed packageManager as we have engines
Signed-off-by: Adithya Krishna <adi@documenso.com>
2023-12-11 23:38:07 +05:30
Adithya Krishna f9139a54a5 chore: prevent frequent commenting for semantic pr titles
Signed-off-by: Adithya Krishna <adi@documenso.com>
2023-12-11 23:37:28 +05:30
Adithya Krishna 2d931b2c9b chore: fix caching issue in workflows
Signed-off-by: Adithya Krishna <adi@documenso.com>
2023-12-11 23:36:54 +05:30
Catalin Pit e79d385534 Merge branch 'main' into feat/public-api 2023-12-11 14:44:29 +02:00
Catalin Pit 8ecd8a7d10 chore: implemented feedback + a small refactoring 2023-12-11 14:33:30 +02:00
Navindu Amarakoon 5c1d30bfbb chore: remove console log 2023-12-10 09:23:31 +05:30
Navindu Amarakoon 95041fa2e4 fix: build error 2023-12-09 12:05:36 +05:30
Navindu Amarakoon 49736d2587 Merge branch 'documenso:main' into feat/732-toggle-signup-form 2023-12-09 11:55:55 +05:30
Navindu Amarakoon ee5ce78c82 chore: remove unused code 2023-12-09 11:48:46 +05:30
Navindu Amarakoon 3b3987dcf8 chore: add env to env.example 2023-12-09 11:43:30 +05:30
Navindu Amarakoon 78a1ee2af0 feat: disable oauth signup when DISABLE_SIGNUP is true 2023-12-09 11:35:45 +05:30
Navindu Amarakoon dbdef79263 chore: remove old env variable from docker compose 2023-12-09 10:38:48 +05:30
Navindu Amarakoon 323380d757 feat: env variable to disable signing up 2023-12-09 10:37:16 +05:30
Lucas Smith e4b7747f66 chore: run eslint fix on lint staged (#743) 2023-12-09 12:37:13 +11:00
Lucas Smith 0697e7f817 Merge branch 'main' into eslint-lint-staged 2023-12-09 11:41:20 +11:00
Lucas Smith e1d3874e79 fix: do not lint js files 2023-12-09 11:40:23 +11:00
Aditya Deshlahre 497d9140d2 chore: add lint-staged task for dependency changes (#548) 2023-12-09 11:31:01 +11:00
nafees nazik 7d22957404 chore: add eslint fix command 2023-12-08 21:27:38 +05:30
Catalin Pit 66c0db91da chore: cleanup and feedback implementation 2023-12-08 13:28:34 +00:00
Lucas Smith 38e5b1d3ce chore: use minio as s3 storage for document during development (#588) 2023-12-08 21:08:30 +11:00
Catalin Pit 54401b94ae chore: split api contract
moved the schemas from the api contract to a separate file
2023-12-08 09:58:23 +00:00
Mythie 09dcc2cac0 chore: update github actions 2023-12-08 20:44:28 +11:00
Mythie d8d36ae8e2 fix: sticky header z-positioning 2023-12-08 20:41:52 +11:00
Mythie dfec8df31e fix: ensure command menu results are distinct 2023-12-08 20:41:52 +11:00
Lucas Smith bc38009392 Merge branch 'main' into refactor-forms 2023-12-08 16:31:13 +11:00
Lucas Smith 5e9bc56329 feat: github repo management improvement (#728) 2023-12-08 15:47:55 +11:00
Mythie 48f6765e76 chore: add yml to lint-staged 2023-12-08 13:01:59 +11:00
Mythie 7feba02e08 chore: update ci and formatting 2023-12-08 13:01:36 +11:00
David Nguyen b9282f11b0 Merge branch 'main' into refactor/download-function 2023-12-08 11:26:02 +11:00
Mythie 4e799e68ef chore: update ci 2023-12-08 09:44:36 +11:00
Mythie 1831084970 chore: update ci 2023-12-08 09:29:47 +11:00
Ephraim Atta-Duncan 38ad3a1922 refactor: download function to be reusable 2023-12-07 14:52:12 +00:00
Mythie 935601ad16 fix(ee): add handling for incomplete expired checkouts 2023-12-07 18:46:57 +11:00
Lucas Smith 7b4e38a032 feat: enhance posthog event tracking (#686) 2023-12-07 18:08:14 +11:00
Lucas Smith 2c5d547cdf fix: add missing import 2023-12-07 18:00:54 +11:00
Lucas Smith c313da5028 fix: update seal event 2023-12-07 16:29:20 +11:00
Lucas Smith 5b98bac53b Merge branch 'main' into feat/enhance-posthog-tracking 2023-12-07 16:28:15 +11:00
Lucas Smith d7e44fc068 fix(webapp): use checkout for expired plans (#738)
Currently customers with inactive/expired plans will be shown the
BillingPlans component but upon hitting the subscribe button they will
be redirected to their portal where they are unable to complete a
checkout.

To resolve this we check for expiration of their subscription and use a
normal stripe checkout instead.
2023-12-07 16:19:03 +11:00
Lucas Smith e03db5c6b3 feat: handle download file error with toast (#655) 2023-12-07 16:18:30 +11:00
Lucas Smith d58433c8a0 fix: destructure toast 2023-12-07 15:50:34 +11:00
Lucas Smith 419f27536b Merge branch 'main' into feat/download-toast 2023-12-07 15:46:43 +11:00
Lucas Smith 9a7e5d333d fix: don't expand documentData 2023-12-07 15:45:44 +11:00
Lucas Smith 39b97a97fe Merge branch 'main' into fix/billing-page 2023-12-07 15:37:32 +11:00
Lucas Smith 328b2e7604 feat: add stepper component (#718)
feat: add stepper component
2023-12-07 15:36:27 +11:00
Lucas Smith 43b1a89c76 Merge branch 'main' into main 2023-12-07 15:20:29 +11:00
Mythie cd6184406d chore: add e2e test for stepper 2023-12-07 15:08:16 +11:00
Mythie 1a34f9fa7a fix: import updates and api route body sizes 2023-12-07 15:08:00 +11:00
Mythie 3ff7b188d7 fix(ui): tidy stepper code 2023-12-07 15:06:49 +11:00
Lucas Smith 684e5272d2 fix(webapp): use checkout for expired plans 2023-12-07 00:52:36 +00:00
Catalin Pit 11ae6d3c16 chore: small changes 2023-12-06 16:53:34 +00:00
Catalin Pit 6c5526dd49 chore: update routes
trying to add the route for creating documents
2023-12-06 15:27:30 +00:00
Catalin Pit 936e75fd30 chore: merged main 2023-12-06 13:18:59 +00:00
Lucas Smith b39a42ecd2 feat(marketing): add careers page (#733) 2023-12-06 18:59:02 +11:00
Lucas Smith e81183f324 Merge branch 'main' into main 2023-12-06 14:13:34 +11:00
Sushant bfc630aa6a feat: add document search to the command menu (#713) 2023-12-06 12:48:05 +11:00
Sushant 2068d980ff feat: allow for the deletion of any document (#711)
Allow for the deletion of any document with notifications of document cancellation for pending documents.
2023-12-06 11:11:51 +11:00
Ephraim Atta-Duncan 0baa2696b4 fix: removed unused code 2023-12-05 10:13:24 +00:00
Ephraim Atta-Duncan 741201822a fix: use useSession instead of prop drilling 2023-12-05 10:12:28 +00:00
Adithya Krishna 520522bef7 chore: removed repo condition for codeql
Signed-off-by: Adithya Krishna <adi@documenso.com>
2023-12-05 12:05:47 +05:30
Kritarth Sharma 8ab1b0cf6b fix: add workspace settings for eol and tabs (#725) 2023-12-05 14:00:48 +11:00
Paul bfedabdc10 fix: increase e2e test timeout (#682) 2023-12-05 13:54:41 +11:00
Adithya Krishna 52e696c90e chore: update pr labeler workflow
Signed-off-by: Adithya Krishna <adi@documenso.com>
2023-12-04 18:12:43 +05:30
Adithya Krishna 02d91d9cd4 chore: updated workflows
Signed-off-by: Adithya Krishna <adi@documenso.com>
2023-12-04 18:04:05 +05:30
Adithya Krishna ac529a89fc feat: check assignee and pr review reminder
Signed-off-by: Adithya Krishna <adi@documenso.com>
2023-12-04 18:00:28 +05:30
Adithya Krishna f181099e74 chore: updated workflow permissions and run conditions
Signed-off-by: Adithya Krishna <adi@documenso.com>
2023-12-04 16:20:02 +05:30
Adithya Krishna 02e96bbd0a feat: added pr count workflow
Signed-off-by: Adithya Krishna <adi@documenso.com>
2023-12-04 16:08:04 +05:30
Adithya Krishna 36e48e67ee chore: updated issue count workflow
Signed-off-by: Adithya Krishna <adi@documenso.com>
2023-12-04 16:07:51 +05:30
Adithya Krishna d8588b780a feat: added issue count workflow
Signed-off-by: Adithya Krishna <adi@documenso.com>
2023-12-04 15:36:38 +05:30
Adithya Krishna ef84f5ba98 chore: added EOLs
Signed-off-by: Adithya Krishna <adi@documenso.com>
2023-12-04 12:28:05 +05:30
Adithya Krishna 68120794f8 feat: added stale workflow
Signed-off-by: Adithya Krishna <adi@documenso.com>
2023-12-04 00:29:30 +05:30
Adithya Krishna 88dc797423 chore: update semantic pr workflow
Signed-off-by: Adithya Krishna <adi@documenso.com>
2023-12-04 00:29:15 +05:30
Adithya Krishna a43be0432b feat: add triage issue workflow
Signed-off-by: Adithya Krishna <adi@documenso.com>
2023-12-04 00:28:27 +05:30
Adithya Krishna 0f11cc0b4b feat: add first interaction workflow
Signed-off-by: Adithya Krishna <adi@documenso.com>
2023-12-04 00:27:49 +05:30
Adithya Krishna f310139a13 feat: add pr labeler workflow
Signed-off-by: Adithya Krishna <adi@documenso.com>
2023-12-04 00:27:17 +05:30
mikezzb 859b789018 feat: isCompleting 2023-12-03 12:50:56 -05:00
mikezzb 340c929806 refactor: edit doc 2023-12-03 11:36:18 -05:00
mikezzb 43b1a14415 chore: let code breath 2023-12-03 11:21:51 -05:00
mikezzb 40a4ec4436 refactor: useContext & remove enum 2023-12-03 01:15:59 -05:00
mikezzb eccf63dcfd chore: refactor 2023-12-02 23:56:07 -05:00
mikezzb a98b429052 feat: stepper refactor example 2023-12-02 22:42:59 -05:00
mikezzb c46a69f865 feat: stepper component 2023-12-02 22:30:10 -05:00
nafees nazik 369d08ae6e feat: refactor signin page 2023-12-02 17:54:55 +05:30
nafees nazik a906833657 feat: use password input component 2023-12-02 17:54:19 +05:30
nafees nazik 4733f1e84b refactor: password input component 2023-12-02 17:46:16 +05:30
nafees nazik ab0d38eaf4 Merge branch 'main' into refactor-forms 2023-12-02 17:24:06 +05:30
Mythie b903de983b chore: v1.2.3 2023-12-02 14:56:00 +11:00
Mythie 6b519a67c2 fix: add guard 2023-12-02 14:55:26 +11:00
Mythie 39d18e93c5 chore: v1.2.2 2023-12-02 13:34:36 +11:00
Mythie 7dac5072f7 fix: revert react-email tailwind canary 2023-12-02 13:34:03 +11:00
Mythie fbfaca190b chore: release 1.2.1 2023-12-02 12:43:55 +11:00
Mythie 486b1cbf62 fix: incorrect promise.all usages 2023-12-02 12:43:43 +11:00
Mythie 16fb90f4d2 chore: v1.2.0 2023-12-02 11:57:50 +11:00
Mythie 53cb38a394 fix: pricing page deopted into csr 2023-12-02 11:14:46 +11:00
Mythie 073a050587 fix: signature field race conditions 2023-12-02 11:09:42 +11:00
Lucas Smith 39c01f4e8d fix: remove server actions (#684) 2023-12-02 09:38:24 +11:00
Lucas Smith 335684d0b7 fix: edit document sizing (#706) 2023-12-01 23:09:24 +11:00
Nafees Nazik 792158c2cb feat: add two factor auth (#643)
Add two factor authentication for users who wish to enhance the security of their accounts.
2023-12-01 20:06:32 +11:00
Lucas Smith 83153cee32 Merge pull request #698 from cuttingedge1109/patch-1
fix: Fix typo in web build command in doc
2023-12-01 15:06:36 +11:00
Lucas Smith 2d2bdc536e fix: add a script for db seed with env (#700) 2023-12-01 12:12:15 +11:00
cuttingedge1109 c16c36a1fc fix: add a script for db seed with env 2023-11-30 18:38:54 +01:00
Catalin Pit 6be4b7ae90 feat: add authorization for api calls 2023-11-30 14:39:31 +02:00
nafees nazik 6bbeaa084c refactor: forms 2023-11-30 15:55:29 +05:30
nafees nazik 231a307b89 feat: add loading text prop 2023-11-30 15:20:06 +05:30
david-loe 1d79ebbda3 fix: body exeeded undefined limit (#679)
* fixed bodySizeLimit

* fix: update marketing config

---------

Co-authored-by: Lucas Smith <me@lucasjamessmith.me>
2023-11-30 09:46:33 +02:00
Bilal Ahmad Bhat 252dd0008c feat: add link to homepage on the complete sign page for logged in users (#691)
* feat: add link to homepage on the complete sign page for logged in users

* feat: added ChevronLeft icon to the link

* feat: remove icon from the link
2023-11-30 09:42:15 +02:00
cuttingedge1109 35d0fed8b3 fix: Fix typo in web build command in doc 2023-11-29 20:06:25 +01:00
nafees nazik 0b2dce2238 fix: type 2023-11-29 22:37:33 +05:30
nafees nazik 1e29dfd823 refactor: reset password form 2023-11-29 22:33:04 +05:30
nafees nazik dc56c2abf2 refactor: password form 2023-11-29 22:32:42 +05:30
nafees nazik 62809e9506 refactor: signin page 2023-11-29 22:31:42 +05:30
nafees nazik 318dfcafc3 refactor: signup page 2023-11-29 22:31:24 +05:30
nafees nazik 4ff8592e8f feat: add password input component 2023-11-29 22:11:55 +05:30
Catalin Pit 76800674ee feat: improve messaging 2023-11-29 14:57:27 +02:00
Catalin Pit d43d40fd6b feat: improvements to the newly created token message 2023-11-29 14:43:26 +02:00
Tanay dad56b4929 fix: minor in file extension (#694) 2023-11-29 09:11:29 +11:00
Szymon Sus 7e4c44e820 perf(web, lib): do not await inside promise statements (#692) 2023-11-29 09:10:15 +11:00
Catalin Pit e1732de81d feat: show newly created token 2023-11-28 15:49:46 +02:00
Catalin Pit 6a5fc7a5fb feat: confirm to delete dialog 2023-11-28 12:37:01 +02:00
Tanay adc97802ea feat: add/update title of the document (#663) 2023-11-28 14:56:50 +11:00
Catalin Pit 13997d3dca feat: add delete and copy token on token page 2023-11-27 16:29:24 +02:00
Catalin Pit 2deaad5c34 feat: token page 2023-11-27 12:50:21 +02:00
Ephraim Atta-Duncan 0e40658201 feat: track when the signing of a document has completed 2023-11-26 19:33:45 +00:00
Ephraim Atta-Duncan d347359d2f chore: changes from code review 2023-11-25 22:09:52 +00:00
Ephraim Atta-Duncan fdf5b3908d feat: add more posthog analytics to the application 2023-11-24 23:50:51 +00:00
Catalin Pit fbee6eedc1 feat: api token functions 2023-11-24 16:13:09 +02:00
Mythie 8048c29480 fix: override @react-email/tailwind to avoid perf regression 2023-11-24 23:57:34 +11:00
Catalin Pit 80fe7ccdf5 feat: api token page in the settings 2023-11-24 13:59:33 +02:00
Mythie 84b958d5b7 fix: universal upload hitting cache 2023-11-24 20:06:47 +11:00
Mythie d8688692f7 fix: move singleplayer create to trpc 2023-11-24 16:58:18 +11:00
Mythie 8230349114 fix: unable to load font for signing 2023-11-24 16:17:54 +11:00
Catalin Pit 2ccede72ea chore: update the contract to add deleteDocument route 2023-11-23 15:23:47 +02:00
Catalin Pit 309b56168a feat: create the model for the api token 2023-11-23 15:21:13 +02:00
Catalin Pit 5c8a77ee8f chore: merged main 2023-11-23 12:05:28 +02:00
Catalin Pit b3008fb272 feat: add route for retrieving a single document by id 2023-11-23 10:02:22 +02:00
Mythie c054fc78a4 fix: resolve issues with emailVerified jwt property 2023-11-23 15:11:37 +11:00
Mythie 5de0c464f0 fix: hydration errors for modifier key 2023-11-23 13:57:08 +11:00
Catalin Pit 6d6c93539f feat: update contract 2023-11-22 15:51:04 +02:00
Catalin Pit 4a6b3edc05 feat: get documents api route with pagination 2023-11-22 15:44:49 +02:00
Catalin Pit 24d9906557 feat: public api start 2023-11-22 15:03:15 +02:00
Lucas Smith 9444e0cc67 fix: docker build requires smtp host (#672)
set a default for smtp host and add an action
for testing docker builds on each pull request
2023-11-22 16:26:39 +11:00
Lucas Smith be0fe079a3 fix: add healthcheck endpoint (#671) 2023-11-22 15:46:21 +11:00
Catalin Pit fbbc3b89c3 feat: email verification for registration (#599) 2023-11-21 15:44:04 +11:00
Bilal Ahmad Bhat 6c73453542 #666 feat: disabled resend button for recipients (#667) 2023-11-20 21:53:57 +11:00
Anik Dhabal Babu 17eeaa2d25 fix: improve the validation message for documenso app (#640)
* fix: improve the validation message

* fix: improve the validation message

---------

Co-authored-by: Catalin Pit <catalinpit@gmail.com>
2023-11-20 12:23:27 +02:00
Catalin Pit a8d49bb8b8 chore: added Documenso video walkthrough (#665) 2023-11-20 19:01:34 +11:00
Anupam e077c36fe4 fix: added the zod validation msg in the single player mode (#646) 2023-11-17 14:28:42 +02:00
Adithya Krishna 7ce4cf8381 feat: add dark mode toggle (#529) 2023-11-17 17:01:39 +11:00
Ephraim Atta-Duncan cebdf5fd8e chore: custom command menu shortcut text for macOS (#657) 2023-11-17 16:47:19 +11:00
Ephraim Atta-Duncan 8adc44802f feat: copy signing link from avatar stack (#658) 2023-11-17 16:12:47 +11:00
Ephraim Atta-Duncan 06714a2aeb chore: append _signed to files when downloading (#656) 2023-11-17 12:02:22 +11:00
Mythie 1c9cec1e93 fix: remove plausible provider 2023-11-17 10:55:09 +11:00
Ephraim Atta-Duncan b4f1a5abce feat: handle download file error with toast 2023-11-16 07:11:23 +00:00
Timur Ercan e838a07bf9 chore: remove share button from top level, texts (#653) 2023-11-16 16:43:50 +11:00
Lucas Smith 8722e4de74 chore: marketing site updates (#654)
Change "Open" links to "Open Startup" to reduce confusion about how to open the web app.

Additionally add the OSS Friends link to the footer since it was dropped during some changes.
2023-11-16 13:39:22 +11:00
Nafees Nazik f7d8ebb9de feat: enable resend email menu (#496) 2023-11-16 13:08:31 +11:00
Ephraim Atta-Duncan 67f3b2de45 fix: fetch the correct number of open issues using the github search api (#495) 2023-11-15 21:56:09 +11:00
Tanay 0da080aa41 fix: hovering on tabslist items at dashboard (#645) 2023-11-15 18:18:11 +11:00
Nafees Nazik fe25239a4e feat: cache getServerComponentSession calls (#644) 2023-11-15 17:42:27 +11:00
SAHIL SIRAJALI KAZI 5ea4a16e36 fix: safari pdf overflow issue fixed (#466) 2023-11-15 17:35:57 +11:00
Nafees Nazik 5002a475d1 feat: limit document upload size (#347) 2023-11-15 13:13:31 +11:00
Nafees Nazik ca9c0d7bf0 chore: add some eslint rules (#344) 2023-11-15 13:10:17 +11:00
Ephraim Atta-Duncan 3f0341c7d4 feat: add dialog to confirm signing (#342) 2023-11-14 19:01:00 +11:00
Lucas Smith c3fe98b05f fix: update docker compose entrypoint (#650) 2023-11-14 13:11:57 +11:00
neo773 608a4eaaa6 feat: refactor og image generation (#639) 2023-11-14 13:08:14 +11:00
Nafees Nazik d6ae0b44e6 feat: use nextjs.js standalone output for improvised docker image (#338) 2023-11-12 13:15:42 +11:00
Lucas Smith aec0d2ae97 fix: show initial data preview for duplication (#642) 2023-11-09 15:46:58 +11:00
Lucas Smith 86160136aa chore: improve command bar (#641) 2023-11-09 14:38:26 +11:00
Nafees Nazik 3490e2a3a8 feat: add command menu and keyboard shortcuts (#337) 2023-11-09 13:33:56 +11:00
sean-brydon 574539d6dd feat: duplicate document (#633) 2023-11-08 20:27:33 +11:00
Lucas Smith f5cba75355 chore: remove product hunt launch from readme (#634)
chore: remove product hunt launch from readme
2023-11-08 12:23:35 +11:00
Lucas Smith 2a4ada8294 fix: restore logo 2023-11-08 12:22:48 +11:00
Lucas Smith 7b8fc65836 chore: remove product hunt launch from readme 2023-11-08 12:21:02 +11:00
Lucas Smith 623257ff13 feat: the big merge
landing our massive rewrite onto main so we can be normal again
2023-11-08 12:19:28 +11:00
Timur Ercan 6646533965 Single Player Mode on Product Hunt
🚨 We are live on Product Hunt with Single Player Mode and the new free tier: [https://www.producthunt.com/products/documenso](https://www.producthunt.com/posts/documenso-singleplayer-mode)
2023-11-08 11:57:45 +11:00
Mythie d1fc7ea217 chore: update ci 2023-11-06 15:10:46 +11:00
Mythie b0e3abffd6 chore: restore dangling changes from rebase 2023-11-06 14:47:46 +11:00
Thomas Kaul ee3614f10e fix: typo in README.md (#630) 2023-11-06 13:02:21 +11:00
Mythie 2e9180acf5 chore: include total and new user charts 2023-11-06 13:02:21 +11:00
Mythie d27880b56b fix: add white background for og images 2023-11-06 13:02:21 +11:00
Mythie 2af100ef6d fix: add white background for og images 2023-11-06 13:02:21 +11:00
Mythie 9edf88692c feat: show monthly new users 2023-11-06 13:02:21 +11:00
David Nguyen f9a0ec99dc fix: correctly sign SPM documents (#627)
- Sign and email correct SPM document
- Optimise signing SPM documents
2023-11-06 13:02:21 +11:00
Mythie 3ebb30090c fix: dont use custom documentData for single player mode 2023-11-06 13:02:21 +11:00
Mythie 4af3d05a24 fix: updates from error logs 2023-11-06 13:02:21 +11:00
Adithya Krishna 803ab7a7da fix: hiding of action buttons (#460)
* chore: fix hiding of action buttons
2023-11-06 13:02:21 +11:00
Mythie 2065a0debc feat: add completed at timestamp 2023-11-06 13:02:21 +11:00
Anik Dhabal Babu f841683d82 fix: small typo error (#584) 2023-11-06 13:02:21 +11:00
Abhinav 8ae860432d fix: days filter working (#623) 2023-11-06 13:02:21 +11:00
David Nguyen ba7d92d255 chore: update bug report template (#580) 2023-11-06 13:02:21 +11:00
Timur Ercan 31eece8926 Update README.md 2023-11-06 13:02:21 +11:00
Anupam 746c97b64f fix: added the share btn in the UI and prewarm fetch (#615) 2023-11-06 13:02:20 +11:00
Catalin Pit d6e3b2b5dc fix: seal document for single player mode (#617) 2023-11-06 13:02:20 +11:00
18feb06 223a5cc9d0 feat: improving incorrect default signature behaviour #594 (#600) 2023-11-06 13:02:20 +11:00
Anik Dhabal Babu c2b078335e fix: improve the early adopters plan input section (#609) 2023-11-06 13:02:20 +11:00
Ephraim Atta-Duncan bbb7c6e0c7 docs: re-add launch week 5 blogpost (#614) 2023-11-06 13:02:20 +11:00
vimode 1e5adb59cd fix: typos and grammatical errors in readme (#616) 2023-11-06 13:02:20 +11:00
Sachin M Mane 02cbf3dfa0 chore:  Improved the issue templates with issue forms (supported viayml ) (#612)
GitHub supports the issue forms [1].
[1] https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/configuring-issue-templates-for-your-repository#creating-issue-forms

This feature allows users to create issues using a structured and visually appealing form. This functionality is facilitated through a  file for the issue template.

Added the issue template for bug report, feature request, and improvement by adding respective  file. Also, removed previous  file which is no longer needed
2023-11-06 13:02:20 +11:00
18feb06 d177dd7c56 fix: page-not-found at share page for document signed in single-player-mode #605 (#606) 2023-11-06 13:02:20 +11:00
Mythie 7fd5f8da67 fix: invalid url with cloudfront 2023-11-06 13:02:20 +11:00
Mythie df4cda8a1b feat: support cloudfront presign 2023-11-06 13:02:20 +11:00
Mythie 5de5d8b0fb feat: add database indexes 2023-11-06 13:02:20 +11:00
Mythie a65db4f668 chore: remove malfunction mania and feat/refresh from readme 2023-11-06 13:02:20 +11:00
Mythie ec1f61faa0 feat: add user schema timestamps 2023-11-06 13:02:20 +11:00
Shivam Bhatnagar 9b5af329a8 fix(web): fix typo + refactor empty state messages (#583)
* fix(web): fix typo + refactor empty state messages

* fix(web): refactor default empty-state message
2023-11-06 13:02:20 +11:00
Olivier Lambert b9daf6219c feat: update the README for the self-hosting users
Signed-off-by: Olivier Lambert <olivier.lambert@vates.fr>
2023-11-06 13:02:20 +11:00
Lucas Smith 4aa43bcfa2 fix: add back slack support 2023-11-06 13:02:20 +11:00
Adithya Krishna c95171bbc9 chore: updated slack to discord links
Signed-off-by: Adithya Krishna <aadithya794@gmail.com>
2023-11-06 13:02:20 +11:00
Mythie 7fa61c6bb6 chore: upgrade to next 14.0.0 2023-11-06 13:02:20 +11:00
Mythie 4f99b58795 fix: missing content updates 2023-11-06 13:02:20 +11:00
Mythie 67fcb154f5 fix: change sign in links 2023-11-06 13:02:20 +11:00
Mythie 9e5bfa543e fix: update early adopter error log 2023-11-06 13:02:20 +11:00
Mythie 165432c37c fix: update stripe metadata for early adopters 2023-11-06 13:02:20 +11:00
Mythie fcd2024132 fix: update limits handler 2023-11-06 13:02:20 +11:00
Mythie 9d9b1a6681 fix: attach document to completed email 2023-11-06 13:02:20 +11:00
Mythie b0bf69450a fix: limit recipients 2023-11-06 13:02:20 +11:00
Mythie 717ca8cdb2 fix: improve claim plan flow 2023-11-06 13:02:20 +11:00
Mythie a975509923 fix: return response for failed invoices 2023-11-06 13:02:20 +11:00
Mythie f68b65fe5f fix: update customer handling for checkouts 2023-11-06 13:02:20 +11:00
Mythie 687ce66e41 fix: update singleplayer add signature to card 2023-11-06 13:02:20 +11:00
Mythie 1d604fff2c fix: limits no longer cache during session changes 2023-11-06 13:02:20 +11:00
Mythie 2f2079e020 fix: optimise pdf viewer rerendering 2023-11-06 13:02:20 +11:00
Mythie 457e73342b fix: unbreak pdf viewer 2023-11-06 13:02:20 +11:00
Mythie 284a2870c2 fix: move getFile to client side 2023-11-06 13:02:20 +11:00
Mythie e8f08f4083 fix: update webhook handler 2023-11-06 13:02:20 +11:00
Mythie 603cc1cb0d fix: update webhook handler 2023-11-06 13:02:20 +11:00
Adithya Krishna c162cb3b2c chore: update zod to 3.22.4 (#563)
* chore: updated zod 

Signed-off-by: Adithya Krishna <aadithya794@gmail.com>

---------

Signed-off-by: Adithya Krishna <aadithya794@gmail.com>
2023-11-06 13:02:20 +11:00
Udit Takkar 6de14ab0ac fix: UI fixes and improvements (#559)
* chore: add cursor pointer

* fix: tooltip color

* chore: add tooltip

* fix: admin pages in mobile
2023-11-06 13:02:20 +11:00
Catalin Pit dec587e39e chore: add prisma studio command (#576)
Co-authored-by: pit <pit@pits-MacBook-Pro.local>
2023-11-06 13:02:20 +11:00
Mythie 89102bd221 fix: add mode to checkout session 2023-11-06 13:02:20 +11:00
Aditya Deshlahre b7950cf042 fix(bug): name field can be updated with spaces #555 (#558) 2023-11-06 13:02:19 +11:00
Mythie 19f1ddb8fe fix: downgrade react-pdf 2023-11-06 13:02:19 +11:00
Mythie 2ac0d79051 fix: support multi env 2023-11-06 13:02:19 +11:00
Tameem Asim 5445b85aae fix: invalid url on main page in self host 2023-11-06 13:02:19 +11:00
Nafees Nazik 04fc9eb187 chore: upgrade to latest next.js version (#553)
* chore: upgrade next.js
* fix: canvas not found error
* chore: upgrade package for marketing
* feat: add isServer conditional
* fix: inverse isServer condition
* fix: normalize packages
* fix: upgrade ee package
* fix: depdency nightmares
* fix: failing seed script
2023-11-06 13:02:19 +11:00
Catalin Pit f1732fab29 fix: truncate long file name in admin dashboard (#572)
Co-authored-by: pit <pit@192-168-0-136.rdsnet.ro>
2023-11-06 13:02:19 +11:00
18feb06 5bc18d4c73 fix: email requesting signature shows "completed document" in preview… (#514) 2023-11-06 13:02:19 +11:00
Abhinav-Developer-23 56914bf604 fix: support mailto link fix (#571) 2023-11-06 13:02:19 +11:00
Mythie 3d44821bff fix: build errors 2023-11-06 13:02:19 +11:00
Mythie 05fd01c72d fix: exports on next page 2023-11-06 13:02:19 +11:00
Mythie c343e8a221 feat: plan limits 2023-11-06 13:02:19 +11:00
Mythie f75f191a9a fix: add redirects for v0.9 requests 2023-11-06 13:02:19 +11:00
David Nguyen 1d291e8e03 feat: add safari clipboard copy support (#486) 2023-11-06 13:02:19 +11:00
Catalin Pit cff547d0d8 fix: user avatar on admin documents table (#570)
Co-authored-by: pit <pit@pits-MacBook-Pro.local>
2023-11-06 13:02:19 +11:00
Abhinav-Developer-23 4b2fec305f fix: fix for Accepting signatures or text fields with white space only #551 (#557) 2023-11-06 13:02:19 +11:00
Udit Takkar 352e4f81fd fix: enable dragging fields (#565) 2023-11-06 13:02:19 +11:00
Mythie 5f15721535 fix: filter out inactive products 2023-11-06 13:02:19 +11:00
Mythie 95a60331f8 fix: named exports 2023-11-06 13:02:19 +11:00
Mythie 17b43caa5c fix: create custom pricing table 2023-11-06 13:02:19 +11:00
David Nguyen 6d7fc32075 fix: stripe customer fetch logic 2023-11-06 13:02:19 +11:00
David Nguyen 81eea4213c fix: merge issues 2023-11-06 13:02:19 +11:00
David Nguyen f45cd81b5f feat: wip 2023-11-06 13:02:19 +11:00
David Nguyen 2856cd9c15 feat: add free tier Stripe subscription 2023-11-06 13:02:19 +11:00
Lucas Smith 5a79535080 fix: style updates 2023-11-06 13:02:19 +11:00
pit 9fa7505061 chore: revert back env file name 2023-11-06 13:02:19 +11:00
pit 39c2bf77c2 chore: implement feedback 2023-11-06 13:02:19 +11:00
pit 9932d805b7 chore: implement feedback 2023-11-06 13:02:19 +11:00
pit afd7dcd992 chore: remove this branch 2023-11-06 13:02:19 +11:00
pit c7f69bafd0 chore: update e2e tests 2023-11-06 13:02:19 +11:00
pit dc1b8c3cb8 chore: update import 2023-11-06 13:02:19 +11:00
pit af73aee113 chore: changes 2023-11-06 13:02:19 +11:00
pit 9151055936 chore: add schema location 2023-11-06 13:02:19 +11:00
pit ca51a926fb chore: change from npm to npx 2023-11-06 13:02:19 +11:00
pit 1bb47f98a1 chore: install prisma before prisma client 2023-11-06 13:02:19 +11:00
pit c00f06a0c5 chore: add remote caching 2023-11-06 13:02:19 +11:00
pit 3cbd4a2680 chore: use env vars for tests 2023-11-06 13:02:19 +11:00
pit c30695f2b8 ci: trigger ci 2023-11-06 13:02:19 +11:00
pit 434c4a6957 ci: trigger ci 2023-11-06 13:02:19 +11:00
pit 7942057c50 chore: add env step in gh action 2023-11-06 13:02:19 +11:00
pit 9afe8731b1 chore: added delete function 2023-11-06 13:02:19 +11:00
pit 7d21f607df chore: removed lint step 2023-11-06 13:02:19 +11:00
pit 00546c1290 feat: add playwright 2023-11-06 13:02:19 +11:00
David Nguyen 702df60076 fix: add cascade delete for share links 2023-11-06 13:02:19 +11:00
David Nguyen 38960c459b feat: add document share button to marketing (#422) 2023-11-06 13:02:19 +11:00
David Nguyen 6d0e8f6dd8 feat: single-player-mode-polish (#435) 2023-11-06 13:02:19 +11:00
Udit Takkar ec11686709 fix: background color of signature page (#487) 2023-11-06 13:02:19 +11:00
Abhinav-Developer-23 2340528d2e fix: bypass signature fix (#536) (#547) 2023-11-06 13:02:19 +11:00
Anik Dhabal Babu e8c1e70714 fix : add gittpod configuration 2023-11-06 13:02:19 +11:00
Anik Dhabal Babu 3778fc8d00 fix: Add gitpod configuration 2023-11-06 13:02:19 +11:00
Anik Dhabal Babu 2faca32427 fix: add gitpod configuration 2023-11-06 13:02:19 +11:00
Anik Dhabal Babu 51f8554ce8 fix: Add gitpod configuration 2023-11-06 13:02:19 +11:00
Lucas Smith 4c8a62a8ab fix: quick tweaks 2023-11-06 13:02:19 +11:00
pit f621e60c16 chore: implemented feedback 2023-11-06 13:02:19 +11:00
pit 4ed467693f chore: implemented feedback 2023-11-06 13:02:19 +11:00
pit 0e77faee3f chore: polished code 2023-11-06 13:02:18 +11:00
pit c78632870e chore: implemented feedback 2023-11-06 13:02:18 +11:00
pit 35087f551c chore: implement pr feedback 2023-11-06 13:02:18 +11:00
pit f569361e57 chore: feedback fix 2023-11-06 13:02:18 +11:00
pit d2263a6d72 chore: fix eslint issues 2023-11-06 13:02:18 +11:00
Nafees Nazik c9a71beb81 feat: delete draft document (#491) 2023-11-06 13:02:18 +11:00
Mythie 0d6efba3cf chore: disable dependabot for now 2023-11-06 13:02:18 +11:00
Anik Dhabal Babu 9d9faffc2f fix: mismatch the version of dotenv-cli 2023-11-06 13:02:18 +11:00
hallidayo f9a3a53c5b fix: frequency focus ring (#533) 2023-11-06 13:02:18 +11:00
Mythie fc876a41d9 fix: update script, docs and devcontainer 2023-11-06 13:02:18 +11:00
Aditya @ArchLinux 6fd72321b3 fix(script): minor change on scipt 2023-11-06 13:02:18 +11:00
Aditya @ArchLinux 1b7c887101 fix(script): added script envprisma in root package.json
dotenv loads all environment variable before running prisma:migrate-dev script
2023-11-06 13:02:18 +11:00
Aditya @ArchLinux 2e90eee4c2 style(ui/ux): added margin to dialogprimitive.content & dialogprimitive.close (m-4) 2023-11-06 13:02:18 +11:00
Sachin bdf31625a2 fix: non responsiveness of Add your sign modal 2023-11-06 13:02:18 +11:00
Ephraim Atta-Duncan e556db0386 docs: add render one click deploy for refresh 2023-11-06 13:02:18 +11:00
Anjy Gupta 7a8f5b8422 fix: sign up with existing account email bug (#517)
* fix: sign up with existing account email bug
2023-11-06 13:02:18 +11:00
zahid47 fa06038950 fix: add defaultValue to SignaturePad to persist signatures (#522)
* fix: add defaultValue to SignaturePad to persist signatures
2023-11-06 13:02:18 +11:00
hallidayo 66eda3321d changed text of stepper (#513) 2023-11-06 13:02:18 +11:00
Timur Ercan 6ec04c5df3 chore: typos
typos
2023-11-06 13:01:46 +11:00
David Nguyen e0662ce024 chore: add code of conduct (#521)
Update contributing guidelines
2023-11-06 13:01:46 +11:00
Udit Takkar 78d2401d44 feat: require old password for password reset (#488)
* feat: require old password for password reset
2023-11-06 13:01:46 +11:00
Anik Dhabal Babu 02bb7e4d68 fix: update icons (#468)
* fix: update icons
2023-11-06 13:01:46 +11:00
Timur Ercan 8fba1c43d3 chore: add new team members 2023-11-06 13:01:46 +11:00
Harsh Acharya 911cdcf170 fix: Error in Pricing Page Validation for Signup Now Modal (#497)
* fix: signup modal validation on close
* fix: restore auto focus input
2023-11-06 13:01:46 +11:00
Arjun Bharti 07fb6fa0e1 fix: signature text overflow truncated for longer signature texts (#489) 2023-11-06 13:01:46 +11:00
Timur Ercan 1d97c0898f chore: and now his watch has ended 2023-11-06 13:01:46 +11:00
Mythie 4132e45a9b fix: remove unused imports 2023-11-06 13:01:46 +11:00
Ollie Halliday b190802f65 capitalise 2023-11-06 13:01:46 +11:00
Ollie Halliday 830f10ac6f text changes on isSubmitting 2023-11-06 13:01:46 +11:00
Adithya Krishna 82f13e0ac3 fix: typo in script
Signed-off-by: Adithya Krishna <aadithya794@gmail.com>
2023-11-06 13:01:46 +11:00
Timur Ercan efa0505276 Update README.md 2023-11-06 13:01:46 +11:00
Adithya Krishna 27287cd1d5 fix: sharp corners of signing card 2023-11-06 13:01:46 +11:00
Mythie a5e087f209 fix: dogfood resend transport 2023-11-06 13:01:46 +11:00
Timur Ercan 85924f49f7 chore: sync 2023-11-06 13:01:46 +11:00
Mythie 6d8c29c5c1 fix: update compose scripts 2023-11-06 13:01:46 +11:00
Mythie 051c96c92b fix: further readme updates 2023-11-06 13:01:46 +11:00
Ephraim Atta-Duncan 0aaf65266e docs: clearer readme? maybe? 2023-11-06 13:01:46 +11:00
PeterKwesiAnsah 5bb2f183c1 chore: added classname and changed typo 2023-11-06 13:01:46 +11:00
PeterKwesiAnsah 8c8bcb694a chore: add empty message 2023-11-06 13:01:46 +11:00
David Nguyen 2e12893e0c fix: add missing URL to email template 2023-11-06 13:01:46 +11:00
David Nguyen 8fb5fdc058 feat: add email forgot password action
Updated email template imports
2023-11-06 13:01:46 +11:00
David Nguyen 0c607e6b39 feat: update email templates
Add SPM email attachment
2023-11-06 13:01:46 +11:00
Mythie a622fd402f fix: add hack for root zod validation with hook form 2023-11-06 13:01:46 +11:00
Timur Ercan a219588287 chore: sync next 2023-11-06 13:01:46 +11:00
Mythie 5cba913c55 fix: resolve issues with signing document stickiness 2023-11-06 13:01:46 +11:00
Mythie adf1359527 fix: disable cancel button when there is no window history 2023-11-06 13:01:46 +11:00
Mythie 187485678a feat: add resend mail transport 2023-11-06 13:01:45 +11:00
David Nguyen 48f4289c09 fix: resolve document title inconsistency (#452) 2023-11-06 13:01:45 +11:00
Mythie e09c076241 fix: do not overwrite new names or emails for signers 2023-11-06 13:01:45 +11:00
David Nguyen 7ec8ce2a56 feat: add posthog reverse proxy (#449) 2023-11-06 13:01:45 +11:00
Timur Ercan cca1bb4639 chore: greetings 2023-11-06 13:01:45 +11:00
Mythie 5e00df1fba chore: add missing migrations 2023-11-06 13:01:45 +11:00
Ephraim Atta-Duncan e14f96485c fix: update for code review 2023-11-06 13:01:45 +11:00
Ephraim Atta-Duncan c107608aeb chore: remove undefined check 2023-11-06 13:01:45 +11:00
Mythie 704306fd21 chore: styling updates 2023-11-06 13:01:45 +11:00
Mythie a164fd1256 fix: lint errors 2023-11-06 13:01:45 +11:00
Mythie ef0ad8761c fix: faster tooltips 2023-11-06 13:01:45 +11:00
Mythie d4c23455d8 fix: share og updates 2023-11-06 13:01:45 +11:00
Mythie eeb0d7b60c fix: twitter images 2023-11-06 13:01:45 +11:00
Mythie c0edac317e fix: better share links 2023-11-06 13:01:45 +11:00
Timur Ercan 5fa7f447cd chore: sync shop article and add missing and updated assets 2023-11-06 13:01:45 +11:00
Timur Ercan c035e9ce0b chore: update mania shirt res 2023-11-06 13:01:45 +11:00
Timur Ercan e982c85e9a feat: shop Article 2023-11-06 13:01:45 +11:00
Timur Ercan d79981b4b2 chore: typos 2023-11-06 13:01:45 +11:00
Timur Ercan 1b57b6027b chore: fix lightmode logo 2023-11-06 13:01:45 +11:00
Timur Ercan 75de3f26b9 Update README.md with M̸͍͚̽͒A̴̯͊͌L̴͖͖͘F̵̗̻́̅U̶̲̅͠N̸͙̰̓C̵̙̮̾T̸̜̙͌Í̷͎̯Ö̵̘̜́N̴̳͊̈ͅ ̶͔́M̸̡͐̾A̵̞̚N̴̤̏́Ǐ̸̩͂Ă̸͓͝ 2023-11-06 13:01:45 +11:00
Mythie 6a5c5f7dd8 fix: redirectless authentication 2023-11-06 13:01:45 +11:00
Mythie c911253be0 chore: quieten dependabot 2023-11-06 13:01:45 +11:00
Mythie f1898b24fc fix: update share preview 2023-11-06 13:01:45 +11:00
Mythie fcf586f24d fix: styling updates 2023-11-06 13:01:45 +11:00
Ephraim Atta-Duncan 34ce0d084e chore: refactor function 2023-11-06 13:01:45 +11:00
Ephraim Atta-Duncan 127dc42dc5 feat: add dropdown to tweet or copy signing link 2023-11-06 13:01:45 +11:00
Timur Ercan 016ae6ec6f chore: fix typo 2023-11-06 13:01:45 +11:00
Timur Ercan ac3b4080c0 chore: typo 2023-11-06 13:01:45 +11:00
Timur Ercan df9c603a37 chore: alt text 2023-11-06 13:01:45 +11:00
Timur Ercan 9c8eb5e13b chore: update date 2023-11-06 13:01:45 +11:00
Timur Ercan da64c9af0d chore: remove unused image 2023-11-06 13:01:45 +11:00
Timur Ercan 990a7da940 chore: typo 2023-11-06 13:01:45 +11:00
Timur Ercan dc5cc74db9 fix: text 2023-11-06 13:01:45 +11:00
Timur Ercan 8bb90494d8 chore: staging 2023-11-06 13:01:45 +11:00
Timur Ercan adc0c31462 chore: update malfunction mania image 2023-11-06 13:01:45 +11:00
Timur Ercan 7385abae25 chore: grammerly, finetuned bounties 2023-11-06 13:01:45 +11:00
flō 6c4fc6b2b4 Fix typo 2023-11-06 13:01:45 +11:00
flō 0c16e0339f Fix typo 2023-11-06 13:01:45 +11:00
flō 779289ccd8 Fix punctuation for consistency 2023-11-06 13:01:45 +11:00
flō bac7cf464a Add keywords
added keywords in description for SEO optimizations
2023-11-06 13:01:45 +11:00
flō e77fd92d13 Fix typo
Fix typo and minor edits for consistency
2023-11-06 13:01:45 +11:00
Timur Ercan 97f995b00a feat: malfunction mania, first draft 2023-11-06 13:01:44 +11:00
Mythie 5904f6c5a8 chore: sign document 2023-11-06 13:01:44 +11:00
Mythie 9164d301fd fix: dark mode for generic mdx content 2023-11-06 13:01:44 +11:00
Mythie f0f67be624 fix: remove usage of buffer 2023-11-06 13:01:44 +11:00
Mythie 1536634fc6 fix: assorted updates 2023-11-06 13:01:44 +11:00
Mythie 0e486c7b58 fix: feature flag client endpoint 2023-11-06 13:01:44 +11:00
Mythie 0f6298cc8b chore: update env.example 2023-11-06 13:01:44 +11:00
Mythie b26bba8329 chore: remove console.log 2023-11-06 13:01:44 +11:00
Mythie 350c02ae98 fix: single player dark mode and animation updates 2023-11-06 13:01:44 +11:00
Mythie 80c9ab5d8c fix: improve dark mode background patterns 2023-11-06 13:01:44 +11:00
Mythie 965b5c0afd fix: cors for feature flags 2023-11-06 13:01:44 +11:00
David Nguyen 341c0df231 fix: firefox signing fields 2023-11-06 13:01:44 +11:00
David Nguyen 0ff044978f feat: update success page text 2023-11-06 13:01:44 +11:00
David Nguyen d20ad4217c feat: add uninserted field validation 2023-11-06 13:01:44 +11:00
David Nguyen ebebceea1f feat: add uninserted field validation 2023-11-06 13:01:44 +11:00
David Nguyen a9a719cd37 feat: utilise transport layer 2023-11-06 13:01:44 +11:00
David Nguyen db1d6478a1 fix: timeout issues 2023-11-06 13:01:44 +11:00
David Nguyen 34232c79e5 feat: add single player mode 2023-11-06 13:01:43 +11:00
Timur Ercan cdae3a9a45 fix: company name 2023-11-06 13:01:15 +11:00
Mythie 60ae674984 feat: darker dark theme 2023-11-06 13:01:15 +11:00
Mythie 986bab2ba4 fix: normalize recipients 2023-11-06 13:01:15 +11:00
captain-Akshay ded4f03e05 fix: cancel button handler 2023-11-06 13:01:15 +11:00
Lucas Smith 4306fbc0f3 fix: remove unused import 2023-11-06 13:01:15 +11:00
Lucas Smith 8fc53d5dac fix: remove unused import 2023-11-06 13:01:15 +11:00
Lucas Smith e97de71811 fix: use named export 2023-11-06 13:01:15 +11:00
Lucas Smith 8c23bea985 fix: tidy messaging 2023-11-06 13:01:15 +11:00
Lucas Smith a92624b255 fix: use ts-pattern 2023-11-06 13:01:15 +11:00
Ephraim Atta-Duncan 8b5d0f445e chore: fix eslint errors 2023-11-06 13:01:15 +11:00
Ephraim Atta-Duncan f09638a4de chore: remove code from different branch 2023-11-06 13:01:15 +11:00
Ephraim Atta-Duncan e5871da7b5 chore: fix eslint errors 2023-11-06 13:01:15 +11:00
Ephraim Atta-Duncan 73a9213088 chore: correct types on component 2023-11-06 13:01:15 +11:00
Ephraim Atta-Duncan 4879d2360b feat: add empty state for different status 2023-11-06 13:01:15 +11:00
Ephraim Atta-Duncan 5aff50b13b feat: add initial empty state for no results 2023-11-06 13:01:15 +11:00
Ephraim Atta-Duncan b747334383 feat: redirect signed document to completed page 2023-11-06 13:01:15 +11:00
Lucas Smith abfa0812f0 fix: minor updates 2023-11-06 13:01:15 +11:00
Mythie 4072e2a200 fix: update styling 2023-11-06 13:01:15 +11:00
Adithya Krishna 4ec2bd7536 chore: updated wording
Signed-off-by: Adithya Krishna <aadithya794@gmail.com>
2023-11-06 13:01:15 +11:00
Adithya Krishna 5dad463877 feat: added 404 page for web app
Signed-off-by: Adithya Krishna <aadithya794@gmail.com>
2023-11-06 13:01:15 +11:00
Adithya Krishna fe4b3e0450 chore: updated 404 page for marketing app
Signed-off-by: Adithya Krishna <aadithya794@gmail.com>
2023-11-06 13:01:15 +11:00
Adithya Krishna 401311acd9 feat: added 404 page for marketing app
Signed-off-by: Adithya Krishna <aadithya794@gmail.com>
2023-11-06 13:01:15 +11:00
Mythie 7823100272 fix: reverse meta relation and tidy code 2023-11-06 13:01:15 +11:00
Ephraim Atta-Duncan 826a901c10 fix: document meta relation with document 2023-11-06 13:01:15 +11:00
Ephraim Atta-Duncan 164aa1cc03 fix: avoid creating document meta with empty strings 2023-11-06 13:01:15 +11:00
Ephraim Atta-Duncan 22f9400932 fix: persist newline in emails 2023-11-06 13:01:15 +11:00
Ephraim Atta-Duncan 345343f4b5 feat: replace template variables with values
Co-authored-by: Mythie <me@lucasjamessmith.me>
2023-11-06 13:01:15 +11:00
Ephraim Atta-Duncan da16f1ee07 feat: send custom email message 2023-11-06 13:01:15 +11:00
Ephraim Atta-Duncan a3baf2ed8b feat: persist document metadata in database for a specific user 2023-11-06 13:01:15 +11:00
Ephraim Atta-Duncan 9521d1df4c feat: send custom email subjects 2023-11-06 13:01:15 +11:00
Ephraim Atta-Duncan 1e294fc933 feat: add prisma schema for document meta 2023-11-06 13:01:15 +11:00
Ephraim Atta-Duncan fd4602faf8 fix: fitler only unsigned documents 2023-11-06 13:01:15 +11:00
Ephraim Atta-Duncan c947c7d761 chore: match file name and method name 2023-11-06 13:01:15 +11:00
Ephraim Atta-Duncan c58006b2d9 feat: avoid sending pending email to document with 1 recipients 2023-11-06 13:01:15 +11:00
Ephraim Atta-Duncan f18010e1e1 refactor: pass document id as arguments 2023-11-06 13:01:15 +11:00
Ephraim Atta-Duncan 94215fffbb feat: send email when all recipients have signed 2023-11-06 13:01:15 +11:00
Ephraim Atta-Duncan b17e73003e feat: send email when recipient is done signing 2023-11-06 13:01:14 +11:00
Mythie 49ce09f49b fix: support optimise imports 2023-11-06 13:01:14 +11:00
Mythie 53db1a5d19 fix: resolve issues with open graph asset loading 2023-11-06 13:01:14 +11:00
Mythie 15fd819132 fix: tidy code and update endpoints 2023-11-06 13:01:14 +11:00
Ephraim Atta-Duncan 8df5304b8e feat: update share page to match latest changes 2023-11-06 13:01:14 +11:00
Ephraim Atta-Duncan 794e575ae9 feat: move opengraph-image to next.js 13 implementation 2023-11-06 13:01:14 +11:00
Ephraim Atta-Duncan 57ff77b920 refactor: redirect using useRouter 2023-11-06 13:01:14 +11:00
Ephraim Atta-Duncan c43843d226 chore: remove unused files 2023-11-06 13:01:14 +11:00
Mythie d0cedc489f fix: update og card 2023-11-06 13:01:14 +11:00
Ephraim Atta-Duncan b12f5b62f1 feat: redirect share page to marketing page after 3 seconds 2023-11-06 13:01:14 +11:00
Ephraim Atta-Duncan f2da49d0e8 feat: generate metatags for share page with og image 2023-11-06 13:01:14 +11:00
Ephraim Atta-Duncan 96264f67e4 feat: display signature text from params 2023-11-06 13:01:14 +11:00
Ephraim Atta-Duncan ebcd7c78e4 feat: create sharing id for each recipient 2023-11-06 13:01:14 +11:00
Ephraim Atta-Duncan 1bce169228 feat: add initial og image for share link 2023-11-06 13:01:14 +11:00
Ephraim Atta-Duncan 023a91832a feat: add extra info for the early adopters 2023-11-06 13:01:14 +11:00
Ephraim Atta-Duncan 0a035f8b60 refactor: metrics into reusable component 2023-11-06 13:01:14 +11:00
Ephraim Atta-Duncan 7659c51980 feat: add early adopters graph 2023-11-06 13:01:14 +11:00
Timur Ercan 3377b55341 chore: rename community plan to early adopters 2023-11-06 13:01:14 +11:00
Timur Ercan f938db25d0 chore: grammerly 2023-11-06 13:01:14 +11:00
Timur Ercan db50dc71aa chore: links 2023-11-06 13:01:14 +11:00
nsylke b2ea5f0e47 fix: remove disallow property of _next from robots 2023-11-06 13:01:14 +11:00
Timur Ercan 32a21999ef feat: early adopter article 2023-11-06 13:01:14 +11:00
pit 0321f8505d chore: self-review 2023-11-06 13:01:14 +11:00
pit 90225574de chore: move fetching in data-table-users 2023-11-06 13:01:14 +11:00
pit 92b5111d7e chore: tidy up 2023-11-06 13:01:14 +11:00
pit 15a1c1da3f chore: remove generic data table 2023-11-06 13:01:14 +11:00
pit d54710ca07 chore: add transition and check for empty users array 2023-11-06 13:01:14 +11:00
pit 9682f8ea36 feat: filter users by name or email 2023-11-06 13:01:14 +11:00
pit 02b6f6a7b7 feat: subscriptions and documents page 2023-11-06 13:01:14 +11:00
pit 214dd7a7c8 feat: manage documents admin ui 2023-11-06 13:01:14 +11:00
pit ff58735153 feat: profile page done 2023-11-06 13:01:14 +11:00
pit 82c1ca13be feat: update user functionality 2023-11-06 13:01:13 +11:00
pit eef720bf8c chore: improve the ui 2023-11-06 13:01:13 +11:00
pit 550b7e1655 feat: build individual user page 2023-11-06 13:01:13 +11:00
pit 32b41386e5 feat: admin ui for managing instance 2023-11-06 13:01:13 +11:00
captain-Akshay 1db0d2eae6 feat: added the icon for theme 2023-11-06 13:01:13 +11:00
captain-Akshay 7a1dd47537 feat: removed unecessary code to the file and made few UI changes 2023-11-06 13:01:13 +11:00
captain-Akshay eec48e48ef feat: added a better theme change ability for user 2023-11-06 13:01:13 +11:00
Mythie 1ec91f6c68 chore: add visibility toggle to reset password 2023-11-06 13:01:13 +11:00
Mythie fbb8e887a8 fix: update colors 2023-11-06 13:01:13 +11:00
Mythie 6778d2a0da fix: update token validity check 2023-11-06 13:01:13 +11:00
Mythie 0ec5976397 fix: update reset token query 2023-11-06 13:01:13 +11:00
Mythie 8f03782fe3 fix: update email template 2023-11-06 13:01:13 +11:00
Mythie 6e791b6e91 fix: add layout and minor updates 2023-11-06 13:01:13 +11:00
Ephraim Atta-Duncan 34c652ab54 feat: add invalid reset token page 2023-11-06 13:01:13 +11:00
Ephraim Atta-Duncan dec7a9cb38 feat: better error handling and better toast messages 2023-11-06 13:01:13 +11:00
Ephraim Atta-Duncan 1e0cde850a feat: better error handling in forgotPassword trpc router 2023-11-06 13:01:13 +11:00
Ephraim Atta-Duncan 9b025f0c9f fix: width reducing with screen size 2023-11-06 13:01:13 +11:00
Ephraim Atta-Duncan dabeead57f feat: send email to user on successful password reset 2023-11-06 13:01:13 +11:00
Ephraim Atta-Duncan 84bc6eb4f3 feat: add reset functionality 2023-11-06 13:01:13 +11:00
Ephraim Atta-Duncan 9ef50f356e feat: send forgot password email 2023-11-06 13:01:13 +11:00
Ephraim Atta-Duncan 38e8611159 chore: rename email templates export 2023-11-06 13:01:13 +11:00
Ephraim Atta-Duncan 8c12789c03 feat: add reset password email template 2023-11-06 13:01:13 +11:00
Ephraim Atta-Duncan ca165c8141 feat: add forgot password template 2023-11-06 13:01:13 +11:00
Ephraim Atta-Duncan 729d0c93fe feat: create a password reset token 2023-11-06 13:01:13 +11:00
Ephraim Atta-Duncan 3544e44c31 chore: remove unused error toast 2023-11-06 13:01:13 +11:00
Ephraim Atta-Duncan b3a312df98 feat: add reset password page 2023-11-06 13:01:13 +11:00
Ephraim Atta-Duncan 8ba9a761d4 feat: add forgot passoword page 2023-11-06 13:01:13 +11:00
Ephraim Atta-Duncan c4282ded57 feat: add password reset token to schema 2023-11-06 13:01:13 +11:00
Ephraim Atta-Duncan 352720a6ae feat: add deploying documenso with vercel, supabase and resend 2023-11-06 13:01:13 +11:00
Mythie a948adfbb7 chore: update devcontainer 2023-11-06 13:01:13 +11:00
Mythie 77833ba895 chore: update ci 2023-11-06 13:01:13 +11:00
Mythie f700016440 chore: tidy unused code 2023-11-06 13:01:13 +11:00
David Nguyen 771042c9ce feat: add vercel build script 2023-11-06 13:01:13 +11:00
nsylke 95a40400af feat: security headers 2023-11-06 13:01:13 +11:00
Ephraim Atta-Duncan 7d4bb09170 feat: use description of each blog post in og image (#380) 2023-11-06 13:01:13 +11:00
Mythie 269f97fa6b fix: final reference to created column 2023-11-06 13:01:13 +11:00
Mythie 666d682536 fix: remove further references to created column 2023-11-06 13:01:13 +11:00
Mythie 2e5d5bb462 fix: remove references to created column 2023-11-06 13:01:13 +11:00
Mythie 0835da45ef fix: implement feedback 2023-11-06 13:01:13 +11:00
Mythie 5a99a0b5eb fix: update migration for timestamp columns 2023-11-06 13:01:13 +11:00
Mythie 3afc35c40c feat: universal upload
Implementation of a universal upload allowing for multiple storage backends
starting with `database` and `s3`.

Allows clients to put and retrieve files from either client or server using
a blend of client and server actions.
2023-11-06 13:01:13 +11:00
Mythie 72bec7bc34 feat: separate document data from document 2023-11-06 13:01:13 +11:00
Timur Ercan 0f38be4e41 chore: update readme to main version 2023-11-06 13:01:13 +11:00
Timur Ercan 706909107f chore: moved rewrite article from next repo 2023-11-06 13:01:13 +11:00
Mythie 48ff16876b fix: add dashboard header border on scroll 2023-11-06 13:01:12 +11:00
David Nguyen a72248e871 refactor: organise recipient utils 2023-11-06 13:01:12 +11:00
David Nguyen 48e58d4675 feat: add avatar email fallback 2023-11-06 13:01:12 +11:00
David Nguyen 41d46c82d1 feat: update document table layout (#371)
* feat: update document table layout

- Removed dashboard page
- Removed redundant ID column
- Moved date to first column
- Added estimated locales for SSR dates
2023-11-06 13:01:12 +11:00
Mythie a849c6431f fix: data table links for recipients 2023-11-06 13:01:12 +11:00
Mythie 399826a6f5 fix: add removed layout guard 2023-11-06 13:01:12 +11:00
Lucas Smith 632b3bd1f4 fix: update layout and wording 2023-11-06 13:01:12 +11:00
Catalin Pit 4f40ce6003 chore: implemented feedback 2023-11-06 13:01:12 +11:00
Catalin Pit e752c0c60b chore: fix version in nextjs config 2023-11-06 13:01:12 +11:00
Catalin Pit 31ae6591dd chore: added app version 2023-11-06 13:01:12 +11:00
Catalin Pit d8bbfae30d chore: changed the cards titles 2023-11-06 13:01:12 +11:00
Catalin Pit f42f2b1aa0 chore: feedback improvements 2023-11-06 13:01:12 +11:00
Catalin Pit a2635851cf chore: rename files 2023-11-06 13:01:12 +11:00
Catalin Pit a94b80d07d chore: implemented feedback 2023-11-06 13:01:12 +11:00
Catalin Pit 766fc6410b feat: add the admin page 2023-11-06 13:01:12 +11:00
Catalin Pit 61df56c21e feat: creating the admin ui for metrics 2023-11-06 13:01:12 +11:00
Timur Ercan fdb542765a chore: phrasing 2023-11-06 13:01:12 +11:00
Timur Ercan dcde3317b8 Update apps/marketing/content/blog/building-documenso-pt1.mdx
Co-authored-by: Adithya Krishna  <aadithya794@gmail.com>
2023-11-06 13:01:12 +11:00
Timur Ercan 6be4a1d3e4 fix: update building documenso article description 2023-11-06 13:01:12 +11:00
flō 9c26faba0d fix typo 2023-11-06 13:01:12 +11:00
Ephraim Atta-Duncan 1a48d194f7 refactor: replace whole implementation with a state 2023-11-06 13:01:12 +11:00
Ephraim Atta-Duncan cb5df80a26 fix: hide popover when user selects a recipients 2023-11-06 13:01:12 +11:00
Mythie 661dfe8368 fix: update devcontainer 2023-11-06 13:01:12 +11:00
Mythie 90bacea7ed fix: update devcontainer 2023-11-06 13:01:12 +11:00
Mythie 0f3db459cb feat: add devcontainer 2023-11-06 13:01:12 +11:00
Ephraim Atta-Duncan 9e4f1dfe1e feat: disable signing and editing for completed documents 2023-11-06 13:01:12 +11:00
David Nguyen d5753dfbb3 feat: update marketing mobile menu 2023-11-06 13:01:12 +11:00
Mythie a644e0134b fix: actually make timeouts clear 2023-11-06 13:01:12 +11:00
Mythie 6ad10f6317 fix: tidy up code 2023-11-06 13:01:12 +11:00
nafees nazik 05c7ac4c20 revert: fix: component style 2023-11-06 13:01:12 +11:00
nafees nazik 0f9ce3b5c7 chore: add comments 2023-11-06 13:01:12 +11:00
nafees nazik 45d6181042 fix: use toast 2023-11-06 13:01:12 +11:00
nafees nazik d3529374a6 fix: typo 2023-11-06 13:01:12 +11:00
nafees nazik a7fa9daada feat: add api error 2023-11-06 13:01:12 +11:00
nafees nazik 4267456857 fix: component style 2023-11-06 13:01:12 +11:00
nafees nazik d7f4f2b8eb fix: value 2023-11-06 13:01:12 +11:00
nafees nazik 07580b4640 fix: user name not updatable 2023-11-06 13:01:12 +11:00
Ephraim Atta-Duncan c2fe7192fa chore: remove console.log 2023-11-06 13:01:12 +11:00
Ephraim Atta-Duncan 0961246834 feat: add missing email field to document sign page 2023-11-06 13:01:12 +11:00
Catalin Pit 383f8d6e3c chore: removed one more console.log 2023-11-06 13:01:12 +11:00
Catalin Pit d1db20ff4a chore: removed console.logs and warn 2023-11-06 13:01:12 +11:00
Mythie 4146d71f9d feat: store signature on signup 2023-11-06 13:01:12 +11:00
Mythie e05eaffb61 feat: store profile signature 2023-11-06 13:01:12 +11:00
PeterKwesiAnsah 6b250b88ec feat: add error message to signature pad 2023-11-06 13:01:12 +11:00
Mythie 8a271ff8bc fix: fix eslint warnings 2023-11-06 13:01:12 +11:00
Ephraim Atta-Duncan 930a80ae18 chore: unused console logs 2023-11-06 13:01:12 +11:00
Ephraim Atta-Duncan 2aabe7ec60 feat: redirect to dashboard when document is sent 2023-11-06 13:01:12 +11:00
Adithya Krishna f64885d2c3 chore: removed console logs
Signed-off-by: Adithya Krishna <adikrish@redhat.com>
2023-11-06 13:01:12 +11:00
Mythie 3546155aab fix: tidying broke generation 2023-11-06 13:01:12 +11:00
Mythie 95886d67a6 fix: tidy code and expect jsx errors 2023-11-06 13:01:12 +11:00
Mythie 8980274f7a fix: center align heading 2023-11-06 13:01:12 +11:00
Mythie 64b399043c fix: use nextjs opengraph-image component 2023-11-06 13:01:12 +11:00
Ephraim Atta-Duncan d536305c1c feat: add og image to blog posts 2023-11-06 13:01:12 +11:00
Ephraim Atta-Duncan 991411c9f5 feat: add blog og image 2023-11-06 13:01:11 +11:00
Mythie bc2da7834e fix: retain redirect to documents rather than dashboard 2023-11-06 13:01:11 +11:00
Ephraim Atta-Duncan 00143052fd fix: redirect root direcotory to dashboard 2023-11-06 13:01:11 +11:00
Ephraim Atta-Duncan ef79eb3ca4 fix: redirect signin page to dashboard when logged in 2023-11-06 13:01:11 +11:00
Mythie 63b21a8206 fix: minor updates 2023-11-06 13:01:11 +11:00
Adithya Krishna e243ba2564 fix: removed passHref and updated card
Signed-off-by: Adithya Krishna <adikrish@redhat.com>
2023-11-06 13:01:11 +11:00
Adithya Krishna fd43ebb7c0 fix: reverted line change
Signed-off-by: Adithya Krishna <adikrish@redhat.com>
2023-11-06 13:01:11 +11:00
Adithya Krishna a7e43c5d77 chore: made requested changes - v2
Signed-off-by: Adithya Krishna <adikrish@redhat.com>
2023-11-06 13:01:11 +11:00
Adithya Krishna 5ca4a7e117 chore: made requested changes
Signed-off-by: Adithya Krishna <adikrish@redhat.com>
2023-11-06 13:01:11 +11:00
Adithya Krishna a23e3c6068 feat: updated rendeing of items using map
Signed-off-by: Adithya Krishna <adikrish@redhat.com>
2023-11-06 13:01:11 +11:00
Adithya Krishna cf799e63ca chore: updated footer component
Signed-off-by: Adithya Krishna <adikrish@redhat.com>
2023-11-06 13:01:11 +11:00
Adithya Krishna 2b53f796bd chore: updated signing fields
Signed-off-by: Adithya Krishna <adikrish@redhat.com>
2023-11-06 13:01:11 +11:00
Adithya Krishna ebdb6442c6 chore: updated dashboard page
Signed-off-by: Adithya Krishna <adikrish@redhat.com>
2023-11-06 13:01:11 +11:00
Adithya Krishna c29d1463b0 chore: updated documents page
Signed-off-by: Adithya Krishna <adikrish@redhat.com>
2023-11-06 13:01:11 +11:00
Mythie a8a6e40174 fix: update import for feature-flag helpers 2023-11-06 13:01:11 +11:00
Mythie 81e612040a fix: extract feature-flag zod schema to separate file 2023-11-06 13:01:11 +11:00
Mythie 7f5ef8690b fix: further stash conflicts 2023-11-06 13:01:11 +11:00
Mythie d7bd8fcd37 fix: add items from stash 2023-11-06 13:01:11 +11:00
Mythie c3f11afaf9 feat: make billing page functional 2023-11-06 13:01:11 +11:00
Mythie 5cba252627 fix: minor tidying 2023-11-06 13:01:11 +11:00
Ephraim Atta-Duncan cd1b4796fc feat: avoid updating password with existing password 2023-11-06 13:01:11 +11:00
Ephraim Atta-Duncan 9524875e98 feat: prevent a user from updating password with the same password 2023-11-06 13:01:11 +11:00
Ephraim Atta-Duncan fba95a4402 feat: reset password from on submit 2023-11-06 13:01:11 +11:00
Mythie 2ba7df4881 fix: update eslint rules 2023-11-06 13:01:11 +11:00
Mythie 7811035384 feat: promise safety with eslint 2023-11-06 13:01:11 +11:00
Mythie 98c980a5c4 fix: remove further unused code 2023-11-06 13:01:11 +11:00
Mythie 7b2d3356f2 fix: remove unused code 2023-11-06 13:01:11 +11:00
Mythie dfe04018a0 feat: add data table actions 2023-11-06 13:01:11 +11:00
Mythie 62c4a89521 feat: onepage inbox 2023-11-06 13:01:11 +11:00
David Nguyen a99efdc916 feat: add inbox 2023-11-06 13:01:11 +11:00
nsylke 6959307f5e chore: change root package.json name 2023-11-06 13:01:11 +11:00
Adithya Krishna b512343bbb chore: removed eslint-plugin-import
Signed-off-by: Adithya Krishna <adikrish@redhat.com>
2023-11-06 13:01:11 +11:00
Adithya Krishna 5100a61ab7 fix: updated eslint config
Signed-off-by: Adithya Krishna <adikrish@redhat.com>
2023-11-06 13:01:11 +11:00
Adithya Krishna e6790d3a19 feat: added eslint plugin dependencies
Signed-off-by: Adithya Krishna <adikrish@redhat.com>
2023-11-06 13:01:11 +11:00
Adithya Krishna 778ac63272 feat: added new eslint rules
Signed-off-by: Adithya Krishna <adikrish@redhat.com>
2023-11-06 13:01:11 +11:00
Adithya Krishna e2fe7e900c fix: duplicate import
Signed-off-by: Adithya Krishna <adikrish@redhat.com>
2023-11-06 13:01:11 +11:00
Adithya Krishna c098c58b2e fix: removed more unnecessary whitespace
Signed-off-by: Adithya Krishna <adikrish@redhat.com>
2023-11-06 13:01:11 +11:00
Adithya Krishna 9c763e864b fix: removed unnecessary whitespace
Signed-off-by: Adithya Krishna <adikrish@redhat.com>
2023-11-06 13:01:11 +11:00
nafees nazik 3ffee97e72 fix: style 2023-11-06 13:01:11 +11:00
nafees nazik 2ab0cd1308 fix: overflow and scroll ux 2023-11-06 13:01:11 +11:00
Ephraim Atta-Duncan 989146f98e chore: reduce open page caching time to 1 hour 2023-11-06 13:01:11 +11:00
nafees nazik faa280c02b fix: make signing form card responsive 2023-11-06 13:01:11 +11:00
Adithya Krishna 942d4bf905 fix: added eol to workflow file
Signed-off-by: Adithya Krishna <adikrish@redhat.com>
2023-11-06 13:01:11 +11:00
Adithya Krishna 84c6a40815 chore: updated workflow name
Signed-off-by: Adithya Krishna <adikrish@redhat.com>
2023-11-06 13:01:11 +11:00
Adithya Krishna ce67f8cc11 feat: added pr title validator
Signed-off-by: Adithya Krishna <adikrish@redhat.com>
2023-11-06 13:01:11 +11:00
nsylke 44f59b07c5 feat: add autocomplete for password managers 2023-11-06 13:01:11 +11:00
nsylke b97a0380df feat: set min/max lengths for password 2023-11-06 13:01:11 +11:00
Mythie 289e3776fd fix: dependency ordering 2023-11-06 13:01:11 +11:00
Adithya Krishna 36b3b36ac8 feat: added sharp for image optimizations on nextjs
Signed-off-by: Adithya Krishna <adikrish@redhat.com>
2023-11-06 13:01:11 +11:00
nafees nazik 7a74f3c77e fix: authentication 2023-11-06 13:01:11 +11:00
Adithya Krishna d0def823c8 fix: update icon sizes
Signed-off-by: Adithya Krishna <adikrish@redhat.com>
2023-11-06 13:01:11 +11:00
Adithya Krishna c902fb8412 fix: updated padding and set patterns
Signed-off-by: Adithya Krishna <adikrish@redhat.com>
2023-11-06 13:01:10 +11:00
Adithya Krishna b733defcd9 feat: added show password feature
Signed-off-by: Adithya Krishna <adikrish@redhat.com>
2023-11-06 13:01:10 +11:00
Adithya Krishna 0cc05052fa chore: optimized images to save ~8mb
Signed-off-by: Adithya Krishna <adikrish@redhat.com>
2023-11-06 13:01:10 +11:00
Mythie 166271ac4b fix: add missing await on mail send 2023-11-06 13:01:10 +11:00
Mythie 7cfc525ddf fix: nicer dark mode for stack avatars 2023-11-06 13:01:10 +11:00
Mythie 3ea0ff6b81 chore: support direct urls for prisma 2023-11-06 13:01:10 +11:00
David Nguyen 97c7bd9792 refactor: remove whitespace 2023-11-06 13:01:10 +11:00
David Nguyen 215eaebc1a feat: update document flow
- Fixed z-index when dragging pre-existing fields
- Refactored document flow
- Added button spinner
- Added animation for document flow slider
- Updated drag and drop fields
- Updated document flow so it adjusts to the height of the PDF
- Updated claim plan dialog
2023-11-06 13:01:10 +11:00
nsylke 039cd11c49 fix: use -p cli option for next dev 2023-11-06 13:01:10 +11:00
Adithya Krishna 617c738e5b fix: dependabot workflow
Signed-off-by: Adithya Krishna <aadithya794@gmail.com>
2023-11-06 13:01:10 +11:00
Mythie 77ab168c03 feat: change document view upon completion 2023-11-06 13:01:10 +11:00
David Nguyen a0abf56833 refactor: extract common components into UI package 2023-11-06 13:01:10 +11:00
Nicholas Sylke 98862a6356 feat: robots.txt & sitemap.xml 2023-11-06 13:01:10 +11:00
Mythie 077bb4ac3c chore: resolve build errors 2023-11-06 13:01:10 +11:00
Adithya Krishna 399cf78508 fix: fixed build command in codeql workflow
Signed-off-by: Adithya Krishna <adikrish@redhat.com>
2023-11-06 13:01:10 +11:00
David Nguyen 857a48b3d9 feat: update items 2023-11-06 13:01:10 +11:00
David Nguyen 371f0947fb feat: update items
Refactored billing flag name

Refactored FeatureFlag type

Disabled session recording by default
2023-11-06 13:01:10 +11:00
David Nguyen aa2969fd50 feat: feature flags 2023-11-06 13:01:10 +11:00
flō 64eefbd340 Add visual asset for blog post 2023-11-06 13:01:10 +11:00
flō 769a374cf6 Create blog post 2023-11-06 13:01:10 +11:00
Adithya Krishna 96ae622f95 fix: removed ts from codeql
Signed-off-by: Adithya Krishna <adikrish@redhat.com>
2023-11-06 13:01:10 +11:00
Adithya Krishna 10330872e1 feat: add codeql-analysis
Signed-off-by: Adithya Krishna <adikrish@redhat.com>
2023-11-06 13:01:10 +11:00
Adithya Krishna 3a77a50d56 chore: updated dependabot config
Signed-off-by: Adithya Krishna <adikrish@redhat.com>
2023-11-06 13:01:10 +11:00
Adithya Krishna 122e1dffc3 chore: update readme file with radix-ui
Signed-off-by: Adithya Krishna <adikrish@redhat.com>
2023-11-06 13:01:10 +11:00
Adithya Krishna 256f1c6c84 chore: update readme file
Signed-off-by: Adithya Krishna <adikrish@redhat.com>
2023-11-06 13:01:10 +11:00
Adithya Krishna 56aea04b80 chore: enable job concurrency
Signed-off-by: Adithya Krishna <adikrish@redhat.com>
2023-11-06 13:01:10 +11:00
Adithya Krishna 6e7deca0cb feat: add dependabot config
Signed-off-by: Adithya Krishna <adikrish@redhat.com>
2023-11-06 13:01:10 +11:00
Adithya Krishna 7975eb7a8d feat: Added Engines to Enforce Node v18.0.0 and above
Signed-off-by: Adithya Krishna <adikrish@redhat.com>
2023-11-06 13:01:10 +11:00
Timur Ercan 105eeec5df chore: add shop to footer 2023-11-06 13:01:10 +11:00
Timur Ercan efc2102b90 chore: remove double emtpy state add CTA 2023-11-06 13:01:10 +11:00
Timur Ercan 46bd501835 chore: status order to figma 2023-11-06 13:01:10 +11:00
Timur Ercan 759b864b14 remove dashboard and link bar 2023-11-06 13:01:10 +11:00
Mythie 94b9b1060b fix: styling updates 2023-11-06 13:01:10 +11:00
premiare 6c06337f6e add PORT number back to package.json 2023-11-06 13:01:10 +11:00
premiare 0b5a550cd1 move menu links to map, add window-size hook 2023-11-06 13:01:10 +11:00
premiare cd1af7b5d3 add reducedMotion check, center menu items 2023-11-06 13:01:10 +11:00
premiare bc87986a3d extract hamburger to own file 2023-11-06 13:01:10 +11:00
premiare a948441956 init mobileNavigation and added documenso symbol 2023-11-06 13:01:10 +11:00
Nicholas Sylke 1f75342b91 chore: ignore intellij editor settings and some of vscode 2023-11-06 13:01:10 +11:00
Ashutosh-Bhadauriya d36ca59b77 fix: commitlint 2023-11-06 13:01:10 +11:00
Ashutosh-Bhadauriya 1f79ca0a70 feat: add commitlint 2023-11-06 13:01:09 +11:00
Nicholas Sylke d4b130a731 ci: use built-in cache from setup-node action 2023-11-06 13:01:09 +11:00
Nicholas Sylke 77ad1d1b0b ci: remove --workspaces from the build script in ci workflow 2023-11-06 13:01:09 +11:00
Nicholas Sylke ab4d70ced1 ci: setup build workflow 2023-11-06 13:01:09 +11:00
flō 3632a5aef5 fix typo 2023-11-06 13:01:09 +11:00
flō 8fa31c8f05 fix typo for consistency 2023-11-06 13:01:09 +11:00
Ephraim Atta-Duncan 7fda1d2010 feat: reduce chart radius to add padding 2023-11-06 13:01:09 +11:00
Ephraim Atta-Duncan fac1d34d24 feat: change legend text color to black 2023-11-06 13:01:09 +11:00
Ephraim Atta-Duncan c841c989aa feat: Add legend to pie chart 2023-11-06 13:01:09 +11:00
Mythie 7a705e3b81 feat: document authoring 2023-11-06 13:01:09 +11:00
Timur Ercan c6327c77ea chore: remove funding rounding 2023-11-06 13:01:08 +11:00
Timur Ercan 258477fd8d fix: link 2023-11-06 13:01:08 +11:00
Timur Ercan baa7236864 fix: format heade 2023-11-06 13:01:08 +11:00
Timur Ercan 201b88544d chore: adding open to footer, naming 2023-11-06 13:01:08 +11:00
Timur Ercan ee595056ac fix: open page link 2023-11-06 13:01:08 +11:00
Timur Ercan 331944f34a chore: update date 2023-11-06 13:01:08 +11:00
Nicholas Sylke 01c88065ee fix: used wrong lockfile version when resolving conflicts 2023-11-06 13:01:08 +11:00
Nicholas Sylke 784188ff51 refactor: future proofing the prettier/lint-staged for js/ts filetypes 2023-11-06 13:01:08 +11:00
Nicholas Sylke 58d765924f refactor: use lint-staged.config.cjs as configuration for lint-staged 2023-11-06 13:01:08 +11:00
Nicholas Sylke 9783e16656 add husky and lint-staged to ensure commits are formatted 2023-11-06 13:01:08 +11:00
Timur Ercan e164fabb04 chore: review updates 2023-11-06 13:01:08 +11:00
Timur Ercan 2d9f996630 mention cals open startup article 2023-11-06 13:01:08 +11:00
Timur Ercan 7c0c082a40 feat: pre seed announce and link on /open page 2023-11-06 13:01:08 +11:00
Timur Ercan 57e9f88b93 chore: whitespace 2023-11-06 13:01:08 +11:00
flō 64ffa37ea7 fix typo 2023-11-06 13:01:08 +11:00
flō 1503536334 Optimize description 2023-11-06 13:01:08 +11:00
flō f3e8c62fad Edit content 2023-11-06 13:01:08 +11:00
Mythie f66934551e chore: add contributor license agreement 2023-11-06 13:01:08 +11:00
flō 739599810e Edit blog post description 2023-11-06 13:01:08 +11:00
flō 58e291bcf1 Update link to community (Discord) 2023-11-06 13:01:08 +11:00
flō 7e2b351390 Add blog post: Switching to Discord 2023-11-06 13:01:08 +11:00
flō 900a51ff06 Add profile picture: Flo 2023-11-06 13:01:08 +11:00
flō dcd275fa6b fix mailto 2023-11-06 13:01:08 +11:00
flō c5f35fb66d fix typo 2023-11-06 13:01:08 +11:00
flō 89bf7b6651 edit announcing-documenso.mdx
- fix typo for consistency in tone and voice
- edit filename for SEO
2023-11-06 13:01:08 +11:00
flō 51e55148c7 edit manifest.mdx
- fix typo in caption for consistency
- edit filename (URL) for SEO
2023-11-06 13:01:08 +11:00
Ephraim Atta-Duncan 4bfbe039e8 fix: ssr hydration error in piechart 2023-11-06 13:01:08 +11:00
Timur Ercan 769b51c531 chore: add total 2023-11-06 13:01:08 +11:00
Ephraim Atta-Duncan 07492100d2 chore: fix ts errors in metrics 2023-11-06 13:01:08 +11:00
Ephraim Atta-Duncan 3407952a5e chore: refactor github charts into a single component 2023-11-06 13:01:08 +11:00
Ephraim Atta-Duncan d59045c419 chore: use correct names on tooltip 2023-11-06 13:01:08 +11:00
Ephraim Atta-Duncan b3a52c4aec feat: add other charts 2023-11-06 13:01:08 +11:00
Ephraim Atta-Duncan b3969f0614 chore: fix eslint error in data 2023-11-06 13:01:08 +11:00
Ephraim Atta-Duncan 0da6e93a6a chore: format date 2023-11-06 13:01:08 +11:00
Ephraim Atta-Duncan fdd3d7c6fe chore: fetch stargazers data from stargazers api 2023-11-06 13:01:08 +11:00
Ephraim Atta-Duncan a78ed42f6c feat: add github stars cummulative 2023-11-06 13:01:08 +11:00
Timur Ercan 63d4216fd1 chore: team updates, funding cummulative 2023-11-06 13:01:08 +11:00
Ephraim Atta-Duncan d5e7f6f4df feat: add team members engagement to open page 2023-11-06 13:01:08 +11:00
Ephraim Atta-Duncan 145abc0e51 --amend 2023-11-06 13:01:08 +11:00
Ephraim Atta-Duncan 63f37732cd feat: add tooltip to cap table 2023-11-06 13:01:08 +11:00
Ephraim Atta-Duncan 27b42814d8 Add initial cap table 2023-11-06 13:01:08 +11:00
Ephraim Atta-Duncan f882be4338 feat: open page 2023-11-06 13:01:08 +11:00
Mythie dc58f77c61 chore: upgrade deps and linting 2023-11-06 13:01:08 +11:00
Mythie 0fca2e9f4e fix: improve typesafety 2023-11-06 13:01:08 +11:00
Mythie 664357d166 chore: add oss friends page 2023-11-06 13:01:08 +11:00
Mythie a1cb595f25 fix: type errors 2023-11-06 13:01:08 +11:00
Mythie d986a3cf77 fix: styling updates 2023-11-06 13:01:08 +11:00
David Nguyen 71e9f016b6 feat: update privacy content 2023-11-06 13:01:08 +11:00
David Nguyen 96fc2fb850 feat: update blog styling 2023-11-06 13:01:08 +11:00
David Nguyen 3f322d1d0c feat: update privacy content 2023-11-06 13:01:08 +11:00
David Nguyen 79684c9970 feat: remove whitespace 2023-11-06 13:01:08 +11:00
David Nguyen fcf9720a1e feat: add generic content page 2023-11-06 13:01:08 +11:00
David Nguyen 822624bc02 Update apps/marketing/content/blog/announcing-documenso.mdx
Co-authored-by: Joshua Sharp <joshuafsharp@gmail.com>
2023-11-06 13:01:08 +11:00
David Nguyen 154ef26465 feat: add content layer
Add blog pages

Add privacy page
2023-11-06 13:01:08 +11:00
Ephraim Atta-Duncan bc425abe35 refactor: read z-index values from an object 2023-11-06 13:01:08 +11:00
Ephraim Atta-Duncan 0de4fe5883 fix: update types from code review 2023-11-06 13:01:07 +11:00
Ephraim Atta-Duncan a94f447e9e feat: update stack avatar with changes from code review 2023-11-06 13:01:07 +11:00
Ephraim Atta-Duncan e1d57e6d29 feat: add recipients avatars on all tables 2023-11-06 13:01:07 +11:00
Ephraim Atta-Duncan 71c689eae8 chore: refactor stacked avatars into component 2023-11-06 13:01:07 +11:00
Ephraim Atta-Duncan 208e028226 feat: add tooltip on hover on stacked avatars 2023-11-06 13:01:07 +11:00
Ephraim Atta-Duncan 00a15124be feat: stack recipients avatars on dashboard 2023-11-06 13:01:07 +11:00
Mythie 12d8cebd4c feat: use server-actions for authoring flow
This change actually makes the authoring flow work for
the most part by tying in emailing and more.

We have also done a number of quality of life updates to
simplify the codebase overall making it easier to continue
work on the refresh.
2023-11-06 13:01:07 +11:00
Mythie 5e3752cdbf fix: add shadow to metric-card 2023-11-06 13:01:07 +11:00
Mythie ca0f4eefd2 feat: email templates
adds email templates using `react-email` which will be used for invites,
signing and document completion.

authored by @dephraiim
2023-11-06 13:01:07 +11:00
Mythie 0b1c4fadc6 chore: use jsonprotocol 2023-11-06 13:01:07 +11:00
Doug Andrade 56b6bc68c4 linking card metrics to filtered /documents 2023-11-06 13:01:07 +11:00
Mythie 3c73f030ac feat: persist fields and recipients for document editing 2023-11-06 13:01:07 +11:00
Mythie 115cae8365 fix: styling and semantic updates 2023-11-06 13:01:07 +11:00
Doug Andrade 814a6174e3 improved loading state for /document/id 2023-11-06 13:01:07 +11:00
Doug Andrade 5442e82ae7 clean up console.log() used for testing 2023-11-06 13:01:07 +11:00
Doug Andrade 6253c42ca1 feat: google auth without schema change 2023-11-06 13:01:07 +11:00
Doug Andrade 3377e29c72 fix: dark mode on signup and signin pages 2023-11-06 13:01:07 +11:00
Doug Andrade 4ea316a077 fix: signature pad in dark mode 2023-11-06 13:01:07 +11:00
Doug Andrade feefeea0c4 resolving eslint build errors 2023-11-06 13:01:07 +11:00
Doug Andrade 40115d33b4 adding dark mode to feat/refresh 2023-11-06 13:01:07 +11:00
Mythie cc182649c2 wip: create document workflow 2023-11-06 13:01:07 +11:00
Mythie 159bcade7b wip: refresh design 2023-11-06 13:01:06 +11:00
Pablo Hinojosa 76b2fb5edd docs: add docker compose instructions
Add docker section to Deployment section
2023-10-31 18:47:34 +11:00
Lucas Smith 7df83cc0ad Merge pull request #363 from mcnaveen/main
chore(docs): improve Docker instructions
2023-09-13 21:57:56 +10:00
MC Naveen f9d96c67d3 changes 2023-09-10 09:32:37 +05:30
MC Naveen beb9946f3b typo 2023-09-10 09:29:01 +05:30
MC Naveen 822b018eb0 chore(docs): improve Docker instructions 2023-09-10 09:28:15 +05:30
Lucas Smith d702710cb4 Merge pull request #325 from thara003/fix/typo-contributing.md
docs: fix typo in CONTRUBUTING.md
2023-08-30 11:19:21 +10:00
Nayan Thara M a9ed9c0316 docs: fix a typo in README.md 2023-08-30 00:27:44 +05:30
Nayan Thara M 1ea231e9af docs: fix a typo in CONTRUBUTING.md 2023-08-29 19:56:39 +05:30
Lucas Smith dfd28f4441 Merge pull request #322 from documenso/readme
feat: Add Repository Activity
2023-08-29 13:23:15 +10:00
flō fee107ff7a Add Repository Activity 2023-08-28 16:34:31 +02:00
Lucas Smith 19ea119009 Merge pull request #251 from documenso/docs/add-render-deploy
docs: add render one click deploy button
2023-08-24 10:49:03 +10:00
Lucas Smith aea20019bd Merge pull request #253 from documenso/docs/add-gitpod-setup
docs: add gitpod setup
2023-08-22 10:20:24 +10:00
Lucas Smith 3177a07d25 chore: update readme 2023-08-21 17:00:14 +10:00
Lucas Smith 0a1603b147 Merge pull request #276 from yashug/fix-null-name-email
Fixes Showing ask null from SigningEmail Template
2023-08-21 12:56:07 +10:00
yashug 82ccdd5104 fix-null-name-email 2023-08-20 10:15:26 +05:30
Mythie 2d5727cab2 chore: add issue and pr templates 2023-08-19 19:57:03 +10:00
Lucas Smith 8862edfd3e Merge pull request #269 from rishi-raj-jain/main
fix: [DOC-296] Add changesets for automatic release versioning
2023-08-18 18:35:19 +10:00
Rishi Raj Jain 2c9644ce9c remove changelog-github 2023-08-18 11:32:48 +05:30
Rishi Raj Jain 6b45e8ce3a update changeset config and contributing 2023-08-18 11:31:13 +05:30
Rishi Raj Jain a98eca3bf1 move to devDep 2023-08-18 11:18:27 +05:30
Rishi Raj Jain e1772da491 add publish & version 2023-08-18 11:17:08 +05:30
Rishi Raj Jain 9f1e0257e7 install changeset 2023-08-18 11:06:49 +05:30
Lucas Smith 4f4725f166 Merge pull request #265 from documenso/fix/discord
fix: update link to community
2023-08-18 08:56:54 +10:00
flō eb7d89a0cd Update link to community 2023-08-17 17:46:32 +02:00
flō 4a57f75228 update link to community 2023-08-17 17:45:39 +02:00
Lucas Smith adf92bb53d Merge pull request #254 from nsylke/nsylke-patch-1
Correct readme logo url
2023-08-14 21:34:18 +10:00
Nicholas Sylke adf3a11c5f Update README.md 2023-08-12 15:08:57 -05:00
Ephraim Atta-Duncan 652951ed7f Fix prisma studio opening twice 2023-08-11 20:48:42 +00:00
Ephraim Atta-Duncan 40db5baa17 Add gitpod button to readme 2023-08-11 20:44:09 +00:00
Ephraim Atta-Duncan 4cdfa2d1f0 Add gitpod config files 2023-08-11 20:38:41 +00:00
Mythie ba82b1fca8 chore: update dockerfile 2023-08-10 13:51:22 +10:00
Ephraim Atta-Duncan 6b3696d879 docs: add render deploy button to readme 2023-08-10 01:53:05 +00:00
Ephraim Atta-Duncan ca1522a31e Merge branch 'main' into feat/add-render-deploy 2023-08-10 01:52:25 +00:00
Ephraim Atta-Duncan 201c0ac22a chore: update start command for render deployment 2023-08-10 01:34:42 +00:00
Ephraim Atta-Duncan c573e15ac2 Add render.yaml 2023-08-10 00:52:43 +00:00
Lucas Smith e5a80a701f Merge pull request #242 from documenso/docs/railway-one-click-deploy
docs: add railway one click deploy
2023-08-09 16:23:40 +10:00
Lucas Smith f8aebbc484 Merge branch 'main' into docs/railway-one-click-deploy 2023-08-09 16:22:56 +10:00
Lucas Smith 4e60d4ac09 Merge pull request #247 from criadoperez/fix/criadoperez
Fixed typos
2023-08-04 12:36:49 +10:00
Alejandro Criado-Pérez b5328eebde Corrected ts and tsx files 2023-08-04 02:14:04 +02:00
Lucas Smith e87c57c97c Merge branch 'main' into docs/railway-one-click-deploy 2023-08-03 10:51:49 +10:00
Timur Ercan cef5c8e33f Merge pull request #245 from documenso/fix-comunity-link
Update link to community (Discord)
2023-08-02 15:13:48 +02:00
flō b03dd1553f Update link to community (Discord) 2023-08-02 15:12:31 +02:00
Ephraim Atta-Duncan f6d1b8c8a1 add hint that more deployment methods are coming 2023-08-01 14:12:33 +00:00
Ephraim Atta-Duncan cb29ffef37 docs: add railway one click deploy 2023-08-01 13:47:50 +00:00
Lucas Smith f7d0bb9823 Merge pull request #227 from documenso/docs-coventional-commits
docs: conventional commits
2023-07-31 13:00:55 +10:00
Timur Ercan fc2809c4cf Merge branch 'main' into docs-coventional-commits 2023-07-28 11:42:48 +02:00
Timur Ercan 14536bda1e Merge pull request #234 from documenso/chore-manifest-filename
Rename manifest.md to MANIFEST.md
2023-07-21 14:35:39 +02:00
Timur Ercan 5fcd54ae09 Rename manifest.md to MANIFEST.md 2023-07-21 14:35:19 +02:00
Timur Ercan 35fecfffa9 Merge pull request #231 from documenso/chore/claim
chore: claim
2023-07-21 14:26:12 +02:00
Timur Ercan da07bf135c chore: phrasing 2023-07-21 09:55:50 +02:00
Timur Ercan 1a06dd261c chore: claim 2023-07-21 09:47:05 +02:00
Timur Ercan 9c3fbbdb3a chore: dub slack slug 2023-07-19 07:54:03 +02:00
Timur Ercan c20123ec75 merge main 2023-07-18 12:03:14 +02:00
Timur Ercan 4c25e85f01 doc: branchformat 2023-07-18 11:59:59 +02:00
Lucas Smith ed3dbefbd7 Merge pull request #229 from fmerian/patch-1
fix: Update link to Slack in CONTRIBUTING.md
2023-07-15 12:19:04 +10:00
flō 7d8f83750b Update link to Slack in CONTRIBUTING.md 2023-07-14 16:40:31 +02:00
Timur Ercan fda3472e67 docs: conventional commits 2023-07-13 15:50:38 +02:00
Timur Ercan 2dd89b1bc1 Merge pull request #225 from documenso/feat/manifest
feat: added manifest
2023-07-13 12:08:02 +02:00
Timur Ercan cc87eeb8e0 feat: added manifest 2023-07-13 11:10:21 +02:00
Mythie 6c78332258 fix: await signing requests 2023-07-08 18:52:13 +10:00
Timur Ercan 5922725e1a Merge pull request #219 from PeerRich/patch-2
added new cal.com badge for booking link
2023-06-29 13:55:24 +02:00
Peer Richelsen 36232c7817 added new cal.com badge for booking link 2023-06-28 19:53:39 +02:00
Mythie 723339f812 fix: add smtp troubleshooting 2023-06-17 13:08:15 +10:00
Lucas Smith f279b41b89 Merge pull request #172 from doug-andrade/logo
added dynamic coloring of logo mark
2023-06-17 11:56:36 +10:00
Lucas Smith 3d0836c39c Merge branch 'main' into logo 2023-06-17 11:55:54 +10:00
Lucas Smith fcaa59699c Merge pull request #188 from Ashutosh-Bhadauriya/fix/selectbox-alignment
Fixed alignment of div containing selectboxes in mobile and tablet screens
2023-06-17 11:54:01 +10:00
Mythie 5063b60a8a fix: further style updates 2023-06-17 11:53:04 +10:00
Lucas Smith 1322f7333f Merge branch 'main' into fix/selectbox-alignment 2023-06-17 11:48:11 +10:00
Lucas Smith 0278495896 Merge pull request #190 from dephraiim/fix-typo
Fix typo in contributing.md
2023-06-17 11:47:19 +10:00
Lucas Smith ef34c4fe5d Merge pull request #179 from documenso/fix/improve-stripe-webhook-endpoint
fix: improve stripe webhook endpoint
2023-06-17 11:46:37 +10:00
Lucas Smith 6dad379943 Merge pull request #196 from documenso/feat/password-reset
feat: reset password
2023-06-17 11:45:38 +10:00
Mythie d3f82e1eb0 fix: code style updates and email wording changes 2023-06-17 11:44:34 +10:00
Lucas Smith 6838b953a8 Merge pull request #209 from documenso/fix/send-error-double-send
fix: don't double send error reponses when sending fails
2023-06-17 11:28:13 +10:00
Lucas Smith fdd5a6114e Merge pull request #211 from danieltonel/doc-210-fix-docker-compose-name-attribute-error
Doc 210 fix docker compose name attribute error
2023-06-16 18:24:54 +10:00
danieltonel b05ab9fbb4 set name using docker compose 2023-06-16 10:50:20 +03:00
danieltonel e34be16d3d fix: Docker Compose 'name' attribute causing invalid file issue 2023-06-16 10:44:23 +03:00
Mythie 9fd9bc2893 fix: reformat 2023-06-16 00:24:13 +10:00
Lucas Smith 3f14d8007a fix: don't double send error reponses when sending fails 2023-06-15 23:25:35 +10:00
Ephraim Atta-Duncan e3bc41934c Fixes from code review 2023-06-09 03:55:30 +00:00
Ephraim Atta-Duncan 13a840ff78 Password validation with zod 2023-06-07 12:33:33 +00:00
Ephraim Atta-Duncan fe6561f596 Set reset token expiry to 24 hours 2023-06-07 11:02:50 +00:00
Ephraim Atta-Duncan 9cfbb1dec9 Avoid leaking that a user has an account 2023-06-07 10:59:20 +00:00
Ephraim Atta-Duncan 9dd8c2842c Match emails with regex 2023-06-07 10:44:07 +00:00
Ephraim Atta-Duncan 54a965e2b4 Remove unused props from components 2023-06-07 10:37:47 +00:00
Ephraim Atta-Duncan 7cc1ae2de0 Refactor forgot password and reset component 2023-06-07 10:33:05 +00:00
Lucas Smith 5ec97657c1 Merge pull request #199 from documenso/fix/new-slack-link
fix: expired slack link
2023-06-07 20:15:13 +10:00
Ephraim Atta-Duncan f08836216e Remove unused input fields 2023-06-07 10:12:05 +00:00
Ephraim Atta-Duncan 7184c47ac4 Rename component interfaces 2023-06-07 10:10:56 +00:00
Ephraim Atta-Duncan 02f9c38e1e Replace slack link with documen.so/slack 2023-06-07 09:59:40 +00:00
Lucas Smith aa651fb4e0 Merge pull request #191 from eltociear/patch-1
Fix typo in pdf-editor.tsx
2023-06-06 19:01:31 +10:00
Ephraim Atta-Duncan 9ff8527336 fix: expired slack link 2023-06-05 21:49:39 +00:00
Ephraim Atta-Duncan 79bd410687 Remove tokens on successful password reset 2023-06-05 17:15:41 +00:00
Ephraim Atta-Duncan 3a0648c85d Expire token after 1 hour 2023-06-05 16:54:12 +00:00
Ephraim Atta-Duncan 2b9a2ff250 Avoid user from setting the same old password 2023-06-05 16:36:16 +00:00
Ephraim Atta-Duncan 4136811e32 Avoid consecutive password reset requests 2023-06-05 16:01:01 +00:00
Ephraim Atta-Duncan e9cee23c15 Error handling for invalid users 2023-06-05 15:52:00 +00:00
Ephraim Atta-Duncan 5d2349086d Send email on password reset complete 2023-06-05 15:33:27 +00:00
Ephraim Atta-Duncan c47e01b2b8 Display sucessful password reset request 2023-06-05 14:59:50 +00:00
Ephraim Atta-Duncan 7c30ee0c3e Redirect to /login on password reset 2023-06-05 14:47:10 +00:00
Ephraim Atta-Duncan 6e2b05f835 Change password in database to new reset password 2023-06-05 14:36:20 +00:00
Ephraim Atta-Duncan 8dc9c9d72d Add reset password page 2023-06-05 14:17:45 +00:00
Ephraim Atta-Duncan 66b529a841 feat: send reset password email 2023-06-05 13:44:47 +00:00
Ephraim Atta-Duncan 8293b50195 Create reset password token for user 2023-06-05 13:05:25 +00:00
Ephraim Atta-Duncan 002b22b1a8 Add forgot password page 2023-06-05 12:53:51 +00:00
Ephraim Atta-Duncan 447bf0cb76 Add password reset to prisma schema 2023-06-05 12:23:52 +00:00
Lucas Smith 4e65ff3a47 Merge pull request #195 from PeerRich/patch-1
chore: fix readme Product Hunt Badges
2023-06-05 21:47:39 +10:00
Peer Richelsen effe781ce7 chore: fix readme Product Hunt Badges
Product Hunt is over, its probably better to move it into its own section.

also added product of the day!
2023-06-05 12:33:08 +01:00
Ikko Eltociear Ashimine a1bb360b6f Fix typo in pdf-editor.tsx
postion -> position
2023-06-03 21:58:14 +09:00
Ephraim Atta-Duncan 37c4e68aac Fix typo in contributing.md 2023-06-02 20:01:10 +00:00
Lucas Smith 11c1b6841f Merge pull request #185 from ahiho/fix/ipv6
docs: update troubleshooting for IPv6
2023-06-03 00:44:04 +10:00
Thanh Vu c41007e026 Revert "fix: support ipv6 for nextjs"
This reverts commit f9de6671e0aa29e25e872a80aa334d3319e3e522.
2023-06-02 18:04:52 +07:00
Thanh Vu db99bf3674 Revert "fix: custom nextjs server"
This reverts commit 8f9a5f4ec7d834970a3e2b0778ce94218c997a8f.
2023-06-02 18:04:52 +07:00
Thanh Vu 3caa01ab53 Revert "fix: add custom nextjs server to docker"
This reverts commit 5dbe7b26286234db542921d9ded000c522c9a31e.
2023-06-02 18:04:52 +07:00
Thanh Vu 20b618c70f docs: update troubleshooting for IPv6 2023-06-02 18:04:52 +07:00
Thanh Vu bbedd6d3de fix: add custom nextjs server to docker 2023-06-02 18:04:52 +07:00
Thanh Vu 054480500f fix: custom nextjs server 2023-06-02 18:04:52 +07:00
Thanh Vu 15b5f31a74 fix: support ipv6 for nextjs 2023-06-02 18:04:52 +07:00
AshutoshBhadauriya a07febef46 Fix: alignment of div containing selecboxes in mobile and tab screens 2023-06-02 15:06:26 +05:30
Mythie 316fb49339 fix: disable subscriptions in example env 2023-06-02 19:03:59 +10:00
Lucas Smith fc1b3be5ad Merge pull request #184 from The-Robin-Hood/bugfix/docker_script_update
docker script updated 🐳
2023-06-02 18:26:21 +10:00
Doug Andrade 79c037216d Delete turbo-build.log 2023-06-01 22:13:45 -04:00
Doug Andrade aa584c1495 Merge branch 'logo' of https://github.com/doug-andrade/documenso into logo 2023-06-01 22:09:39 -04:00
Doug Andrade 8b9738f6d5 fix: updated all logo component to set color 2023-06-01 22:05:15 -04:00
Robinhood 20b51198b4 docker script updated 🐳 2023-06-01 22:24:58 +05:30
Lucas Smith f80edf3f94 Merge pull request #181 from ahiho/fix/docker-image-typo
typo: documentso >> documenso
2023-06-02 00:06:28 +10:00
Lucas Smith 08faabc813 Merge pull request #182 from JonasPardon/patch-1
Fix typos in example env
2023-06-02 00:04:50 +10:00
Mythie 0a7ed0701c fix: add turbo entries for other platforms to package-lock
Package managers such as NPM behave strangely when adding
packages such as swc and turborepo which contain platform
variants.

During a first time install they will include only the current
devices platform while a clean node_modules and package-lock
will result in all platforms being included.

This change adds those missed platforms by performing the above step and porting it back to our existing package-lock.
2023-06-01 23:25:49 +10:00
Jonas Pardon 488cf58f0e Fix typos in example env
Just noticed some typos while setting up a local copy and thought I'd fix them up real quick.
2023-06-01 10:04:26 +02:00
Thanh Vu dd4568b7fa typo: documentso >> documenso 2023-06-01 13:58:18 +07:00
Mythie 19e960f593 fix: improve stripe webhook endpoint
Improve the stripe webhook endpoint by checking for
subscriptions prior to performing an update to handle
cases where accounts have no created subscription.

This can happen in sitations such as when a checkout_session has been created but the payment fails.
2023-05-31 21:11:54 +10:00
Lucas Smith 893ab9bea5 Merge pull request #167 from dephraiim/fix/dashboard-logo
fix: dashboard logo
2023-05-30 23:29:57 +10:00
Lucas Smith 2aaeab3217 Merge pull request #176 from The-Robin-Hood/bugfix/docker_compose
Package.json Docker script fix
2023-05-30 22:50:57 +10:00
Ansari 0a5de18235 minor script fix 2023-05-30 15:43:58 +05:30
Mythie b5e03359c1 fix: mark truncateTitle as optional 2023-05-30 20:11:23 +10:00
Lucas Smith a266e4f9d4 Merge pull request #150 from The-Robin-Hood/bugfix/long_filename
Long filename fix 🗄
2023-05-30 20:04:19 +10:00
Lucas Smith eccd9b5cd3 Merge branch 'main' into bugfix/long_filename 2023-05-30 20:03:19 +10:00
Lucas Smith fdbcf33210 Merge pull request #164 from doug-andrade/next
Simplified next.config.js and removed next-transpile-modules dependency.
2023-05-30 20:02:17 +10:00
Lucas Smith 6048555e4a Merge branch 'main' into next 2023-05-30 19:55:31 +10:00
Lucas Smith e33f31c483 Merge pull request #165 from doug-andrade/fix-typos
typo: /ressources to /resources
2023-05-30 19:54:32 +10:00
Lucas Smith fe82e3c84f Merge pull request #171 from leerob/turbo
Add turborepo to monorepo.
2023-05-30 19:34:53 +10:00
Ansari 7684a49b7d Merge branch 'main' into bugfix/long_filename 2023-05-30 14:30:55 +05:30
Mythie d8ad4b4b2b fix: add turbo dep and start command 2023-05-30 18:56:41 +10:00
Lucas Smith e40ebd84d4 Merge pull request #174 from doug-andrade/fonts
loading fonts with next/font for no layout shift
2023-05-30 18:48:12 +10:00
Lucas Smith a340b9c481 Merge pull request #173 from piyushkrmaurya/prisma_deprecations
fix: deprecated type checks and imports from @prisma/client
2023-05-30 18:35:32 +10:00
Doug Andrade 307b0cc9d9 fixed height on login/signup pages 2023-05-30 02:36:43 -04:00
Doug Andrade 3e94491474 fixed next/font load on ALL pages and toast. 2023-05-30 02:17:34 -04:00
Doug Andrade 007fe44db8 loading fonts with next/font 2023-05-29 22:25:36 -04:00
Lee Robinson 1e6f65f92d Explicit deps 2023-05-29 19:46:24 -05:00
Piyush Maurya 82fbedf8e3 fix: deprecated type checks and imports from @prisma 2023-05-30 00:24:18 +05:30
Doug Andrade 37ded07a92 Merge branch 'main' into logo 2023-05-29 13:23:14 -04:00
Doug Andrade df2294b43b dynamic coloring of logo mark 2023-05-29 13:17:40 -04:00
Lee Robinson 2f3be1cfe5 Add turborepo to monorepo. 2023-05-29 10:38:24 -05:00
Mythie 8ecd5cf215 fix: respect truncate title prop 2023-05-29 18:47:54 +10:00
Lucas Smith f5091dd4d7 Merge pull request #166 from doug-andrade/tailwind
update: add new brand color as palette in tailwind config
2023-05-29 18:40:09 +10:00
Ephraim Atta-Duncan 4c06b5e640 fix: logo only on dashboard 2023-05-29 08:01:12 +00:00
Doug Andrade b477799d70 update: add new brand color as palette in tailwind config 2023-05-28 23:17:52 -04:00
Doug Andrade b928993510 typo: /ressources >> /resources 2023-05-28 20:06:43 -04:00
Doug Andrade ad4d844b4d remove: next-transpile-modules dependency 2023-05-28 19:53:44 -04:00
Doug Andrade 3444d7fd93 task: simplify next.config.js 2023-05-28 19:44:00 -04:00
Timur Ercan 3e220135be fix: readme format 2023-05-28 17:42:54 +02:00
Timur Ercan 095c391d45 Merge pull request #163 from documenso/ElTimuro-patch-1
We are LIVE on Product Hunt 🚨 Come say hi :)
2023-05-28 10:16:35 +02:00
Timur Ercan b0e4fa9e1d We are LIVE on Product Hunt 🚨 Come say hi :)
We are LIVE on Product Hunt 🚨 Come say hi :) 
https://www.producthunt.com/posts/documenso
2023-05-28 10:16:22 +02:00
Timur Ercan f6bff1649b fix: disable empty state add doc without subscr. 2023-05-28 06:38:55 +02:00
Timur Ercan b2b499f397 chore: update signup link 2023-05-28 06:16:48 +02:00
Mythie eb18a7e11c feat: update password in dashboard 2023-05-28 13:11:09 +10:00
Mythie 89d9e02464 fix: update logo 2023-05-28 13:10:09 +10:00
Mythie a83b09f4db fix: update favicon 2023-05-28 13:07:47 +10:00
Mythie e445830ffb fix: convert readFile to buffer 2023-05-28 08:04:16 +10:00
Mythie bfff81dd3c fix: apply encoding on buffer level 2023-05-28 07:43:02 +10:00
Timur Ercan 02129aab73 Merge pull request #162 from documenso/feature/update-branding
Feature/update branding
2023-05-27 18:23:22 +02:00
Timur Ercan e7386928fa Merge branch 'main' into feature/update-branding 2023-05-27 18:22:13 +02:00
Timur Ercan 7890b4adf1 feat: update logo 2023-05-27 18:18:34 +02:00
Timur Ercan 6aa40b2547 feat: update logo 2023-05-27 18:18:21 +02:00
Timur Ercan c142c1bd54 feat: favicon logo 2023-05-27 18:11:49 +02:00
Mythie 980bd0d485 fix: convert readFile to buffer 2023-05-28 00:53:43 +10:00
Mythie 17d51354d7 fix: support cert file encodings 2023-05-28 00:39:07 +10:00
Lucas Smith 0881abdee4 Merge pull request #159 from documenso/feat/support-custom-cert-paths
feat: support leading cert from custom path
2023-05-27 23:39:08 +10:00
Lucas Smith a300c3fb3a Merge branch 'main' into feat/support-custom-cert-paths 2023-05-27 23:38:33 +10:00
Timur Ercan 5e07b8bd92 Merge pull request #161 from documenso/ElTimuro-patch-1
PRODUCT HUNT LAUNCH TOMORROW
2023-05-27 12:04:55 +02:00
Timur Ercan 7b1d626f9a PRODUCT HUNT LAUNCH TOMORROW
WE LAUNCH ON PRODUCT HUNT TOMORROW.
https://dub.sh/documenso-launch
2023-05-27 12:04:44 +02:00
Mythie de46d0f4ab fix: support passphrase env var 2023-05-27 01:31:48 +10:00
Timur Ercan cc7ab171b1 Merge pull request #160 from documenso/ElTimuro-patch-1
Update README.md
2023-05-26 17:23:16 +02:00
Timur Ercan 466941dbc2 Update README.md 2023-05-26 17:22:56 +02:00
Mythie 0564792604 fix: remove unused import 2023-05-27 01:08:33 +10:00
Mythie 32f904ad68 feat: support leading cert from custom path 2023-05-27 01:07:07 +10:00
Mythie 748f842115 fix: update prop typo, extract truncate method 2023-05-25 18:43:37 +10:00
Timur Ercan ecaec356a1 Product Hunt Hint 2023-05-23 17:22:40 +02:00
Timur Ercan 38f730c730 added EE folder and EE license scaffold 2023-05-23 17:09:42 +02:00
Timur Ercan 2b4a9fbe21 Merge pull request #145 from documenso/feat/add-subscriptions
Add subscriptions
2023-05-22 16:43:10 +02:00
Timur Ercan 106ac40fb1 texts, monthly billing default 2023-05-21 21:01:34 +02:00
Timur Ercan 62ac181193 Merge branch 'main' into feat/add-subscriptions 2023-05-21 20:44:07 +02:00
Timur Ercan 9580100d66 Merge pull request #153 from documenso/doc-215-link-token
fix: pass recipient token to signed page
2023-05-21 20:37:39 +02:00
Timur Ercan 38a8279757 fix 2023-05-21 20:36:38 +02:00
Timur Ercan ed77000746 fix: pass recipient token to signed page 2023-05-21 20:28:06 +02:00
Timur Ercan 73b72c6cce fix NEXT_PUBLIC_ALLOW_SIGNUP reference 2023-05-21 20:10:06 +02:00
Timur Ercan b2aa4d6587 Merge branch 'main' into feat/add-subscriptions 2023-05-21 19:08:23 +02:00
Timur Ercan bde80bf2c9 clean up debug 2023-05-21 18:52:35 +02:00
Mythie 1e505088ad fix: hide billing if the feature flag hasn't been passed 2023-05-21 23:00:54 +10:00
Timur Ercan ae0799168a clean up submodule 2023-05-19 20:02:39 +02:00
Timur Ercan b5ec3cc817 Merge branch 'main' into feat/add-subscriptions 2023-05-19 19:47:23 +02:00
Timur Ercan 4a2162478e Merge branch 'main' into bugfix/long_filename 2023-05-19 19:33:22 +02:00
Timur Ercan 370f38457b Merge pull request #151 from abielzulio/abielzulio-fix-typo
fix(`typo`): `availible` → `available`
2023-05-19 18:58:55 +02:00
Ansari 1a5948c50e Merge branch 'bugfix/long_filename' of https://github.com/The-Robin-Hood/documenso into bugfix/long_filename 2023-05-15 15:43:32 +05:30
Ansari 8bf6594cf4 prop name changed 📛 2023-05-15 15:43:29 +05:30
Ansari b6ff01ef86 Merge branch 'main' into bugfix/long_filename 2023-05-15 15:40:04 +05:30
Ansari 9b993c08f1 Truncate prop added 2023-05-15 15:39:37 +05:30
Abiel Zulio M f34813e450 Update login.tsx 2023-05-14 20:13:45 +07:00
Lucas Smith 8f6c6dccf4 Merge pull request #148 from piyushkrmaurya/main
Add tooltip to recipients action buttons
2023-05-12 07:42:24 +10:00
Piyush Maurya 826704c21f Adds animation to tooltip 2023-05-11 21:00:05 +05:30
Piyush Maurya 4f47bbb552 Adds consistent 'className' to action buttons 2023-05-11 14:04:40 +05:30
Piyush Maurya 825231fe2a Adds tooltip to recipient action buttons 2023-05-11 12:15:41 +05:30
Ansari 051e681701 Long filename fix 🗄 2023-05-10 20:13:07 +05:30
Lucas Smith 012d2a9a09 Merge pull request #147 from dephraiim/readme-fixes
Readme Fixes
2023-05-09 17:28:27 +10:00
Ephraim Atta-Duncan 85c593d8e3 fix typo 2023-05-09 07:24:38 +00:00
Ephraim Atta-Duncan 0f28692a39 Update readme 2023-05-07 11:25:12 +00:00
Mythie 22bc854cac feat: add warnings for subscription lapses and cancellations 2023-05-06 16:40:37 +10:00
Mythie d2c5657093 fix: update signup env var 2023-05-06 16:11:56 +10:00
Mythie 6934e573d5 feat: add guards and subscription ui 2023-05-06 16:08:21 +10:00
Mythie 7eaa00b836 feat: add stripe api handlers 2023-05-06 14:34:43 +10:00
Mythie e7e881be01 fix: update env types 2023-05-06 14:34:20 +10:00
Mythie e80997f462 fix: update env vars 2023-05-06 14:33:42 +10:00
Mythie da0166b746 fix: tidy stripe feature and add provider 2023-05-06 14:33:27 +10:00
Mythie 900b816ae0 feat: stripe handlers and fetchers 2023-05-05 20:08:18 +10:00
Mythie ed3e4d22ef feat: scaffhold subscription table and ui 2023-05-05 19:29:42 +10:00
Lucas Smith bf84ec8962 Merge pull request #74 from Mythie/chore/optimise-deps
chore: optimise depedency tree
2023-05-01 20:38:24 +10:00
Lucas Smith 1abfa93551 Merge branch 'main' into chore/optimise-deps 2023-05-01 20:36:37 +10:00
Lucas Smith 039cc75882 Merge pull request #139 from documenso/fix/improve-general-styling
chore: improve general styling
2023-05-01 20:05:17 +10:00
Mythie 8457823d8e fix: improve sign in and sign up pages 2023-05-01 20:01:36 +10:00
Mythie d135df827a fix: improve general styling
Improve the general styling of the app by removing floats and replacing it `flex`. Additionally, improve the constrast of certain parts of the app and add some transitions to hover changes.
2023-05-01 20:01:35 +10:00
Timur Ercan d2301a923b Merge pull request #140 from documenso/feat/DOC-210-sign-dialog-broken-on-second-opening
fix: debounce display of signing canvas
2023-04-28 19:12:10 +02:00
Timur Ercan 108614bf46 Merge branch 'main' into feat/DOC-210-sign-dialog-broken-on-second-opening 2023-04-28 18:22:57 +02:00
Timur Ercan adf69edd54 Merge pull request #141 from documenso/fix/DOC-214-date-field-appears-for-all-recipients
fix: date field appears for all recipients
2023-04-28 18:20:52 +02:00
Timur Ercan 82139f6b2d Merge branch 'main' into fix/DOC-214-date-field-appears-for-all-recipients 2023-04-25 11:51:23 +02:00
Lucas Smith 270c82759c Merge pull request #137 from zahid47/issue-131-redirect-to-dashboard-if-logged-in
Redirect to /dashboard if auth user tries to access /login or /signup
2023-04-25 11:15:11 +10:00
Lucas Smith 01c7903efa Merge pull request #142 from raysubham/fix/keep-url-state-in-sync
feat: Keep the URL query params and UI state in sync when status filter changes
2023-04-25 10:48:30 +10:00
Lucas Smith 64b755d5ba Merge branch 'main' into fix/keep-url-state-in-sync 2023-04-25 10:48:07 +10:00
Lucas Smith 8788b64585 Merge pull request #143 from mikeriss/fix-typo
Fix: typos on Readme
2023-04-25 10:41:27 +10:00
mikeriss c9547057f6 fixed addional typos
typos fixed
2023-04-24 19:59:56 +02:00
mikeriss 17e688c222 typo
changed machnine to machine
2023-04-24 19:51:05 +02:00
mikeriss f5a42e694d Updated README.md typo
changed a typo from signging to signing
2023-04-24 19:48:34 +02:00
Subham Ray b2d09216c8 rename function 2023-04-24 23:13:38 +05:30
Subham Ray 6d30a486ab added type for statusFilter 2023-04-24 19:37:41 +05:30
Subham Ray dc6217b14e feat(Documents Filter): Keep the URL and UI state in sync when status filter changes 2023-04-24 19:16:56 +05:30
Lucas Smith a6171ec4f3 Merge branch 'main' into fix/DOC-214-date-field-appears-for-all-recipients 2023-04-23 10:36:17 +10:00
Timur Ercan d0f962598c Merge branch 'main' into feat/DOC-210-sign-dialog-broken-on-second-opening 2023-04-21 15:49:40 +02:00
Mythie 81fd9ff749 fix: date field appears for all recipients
Updates the signing endpoint to only apply changes to the Date field for the current signer. This is made possible through the addition of the `signedAt` column within the database.

Resolves the issue with one signer filling the date for all recipients and also ensures that the date of signing on a document won't always be todays date after each recipient has signed.
2023-04-21 23:43:54 +10:00
Mythie 4dcb0a684d fix: debounce display of signing canvas
Debounces the display of the signing canvas to avoid situtations where the canvas renders to 2px due to rendering while a transition is being performed.
2023-04-21 23:18:36 +10:00
Timur Ercan ab96990d43 render PR env debug 2023-04-21 13:29:51 +02:00
Timur Ercan ad5b2bcf82 fix: pr env condition 2023-04-21 12:59:53 +02:00
Timur Ercan 6f18be6b5b add render preview env support 2023-04-21 12:42:31 +02:00
Timur Ercan 8039871ab1 Merge pull request #130 from Mythie/fix/can-add-signature-space-for-empty-recipients
fix: disable selection for draft recipients
2023-04-20 17:26:01 +02:00
Timur Ercan 4b9840d7e0 Merge branch 'main' into fix/can-add-signature-space-for-empty-recipients 2023-04-20 17:25:39 +02:00
Timur Ercan 544a16caff Merge pull request #135 from Mythie/fix/signing-email-breaks-on-small-decices
fix: signing email breaks on small devices
2023-04-20 17:19:21 +02:00
Timur Ercan 989d036e54 Merge branch 'main' into fix/signing-email-breaks-on-small-decices 2023-04-20 17:14:00 +02:00
Lucas Smith 894f8720b8 Merge pull request #134 from SauravL3010/bugfix-#71/invalid-email-hint
Toast error for invalid email
2023-04-19 23:58:13 +10:00
Mythie 70ea3ceaf3 fix: improve types 2023-04-19 23:56:39 +10:00
Saurav Gurhale 80d26adf9c add toast error for invalid email 2023-04-19 23:56:39 +10:00
Lucas Smith b4e21f97e3 Merge pull request #133 from dephraiim/docker-container-name
Use `documenso` as container name for local development
2023-04-19 23:32:00 +10:00
Mythie 95c3be9a77 chore: optimise depedency tree 2023-04-19 23:30:14 +10:00
Lucas Smith 52f554a636 Merge pull request #136 from dephraiim/doc-223
Remove Input Placeholders
2023-04-19 22:55:26 +10:00
zahid 849885b5b3 fix: redirect to /dashboard if auth user tries to access /login or /signup 2023-04-19 13:11:02 +06:00
Ephraim Atta-Duncan bcc2530484 Declutter Textarea by removing placeholders 2023-04-16 23:45:57 +00:00
Mythie d863f89232 fix: signing email breaks on small devices
Currently the signing email displays poorly on small devices with the line wrapping
causing the button to look broken.

Resolve this by using whitespace no-wrap.
2023-04-17 07:01:41 +10:00
Ephraim Atta-Duncan 84e3d29589 Use documenso as container name for local development 2023-04-16 18:29:40 +00:00
Mythie ba3ffe68ea fix: disable selection for draft recipients 2023-04-16 23:02:50 +10:00
Timur Ercan 5c58b32d92 Merge branch 'main' of https://github.com/documenso/documenso 2023-04-15 20:35:36 +02:00
Timur Ercan f10bafd998 cleanup 2023-04-15 20:35:33 +02:00
Timur Ercan 2cf8896e46 Merge branch 'main' of https://github.com/documenso/documenso 2023-04-15 20:33:38 +02:00
Timur Ercan e873af3ec9 cleanup 2023-04-15 20:31:38 +02:00
Timur Ercan 06501bde60 cleanup 2023-04-15 20:31:24 +02:00
Timur Ercan 0dcab27e65 fix: openshift build does not allow private repos 2023-04-15 20:26:35 +02:00
Timur Ercan ff2334ab55 fix: openshift build does not allow private repos
https://github.com/documenso/documenso/issues/79
2023-04-15 20:18:30 +02:00
Timur Ercan 63bd044723 feat: npm run d for ultra quick start 2023-04-15 20:04:28 +02:00
Timur Ercan b111874d7c fix: redirect users sessions not found in databae 2023-04-15 19:54:04 +02:00
Timur Ercan 21149f82ba Merge pull request #61 from Mythie/feat/docker-environment
feat: add docker support and docker-compose quickstart
2023-04-15 19:44:33 +02:00
Mythie cb77a40fd9 fix: update postgres port 2023-04-13 23:43:42 +10:00
Mythie 7aa7485388 fix: migrate dx.sh to package scripts 2023-04-13 22:52:54 +10:00
Timur Ercan 984084dd3b Merge branch 'main' into feat/docker-environment 2023-04-13 14:50:36 +02:00
Mythie 6ea38efd9d chore: tidy script 2023-04-09 22:36:28 +10:00
Mythie 49cb50ed6e feat: add down flag for stopping environment 2023-04-09 22:33:14 +10:00
Mythie 5dd3713475 feat: add docker support and docker-compose quickstart
Add support for production container builds using the provided `Dockerfile` and `build.sh` script. This can later be used with actions to automatically publish to the provided docker registry.

Additionally, support an accelerated developer quickstart using `docker-compose`. Developers can now run the `dx` npm command to quickly spin up a database and mail server.
2023-04-08 23:20:42 +10:00
2681 changed files with 475138 additions and 31161 deletions
View File
View File
@@ -0,0 +1,161 @@
---
date: 2026-01-28
title: Pdf Placeholder Field Positioning
---
## Overview
This feature enables automatic field placement in PDFs using placeholder text, eliminating the need for manual coordinate-based positioning. It supports two complementary workflows:
1. **Automatic detection on upload** - PDFs containing structured placeholders like `{{signature, r1}}` have fields created automatically when uploaded
2. **API placeholder positioning** - Developers can reference any text in a PDF to position fields instead of calculating coordinates
## Goals
- Allow users to prepare documents in Word/Google Docs with placeholders that become signature fields
- Reduce friction for document preparation workflows
- Provide API developers with a simpler alternative to coordinate-based field positioning
- Support documents with repeated placeholders (e.g., initials on every page)
## Placeholder Format (Automatic Detection)
```
{{FIELD_TYPE, RECIPIENT, option1=value1, option2=value2}}
```
### Components
- **FIELD_TYPE** (required): One of `signature`, `initials`, `name`, `email`, `date`, `text`, `number`, `radio`, `checkbox`, `dropdown`
- **RECIPIENT** (required): `r1`, `r2`, `r3`, etc. - identifies which recipient the field belongs to
- **OPTIONS** (optional): Key-value pairs like `required=true`, `fontSize=14`, `readOnly=true`
### Examples
- `{{signature, r1}}` - Signature field for first recipient
- `{{text, r1, required=true, label=Company Name}}` - Required text field with label
- `{{number, r2, minValue=0, maxValue=100}}` - Number field with validation
### Behavior
- Placeholders without recipient identifiers (e.g., `{{signature}}`) are skipped during automatic detection - reserved for API use
- Invalid field types are silently skipped
- Placeholder text is covered with white rectangles after field creation
## API Placeholder Positioning
The `/api/v2/envelope/field/create-many` endpoint accepts `placeholder` as an alternative to coordinates:
```json
{
"recipientId": 123,
"type": "SIGNATURE",
"placeholder": "{{signature}}"
}
```
### Parameters
| Parameter | Type | Description |
| ------------- | ------- | -------------------------------------------- |
| `placeholder` | string | Text to search for in the PDF |
| `width` | number | Optional override (percentage) |
| `height` | number | Optional override (percentage) |
| `matchAll` | boolean | When true, creates fields at ALL occurrences |
### matchAll Behavior
- Default (`false`): Only first occurrence gets a field
- `true`: Creates a field at every occurrence of the placeholder text
This is useful for documents requiring initials on every page.
## Implementation Components
### Core Functions
- `extractPlaceholdersFromPDF()` - Scans PDF for `{{...}}` patterns with recipient identifiers
- `removePlaceholdersFromPDF()` - Covers placeholder text with white rectangles
- `whiteoutRegions()` - Low-level helper for drawing white boxes on PDF pages
- `parseFieldTypeFromPlaceholder()` - Converts placeholder field type to FieldType enum
- `parseFieldMetaFromPlaceholder()` - Parses options into fieldMeta format
### Integration Points
1. **Upload flow** (`create-envelope.ts`, `create-envelope-items.ts`)
- Extract placeholders at upload time (before saving to storage)
- Pass placeholders in-memory to envelope creation
- Create placeholder recipients if none provided
- Create fields within the same transaction
2. **API field creation** (`create-envelope-fields.ts`)
- Accept `placeholder` as alternative to coordinates
- Search PDF for placeholder text
- Resolve position from bounding box
- Support `matchAll` for multiple occurrences
### Field Meta Parsing
The following properties are explicitly parsed:
- `required`, `readOnly` → boolean
- `fontSize`, `minValue`, `maxValue`, `characterLimit` → number
- Other properties pass through as strings
Note: Signature fields do not support fieldMeta options.
## Testing
### E2E Tests
**UI Tests** (`e2e/auto-placing-fields/`):
- Single recipient placeholder detection
- Multiple recipient placeholder detection
- Field configuration from placeholder options
- Skipping placeholders without recipient identifiers
- Skipping invalid field types
**API Tests** (`e2e/api/v2/placeholder-fields-api.spec.ts`):
- Placeholder-based field positioning
- Width/height overrides
- Error on placeholder not found
- Mixed coordinate and placeholder positioning
- First occurrence only (default)
- All occurrences with `matchAll: true`
## Documentation
### User Documentation
`/users/documents/pdf-placeholders` - Explains:
- Placeholder format and syntax
- Supported field types
- Recipient identifiers
- Available options per field type
- Troubleshooting
### Developer Documentation
`/developers/public-api/reference` - Documents:
- Coordinate-based positioning (existing)
- Placeholder-based positioning (new)
- matchAll parameter
- Mixing both methods
## Edge Cases Handled
1. **No placeholders found** - Original PDF returned unchanged
2. **Placeholder not found (API)** - Returns error with placeholder text
3. **Multiple occurrences** - First only by default, all with `matchAll: true`
4. **No recipient identifier** - Skipped during auto-detection, works for API
5. **Invalid field type** - Skipped during auto-detection
6. **Signature field with options** - Options ignored (signature doesn't support fieldMeta)
## Future Considerations
- Support for placeholder text styles (bold, underline) to indicate field properties
- Template-level placeholder mapping for reusable configurations
- Placeholder validation in document editor before sending
@@ -0,0 +1,239 @@
---
date: 2026-03-26
title: Bullmq Background Jobs
---
## Context
The codebase has a well-designed background job provider abstraction (`BaseJobProvider`) with two existing implementations:
- **InngestJobProvider** — cloud/SaaS provider, externally hosted
- **LocalJobProvider** — database-backed (Postgres via Prisma), uses HTTP self-calls to dispatch
The goal is to add a third provider backed by a proper job queue library for self-hosted deployments that need more reliability than the Local provider offers.
### Current Architecture
All code lives in `packages/lib/jobs/`:
- `client/base.ts` — Abstract `BaseJobProvider` with 4 methods: `defineJob()`, `triggerJob()`, `getApiHandler()`, `startCron()`
- `client/client.ts``JobClient` facade, selects provider via `NEXT_PRIVATE_JOBS_PROVIDER` env var
- `client/inngest.ts` — Inngest implementation
- `client/local.ts` — Local/Postgres implementation
- `client/_internal/job.ts` — Core types: `JobDefinition`, `JobRunIO`, `SimpleTriggerJobOptions`
- `definitions/` — 19 job definitions (15 event-triggered, 4 cron)
The `JobRunIO` interface provided to handlers includes:
- `runTask(cacheKey, callback)` — idempotent task execution (cached via `BackgroundJobTask` table)
- `triggerJob(cacheKey, options)` — chain jobs from within handlers
- `wait(cacheKey, ms)` — delay/sleep (not implemented in Local provider)
- `logger` — structured logging
### Local Provider Limitations
The current Local provider has several issues that motivate this work:
1. `io.wait()` throws "Not implemented"
2. HTTP self-call with 150ms fire-and-forget `Promise.race` is fragile
3. No concurrency control — jobs run in the web server process
4. No real retry backoff (immediate re-dispatch)
5. No monitoring/visibility into job status
6. Jobs compete for resources with HTTP request handling
---
## Provider Evaluation
Three alternatives were evaluated against the existing provider interface and project requirements.
### BullMQ (Redis-backed) — Recommended
| Attribute | Detail |
| ------------------- | -------------------------- |
| Backend | Redis 7.x |
| npm downloads/month | ~15M |
| TypeScript | Native |
| Delayed jobs | Yes (ms precision) |
| Cron/repeatable | Yes (`upsertJobScheduler`) |
| Retries + backoff | Yes (exponential, custom) |
| Concurrency control | Yes (per-worker) |
| Rate limiting | Yes (per-queue, per-group) |
| Dashboard | Bull Board (mature) |
| New infrastructure | Yes — Redis required |
**Why BullMQ**: Most mature and widely-adopted Node.js queue. Native delayed jobs solve the `io.wait()` gap. Redis is purpose-built for queue workloads and keeps Postgres clean for application data. Bull Board gives immediate operational visibility. The provider abstraction already exists so wrapping BullMQ is straightforward.
**Trade-off**: Requires Redis, which is additional infrastructure. However, Redis is a single Docker Compose service or a free Upstash tier, and the operational benefit is significant.
### pg-boss (PostgreSQL-backed) — Strong Alternative
| Attribute | Detail |
| ------------------- | ----------------------------- |
| Backend | PostgreSQL (existing) |
| npm downloads/month | ~1.4M |
| TypeScript | Native |
| Delayed jobs | Yes (`startAfter`) |
| Cron/repeatable | Yes (`schedule()`) |
| New infrastructure | No — reuses existing Postgres |
**Why it could work**: Zero new infrastructure since the project already uses Postgres. API maps well to existing patterns.
**Why it's second choice**: Polling-based (no LISTEN/NOTIFY), adds write amplification to the primary database, smaller ecosystem, no dashboard. At scale, queue operations on the primary database become a concern.
### Graphile Worker (PostgreSQL-backed) — Less Suitable
Uses LISTEN/NOTIFY for instant pickup but has a file-based task convention and separate schema that don't mesh well with the existing Prisma-centric architecture. Would require more adapter work.
### Improving the Local Provider — Not Recommended
Fixing the Local provider's issues (wait support, replacing HTTP self-calls, adding concurrency control, backoff) essentially means rebuilding a queue library from scratch with less robustness and no community maintenance.
---
## Recommendation
**Proceed with BullMQ.** It's the most capable option, maps cleanly to the existing provider interface, and is the standard choice for production Node.js applications. Redis is lightweight infrastructure with managed options available at every cloud provider.
**If Redis is a hard blocker**, pg-boss is the clear fallback — but the plan below assumes BullMQ.
---
## Implementation Plan
### Phase 1: BullMQ Provider Core
**File: `packages/lib/jobs/client/bullmq.ts`**
Create `BullMQJobProvider extends BaseJobProvider` with singleton pattern matching the existing providers.
Key implementation details:
1. **Constructor / `getInstance()`**
- Initialize a Redis `IORedis` connection using new env var: `NEXT_PRIVATE_REDIS_URL`
- Create a single `Queue` instance for dispatching jobs, using `NEXT_PRIVATE_REDIS_PREFIX` as the BullMQ `prefix` option (defaults to `documenso` if unset). This namespaces all Redis keys so multiple environments (worktrees, branches, developers) sharing the same Redis instance don't collide.
- Create a single `Worker` instance for processing jobs (in-process, same prefix)
- Store job definitions in a `_jobDefinitions` record (same pattern as Local provider)
2. **`defineJob()`**
- Store definition in `_jobDefinitions` keyed by ID
- If the definition has a `trigger.cron`, register it via `queue.upsertJobScheduler()` with the cron expression
3. **`triggerJob(options)`**
- Find eligible definitions by `trigger.name` (same lookup as Local provider)
- For each, call `queue.add(jobDefinitionId, payload)` with appropriate options
- Support `options.id` for deduplication via BullMQ's `jobId` option
4. **`getApiHandler()`**
- Return a minimal health-check / queue-status handler. Unlike the Local provider, BullMQ workers don't need an HTTP endpoint to receive jobs — they pull from Redis directly. The API handler can return queue metrics for monitoring.
5. **`startCron()`**
- No-op — cron is handled by BullMQ's `upsertJobScheduler` registered during `defineJob()`
6. **Worker setup**
- Single worker processes all job types by dispatching to the correct handler from `_jobDefinitions`
- Configure concurrency with a default of 10 (overridable via `NEXT_PRIVATE_BULLMQ_CONCURRENCY` env var for those who need to tune it)
- Configure retry with exponential backoff: `backoff: { type: 'exponential', delay: 1000 }`
- Default 3 retries (matching current Local provider behavior)
7. **`createJobRunIO(jobId)`** — Implement `JobRunIO`:
- `runTask()`: Reuse the existing `BackgroundJobTask` Prisma table for idempotent task tracking (same pattern as Local provider)
- `triggerJob()`: Delegate to `this.triggerJob()`
- `wait()`: Throw "Not implemented" (same as Local provider). No handler uses `io.wait()` so this has zero impact
- `logger`: Same console-based logger pattern as Local provider
### Phase 2: Provider Registration
**File: `packages/lib/jobs/client/client.ts`**
Add `'bullmq'` case to the provider match:
```typescript
this._provider = match(env('NEXT_PRIVATE_JOBS_PROVIDER'))
.with('inngest', () => InngestJobProvider.getInstance())
.with('bullmq', () => BullMQJobProvider.getInstance())
.otherwise(() => LocalJobProvider.getInstance());
```
**File: `packages/tsconfig/process-env.d.ts`**
Add `'bullmq'` to the `NEXT_PRIVATE_JOBS_PROVIDER` type union and add Redis env var types:
```typescript
NEXT_PRIVATE_JOBS_PROVIDER?: 'inngest' | 'local' | 'bullmq';
NEXT_PRIVATE_REDIS_URL?: string;
NEXT_PRIVATE_REDIS_PREFIX?: string;
NEXT_PRIVATE_BULLMQ_CONCURRENCY?: string;
```
**File: `.env.example`**
Add Redis configuration examples:
```env
NEXT_PRIVATE_JOBS_PROVIDER="local" # Options: local, inngest, bullmq
NEXT_PRIVATE_REDIS_URL="redis://localhost:63790"
NEXT_PRIVATE_REDIS_PREFIX="documenso" # Namespace for Redis keys (useful when sharing a Redis instance)
```
**File: `turbo.json`**
Add `NEXT_PRIVATE_REDIS_URL`, `NEXT_PRIVATE_REDIS_PREFIX`, and `NEXT_PRIVATE_BULLMQ_CONCURRENCY` to the env vars list for cache invalidation.
### Phase 3: Infrastructure & Dependencies
**File: `packages/lib/package.json`**
Add dependencies:
- `bullmq` — the queue library
- `ioredis` — Redis client (peer dependency of BullMQ, but explicit is better)
**File: `docker-compose.yml` (or equivalent)**
Add Redis service for local development:
```yaml
redis:
image: redis:7-alpine
ports:
- '6379:6379'
```
### Phase 4: Optional Enhancements
These are not required for the initial implementation but worth considering for follow-up:
1. **Bull Board integration** — Add a `/api/jobs/dashboard` route that serves Bull Board UI for monitoring. Gate behind an admin auth check.
2. **Separate worker process** — Add an `apps/worker` entry point that runs BullMQ workers without the web server, for deployments that want to isolate job processing from request handling.
3. **Graceful shutdown** — Register `SIGTERM`/`SIGINT` handlers to call `worker.close()` and `queue.close()` for clean shutdown.
4. **BackgroundJob table integration** — Optionally continue writing to the `BackgroundJob` Prisma table for audit/history, using BullMQ events (`completed`, `failed`) to update status. This preserves the existing database-level visibility.
---
## Files to Create/Modify
| File | Action | Description |
| ------------------------------------ | ---------- | ---------------------------------------- |
| `packages/lib/jobs/client/bullmq.ts` | **Create** | BullMQ provider implementation |
| `packages/lib/jobs/client/client.ts` | Modify | Add `'bullmq'` provider case |
| `packages/tsconfig/process-env.d.ts` | Modify | Add type for `'bullmq'` + Redis env vars |
| `.env.example` | Modify | Add Redis config example |
| `turbo.json` | Modify | Add Redis env var to cache keys |
| `packages/lib/package.json` | Modify | Add `bullmq` + `ioredis` dependencies |
| `docker-compose.yml` | Modify | Add Redis service |
---
## Open Questions
1. **Should the BullMQ provider also write to the `BackgroundJob` Prisma table?** This would maintain audit history and allow existing admin tooling to query job status. Trade-off is dual-write complexity.
2. **Redis connection resilience**: Should the provider gracefully degrade if Redis is unavailable (e.g., fall back to Local provider), or fail hard? Failing hard is simpler and more predictable.
## Resolved Questions
- **`io.wait()`**: Not a concern. Only Inngest implements it (via `step.sleep`), the Local provider throws "Not implemented", and no job handler calls `io.wait()`. The BullMQ provider can throw "Not implemented" identically to the Local provider.
@@ -0,0 +1,519 @@
---
date: 2026-02-10
title: Envelope Expiration
---
## Summary
Envelopes (documents sent for signing) should automatically expire after a configurable period, preventing recipients from completing stale documents. Expiration is tracked **per-recipient** — when a recipient's signing window lapses, the document owner is notified and can resend (extending the deadline) or cancel. The document itself stays PENDING so other recipients can continue signing.
**Settings cascade**: Organisation → Team → Document (each level can override the prior).
**Default**: 1 month from when the envelope is sent (transitions to PENDING).
---
## 1. Database Schema Changes
### 1.1 Expiration period data shape
Store expiration as a structured JSON object rather than an enum or raw milliseconds. This avoids the enum treadmill (adding `FOUR_MONTHS` later requires a migration) while keeping values validated and meaningful.
**Zod schema** (defined in `packages/lib/constants/envelope-expiration.ts`):
```typescript
export const ZEnvelopeExpirationPeriod = z.union([
z.object({ unit: z.enum(['day', 'week', 'month', 'year']), amount: z.number().int().min(1) }),
z.object({ disabled: z.literal(true) }),
]);
export type TEnvelopeExpirationPeriod = z.infer<typeof ZEnvelopeExpirationPeriod>;
```
Semantics:
- `null` on `DocumentMeta` / `TeamGlobalSettings` = inherit from parent
- `{ disabled: true }` = explicitly never expires
- `{ unit: 'month', amount: 1 }` = expires in 1 month
No Prisma enum is needed — the period is stored as `Json?` on the relevant models (see sections 1.3 and 1.4).
### 1.2 Add expiration fields to `Recipient`
```prisma
model Recipient {
// ... existing fields
expiresAt DateTime?
expirationNotifiedAt DateTime? // null = not yet notified; set when owner notification sent
@@index([expiresAt])
}
```
`expiresAt` is a computed timestamp set when the envelope transitions to PENDING (at send time). It is calculated from the effective expiration period. Storing the concrete timestamp rather than a relative duration means:
- Sweep queries are simple (`WHERE expiresAt <= NOW() AND expirationNotifiedAt IS NULL`)
- No need to re-resolve the settings cascade at query time
- The sender can see the exact deadline in the UI
- The index on `expiresAt` ensures the expiration sweep query is efficient
`expirationNotifiedAt` tracks whether the owner has already been notified about this recipient's expiration, making the notification job idempotent.
### 1.3 Add expiration period to settings models
**OrganisationGlobalSettings** (JSON, application-level default):
```prisma
model OrganisationGlobalSettings {
// ... existing fields
envelopeExpirationPeriod Json?
}
```
Prisma `@default` doesn't work for `Json` columns, so the application-level default (`{ unit: 'month', amount: 1 }`) is applied in `extractDerivedTeamSettings` / `extractDerivedDocumentMeta` when the value is null. The migration should backfill existing rows with `{ "unit": "month", "amount": 1 }`.
**TeamGlobalSettings** (nullable, null = inherit from org):
```prisma
model TeamGlobalSettings {
// ... existing fields
envelopeExpirationPeriod Json?
}
```
### 1.4 Add expiration period to DocumentMeta
This allows per-document override during the document editing flow:
```prisma
model DocumentMeta {
// ... existing fields
envelopeExpirationPeriod Json?
}
```
When null on DocumentMeta, the resolved team/org setting is used at send time. Validated at write time using `ZEnvelopeExpirationPeriod.nullable()`.
**Important**: `envelopeExpirationPeriod` on `DocumentMeta` is a user-facing preference that may be set during the draft editing flow. It does NOT determine the final expiration — that is resolved at send time (see section 2.3). The value stored here is just the user's selection in the document editor.
---
## 2. Expiration Period Resolution
### 2.1 Duration mapping
Add to `packages/lib/constants/envelope-expiration.ts` alongside the Zod schema:
```typescript
import { Duration } from 'luxon';
const UNIT_TO_LUXON_KEY: Record<TEnvelopeExpirationPeriod['unit'], string> = {
day: 'days',
week: 'weeks',
month: 'months',
year: 'years',
};
export const DEFAULT_ENVELOPE_EXPIRATION_PERIOD: TEnvelopeExpirationPeriod = {
unit: 'month',
amount: 1,
};
export const getEnvelopeExpirationDuration = (period: TEnvelopeExpirationPeriod): Duration => {
return Duration.fromObject({ [UNIT_TO_LUXON_KEY[period.unit]]: period.amount });
};
```
### 2.2 Settings cascade integration
`extractDerivedTeamSettings()` in `packages/lib/utils/teams.ts` needs **no code changes** — it iterates `Object.keys(derivedSettings)` and overrides with non-null team values at runtime. The new `envelopeExpirationPeriod` field on both `OrganisationGlobalSettings` and `TeamGlobalSettings` will be automatically picked up.
Update `extractDerivedDocumentMeta()` in `packages/lib/utils/document.ts` to include the new field:
```typescript
envelopeExpirationPeriod: meta.envelopeExpirationPeriod ?? settings.envelopeExpirationPeriod,
```
### 2.3 Compute `expiresAt` at send time
The expiration period is **locked at send time** — when the envelope transitions to PENDING. The concrete `expiresAt` timestamp is computed for each recipient when the document is actually sent.
In `packages/lib/server-only/document/send-document.ts`:
```typescript
// Resolve effective period: document meta -> team/org settings -> default
const rawPeriod =
envelope.documentMeta?.envelopeExpirationPeriod ?? settings.envelopeExpirationPeriod;
const expiresAt = resolveExpiresAt(rawPeriod);
// Inside the $transaction, for each recipient:
await tx.recipient.updateMany({
where: { envelopeId: envelope.id },
data: { expiresAt },
});
```
### 2.4 Compute `expiresAt` in the direct template flow
`create-document-from-direct-template.ts` creates envelopes directly as PENDING and then calls `sendDocument` afterward. Since `sendDocument` handles setting `expiresAt` on recipients, the direct template flow doesn't need to set it directly — `sendDocument` handles it.
---
## 3. Cron Job Infrastructure (New)
The current job system is purely event-triggered. Inngest natively supports cron-triggered functions, but the local provider (used in dev and by self-hosters who don't want a third-party dependency) has no scheduling capability. This section adds cron support to the local provider to maintain feature parity.
### 3.1 Extend `JobDefinition` with cron support
Add an optional `cron` field to the trigger type in `packages/lib/jobs/client/_internal/job.ts`:
```typescript
export type JobDefinition<Name extends string = string, Schema = any> = {
id: string;
name: string;
version: string;
enabled?: boolean;
optimizeParallelism?: boolean;
trigger: {
name: Name;
schema?: z.ZodType<Schema>;
/** Cron expression (e.g. "* * * * *"). When set, the job runs on a schedule. */
cron?: string;
};
handler: (options: { payload: Schema; io: JobRunIO }) => Promise<Json | void>;
};
```
### 3.2 Inngest provider: wire up native cron
In `packages/lib/jobs/client/inngest.ts`, when defining a function, check for `cron`:
```typescript
defineJob(job) {
if (job.trigger.cron) {
this._functions.push(
this._client.createFunction(
{ id: job.id, name: job.name },
{ cron: job.trigger.cron },
async ({ step, logger }) => {
const io = convertInngestIoToJobRunIo(step, logger, this);
await job.handler({ payload: {} as any, io });
},
),
);
} else {
// Existing event-triggered logic (unchanged)
}
}
```
### 3.3 Local provider: poller + deterministic `BackgroundJob` IDs
Use the existing `BackgroundJob` table for multi-instance dedupe instead of advisory locks. This approach keeps implementation Prisma-only (no raw SQL), works for single-instance and multi-instance deployments, and preserves existing retry/visibility behavior.
**On `defineJob()`**: If the job has a `cron` field, register an in-process scheduler entry and start a lightweight poller (every 30s with jitter).
**Each poll tick**:
1. Evaluate whether the cron schedule has one or more due run slots since the last tick (use a real cron parser, e.g. `cron-parser`)
2. For each due slot, build a deterministic run ID from job ID + scheduled slot time
3. Create a `BackgroundJob` row with that deterministic ID using Prisma
4. If insert succeeds → enqueue via the existing local job pipeline
5. If insert fails with Prisma `P2002` (unique violation) → another node already enqueued that run, skip
### 3.4 Summary of changes to the job system
| File | Change |
| ------------------------------------------- | ---------------------------------------------------------------- |
| `packages/lib/jobs/client/_internal/job.ts` | Add optional `cron` field to `trigger` type |
| `packages/lib/jobs/client/local.ts` | Add cron poller + deterministic `BackgroundJob.id` dedupe |
| `packages/lib/jobs/client/inngest.ts` | Wire up `{ cron: ... }` in `createFunction` for cron jobs |
| `packages/lib/jobs/client/_internal/*` | Add cron helper utilities (`getDueCronSlots`, run ID generation) |
---
## 4. Expiration Processing
### 4.1 Two-job architecture
Expiration uses two jobs: a **sweep dispatcher** that runs on a cron schedule and finds expired recipients, and an **individual notification job** that handles the audit log, owner notification email, and webhook for a single recipient. This separation means:
- The sweep is lightweight and fast (just a query + N job triggers)
- Each recipient's expiration notification is independently retryable
- The individual jobs are idempotent — they check `expirationNotifiedAt IS NULL` before processing
### 4.2 Sweep job: `EXPIRE_RECIPIENTS_SWEEP_JOB`
A cron-triggered job that runs every minute to find and dispatch notifications for expired recipients.
**Definition:** `packages/lib/jobs/definitions/internal/expire-recipients-sweep.ts`
**Handler:** `packages/lib/jobs/definitions/internal/expire-recipients-sweep.handler.ts`
```typescript
const expiredRecipients = await prisma.recipient.findMany({
where: {
expiresAt: { lte: new Date() },
expirationNotifiedAt: null,
signingStatus: { notIn: [SigningStatus.SIGNED, SigningStatus.REJECTED] },
envelope: { status: DocumentStatus.PENDING },
},
select: { id: true },
take: 100,
});
for (const recipient of expiredRecipients) {
await jobs.triggerJob({
name: 'internal.notify-recipient-expired',
payload: { recipientId: recipient.id },
});
}
```
### 4.3 Individual notification job: `NOTIFY_RECIPIENT_EXPIRED_JOB`
An event-triggered job that handles a single recipient's expiration.
**Definition:** `packages/lib/jobs/definitions/internal/notify-recipient-expired.ts`
**Handler:** `packages/lib/jobs/definitions/internal/notify-recipient-expired.handler.ts`
The handler:
1. Fetches the recipient (with guard: `expirationNotifiedAt IS NULL` + not signed/rejected)
2. Sets `recipient.expirationNotifiedAt = now()` (idempotency)
3. Creates audit log entry with `DOCUMENT_RECIPIENT_EXPIRED` type
4. Sends email notification to the **document owner** (inline — no separate email job)
5. The document stays PENDING — the owner decides whether to resend or cancel
### 4.4 Register in job client
Add `EXPIRE_RECIPIENTS_SWEEP_JOB_DEFINITION` and `NOTIFY_RECIPIENT_EXPIRED_JOB_DEFINITION` to the job registry in `packages/lib/jobs/client.ts`.
### 4.5 Email template: Recipient Expired
Target the **document owner**:
- Subject: `Signing window expired for "{recipientName}" on "{documentTitle}"`
- Body: "The signing window for {recipientName} ({recipientEmail}) on document {title} has expired. You can resend the document to extend their deadline or cancel the document."
- Include a "View Document" link to the document page in the app
Template files:
- `packages/email/templates/recipient-expired.tsx` — wrapper
- `packages/email/template-components/template-recipient-expired.tsx` — body
### 4.6 Recipient signing guard
In the signing flow, check `recipient.expiresAt` before allowing any signing action. Note that the document stays PENDING even after recipient expiration, so the existing `status !== PENDING` guard does not block expired recipients — an explicit expiration check is required:
```typescript
if (recipient.expiresAt && recipient.expiresAt <= new Date()) {
throw new AppError(AppErrorCode.RECIPIENT_EXPIRED, {
message: 'Recipient signing window has expired',
});
}
```
**Files to update:**
- `packages/lib/server-only/document/complete-document-with-token.ts`
- `packages/lib/server-only/field/sign-field-with-token.ts`
- `packages/lib/server-only/field/remove-signed-field-with-token.ts`
- `packages/lib/server-only/document/reject-document-with-token.ts`
---
## 5. UI Design
### 5.1 Expiration Period Selector Component
Use a number input + unit selector combo. This gives organisations full flexibility to configure any duration without needing schema changes for new options.
**Layout**: A horizontal group with:
- A number `<Input>` (min 1, integer)
- A `<Select>` for the unit (`day`, `week`, `month`, `year`)
- A "Never expires" toggle/checkbox that disables the duration inputs and sets the value to `{ disabled: true }`
At the team level, include an "Inherit from organisation" option that clears the value to `null`.
**Validation**: Use `ZEnvelopeExpirationPeriod` for form validation.
### 5.2 Organisation Settings → Document Preferences
Add a "Default Envelope Expiration" field to the `DocumentPreferencesForm` component. At the org level, there is no "Inherit" option — it must have a concrete value (default: `{ unit: 'month', amount: 1 }`).
### 5.3 Team Settings → Document Preferences
Same field as org, but with the additional "Inherit from organisation" option (stored as `null`).
### 5.4 Document Editor → Settings Step
Add the expiration selector to `packages/ui/primitives/document-flow/add-settings.tsx` inside the "Advanced Options" accordion.
Label: **"Expiration"**
Description: _"How long recipients have to complete this document after it is sent."_
### 5.5 Recipient Signing Page — Expired State
When a recipient visits a signing link for an expired recipient:
- Redirect to `/sign/{token}/expired`
- Show a clear, non-alarming message: "Your signing window has expired. Please contact the sender for a new invitation."
- Do not show the signing form or fields
- The `isExpired` flag in `get-envelope-for-recipient-signing.ts` is derived from `recipient.expiresAt`
### 5.6 Embed Signing — Expired State
Embed signing routes handle recipient expiration by throwing `embed-recipient-expired`:
- `apps/remix/app/routes/embed+/_v0+/sign.$token.tsx` — both V1 and V2 loaders check expiration
- The embed error boundary renders an `EmbedRecipientExpired` component
- Direct templates (`direct.$token.tsx`) create fresh recipients so `isExpired` is always `false`
---
## 6. API / TRPC Changes
### 6.1 Update settings mutation schemas
- `packages/trpc/server/organisation-router/update-organisation-settings.types.ts` — add `envelopeExpirationPeriod: ZEnvelopeExpirationPeriod` (non-nullable at org level)
- `packages/trpc/server/team-router/update-team-settings.types.ts` — add `envelopeExpirationPeriod: ZEnvelopeExpirationPeriod.nullable()` (null = inherit from org)
### 6.2 Update document mutation schemas
- `packages/lib/types/document-meta.ts` — add `envelopeExpirationPeriod: ZEnvelopeExpirationPeriod.nullable()` to the meta schema
- `packages/trpc/server/document-router/create-document.types.ts` — include in meta
- `packages/trpc/server/document-router/update-document.types.ts` — include in meta
- `packages/trpc/server/document-router/distribute-document.types.ts` — include in meta
### 6.3 Expose `expiresAt` in recipient responses
Ensure `expiresAt` and `expirationNotifiedAt` are returned when fetching recipients/documents so the UI can display expiration status.
### 6.4 Webhook / API schema updates
- Recipient schema includes `expiresAt` and `expirationNotifiedAt` fields (replacing the old `expired` field)
- Update `packages/api/v1/schema.ts`, webhook payload types, zapier integration, and sample data generators
---
## 7. Edge Cases & Considerations
### 7.1 Already-sent documents
The migration should NOT retroactively expire existing recipients. `expiresAt` will be null for all existing recipients, meaning they never expire (backward-compatible).
### 7.2 Re-sending / redistributing
When `redistribute` is called on a PENDING document, `expiresAt` should be refreshed on all eligible recipients. Redistributing signals active intent, so the clock should restart.
**Implementation**: `resendDocument` refreshes `recipient.expiresAt` for all recipients that haven't signed/rejected yet.
### 7.3 Multi-recipient partial expiration
If some recipients have signed and others expire, the document stays PENDING. This is the key advantage over document-level expiration — the owner can resend to extend the expired recipients' deadlines without affecting those who've already signed.
### 7.4 Partial completion
Partial signatures are preserved. The document is not sealed/completed until all required recipients have signed (or the owner cancels).
### 7.5 Timezone handling
`expiresAt` is stored as UTC. Display in the sender's configured timezone.
### 7.6 Race condition: signing at expiration time
The signing guard checks `recipient.expiresAt` in application code before the signing operation. The notification job's guard (`expirationNotifiedAt IS NULL` + `signingStatus NOT IN (SIGNED, REJECTED)`) prevents double-notifications. If a recipient signs just before expiration, the sweep's `signingStatus` filter skips them.
### 7.7 Direct template flow
`create-document-from-direct-template.ts` creates envelopes directly as PENDING then calls `sendDocument`. Since `sendDocument` sets `recipient.expiresAt`, no special handling is needed in the direct template flow.
---
## 8. Migration Plan
1. Add Prisma schema changes (`expiresAt` + `expirationNotifiedAt` on Recipient, `Json?` fields on settings models, index)
2. Generate and run migration
3. Backfill: set `envelopeExpirationPeriod` to `{ "unit": "month", "amount": 1 }` on all existing `OrganisationGlobalSettings` rows
4. No backfill on `Recipient.expiresAt` — existing recipients keep null (never expire)
5. Deploy backend changes (jobs, guards, email template)
6. Deploy frontend changes (settings UI, document editor, signing page, embeds)
---
## 9. Files to Create or Modify
### New Files
- `packages/lib/constants/envelope-expiration.ts``ZEnvelopeExpirationPeriod` schema, types, `DEFAULT_ENVELOPE_EXPIRATION_PERIOD`, `getEnvelopeExpirationDuration()`, `resolveExpiresAt()` helper
- `packages/lib/jobs/definitions/internal/expire-recipients-sweep.ts` — cron sweep job definition
- `packages/lib/jobs/definitions/internal/expire-recipients-sweep.handler.ts` — cron sweep handler
- `packages/lib/jobs/definitions/internal/notify-recipient-expired.ts` — individual notification job definition
- `packages/lib/jobs/definitions/internal/notify-recipient-expired.handler.ts` — notification handler (includes inline email sending)
- `packages/email/templates/recipient-expired.tsx` — email template wrapper
- `packages/email/template-components/template-recipient-expired.tsx` — email template body
- `apps/remix/app/components/embed/embed-recipient-expired.tsx` — embed expired component
### Modified Files
**Job system (cron infrastructure):**
- `packages/lib/jobs/client/_internal/job.ts` — add optional `cron` field to `trigger` type
- `packages/lib/jobs/client/local.ts` — add cron poller + deterministic `BackgroundJob.id` dedupe
- `packages/lib/jobs/client/inngest.ts` — wire up `{ cron: ... }` in `createFunction`
- `packages/lib/jobs/client/_internal/*` — add cron helper utilities (slot calc + run ID)
- `packages/lib/jobs/client.ts` — register new jobs
**Schema & data layer:**
- `packages/prisma/schema.prisma` — model changes + index
- `packages/lib/utils/document.ts``extractDerivedDocumentMeta` (add `envelopeExpirationPeriod`)
- `packages/lib/server-only/document/send-document.ts` — resolve settings + compute and set `recipient.expiresAt`
- `packages/lib/server-only/template/create-document-from-direct-template.ts` — no changes (sendDocument handles it)
- `packages/lib/server-only/document/resend-document.ts` — refresh `recipient.expiresAt` on redistribute
- `packages/lib/server-only/document/complete-document-with-token.ts` — recipient expiration guard
- `packages/lib/server-only/field/sign-field-with-token.ts` — recipient expiration guard
- `packages/lib/server-only/field/remove-signed-field-with-token.ts` — recipient expiration guard
- `packages/lib/server-only/document/reject-document-with-token.ts` — recipient expiration guard
**Error handling:**
- `packages/lib/errors/app-error.ts` — add `RECIPIENT_EXPIRED` error code
**Audit logs:**
- `packages/lib/types/document-audit-logs.ts` — add `DOCUMENT_RECIPIENT_EXPIRED` type with `recipientEmail`/`recipientName` data fields
- `packages/lib/utils/document-audit-logs.ts` — add human-readable rendering for `DOCUMENT_RECIPIENT_EXPIRED`
**Signing page:**
- `packages/lib/server-only/envelope/get-envelope-for-recipient-signing.ts` — derive `isExpired` from `recipient.expiresAt`
- `apps/remix/app/routes/_recipient+/sign.$token+/_index.tsx` — keep redirect to expired page using `isExpired`
**Embeds:**
- `apps/remix/app/routes/embed+/_v0+/sign.$token.tsx` — check recipient expiration in V1/V2 loaders
- `apps/remix/app/routes/embed+/_v0+/_layout.tsx` — handle `embed-recipient-expired` in error boundary
**Webhook / API:**
- `packages/lib/types/recipient.ts` — add `expiresAt`/`expirationNotifiedAt` to recipient type
- `packages/lib/types/webhook-payload.ts` — add `expiresAt`/`expirationNotifiedAt` to webhook recipient
- `packages/lib/server-only/webhooks/trigger/generate-sample-data.ts` — update sample data
- `packages/lib/server-only/webhooks/zapier/list-documents.ts` — update zapier recipient shape
- `packages/api/v1/schema.ts` — add `expiresAt` to API recipient schema
**TRPC / settings:**
- `packages/trpc/server/organisation-router/update-organisation-settings.types.ts`
- `packages/trpc/server/team-router/update-team-settings.types.ts`
- `packages/lib/types/document-meta.ts`
**UI:**
- `apps/remix/app/components/forms/document-preferences-form.tsx` — add expiration period picker
- `packages/ui/primitives/document-flow/add-settings.tsx` — add expiration field
- `packages/ui/primitives/document-flow/add-settings.types.ts` — add to schema
@@ -0,0 +1,76 @@
---
date: 2026-01-26
title: Validate Signer Fields On Distribute
---
## Summary
Validate that signers have at least one signature field before allowing document/envelope distribution via API, matching the existing UI behavior.
## Background
The API originally allowed distributing documents/envelopes without validating that signers had signature fields assigned. This was intentional - we thought API users might have specific flows where this flexibility was needed.
However, after running it this way for a while, we've observed that more often than not, API users inadvertently send documents without fields assigned. This causes confusion for their recipients (who receive a document with nothing to sign) and breaks their own systems expecting a completed signing flow.
## Problem
The API allowed distributing documents/envelopes even when signers had no signature fields assigned. This was inconsistent with the UI which validates this condition before allowing distribution.
## Solution
### 1. Create centralized validation helper
**File**: `packages/lib/utils/recipients.ts`
- Added `RECIPIENT_ROLES_THAT_REQUIRE_FIELDS` constant (currently only `SIGNER`)
- Added `getRecipientsWithMissingFields()` function that returns recipients missing required fields
- Uses existing `isSignatureFieldType` guard from `packages/prisma/guards/is-signature-field.ts`
### 2. Add server-side validation
**File**: `packages/lib/server-only/document/send-document.ts`
- Added validation check that throws `AppError` with `INVALID_REQUEST` code when signers are missing signature fields
- This blocks both v1 and v2 API distribution endpoints since they both use `sendDocument()`
### 3. Fix v1 API error handling
**File**: `packages/api/v1/implementation.ts`
- Changed `sendDocument` endpoint to use `AppError.toRestAPIError(err)` instead of always returning 500
- Now returns 400 for validation errors
### 4. Update UI to use shared helper
**Files**:
- `apps/remix/app/components/dialogs/envelope-distribute-dialog.tsx`
- `packages/ui/primitives/document-flow/add-fields.tsx`
### 5. Consolidate `hasSignatureField` checks
Updated to use `isSignatureFieldType` guard (checks both `SIGNATURE` and `FREE_SIGNATURE`):
- `apps/remix/app/components/general/document-signing/document-signing-form.tsx`
- `apps/remix/app/components/general/envelope-signing/envelope-signer-form.tsx`
- `apps/remix/app/components/embed/multisign/multi-sign-document-signing-view.tsx`
- `apps/remix/app/components/embed/embed-direct-template-client-page.tsx`
- `apps/remix/app/components/embed/embed-document-signing-page-v1.tsx`
### 6. Add E2E tests
**Files**:
- `packages/app-tests/e2e/api/v1/document-sending.spec.ts` - 5 new tests
- `packages/app-tests/e2e/api/v2/distribute-validation.spec.ts` - 8 new tests
## Test Coverage
- Distribution fails when signer has no fields
- Distribution fails when signer has only non-signature fields
- Distribution succeeds with SIGNATURE field
- Distribution succeeds with FREE_SIGNATURE field (v1 only via Prisma)
- Distribution succeeds when VIEWER/CC/APPROVER have no fields
- Distribution fails when one of multiple signers is missing signature field
- Distribution succeeds when all signers have signature fields
@@ -0,0 +1,151 @@
---
date: 2026-03-04
title: Swap Subscription Between Orgs
---
## Overview
Add the ability for admins to move a subscription (and its associated Stripe customerId) from one organisation to another, when viewing a user in the admin panel. The target org must be owned by the same user and must be on the free plan (no existing active subscription).
## Context & Data Model
- `Organisation` has a 1:1 optional `Subscription` and a `customerId` (Stripe customer ID, `@unique`)
- `Organisation` has a 1:1 `OrganisationClaim` that tracks entitlements (team count, member count, feature flags)
- `Subscription` also stores a redundant `customerId` and has `organisationId` (`@unique`)
- When a subscription is removed from an org, its `OrganisationClaim` should be reset to the FREE claim
- Relationship chain: `User --owns--> Organisation --has--> Subscription + OrganisationClaim`
## Constraints
- **paid → free only**: The target org must NOT have an active subscription (status ACTIVE or PAST_DUE). It must be on the free plan.
- **same owner**: Both source and target orgs must be owned by the same user (the user being viewed).
- The `customerId` must move with the subscription to the target org (cleared from source, set on target).
- The Stripe subscription object itself is NOT modified — only the DB-level mapping changes. The Stripe customer stays the same; we just reassociate it to a different org.
## Implementation Plan
### 1. Backend: TRPC Admin Route
**Files to create:**
- `packages/trpc/server/admin-router/swap-organisation-subscription.types.ts`
- `packages/trpc/server/admin-router/swap-organisation-subscription.ts`
**Request schema (`ZSwapOrganisationSubscriptionRequestSchema`):**
```ts
z.object({
sourceOrganisationId: z.string(),
targetOrganisationId: z.string(),
});
```
**Response schema:** `z.void()`
**Route logic (in a single `prisma.$transaction`):**
1. Fetch source org with `subscription` + `organisationClaim`
2. Fetch target org with `subscription` + `organisationClaim`
3. Validate:
- Source org has an active subscription (status `ACTIVE` or `PAST_DUE`)
- Target org does NOT have an active subscription (no subscription record, or status `INACTIVE`)
- Both orgs have the same `ownerUserId`
4. In a transaction:
a. Clear `customerId` on source org (set to `null`)
b. Set `customerId` on target org to the source's `customerId`
c. Move the `Subscription` record: update `organisationId` to target org ID
d. Copy the source org's `OrganisationClaim` entitlements to the target org's `OrganisationClaim` (`originalSubscriptionClaimId`, `teamCount`, `memberCount`, `envelopeItemCount`, `flags`)
e. Reset the source org's `OrganisationClaim` to the FREE claim (using `createOrganisationClaimUpsertData(internalClaims[INTERNAL_CLAIM_ID.FREE])` pattern from `on-subscription-deleted.ts`)
**Note on ordering:** Because `Organisation.customerId` is `@unique`, we must clear the source first, then set the target — or do both in a transaction that handles the constraint. Prisma transactions handle this correctly as they apply all writes atomically.
**Register the route:**
- Import in `packages/trpc/server/admin-router/router.ts`
- Add under `organisation` as `swapSubscription`
- Call path: `trpc.admin.organisation.swapSubscription`
### 2. Frontend: Dialog Component
**File to create:**
- `apps/remix/app/components/dialogs/admin-swap-subscription-dialog.tsx`
**Props:**
```ts
type AdminSwapSubscriptionDialogProps = {
trigger?: React.ReactNode;
sourceOrganisationId: string;
sourceOrganisationName: string;
userId: number;
} & Omit<DialogPrimitive.DialogProps, 'children'>;
```
**Dialog behavior:**
1. Opens when the trigger is clicked (from the organisations table actions dropdown)
2. Fetches the user's owned orgs via `trpc.admin.organisation.find.useQuery({ ownerUserId: userId })`
3. Filters to only show orgs that are on the free plan (no active subscription) and excludes the source org
4. Displays a select dropdown to pick the target org
5. Shows a warning alert: "This will move the subscription from {source} to {target}. The source organisation will be reset to the free plan."
6. On submit, calls `trpc.admin.organisation.swapSubscription.useMutation()`
7. On success, shows a toast, invalidates relevant queries, and closes the dialog
**UI layout (following existing dialog patterns like `admin-organisation-create-dialog.tsx`):**
- `DialogHeader` with title "Move Subscription" and description
- A select dropdown listing eligible target orgs (name + url)
- An `Alert` explaining what will happen
- `DialogFooter` with Cancel + "Move Subscription" buttons (submit button uses `loading` prop)
### 3. Frontend: Wire into the Organisations Table
**File to modify:**
- `apps/remix/app/components/tables/admin-organisations-table.tsx`
**Changes:**
- Import the `AdminSwapSubscriptionDialog`
- Add a new prop `ownerUserId?: number` to `AdminOrganisationsTableOptions` (needed so the dialog can query other owned orgs)
- Add a new dropdown menu item in the actions column: "Move Subscription" with `ArrowRightLeftIcon` from lucide
- Only render this item when the org row has an active subscription (`subscription?.status === 'ACTIVE' || subscription?.status === 'PAST_DUE'`)
- The menu item renders inside `AdminSwapSubscriptionDialog` with `trigger` prop as the menu item
### 4. Frontend: Pass userId from User Detail Page
**File to modify:**
- `apps/remix/app/routes/_authenticated+/admin+/users.$id.tsx`
**Changes:**
- Pass `ownerUserId={user.id}` to `<AdminOrganisationsTable>` so it can forward this to the swap dialog
## File Change Summary
| File | Action | Description |
| --------------------------------------------------------------------------- | ---------- | ---------------------------------------------------------- |
| `packages/trpc/server/admin-router/swap-organisation-subscription.types.ts` | **Create** | Request/response Zod schemas + TS types |
| `packages/trpc/server/admin-router/swap-organisation-subscription.ts` | **Create** | Admin mutation with prisma transaction |
| `packages/trpc/server/admin-router/router.ts` | **Modify** | Register route at `organisation.swapSubscription` |
| `apps/remix/app/components/dialogs/admin-swap-subscription-dialog.tsx` | **Create** | Dialog for selecting target org |
| `apps/remix/app/components/tables/admin-organisations-table.tsx` | **Modify** | Add "Move Subscription" action + accept `ownerUserId` prop |
| `apps/remix/app/routes/_authenticated+/admin+/users.$id.tsx` | **Modify** | Pass `ownerUserId={user.id}` to table |
## Edge Cases & Considerations
1. **Stripe customer stays the same**: The Stripe subscription is tied to a Stripe customer. We move the `customerId` to the target org, so webhook lookups (`findFirst where customerId`) will correctly resolve to the target org going forward.
2. **`@unique` constraint on `Organisation.customerId`**: Must clear source before setting target within the transaction. Prisma interactive transactions handle this correctly.
3. **`@unique` constraint on `Subscription.organisationId`**: Since the target org should not have a subscription record, updating the existing subscription's `organisationId` to the target should work. If the target has an INACTIVE subscription record, we need to delete it first.
4. **Target org has INACTIVE subscription**: The target org might have a stale INACTIVE subscription from a previous cancellation. In this case, delete the target's old subscription record before moving the source's subscription over.
5. **Seat-based plans**: If the subscription is seat-based, the Stripe quantity may not match the target org's member count. Consider calling `syncMemberCountWithStripeSeatPlan` after the swap as a post-transaction step.
6. **OrganisationClaim transfer**: Copy `originalSubscriptionClaimId`, `teamCount`, `memberCount`, `envelopeItemCount`, and `flags` from source claim to target claim. Reset source claim to FREE.
7. **No Stripe API calls needed**: This is purely a DB-level reassociation. The Stripe subscription, customer, and payment method all remain unchanged.
@@ -0,0 +1,168 @@
---
date: 2026-02-11
title: Cert Page Width Mismatch
---
## Problem
Certificate and audit log pages are generated with hardcoded A4 dimensions (`PDF_SIZE_A4_72PPI`: 595×842) regardless of the actual document page sizes. When the source document uses a different page size (e.g., Letter, Legal, or custom dimensions), the certificate/audit log pages end up with a different width than the document pages. This causes problems with courts that expect uniform page dimensions throughout a PDF.
**Both width and height must match** the last page of the document so the entire PDF prints uniformly.
**Root cause**: In `seal-document.handler.ts` (lines 186-187), the certificate payload always uses:
```ts
pageWidth: PDF_SIZE_A4_72PPI.width, // 595
pageHeight: PDF_SIZE_A4_72PPI.height, // 842
```
These hardcoded values flow into `generateCertificatePdf`, `generateAuditLogPdf`, `renderCertificate`, and `renderAuditLogs` — all of which use `pageWidth`/`pageHeight` to set Konva stage dimensions and layout content.
## Key Files
| File | Role |
| ----------------------------------------------------------------------- | ------------------------------------------------------------------------------------- |
| `packages/lib/jobs/definitions/internal/seal-document.handler.ts` | Orchestrates sealing; passes page dimensions to cert/audit generators |
| `packages/lib/constants/pdf.ts` | Defines `PDF_SIZE_A4_72PPI` (595×842) |
| `packages/lib/server-only/pdf/generate-certificate-pdf.ts` | Generates certificate PDF; accepts `pageWidth`/`pageHeight` |
| `packages/lib/server-only/pdf/generate-audit-log-pdf.ts` | Generates audit log PDF; accepts `pageWidth`/`pageHeight` |
| `packages/lib/server-only/pdf/render-certificate.ts` | Renders certificate pages via Konva; uses `pageWidth`/`pageHeight` for stage + layout |
| `packages/lib/server-only/pdf/render-audit-logs.ts` | Renders audit log pages via Konva; uses `pageWidth`/`pageHeight` for stage + layout |
| `packages/lib/server-only/pdf/get-page-size.ts` | Existing utility — extend with `@libpdf/core` version |
| `packages/trpc/server/document-router/download-document-certificate.ts` | Standalone certificate download (also hardcodes A4) |
| `packages/trpc/server/document-router/download-document-audit-logs.ts` | Standalone audit log download (also hardcodes A4) |
## Architecture
### Current Flow
1. **One cert PDF + one audit log PDF** generated per envelope with hardcoded A4 dims
2. Both appended to **every** envelope item (document) via `decorateAndSignPdf``pdfDoc.copyPagesFrom()`
3. The audit log is envelope-level (all recipients, all events across all docs) — one per envelope, not per document
### Multi-Document Envelopes
- V1 envelopes: single document only
- V2 envelopes: support multiple documents (envelope items)
- Each envelope item gets both cert + audit log pages appended to it
- If documents have different page sizes → need size-matched cert/audit for each
### Reading Page Dimensions (`@libpdf/core` only)
Use `@libpdf/core`'s `PDF` class — NOT `@cantoo/pdf-lib`:
```ts
const pdfDoc = await PDF.load(pdfData);
const lastPage = pdfDoc.getPage(pdfDoc.getPageCount() - 1);
const { width, height } = lastPage; // e.g. 612, 792 for Letter
```
Already used this way in `seal-document.handler.ts` lines 403-410 for V2 field insertion.
"Last page" = last page of the original document, before cert/audit pages are appended.
### Content Layout Adaptation
Both renderers already handle variable dimensions gracefully:
- **Width**: `render-certificate.ts:713` / `render-audit-logs.ts:588``Math.min(pageWidth - minimumMargin * 2, contentMaxWidth)` with `contentMaxWidth = 768`. Wider pages get more margin, narrower pages tighter margins.
- **Height**: Both renderers paginate content into pages using `groupRowsIntoPages()` which respects `pageHeight` via `maxTableHeight = pageHeight - pageTopMargin - pageBottomMargin`. Shorter pages just mean more pages; taller pages fit more rows per page.
### Playwright PDF Path — Out of Scope
The `NEXT_PRIVATE_USE_PLAYWRIGHT_PDF` toggle enables a deprecated Playwright-based PDF generation path (`get-certificate-pdf.ts`, `get-audit-logs-pdf.ts`) that also hardcodes `format: 'A4'` in `page.pdf()`. This path is **not being updated** as part of this fix:
- Both files are marked `@deprecated`
- The Konva-based path is the default and recommended path
- The Playwright path is behind a feature flag and will be removed
No changes needed. Add a code comment noting the A4 limitation if the Playwright path is ever re-enabled.
## Plan
### 1. Extend `get-page-size.ts` with `@libpdf/core` utility
Add a `getLastPageDimensions` function to the existing `packages/lib/server-only/pdf/get-page-size.ts` file. This consolidates page-size logic in one place (the file already has the legacy `@cantoo/pdf-lib` version).
```ts
export const getLastPageDimensions = (pdfDoc: PDF): { width: number; height: number } => {
const lastPage = pdfDoc.getPage(pdfDoc.getPageCount() - 1);
const width = Math.round(lastPage.width);
const height = Math.round(lastPage.height);
if (width < MIN_CERT_PAGE_WIDTH || height < MIN_CERT_PAGE_HEIGHT) {
return { width: PDF_SIZE_A4_72PPI.width, height: PDF_SIZE_A4_72PPI.height };
}
return { width, height };
};
```
**Dimension rounding**: `Math.round()` both width and height. PDF points at 72ppi are typically whole numbers; rounding avoids spurious float-precision mismatches (e.g., 612.0 vs 612.00001) that would cause unnecessary duplicate cert/audit PDF generation.
**Minimum page dimensions**: Enforce a minimum threshold (e.g., 300pt for both width and height). If either dimension falls below the minimum, fall back to A4 (595×842). The certificate and audit log renderers have headers, table rows, margins, and QR codes that require a minimum viable area.
### 2. Read last page dimensions from each envelope item's PDF
In `seal-document.handler.ts`, before generating cert/audit PDFs:
- For each `envelopeItem`, load the PDF and read the **last page's width and height** using `getLastPageDimensions`
- Use `PDF.load()` then pass the loaded doc to the utility
**Resealing consideration**: When `isResealing` is true, envelope items are remapped to use `initialData` (lines 152-158) before this point. Page-size extraction must operate on the same data source that `decorateAndSignPdf` will use. Since the `envelopeItems` array is already remapped by the time we read dimensions, reading from `envelopeItem.documentData` will naturally give the correct (initial) data. No special handling needed beyond ensuring the dimension read happens **after** the resealing remap.
### 3. Generate cert/audit PDFs per unique page size
Current flow generates one cert + one audit log doc per envelope. Change to:
1. Collect `{ width, height }` of the last page for each envelope item
2. Deduplicate by `"${width}x${height}"` key (using the already-rounded integers)
3. For each unique size, generate cert PDF and audit log PDF with those dimensions
4. Store in a `Map<string, { certificateDoc, auditLogDoc }>` keyed by `"${width}x${height}"`
For the common single-document case, this is one generation — same perf as today.
### 4. Thread the correct docs into `decorateAndSignPdf`
In the envelope item loop, look up the item's last-page dimensions in the map and pass the matching cert/audit docs. Signature of `decorateAndSignPdf` doesn't change — it still receives a single `certificateDoc` and `auditLogDoc`, just the right ones per item.
### 5. Update standalone download routes
`download-document-certificate.ts` and `download-document-audit-logs.ts` also hardcode A4:
- Both routes have `documentId` which maps to a specific envelope item
- Fetch **that specific document's** PDF data, load it, read last page width + height via `getLastPageDimensions`
- Pass `{ pageWidth, pageHeight }` to the generator
- This ensures the standalone download matches the dimensions the user would see in the sealed PDF for that document
### 6. Edge cases
| Scenario | Behavior |
| --------------------------------------- | ------------------------------------------------------------------------------------------- |
| Mixed page sizes within one PDF | Use last page's dimensions (per spec) |
| Page dimensions below minimum threshold | Fall back to A4 (595×842) |
| Landscape pages | width/height just swap roles; renderers adapt via `Math.min()` capping. No special handling |
| Fallback if page dims unreadable | Default to A4 (595×842) |
| Resealing | Dimensions read after `initialData` remap — correct source automatically |
| Playwright PDF path enabled | Remains A4 — out of scope, deprecated |
| Single-doc envelope (most common) | One generation, same perf as today |
| Multi-doc envelope, same page sizes | Dedup key matches → one generation |
| Multi-doc envelope, different sizes | One generation per unique size |
### 7. Tests
- Add assertion-based E2E test (no visual regression / reference images needed)
- Seal a Letter-size (612×792) PDF through the full flow
- Load the sealed output and assert all pages (document + cert + audit) have matching width/height
- Can be added to `envelope-alignment.spec.ts` or as a new focused test
## Implementation Steps
1. **Extend `get-page-size.ts`** — add `getLastPageDimensions(pdfDoc: PDF): { width: number; height: number }` using `@libpdf/core`, with `Math.round()` and minimum dimension enforcement
2. **In `seal-document.handler.ts`**:
a. After the resealing remap (line ~159), load each envelope item's PDF via `PDF.load()` and collect last page `{ width, height }` using `getLastPageDimensions`
b. Deduplicate by `"${width}x${height}"` key
c. Generate cert/audit PDFs per unique size (parallel via `Promise.all`)
d. In envelope item loop, look up matching cert/audit doc by size key
3. **Fix `download-document-certificate.ts`** — load the specific document's PDF, read last page dims via `getLastPageDimensions`, pass to generator
4. **Fix `download-document-audit-logs.ts`** — same as above, using the specific `documentId`'s PDF
5. **Add E2E test** — assertion-based test with a Letter-size document verifying all page dimensions match after sealing
@@ -0,0 +1,312 @@
---
date: 2026-02-26
title: pnpm Migration
---
## Overview
Migrate from npm to pnpm to eliminate dependency resolution duplication issues that cause bundler problems. The current npm workspace setup results in nested `node_modules` copies that don't deduplicate reliably, requiring manual hoisting and `npm dedupe` cycles. pnpm's content-addressable store and strict symlink structure eliminates this class of problem entirely.
## Current State
- **Package manager:** npm@10.7.0 with `legacy-peer-deps=true` and `prefer-dedupe=true`
- **Workspaces:** 18 total (3 apps, 15 packages) declared in root `package.json` `workspaces` field
- **Lockfile:** `package-lock.json`
- **Patches:** `patch-package` with one patch (`@ai-sdk+google-vertex+3.0.81`)
- **Overrides:** `lodash`, `pdfjs-dist`, `typescript`, `zod` in root `package.json`
- **Syncpack:** installed but unconfigured (no `.syncpackrc`)
- **Heavy duplication:** `zod` in 7 workspaces, `ts-pattern` in 9, `luxon` in 8, `react` in 6, etc.
- **Docker:** `turbo prune``npm ci``npm ci --only=production` multi-stage build
- **Existing Dockerfiles:** `docker/Dockerfile` (primary, npm), `apps/remix/Dockerfile.pnpm` (already exists, needs review)
## Migration Steps
### Phase 1: Core Migration
#### Step 1: Enable pnpm via corepack
```bash
corepack enable pnpm
corepack use pnpm@latest
```
This adds a `"packageManager"` field to root `package.json` (e.g. `"packageManager": "pnpm@10.x.x"`). Remove the existing `"engines"` npm constraint if present.
#### Step 2: Create `pnpm-workspace.yaml`
```yaml
packages:
- apps/*
- packages/*
```
Remove the `"workspaces"` field from root `package.json` — pnpm uses `pnpm-workspace.yaml` instead.
#### Step 3: Convert lockfile
```bash
pnpm import
```
This reads `package-lock.json` and generates `pnpm-lock.yaml`. After verifying, delete `package-lock.json`.
#### Step 4: Create `.npmrc` for pnpm
Replace the current `.npmrc` contents. The existing settings (`legacy-peer-deps=true`, `prefer-dedupe=true`) are npm-specific.
```ini
# Hoist packages that expect to be resolvable from any workspace.
# Start strict, add patterns here only as needed.
shamefully-hoist=true
```
> **Note:** `shamefully-hoist=true` is the pragmatic starting point. It mimics npm's flat `node_modules` layout. Once the migration is stable, this can be tightened to `hoist-pattern[]` entries for specific packages that need it, moving toward pnpm's strict isolation model.
#### Step 5: Clean install
```bash
rm -rf node_modules apps/*/node_modules packages/*/node_modules
pnpm install
```
Verify the install completes without errors. Fix any peer dependency warnings — pnpm is stricter than npm with `legacy-peer-deps=true`.
#### Step 6: Convert `overrides` to `pnpm.overrides`
In root `package.json`, move the `overrides` block under `pnpm`:
```json
{
"pnpm": {
"overrides": {
"lodash": "4.17.23",
"pdfjs-dist": "5.4.296",
"typescript": "5.6.2",
"zod": "^3.25.76"
}
}
}
```
Remove the top-level `overrides` field (that's npm-specific).
#### Step 7: Convert patch-package to pnpm patches
pnpm has native patching. Convert the existing `@ai-sdk+google-vertex+3.0.81` patch:
```bash
# Remove patch-package dependency and postinstall script
# Then use pnpm's native patching:
pnpm patch @ai-sdk/google-vertex@3.0.81
# Apply the same changes from patches/@ai-sdk+google-vertex+3.0.81.patch
pnpm patch-commit <temp-dir>
```
This adds a `pnpm.patchedDependencies` entry to root `package.json` and stores the patch in a `patches/` directory (pnpm's own format). Remove `patch-package` from dependencies and the `postinstall` script.
### Phase 2: Catalogs
#### Step 8: Identify catalog candidates
Packages duplicated across 3+ workspaces are prime candidates:
| Package | Workspaces | Catalog? |
| ----------------------------------------------- | ---------- | ---------------------- |
| `zod` | 7 | Yes |
| `ts-pattern` | 9 | Yes |
| `luxon` | 8 | Yes |
| `react` / `react-dom` | 6 / 3 | Yes |
| `typescript` | 6 | Yes |
| `nanoid` | 4 | Yes |
| `@lingui/core` / `macro` / `react` | 2-3 | Yes |
| `@simplewebauthn/server` | 3 | Yes |
| `@documenso/*` (internal) | varies | No (use `workspace:*`) |
| `@aws-sdk/*` | 2 | Yes |
| `hono` | 2 | Yes |
| `posthog-node` / `posthog-js` | 2 | Yes |
| `remeda` | 3 | Yes |
| `@tanstack/react-query` | 2 | Yes |
| `@trpc/*` | 2 | Yes |
| `superjson` | 2 | Yes |
| `kysely` | 2 | Yes |
| `@types/react` / `@types/node` / `@types/luxon` | 3-4 | Yes |
#### Step 9: Define catalogs in `pnpm-workspace.yaml`
```yaml
packages:
- apps/*
- packages/*
catalog:
# Core
react: ^18
react-dom: ^18
typescript: 5.6.2
zod: ^3.25.76
# Shared utilities
ts-pattern: <current-version>
luxon: ^3.7.2
nanoid: ^5.1.6
remeda: <current-version>
superjson: ^2.2.5
# AWS
'@aws-sdk/client-s3': ^3.998.0
'@aws-sdk/client-sesv2': ^3.998.0
'@aws-sdk/cloudfront-signer': ^3.998.0
'@aws-sdk/s3-request-presigner': ^3.998.0
'@aws-sdk/signature-v4-crt': ^3.998.0
# Framework
hono: 4.12.2
'@tanstack/react-query': <current-version>
'@trpc/client': 11.8.1
'@trpc/react-query': 11.8.1
'@trpc/server': 11.8.1
# i18n
'@lingui/core': ^5.6.0
'@lingui/macro': ^5.6.0
'@lingui/react': ^5.6.0
# Auth
'@simplewebauthn/server': <current-version>
# Observability
posthog-node: 4.18.0
posthog-js: <current-version>
# Database
kysely: <current-version>
'@prisma/client': ^6.19.0
prisma: ^6.19.0
# Types
'@types/react': <current-version>
'@types/react-dom': <current-version>
'@types/node': ^20
'@types/luxon': <current-version>
```
#### Step 10: Update workspace `package.json` files
Replace pinned versions with `catalog:` protocol for all cataloged packages:
```json
{
"dependencies": {
"zod": "catalog:",
"ts-pattern": "catalog:",
"luxon": "catalog:"
}
}
```
This is a mechanical find-and-replace across all workspace `package.json` files.
### Phase 3: Internal Workspace References
#### Step 11: Convert internal references to `workspace:*`
All `@documenso/*` internal package references currently use `"*"`. Convert to pnpm's `workspace:*` protocol:
```json
{
"dependencies": {
"@documenso/lib": "workspace:*",
"@documenso/prisma": "workspace:*"
}
}
```
This makes the workspace resolution explicit and prevents accidental resolution to a published version.
### Phase 4: Docker & CI
#### Step 12: Update primary Dockerfile (`docker/Dockerfile`)
The existing multi-stage build needs to change:
1. **base:** Add pnpm — `corepack enable pnpm` or install via `npm i -g pnpm`
2. **builder:** `turbo prune` still works with pnpm. Output structure is the same.
3. **installer:**
- Replace `npm ci` with `pnpm install --frozen-lockfile`
- Copy `pnpm-lock.yaml` and `pnpm-workspace.yaml` instead of `package-lock.json`
- Remove `patch-package` from postinstall (pnpm patches are applied natively)
4. **runner:**
- Replace `npm ci --only=production` with `pnpm install --frozen-lockfile --prod`
- Or use `pnpm deploy` for standalone output (copies only production deps to a flat directory)
Review `apps/remix/Dockerfile.pnpm` — it already exists and may have most of this solved. Reconcile with the primary `docker/Dockerfile`.
#### Step 13: Update CI workflows
Search for all `npm ci`, `npm install`, `npm run` in CI config files (`.github/workflows/`, etc.) and replace with `pnpm install --frozen-lockfile`, `pnpm run`, etc.
Ensure corepack is enabled in CI runners:
```yaml
- run: corepack enable pnpm
```
#### Step 14: Update turborepo config
Turbo works with pnpm out of the box. The `turbo.json` should not need changes. Verify `turbo prune` generates correct output with pnpm lockfile.
### Phase 5: Cleanup & Tighten
#### Step 15: Remove npm-specific tooling
- Remove `syncpack` (catalogs replace its purpose)
- Remove `patch-package` (pnpm native patches replace it)
- Remove `"workspaces"` from root `package.json` if not already done
- Delete `package-lock.json`
- Update `.gitignore` if needed (pnpm store is outside the repo by default)
#### Step 16: Tighten hoisting (optional, future)
Once stable, replace `shamefully-hoist=true` with targeted hoist patterns:
```ini
shamefully-hoist=false
hoist-pattern[]=*eslint*
hoist-pattern[]=*prettier*
# Add others as discovered
```
This moves toward strict isolation where each package can only import what it declares. Catches phantom dependency issues. Do this incrementally — let the bundler tell you what breaks.
#### Step 17: Remove root-level dependency hoisting
With catalogs and strict resolution, dependencies currently hoisted to root `package.json` for deduplication purposes can be moved back to the workspaces that actually use them. The root `package.json` should only contain tooling deps (`turbo`, `prettier`, `eslint`, etc.) and `pnpm.overrides`.
## Risks and Mitigations
1. **Phantom dependencies surface:** pnpm's strict isolation will expose imports that work today only because npm hoisted them. `shamefully-hoist=true` defers this, but tightening later will reveal them.
- **Mitigation:** Start with `shamefully-hoist=true`. Tighten incrementally after the migration is stable.
2. **Peer dependency strictness:** pnpm enforces peer deps by default. The current `.npmrc` has `legacy-peer-deps=true` which suppresses all peer dep errors.
- **Mitigation:** Run `pnpm install` and address peer dep warnings. Most will be resolvable by adding missing peer deps to the relevant workspace.
3. **Docker build breakage:** The `turbo prune` + `npm ci` pipeline is battle-tested. Switching to pnpm changes the install semantics.
- **Mitigation:** The existing `Dockerfile.pnpm` in `apps/remix/` provides a reference. Test the Docker build in CI before merging.
4. **CI cache invalidation:** Switching lockfiles invalidates all CI dependency caches.
- **Mitigation:** Update cache keys to use `pnpm-lock.yaml` hash. First CI run will be slower, subsequent runs will cache normally.
5. **Turbo + pnpm compatibility:** Turbo has first-class pnpm support, but `turbo prune` output format may differ slightly.
- **Mitigation:** Test `turbo prune --scope=@documenso/remix --docker` and verify output structure before updating Dockerfile.
## Verification Checklist
- [ ] `pnpm install` succeeds with no errors
- [ ] `pnpm run build` succeeds (all workspaces)
- [ ] `pnpm run lint` passes
- [ ] `pnpm run dev` starts correctly
- [ ] Docker build produces a working image
- [ ] E2E tests pass (`pnpm run test:e2e`)
- [ ] No duplicate package copies in `node_modules` for key deps (`zod`, `react`, `typescript`)
- [ ] `pnpm audit` shows same or better results than current npm audit
- [ ] CI pipeline passes end-to-end
@@ -0,0 +1,551 @@
---
date: 2026-02-19
title: Database Rate Limiting
---
## Summary
Replace the in-memory `hono-rate-limiter` with a database-backed rate limiting system using Prisma and PostgreSQL. The current in-memory approach is ineffective in multi-instance deployments since there are no sticky sessions. The new system uses **bucketed counters** (one row per key/action/time-bucket with atomic increment) to efficiently handle both high-throughput API rate limiting and granular auth/email rate limiting.
### Design Decisions
- **Bucketed counters** over row-per-request: high-throughput consumers would create thousands of rows per minute; bucketed counters reduce this to one row per key per time bucket
- **Fixed time windows**: simpler than sliding windows, the 2x burst-at-boundary scenario is acceptable for rate limiting purposes
- **Dual-key rate limiting**: per-identifier (`max`) and per-IP (`globalMax`) checked independently via separate rows with a `key` prefix (`id:` / `ip:`)
- **Accept slight over-count**: the upsert is atomic (increment + return count in one operation) but concurrent requests near the limit may both see a count just under the threshold before either commits, allowing a slight overshoot
- **Fail-open on errors**: if the rate limit DB query fails, allow the request through rather than blocking legitimate users
- **Prisma upsert** with `{ increment: 1 }` for atomic counter updates, returns the updated row so count check is a single operation
- **Application cron job** for cleanup of expired bucket rows
### Rate Limit Check Flow
```
check({ ip, identifier }) ->
1. Upsert IP row (ip:{ip} / action / bucket) with count + 1, RETURNING count
-> if globalMax is set and count >= globalMax, return { isLimited: true }
2. Upsert identifier row (id:{identifier} / action / bucket) with count + 1, RETURNING count
-> if count >= max, return { isLimited: true }
3. Neither limited -> return { isLimited: false }
```
Each upsert atomically increments and returns the new count in a single operation. Both counters always increment on every check — there's no conditional logic to skip one based on the other. This keeps the implementation simple and avoids read-then-write race conditions. If only IP is provided (API rate limiting), only step 1 runs.
---
## 1. Database Schema
### 1.1 Prisma model
Add to `packages/prisma/schema.prisma` after the `Counter` model:
```prisma
model RateLimit {
key String
action String
bucket DateTime
count Int @default(1)
createdAt DateTime @default(now())
@@id([key, action, bucket])
@@index([createdAt])
}
```
- **Composite primary key** `(key, action, bucket)` serves as both the unique constraint for upserts and the lookup index
- **`key`** is prefixed: `ip:1.2.3.4` or `id:user@example.com`
- **`action`** is the rate limit action name: `auth.forgot-password`, `api.v1`, etc.
- **`bucket`** is the start of the time window, truncated to the window size (e.g., `2026-02-19T10:05:00Z` for a 5-minute bucket)
- **`createdAt` index** is for the cleanup job to efficiently delete old rows
- **`count`** starts at 1 (set by the create side of the upsert)
### 1.2 Migration
Generate with `npx prisma migrate dev --name add-rate-limits`.
---
## 2. Rate Limit Library
### 2.1 Core module
Create `packages/lib/server-only/rate-limit/rate-limit.ts`:
```typescript
type WindowUnit = 's' | 'm' | 'h' | 'd';
type WindowStr = `${number}${WindowUnit}`;
type RateLimitConfig = {
action: string;
max: number;
globalMax?: number;
window: WindowStr;
};
type CheckParams = {
ip: string;
identifier?: string;
};
export const rateLimit = (config: RateLimitConfig) => {
return {
async check(params: CheckParams): Promise<{
isLimited: boolean;
remaining: number;
limit: number;
reset: Date;
}> { ... }
};
};
```
### 2.2 Window parsing and bucket computation
```typescript
const parseWindow = (window: WindowStr): number => {
const value = parseInt(window.slice(0, -1), 10);
const unit = window.slice(-1) as WindowUnit;
const multipliers: Record<WindowUnit, number> = {
s: 1000,
m: 60 * 1000,
h: 60 * 60 * 1000,
d: 24 * 60 * 60 * 1000,
};
return value * multipliers[unit];
};
const getBucket = (windowMs: number): Date => {
const now = Date.now();
return new Date(now - (now % windowMs));
};
```
### 2.3 Check implementation
The `check()` method:
1. Compute the current bucket from the window
2. Compute `reset` as `bucket + windowMs` (the start of the next window)
3. If `globalMax` is set, upsert the IP row and check count
4. If `identifier` is provided, upsert the identifier row and check count
5. Wrap in try/catch — **fail-open** on any database error (log the error, return `{ isLimited: false }`)
Each upsert uses Prisma's `upsert` with `{ increment: 1 }`:
```typescript
const result = await prisma.rateLimit.upsert({
where: {
key_action_bucket: {
key: `ip:${params.ip}`,
action: config.action,
bucket,
},
},
create: {
key: `ip:${params.ip}`,
action: config.action,
bucket,
count: 1,
},
update: {
count: { increment: 1 },
},
});
if (config.globalMax && result.count >= config.globalMax) {
return { isLimited: true, remaining: 0, limit: config.globalMax };
}
```
### 2.4 Rate limit definitions
Create `packages/lib/server-only/rate-limit/rate-limits.ts` with all rate limit instances:
```typescript
// ---- Auth (Tier 1 - Critical, sends emails) ----
export const signupRateLimit = rateLimit({
action: 'auth.signup',
max: 5,
globalMax: 10,
window: '1h',
});
export const forgotPasswordRateLimit = rateLimit({
action: 'auth.forgot-password',
max: 3,
globalMax: 20,
window: '1h',
});
export const resendVerifyEmailRateLimit = rateLimit({
action: 'auth.resend-verify-email',
max: 3,
globalMax: 20,
window: '1h',
});
export const request2FAEmailRateLimit = rateLimit({
action: 'auth.request-2fa-email',
max: 5,
globalMax: 20,
window: '15m',
});
// ---- Auth (Tier 2 - Unauthenticated) ----
export const loginRateLimit = rateLimit({
action: 'auth.login',
max: 10,
globalMax: 50,
window: '15m',
});
export const resetPasswordRateLimit = rateLimit({
action: 'auth.reset-password',
max: 5,
globalMax: 20,
window: '1h',
});
export const verifyEmailRateLimit = rateLimit({
action: 'auth.verify-email',
max: 5,
globalMax: 20,
window: '15m',
});
export const passkeyRateLimit = rateLimit({
action: 'auth.passkey',
max: 10,
globalMax: 50,
window: '15m',
});
export const oauthRateLimit = rateLimit({
action: 'auth.oauth',
max: 10,
globalMax: 50,
window: '15m',
});
export const linkOrgAccountRateLimit = rateLimit({
action: 'auth.link-org-account',
max: 5,
globalMax: 20,
window: '1h',
});
// ---- API (Tier 4 - Standard) ----
export const apiV1RateLimit = rateLimit({
action: 'api.v1',
max: 100,
window: '1m',
});
export const apiV2RateLimit = rateLimit({
action: 'api.v2',
max: 100,
window: '1m',
});
export const apiTrpcRateLimit = rateLimit({
action: 'api.trpc',
max: 100,
window: '1m',
});
export const aiRateLimit = rateLimit({
action: 'api.ai',
max: 3,
window: '1m',
});
export const fileUploadRateLimit = rateLimit({
action: 'api.file-upload',
max: 20,
window: '1m',
});
```
Exact limits are initial values — tune based on observed traffic patterns. These should be easy to adjust.
---
## 3. Integration Points
### 3.1 Hono middleware for API routes
Create a reusable Hono middleware factory in `packages/lib/server-only/rate-limit/rate-limit-middleware.ts` that wraps the `rateLimit` checker into Hono middleware:
```typescript
import { type MiddlewareHandler } from 'hono';
import { getIpAddress } from '@documenso/lib/universal/get-ip-address';
export const createRateLimitMiddleware = (
limiter: ReturnType<typeof rateLimit>,
options?: { identifierFn?: (c: Context) => string | undefined },
): MiddlewareHandler => {
return async (c, next) => {
let ip: string;
try {
ip = getIpAddress(c.req.raw);
} catch {
ip = 'unknown';
}
const identifier = options?.identifierFn?.(c);
const result = await limiter.check({ ip, identifier });
c.header('X-RateLimit-Limit', String(result.limit));
c.header('X-RateLimit-Remaining', String(result.remaining));
c.header('X-RateLimit-Reset', String(Math.ceil(result.reset.getTime() / 1000)));
if (result.isLimited) {
c.header('Retry-After', String(Math.ceil((result.reset.getTime() - Date.now()) / 1000)));
return c.json({ error: 'Too many requests, please try again later.' }, 429);
}
await next();
};
};
```
### 3.2 Replace existing Hono rate limiters
In `apps/remix/server/router.ts`:
- Remove `hono-rate-limiter` import and both `rateLimiter()` instances
- Replace with `createRateLimitMiddleware()` calls using the defined rate limits
- API routes use IP-only limiting (no identifier)
- AI route uses IP-only limiting with the stricter 3/min limit
```typescript
// Before
import { rateLimiter } from 'hono-rate-limiter';
const rateLimitMiddleware = rateLimiter({ ... });
// After
import { createRateLimitMiddleware } from '@documenso/lib/server-only/rate-limit/rate-limit-middleware';
import { apiV1RateLimit, apiV2RateLimit, aiRateLimit } from '@documenso/lib/server-only/rate-limit/rate-limits';
const apiV1RateLimitMiddleware = createRateLimitMiddleware(apiV1RateLimit);
const apiV2RateLimitMiddleware = createRateLimitMiddleware(apiV2RateLimit);
const aiRateLimitMiddleware = createRateLimitMiddleware(aiRateLimit);
```
### 3.3 Response helpers for inline checks
For auth routes (Hono handlers) and tRPC routes where rate limiting is applied inline rather than via middleware, provide helpers that handle the response formatting and headers consistently.
**Hono helper** — returns a 429 `Response` with headers if limited, or `null` if allowed:
```typescript
export const rateLimitResponse = (c: Context, result: RateLimitCheckResult): Response | null => {
c.header('X-RateLimit-Limit', String(result.limit));
c.header('X-RateLimit-Remaining', String(result.remaining));
c.header('X-RateLimit-Reset', String(Math.ceil(result.reset.getTime() / 1000)));
if (result.isLimited) {
c.header('Retry-After', String(Math.ceil((result.reset.getTime() - Date.now()) / 1000)));
return c.json({ error: 'Too many requests, please try again later.' }, 429);
}
return null;
};
```
Usage in auth routes:
```typescript
const result = await loginRateLimit.check({
ip: requestMetadata.ipAddress ?? 'unknown',
identifier: input.email,
});
const limited = rateLimitResponse(c, result);
if (limited) return limited;
```
**tRPC helper** — throws a `TRPCError` with rate limit headers if limited:
```typescript
export const assertRateLimit = (result: RateLimitCheckResult): void => {
if (result.isLimited) {
throw new TRPCError({
code: 'TOO_MANY_REQUESTS',
});
}
};
```
Usage in tRPC routes:
```typescript
const result = await request2FAEmailRateLimit.check({
ip: ctx.requestMetadata.ipAddress ?? 'unknown',
identifier: input.recipientId,
});
assertRateLimit(result);
```
Both helpers live in `packages/lib/server-only/rate-limit/rate-limit-middleware.ts` alongside the Hono middleware.
### 3.4 Auth endpoint rate limiting
In `packages/auth/server/routes/email-password.ts`, add rate limit checks at the start of each handler using the `rateLimitResponse` helper.
Apply to each endpoint per the tier list:
| Endpoint | Rate Limit |
| --------------------------- | ----------------------------------------------------- |
| `POST /signup` | `signupRateLimit` with `identifier: email` |
| `POST /authorize` (login) | `loginRateLimit` with `identifier: email` |
| `POST /forgot-password` | `forgotPasswordRateLimit` with `identifier: email` |
| `POST /resend-verify-email` | `resendVerifyEmailRateLimit` with `identifier: email` |
| `POST /verify-email` | `verifyEmailRateLimit` with `identifier: token` |
| `POST /reset-password` | `resetPasswordRateLimit` with `identifier: token` |
| `POST /passkey/authorize` | `passkeyRateLimit` (IP only, no identifier) |
| `POST /oauth/authorize/*` | `oauthRateLimit` (IP only) |
### 3.4 tRPC unauthenticated route rate limiting
For unauthenticated tRPC routes that send emails, add rate limit checks at the start of the route handler:
| Route | Rate Limit | Identifier |
| ---------------------------------------------------------- | ------------------------------------ | ---------------------- |
| `document.accessAuth.request2FAEmail` | `request2FAEmailRateLimit` | `recipientId` or token |
| `enterprise.organisation.authenticationPortal.linkAccount` | `linkOrgAccountRateLimit` | email |
| `template.createDocumentFromDirectTemplate` | Dedicated direct template rate limit | IP only |
Access `requestMetadata` from the tRPC context (`ctx.requestMetadata.ipAddress`).
### 3.5 tRPC and file routes — general API rate limiting
Add rate limit middleware for currently unprotected routes:
- `/api/trpc/*` — apply `apiTrpcRateLimit` middleware
- `/api/files/*` — apply `fileUploadRateLimit` middleware
---
## 4. Cleanup Job
### 4.1 Job definition
Create `packages/lib/jobs/definitions/internal/cleanup-rate-limits.ts`:
```typescript
export const CLEANUP_RATE_LIMITS_JOB_DEFINITION = {
id: 'internal.cleanup-rate-limits',
name: 'Cleanup Rate Limits',
version: '1.0.0',
trigger: {
name: 'internal.cleanup-rate-limits',
schema: z.object({}),
cron: '*/15 * * * *', // Every 15 minutes
},
handler: async ({ payload, io }) => {
const handler = await import('./cleanup-rate-limits.handler');
await handler.run({ payload, io });
},
} as const satisfies JobDefinition<...>;
```
### 4.2 Job handler
Create `packages/lib/jobs/definitions/internal/cleanup-rate-limits.handler.ts`:
- Delete all `RateLimit` rows where `createdAt` is older than 24 hours (covers all possible windows with margin)
- Use batched deletes to avoid long-running transactions
- Batch in chunks of 10,000 rows
```typescript
export const run = async () => {
const cutoff = new Date(Date.now() - 24 * 60 * 60 * 1000);
let deleted = 0;
do {
// Prisma doesn't support DELETE with LIMIT, so use raw SQL for batching
deleted = await prisma.$executeRaw`
DELETE FROM "RateLimit"
WHERE "createdAt" < ${cutoff}
AND ctid IN (
SELECT ctid FROM "RateLimit"
WHERE "createdAt" < ${cutoff}
LIMIT 10000
)
`;
} while (deleted > 0);
};
```
### 4.3 Register in job client
Add `CLEANUP_RATE_LIMITS_JOB_DEFINITION` to the job registry in `packages/lib/jobs/client.ts`.
---
## 5. Remove hono-rate-limiter Dependency
After the migration is complete:
- Remove `hono-rate-limiter` from `apps/remix/package.json`
- Run `npm install` to clean up
---
## 6. Files to Create or Modify
### New Files
| File | Purpose |
| ----------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- |
| `packages/lib/server-only/rate-limit/rate-limit.ts` | Core rate limit factory (`rateLimit()`) with window parsing, bucket computation, Prisma upsert, fail-open |
| `packages/lib/server-only/rate-limit/rate-limits.ts` | All rate limit instances (auth, API, AI, file upload) |
| `packages/lib/server-only/rate-limit/rate-limit-middleware.ts` | Hono middleware factory, `rateLimitResponse` helper for Hono handlers, `assertRateLimit` helper for tRPC routes |
| `packages/lib/jobs/definitions/internal/cleanup-rate-limits.ts` | Cleanup cron job definition |
| `packages/lib/jobs/definitions/internal/cleanup-rate-limits.handler.ts` | Cleanup handler (batched deletes) |
### Modified Files
| File | Change |
| ----------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- |
| `packages/prisma/schema.prisma` | Add `RateLimit` model |
| `apps/remix/server/router.ts` | Replace `hono-rate-limiter` with DB-backed middleware, add rate limits for `/api/trpc/*` and `/api/files/*` |
| `apps/remix/package.json` | Remove `hono-rate-limiter` dependency |
| `packages/auth/server/routes/email-password.ts` | Add rate limit checks to signup, login, forgot-password, resend-verify-email, verify-email, reset-password |
| `packages/auth/server/routes/passkey.ts` | Add rate limit check to passkey authorize |
| `packages/auth/server/routes/oauth.ts` | Add rate limit check to OAuth authorize endpoints |
| `packages/trpc/server/document-router/access-auth-request-2fa-email.ts` | Add rate limit check (sends email, unauthenticated) |
| `packages/trpc/server/enterprise-router/link-organisation-account.ts` | Add rate limit check (sends email, unauthenticated) |
| `packages/lib/jobs/client.ts` | Register cleanup-rate-limits job definition |
---
## 7. Considerations
### 7.1 Fail-open
All rate limit checks must be wrapped in try/catch. On any DB error, log the error and allow the request through. Rate limiting should never block legitimate traffic due to infrastructure issues.
### 7.2 Performance
- Each API request adds 1 upsert query (~1ms)
- Auth requests add 2 upsert queries (~2ms total)
- The composite primary key ensures all lookups and upserts are index-only operations
- No `COUNT(*)` queries — the count is stored directly in the row
### 7.3 Monitoring
Log rate limit hits at `warn` level with the action, key type (IP/identifier), and count. This provides visibility into traffic patterns and helps tune limits.
### 7.4 Testing
The rate limit module should be mockable in tests. Consider exporting the bucket computation and window parsing as standalone functions for unit testing. Integration tests can verify the upsert + count logic against a test database.
### 7.5 Future improvements
- **Redis backend**: if DB pressure from rate limiting becomes measurable, swap the Prisma upsert for Redis `INCR` + `EXPIRE` with no API changes
- **System-wide circuit breaker**: add a `systemMax` config option that counts all requests for an action regardless of key
@@ -0,0 +1,186 @@
---
date: 2026-01-14
title: Simplewebauthn V13 Upgrade
---
## Overview
Upgrade SimpleWebAuthn packages from v9.x to v13.x to address the deprecation of `@simplewebauthn/types` and take advantage of new features and improvements.
## Current State
The codebase currently uses:
- `@simplewebauthn/browser@9.x`
- `@simplewebauthn/server@9.x`
- `@simplewebauthn/types@9.x`
## Breaking Changes Summary (v9 → v13)
### v10.0.0 Breaking Changes
1. **Minimum Node version raised to Node v20**
2. **`generateRegistrationOptions()` now expects `Base64URLString` for `excludeCredentials` IDs** (no more `type: 'public-key'` needed)
3. **`generateAuthenticationOptions()` now expects `Base64URLString` for `allowCredentials` IDs**
4. **`credentialID` returned from verification methods is now `Base64URLString`** instead of `Uint8Array`
5. **`AuthenticatorDevice.credentialID` is now `Base64URLString`**
6. **`rpID` is now required when calling `generateAuthenticationOptions()`**
7. **`generateRegistrationOptions()` will generate random user IDs** if not provided
8. **`user.id` is treated as base64url string in `startRegistration()`**
9. **`userHandle` is treated as base64url string in `startAuthentication()`**
### v11.0.0 Breaking Changes
1. **Positional arguments in `startRegistration()` and `startAuthentication()` replaced by object**
- Before: `startRegistration(options)`
- After: `startRegistration({ optionsJSON: options })`
- Before: `startAuthentication(options)`
- After: `startAuthentication({ optionsJSON: options })`
2. **`AuthenticatorDevice` type renamed to `WebAuthnCredential`**
- `credentialID``credential.id`
- `credentialPublicKey``credential.publicKey`
3. **`verifyRegistrationResponse()` returns `registrationInfo.credential` instead of individual properties**
- `credentialID``credential.id`
- `credentialPublicKey``credential.publicKey`
- `counter``credential.counter`
- `transports` are now in `credential.transports`
4. **`verifyAuthenticationResponse()` uses `credential` argument instead of `authenticator`**
### v13.0.0 Breaking Changes
1. **`@simplewebauthn/types` package is retired**
- Types are now exported from `@simplewebauthn/browser` and `@simplewebauthn/server`
- Import types from `@simplewebauthn/server` instead
## Files to Update
### Package Changes
1. Remove `@simplewebauthn/types` dependency
2. Update `@simplewebauthn/browser` to `^13.2.2`
3. Update `@simplewebauthn/server` to `^13.2.2`
### Server-side Files
#### 1. `packages/lib/server-only/auth/create-passkey-registration-options.ts`
- Change import from `@simplewebauthn/types` to `@simplewebauthn/server`
- Remove `type: 'public-key'` from `excludeCredentials` items
- Update `userID` to use `isoUint8Array.fromUTF8String()` for proper encoding
#### 2. `packages/lib/server-only/auth/create-passkey-authentication-options.ts`
- Change import from `@simplewebauthn/types` to `@simplewebauthn/server`
- Remove `type: 'public-key'` from `allowCredentials` items
#### 3. `packages/lib/server-only/auth/create-passkey-signin-options.ts`
- No changes needed (already using correct options)
#### 4. `packages/lib/server-only/auth/create-passkey.ts`
- Change import from `@simplewebauthn/types` to `@simplewebauthn/server`
- Update to use new `registrationInfo.credential` structure:
- `credentialID``credential.id`
- `credentialPublicKey``credential.publicKey`
- `counter``credential.counter`
- Note: `credential.id` is now a `Base64URLString`, so `Buffer.from(credentialID)` needs updating
#### 5. `packages/lib/server-only/document/is-recipient-authorized.ts`
- Update `verifyAuthenticationResponse()` to use `credential` instead of `authenticator`:
- Change `authenticator: { credentialID, credentialPublicKey, counter }` to `credential: { id, publicKey, counter }`
- Since `credential.id` is now base64url string, convert stored `credentialId` buffer to base64url
#### 6. `packages/auth/server/routes/passkey.ts`
- Update `verifyAuthenticationResponse()` to use `credential` instead of `authenticator`
- Same changes as `is-recipient-authorized.ts`
#### 7. `packages/trpc/server/auth-router/create-passkey.ts`
- Change import from `@simplewebauthn/types` to `@simplewebauthn/server`
### Browser-side Files
#### 8. `apps/remix/app/components/dialogs/passkey-create-dialog.tsx`
- Update `startRegistration()` call:
- Before: `startRegistration(passkeyRegistrationOptions)`
- After: `startRegistration({ optionsJSON: passkeyRegistrationOptions })`
#### 9. `apps/remix/app/components/forms/signin.tsx`
- Update `startAuthentication()` call:
- Before: `startAuthentication(options)`
- After: `startAuthentication({ optionsJSON: options })`
#### 10. `apps/remix/app/components/general/document-signing/document-signing-auth-passkey.tsx`
- Update `startAuthentication()` call:
- Before: `startAuthentication(options)`
- After: `startAuthentication({ optionsJSON: options })`
### Database/Schema Considerations
The database stores `credentialId` as `Bytes`. The new API returns `credential.id` as `Base64URLString`. We need to:
1. When **storing** a new passkey: Convert from `Base64URLString` to `Buffer`
2. When **passing to verification**: Convert from `Buffer` to `Base64URLString`
Use `isoBase64URL` helper from `@simplewebauthn/server/helpers` for these conversions.
## Implementation Steps
### Step 1: Update package.json dependencies
```bash
npm uninstall @simplewebauthn/types
npm install @simplewebauthn/browser@^13.2.2 @simplewebauthn/server@^13.2.2
```
### Step 2: Update type imports
Replace all `@simplewebauthn/types` imports with `@simplewebauthn/server`
### Step 3: Update browser-side API calls
- `startRegistration(options)``startRegistration({ optionsJSON: options })`
- `startAuthentication(options)``startAuthentication({ optionsJSON: options })`
### Step 4: Update server-side registration
- Update `excludeCredentials` format (remove `type: 'public-key'`)
- Update `userID` encoding if needed
- Update `verifyRegistrationResponse()` result handling for new `credential` structure
### Step 5: Update server-side authentication
- Update `allowCredentials` format (remove `type: 'public-key'`)
- Update `verifyAuthenticationResponse()` to use `credential` instead of `authenticator`
- Handle `Base64URLString` for `credential.id`
### Step 6: Update credential storage/retrieval
- When storing: Convert `Base64URLString` to `Buffer`
- When reading: Convert `Buffer` to `Base64URLString`
### Step 7: Test passkey flows
1. Test passkey creation
2. Test passkey sign-in
3. Test passkey authentication for document signing
4. Test passkey deletion
## Code Examples
### Converting stored Buffer to Base64URLString for verification
```typescript
import { isoBase64URL } from '@simplewebauthn/server/helpers';
// When reading from database (Buffer) and passing to verification
const credential = {
id: isoBase64URL.fromBuffer(passkey.credentialId),
publicKey: new Uint8Array(passkey.credentialPublicKey),
counter: Number(passkey.counter),
transports: passkey.transports,
};
```
### Converting Base64URLString to Buffer for storage
```typescript
import { isoBase64URL } from '@simplewebauthn/server/helpers';
// When storing from registration response
const credentialIdBuffer = Buffer.from(
isoBase64URL.toBuffer(registrationInfo.credential.id)
);
```
## Risks and Mitigations
1. **Database compatibility**: The `credentialId` is stored as `Bytes` in the database. The new API uses `Base64URLString`. We need proper conversion functions.
- **Mitigation**: Use `isoBase64URL.fromBuffer()` and `isoBase64URL.toBuffer()` for conversions
2. **Existing passkeys**: Existing passkeys should continue to work as long as conversion is done correctly.
- **Mitigation**: Test with existing passkeys after upgrade
3. **Browser compatibility**: v10+ requires newer browser APIs.
- **Mitigation**: `browserSupportsWebAuthn()` already handles this check
@@ -0,0 +1,263 @@
---
date: 2026-02-24
title: Custom Email Domain Sync And Recovery
---
## Problem Statement
Custom email domains configured via AWS SES can get stuck in a `PENDING` state or fail validation silently. Currently, there is **no automated verification** -- users must manually click "Sync" in the UI to check domain status. If a domain fails to validate, the only option is to delete it and recreate it, which generates new DKIM keys and requires the user to update their DNS records.
### Current Pain Points
1. **No background sync** -- Domain verification status is never checked automatically; users must manually click "Sync"
2. **Stuck domains** -- Domains can remain in `PENDING` state indefinitely with no alerting or auto-recovery
3. **Failed recovery requires DNS changes** -- Deleting and recreating a domain generates new keys, forcing the user to update DNS records
4. **No visibility into failure duration** -- There's no tracking of how long a domain has been pending
## Proposed Solution
### 1. Hourly Background Sync Job
Create a new cron job (`internal.sync-email-domains`) that runs every hour to automatically verify all `PENDING` email domains.
**Job Definition:** `packages/lib/jobs/definitions/internal/sync-email-domains.ts`
**Job Handler:** `packages/lib/jobs/definitions/internal/sync-email-domains.handler.ts`
**Pattern:** Follow the existing `cleanup-rate-limits` cron job pattern:
- `cron: '0 * * * *'` (every hour, on the hour)
- Empty `z.object({})` schema (no payload needed)
- Register in `packages/lib/jobs/client.ts`
**Handler Logic:**
1. Query all `EmailDomain` records with `status: 'PENDING'`
2. For each domain, call `verifyEmailDomain(emailDomainId)` which:
- Calls AWS SES `GetEmailIdentityCommand` to check current verification status
- Updates DB status to `ACTIVE` if verified, keeps `PENDING` otherwise
3. Log results via `io.logger` (how many checked, how many transitioned to ACTIVE)
4. Process domains in batches to avoid overwhelming SES API rate limits
5. Add error handling per-domain so one failure doesn't stop the entire sweep
### 2. Schema Changes -- Track Pending Duration
Add a `lastVerifiedAt` column to the `EmailDomain` model to track when verification was last attempted, enabling "stale domain" detection.
**File:** `packages/prisma/schema.prisma`
```prisma
model EmailDomain {
// ... existing fields ...
lastVerifiedAt DateTime? // Last time verification was checked against SES
}
```
**Migration:** Create a new Prisma migration for this column addition.
**Updates needed:**
- `verify-email-domain.ts` -- Update `lastVerifiedAt` when verification is checked
- The sync job handler -- Use `lastVerifiedAt` to avoid re-checking domains that were just verified
### 3. Domain Re-registration (Recovery) -- Delete & Recreate in SES Without Changing Keys
Add a new "Re-register" action that deletes the SES identity and recreates it using the **same** DKIM key pair stored in the database, so the user's DNS records remain valid.
#### 3a. New Service Function
**File:** `packages/ee/server-only/lib/reregister-email-domain.ts`
```typescript
export const reregisterEmailDomain = async (options: { emailDomainId: string }) => {
// 1. Fetch the EmailDomain record (including encrypted privateKey)
// 2. Decrypt the private key using DOCUMENSO_ENCRYPTION_KEY
// 3. Call DeleteEmailIdentityCommand on SES (ignore NotFoundException)
// 4. Call CreateEmailIdentityCommand with BYODKIM using the SAME selector + private key
// 5. Update EmailDomain status back to PENDING, update lastVerifiedAt
// 6. Return the updated domain
};
```
Key points:
- Uses the existing encrypted `privateKey` from the DB -- no new key generation
- Uses the existing `selector` -- DNS records stay the same
- Deletes first, then recreates -- handles cases where SES state is corrupted
- Resets status to `PENDING` since verification will need to re-occur
- Uses `verifyDomainWithDKIM()` from `create-email-domain.ts` (may need to extract/export this helper)
#### 3b. Admin TRPC Routes (Find, Get, Re-register)
All email domain admin routes use `adminProcedure` -- requires system-level `Role.ADMIN`.
**Find (list) route:**
**File:** `packages/trpc/server/admin-router/find-email-domains.ts`
**Types:** `packages/trpc/server/admin-router/find-email-domains.types.ts`
- Query route: `admin.emailDomain.find`
- Input: `{ query?: string, page?: number, perPage?: number, status?: EmailDomainStatus }`
- Extends `ZFindSearchParamsSchema` with optional `status` filter
- Returns standard `ZFindResultResponse` with email domain data including: id, domain, status, selector, createdAt, lastVerifiedAt, organisation name, email count
- Prisma query filters by domain name (LIKE search on `query`), optional status, joins organisation for name, counts emails
**Get (detail) route:**
**File:** `packages/trpc/server/admin-router/get-email-domain.ts`
**Types:** `packages/trpc/server/admin-router/get-email-domain.types.ts`
- Query route: `admin.emailDomain.get`
- Input: `{ emailDomainId: string }`
- Returns full email domain detail: all fields (except privateKey), organisation info, list of associated emails, DNS records (generated from publicKey + selector)
- Omits `privateKey` from response
**Re-register (mutation) route:**
**File:** `packages/trpc/server/admin-router/reregister-email-domain.ts`
**Types:** `packages/trpc/server/admin-router/reregister-email-domain.types.ts`
- Mutation route: `admin.emailDomain.reregister`
- Input: `{ emailDomainId: string }`
- Calls `reregisterEmailDomain()`
- Rationale: Re-registration is a recovery/operational action that deletes and recreates an SES identity. This is a privileged operation that should only be performed by platform operators, not self-service by org admins.
#### 3c. Register in Admin Router
**File:** `packages/trpc/server/admin-router/router.ts`
Add a new `emailDomain` namespace to the admin router:
```typescript
emailDomain: {
find: findEmailDomainsRoute,
get: getEmailDomainRoute,
reregister: reregisterEmailDomainRoute,
},
```
#### 3d. Admin Panel UI -- Email Domains Section
**List page:** `apps/remix/app/routes/_authenticated+/admin+/email-domains._index.tsx`
- New admin panel page at `/admin/email-domains`
- Follow the existing admin documents list pattern (client-side TRPC data fetching)
- Search input (debounced) filtering by domain name
- Status filter dropdown (All / Pending / Active)
- DataTable with columns: Domain, Organisation, Status (badge), Email Count, Created, Last Verified, Actions
- Actions dropdown per row: View details, Re-register
- Pagination via `DataTablePagination`
**Detail page:** `apps/remix/app/routes/_authenticated+/admin+/email-domains.$id.tsx`
- Shows full domain details: domain, selector, status, organisation, created date, last verified date
- Shows DNS records (DKIM + SPF) with copy buttons (reuse `organisation-email-domain-records-dialog` pattern)
- Table of associated organisation emails
- "Re-register" button with confirmation dialog explaining the action (SES identity will be deleted and recreated with the same keys)
- "Verify Now" button to manually trigger a verification check
- Shows how long the domain has been pending (using `lastVerifiedAt` or `createdAt`)
**Navigation:** Add menu item to admin sidebar in `_layout.tsx`:
```tsx
<Button
variant="ghost"
className={cn(
'justify-start md:w-full',
pathname?.startsWith('/admin/email-domains') && 'bg-secondary',
)}
asChild
>
<Link to="/admin/email-domains">
<MailIcon className="mr-2 h-5 w-5" />
<Trans>Email Domains</Trans>
</Link>
</Button>
```
**Table component:** `apps/remix/app/components/tables/admin-email-domains-table.tsx` (optional -- can be inline in the route file like the documents page)
#### 3e. Automatic Re-registration in Sync Job (Optional Enhancement)
In the hourly sync job, after checking verification status, if a domain has been `PENDING` for more than 48 hours:
- Automatically call `reregisterEmailDomain()` to attempt recovery
- Log the auto-recovery attempt
- This provides a self-healing mechanism without user intervention
## Implementation Plan
### Phase 1: Background Sync Job (Core)
1. Create `sync-email-domains.ts` job definition with hourly cron
2. Create `sync-email-domains.handler.ts` with batch verification logic
3. Register job in `packages/lib/jobs/client.ts`
4. Add error handling and logging
### Phase 2: Schema Enhancement
5. Add `lastVerifiedAt` column to `EmailDomain` model
6. Create Prisma migration
7. Update `verifyEmailDomain()` to set `lastVerifiedAt` on each check
8. Update sync job to use `lastVerifiedAt` for intelligent scheduling
### Phase 3: Admin Email Domains Panel
9. Create `find-email-domains` admin TRPC route + types (list/search with pagination and status filter)
10. Create `get-email-domain` admin TRPC route + types (detail view with org info, emails, DNS records)
11. Register find + get routes in admin router under `emailDomain` namespace
12. Create admin list page (`admin+/email-domains._index.tsx`) with search, status filter, DataTable
13. Create admin detail page (`admin+/email-domains.$id.tsx`) with domain info, emails table, DNS records
14. Add "Email Domains" menu item to admin sidebar (`_layout.tsx`)
### Phase 4: Re-registration Feature
15. Extract `verifyDomainWithDKIM()` as a shared helper (if not already exported)
16. Create `reregisterEmailDomain()` service function
17. Create `reregister-email-domain` admin TRPC mutation route + types
18. Register reregister route in admin router under `emailDomain.reregister`
19. Add "Re-register" button + confirmation dialog on admin detail page
### Phase 5: Auto-Recovery (Optional)
20. Add 48-hour stale detection logic to sync job
21. Auto-trigger re-registration for stale domains
22. Add logging/notifications for auto-recovery events
## Files to Create/Modify
### New Files
- `packages/lib/jobs/definitions/internal/sync-email-domains.ts`
- `packages/lib/jobs/definitions/internal/sync-email-domains.handler.ts`
- `packages/ee/server-only/lib/reregister-email-domain.ts`
- `packages/trpc/server/admin-router/find-email-domains.ts`
- `packages/trpc/server/admin-router/find-email-domains.types.ts`
- `packages/trpc/server/admin-router/get-email-domain.ts`
- `packages/trpc/server/admin-router/get-email-domain.types.ts`
- `packages/trpc/server/admin-router/reregister-email-domain.ts`
- `packages/trpc/server/admin-router/reregister-email-domain.types.ts`
- `apps/remix/app/routes/_authenticated+/admin+/email-domains._index.tsx`
- `apps/remix/app/routes/_authenticated+/admin+/email-domains.$id.tsx`
### Modified Files
- `packages/prisma/schema.prisma` -- Add `lastVerifiedAt` field
- `packages/lib/jobs/client.ts` -- Register new sync job
- `packages/ee/server-only/lib/verify-email-domain.ts` -- Update `lastVerifiedAt`
- `packages/ee/server-only/lib/create-email-domain.ts` -- Export `verifyDomainWithDKIM` helper
- `packages/trpc/server/admin-router/router.ts` -- Add `emailDomain.{find, get, reregister}` routes
- `apps/remix/app/routes/_authenticated+/admin+/_layout.tsx` -- Add "Email Domains" nav item to sidebar
- New Prisma migration file
## Technical Considerations
1. **SES API Rate Limits** -- AWS SES has rate limits on `GetEmailIdentityCommand`. The sync job should process domains in batches with small delays between calls (e.g., 5-10 per batch with 1s delay).
2. **Concurrency** -- The local job provider has deterministic deduplication via SHA-256 IDs, so multiple app instances won't run the same cron tick twice.
3. **Error Isolation** -- Each domain verification in the sync job should be wrapped in try/catch so one failing domain doesn't prevent others from being checked.
4. **Re-registration Safety** -- The re-register function should be idempotent. Deleting a non-existent SES identity should be handled gracefully (already done in `deleteEmailDomain`).
5. **Private Key Security** -- The private key is encrypted at rest and should only be decrypted transiently during re-registration. It should never be logged or exposed in API responses.
6. **Feature Gating** -- The sync job should only process domains belonging to organisations with active `emailDomains` claim flags. This prevents processing domains for orgs that have downgraded.
7. **Observability** -- Add structured logging to the sync job so operations teams can monitor domain verification health across all tenants.
@@ -0,0 +1,210 @@
---
date: 2026-02-10
title: Add Folder Support To V1 Api
status: ready
---
## Problem
The `GET /api/v1/documents` endpoint does not return documents inside folders. The underlying `findDocuments()` function defaults to `folderId: null` when no `folderId` is provided, meaning only root-level documents are returned. The V1 API never passes `folderId`, so folder documents are invisible to API consumers.
Additionally, neither the list endpoint nor the single-document endpoint exposes `folderId` in the response, so consumers cannot know which folder a document belongs to.
## Root Cause
In `packages/lib/server-only/document/find-documents.ts` (line 222-226):
```ts
if (folderId !== undefined) {
whereClause.folderId = folderId;
} else {
whereClause.folderId = null; // Only root documents returned
}
```
The V1 `getDocuments` handler in `packages/api/v1/implementation.ts` (line 61-70) only passes `page` and `perPage` to `findDocuments` — it never extracts or forwards a `folderId` from the query string.
## Decisions
These decisions were made during the spec interview:
1. **Fix V1 directly** — The V1 API is deprecated but still actively used. This is a quick, low-risk fix. No need to defer to a newer API.
2. **Breaking change accepted** — Returning ALL documents by default (instead of root-only) is intentional. The current root-only behavior is a bug, not a feature.
3. **No root-only query option needed** — Not all documents are in folders, so consumers can filter client-side using the `folderId` field in the response if needed.
4. **No folder existence validation**`?folderId=nonexistent` returns empty array, not 404. Consistent with V1 list endpoint patterns.
5. **Add `folderId` to both endpoints** — Both `GET /api/v1/documents` (list) and `GET /api/v1/documents/:id` (single) will include `folderId` in the response.
6. **Top-level `skipFolderFilter` is sufficient** — The inner helper filters (`findDocumentsFilter`, `findTeamDocumentsFilter`) receive `folderId: undefined` when skip is active. Prisma ignores `undefined` values in WHERE clauses, so these inner filters will not constrain by folder. No propagation needed.
7. **Scope is minimal** — Only `folderId` support. No other filters (status, period, query, senderIds) added in this change.
## Scope
Three files need changes. No new files.
| File | Change |
| ----------------------------------------------------- | ------------------------------------------------------------------------ |
| `packages/api/v1/schema.ts` | Add `folderId` to query schema + both response schemas |
| `packages/api/v1/implementation.ts` | Pass `folderId` through in `getDocuments`, add to `getDocument` response |
| `packages/lib/server-only/document/find-documents.ts` | Add `skipFolderFilter` option |
## Changes
### 1. `packages/api/v1/schema.ts` — Add `folderId` to query + response schemas
**Query schema** (`ZGetDocumentsQuerySchema`, line 35-38):
```ts
export const ZGetDocumentsQuerySchema = z.object({
page: z.coerce.number().min(1).optional().default(1),
perPage: z.coerce.number().min(1).optional().default(10),
folderId: z
.string()
.describe(
'Filter documents by folder ID. When omitted, returns all documents regardless of folder.',
)
.optional(),
});
```
**List response schema** (`ZSuccessfulDocumentResponseSchema`, line 46-56):
Add `folderId: z.string().nullish()` so consumers can see which folder each document belongs to.
**Single document response schema** (`ZSuccessfulGetDocumentResponseSchema`, line 58-79):
Add `folderId: z.string().nullish()` to the extended schema as well.
### 2. `packages/api/v1/implementation.ts` — Pass `folderId` through + add to responses
**`getDocuments` handler** (line 61-70):
```ts
getDocuments: authenticatedMiddleware(async (args, user, team) => {
const page = Number(args.query.page) || 1;
const perPage = Number(args.query.perPage) || 10;
const { data: documents, totalPages } = await findDocuments({
page,
perPage,
userId: user.id,
teamId: team.id,
folderId: args.query.folderId,
skipFolderFilter: args.query.folderId === undefined,
});
return {
status: 200,
body: {
documents: documents.map((document) => ({
id: mapSecondaryIdToDocumentId(document.secondaryId),
externalId: document.externalId,
userId: document.userId,
teamId: document.teamId,
folderId: document.folderId,
title: document.title,
status: document.status,
createdAt: document.createdAt,
updatedAt: document.updatedAt,
completedAt: document.completedAt,
})),
totalPages,
},
};
}),
```
**`getDocument` handler** (line 91-197):
Add `folderId: envelope.folderId` to the response body mapping (alongside `id`, `externalId`, etc.).
### 3. `packages/lib/server-only/document/find-documents.ts` — Handle "return all" semantics
Add `skipFolderFilter` to the options type and modify the WHERE clause logic:
```ts
export type FindDocumentsOptions = {
// ... existing fields ...
folderId?: string;
skipFolderFilter?: boolean;
};
```
Modify the folderId logic (line 222-226):
```ts
if (!skipFolderFilter) {
if (folderId !== undefined) {
whereClause.folderId = folderId;
} else {
whereClause.folderId = null;
}
}
```
When `skipFolderFilter` is true:
- The top-level `whereClause.folderId` is never set — no folder constraint at the top level.
- The inner helpers (`findDocumentsFilter`, `findTeamDocumentsFilter`) receive `folderId: undefined`, which Prisma ignores in WHERE objects — no folder constraint at the inner level either.
- Result: all documents returned regardless of folder.
When `skipFolderFilter` is false (default, used by UI/tRPC callers):
- Existing behavior is completely unchanged. `folderId: undefined` still defaults to root-only.
## Why `skipFolderFilter` (Option B)
Two approaches were considered:
**Option A: Change `folderId: undefined` semantics to mean "all documents"**
- Risky: would affect all callers of `findDocuments` (UI, tRPC) unless every caller is audited.
- The UI intentionally shows root-only when no folder is selected.
**Option B (chosen): Add `skipFolderFilter` boolean**
- Additive — no existing callers pass this flag, so they're unaffected.
- Explicit — the intent is clear in the code.
- Safe — zero risk to UI/tRPC behavior.
## Behavior Matrix
| Request | Current Behavior | New Behavior |
| -------------------------------------------- | ------------------- | ------------------------- |
| `GET /api/v1/documents` | Root docs only | ALL docs (root + folders) |
| `GET /api/v1/documents?folderId=abc` | Not supported | Docs in folder `abc` only |
| `GET /api/v1/documents?folderId=nonexistent` | Not supported | Empty array, 200 OK |
| `GET /api/v1/documents/:id` response | No `folderId` field | Includes `folderId` |
## Implementation Notes
- `folderId` is a `String?` on the `Envelope` model in Prisma, not a number.
- The `findDocuments` function already accepts `folderId` in its options type — it just needs the `skipFolderFilter` escape hatch.
- No need to propagate `skipFolderFilter` into `findDocumentsFilter` or `findTeamDocumentsFilter`. When `folderId` is `undefined`, those helpers embed `folderId: undefined` in their Prisma WHERE objects. Prisma strips `undefined` keys, so no folder constraint is applied. This is well-documented Prisma behavior.
- The `createDocument` endpoint already supports `folderId` in the request body (line 139-144 of schema.ts), confirming the pattern.
- The `getDocument` handler fetches from `prisma.envelope.findFirstOrThrow` which already includes `folderId` on the envelope — just needs to be added to the response mapping.
## Testing
Manual and automated test cases:
1. `GET /api/v1/documents` returns docs from root AND subfolders.
2. `GET /api/v1/documents?folderId=<valid-id>` returns only docs in that folder.
3. `GET /api/v1/documents?folderId=<nonexistent-id>` returns empty array with 200 status.
4. List response includes `folderId` field on each document (null for root docs, string for folder docs).
5. `GET /api/v1/documents/:id` response includes `folderId` field.
6. Existing UI/tRPC callers of `findDocuments` are unaffected (they don't pass `skipFolderFilter`).
7. Pagination: verify `totalPages` correctly reflects the larger result set when all docs are returned.
## Breaking Change Notice
This is a **breaking change** for existing V1 API consumers:
- **Before**: `GET /api/v1/documents` returned only root-level documents (those not in any folder).
- **After**: `GET /api/v1/documents` returns all documents regardless of folder placement.
Impact:
- Consumers paginating through results will see more documents in the total count.
- Consumers building UIs will now display folder documents they previously didn't see.
- The new `folderId` field is additive and won't break existing response parsing.
This is considered a **bug fix**, not a feature removal. The previous behavior silently hid documents from API consumers.
View File
@@ -0,0 +1,113 @@
---
date: 2026-03-07
title: Search Query Optimization
---
## Problem
The `searchDocumentsWithKeyword` and `searchTemplatesWithKeyword` functions generate a single massive Prisma `findMany` with 7 OR branches. This produces a SQL query that:
- Joins `Team` twice (aliased j3 and j8) for the two team-access branches
- Embeds 4-level deep EXISTS subqueries (`TeamGroup -> OrganisationGroup -> OrganisationGroupMember -> OrganisationMember`) for each team branch
- Uses `ILIKE` across multiple columns with no way for Postgres to use indexes effectively across the OR
- Includes `recipients: true` on the result even though only a small subset of fields are needed
- Fetches all matching rows then filters visibility **in application code**
With 1,000 documents seeded under `medium-account@documenso.com`, this query is noticeably slow.
---
## Option A: Pre-resolve team IDs, keep Prisma
**Change:** Before the envelope query, resolve the user's accessible team IDs in a single query:
```ts
const teamIds = await prisma.teamGroup
.findMany({
where: {
organisationGroup: {
organisationGroupMembers: {
some: { organisationMember: { userId } },
},
},
},
select: { teamId: true },
})
.then((rows) => [...new Set(rows.map((r) => r.teamId))]);
```
Then replace `team: buildTeamWhereQuery(...)` with `teamId: { in: teamIds }` in the envelope query.
**Benefits:**
- Eliminates the duplicated 4-level deep join chain from the envelope query
- The team ID resolution is a simple indexed lookup (runs once, not twice)
- Minimal code change -- still Prisma, same structure
- Can also pre-resolve team roles to move visibility filtering into the WHERE clause
**Drawbacks:**
- Still a single large OR query with ILIKE branches
- Prisma still generates suboptimal SQL for the remaining OR conditions
---
## Option B: Kysely rewrite with pre-resolved teams
**Change:** Rewrite using Kysely (already set up in codebase as `kyselyPrisma.$kysely`). Follow the pattern in `find-envelopes.ts` -- use Kysely for filtering/ID fetching, then Prisma for hydration.
Structure as a UNION of targeted queries instead of a single OR:
```
Query 1: owned docs matching title/externalId (simple indexed lookup)
Query 2: docs where user is recipient matching title (EXISTS on Recipient)
Query 3: team docs matching title/externalId (using pre-resolved teamIds)
UNION ALL -> deduplicate -> ORDER BY createdAt DESC -> LIMIT 20
```
Then hydrate the 20 IDs with Prisma for the include data.
**Benefits:**
- Each sub-query is simple and independently optimizable by Postgres
- UNION eliminates the massive OR which forces bad query plans
- Kysely gives control over exact SQL structure
- Only hydrate the final 20 results (not all matches)
- Follows existing `find-envelopes.ts` pattern -- not a new paradigm
**Drawbacks:**
- More code than Option A
- Two query layers (Kysely for IDs, Prisma for hydration)
---
## Option C: Hybrid -- pre-resolve teams + simplify Prisma OR
**Change:** Pre-resolve team IDs (like Option A), but also restructure the Prisma query to reduce OR branches:
- Merge "owned + title" and "owned + externalId" and "owned + recipient email" into a single owned-docs branch with nested OR
- Merge "team + title" and "team + externalId" into a single team-docs branch
- Keep "recipient inbox" branches separate
This reduces from 7 OR branches to ~3-4, with simpler conditions in each.
**Benefits:**
- Simpler than Kysely rewrite
- Fewer OR branches = better query plan
- Pre-resolved team IDs eliminate the deep joins
- Still pure Prisma
**Drawbacks:**
- Postgres still has to handle OR across different access patterns in one query
- Less control over SQL than Kysely
---
## Recommendation
**Option B (Kysely)** is the strongest choice. The codebase already uses this exact pattern for `find-envelopes.ts` which solves the same class of problem. The UNION approach gives Postgres the best chance at using indexes per sub-query. Pre-resolving team IDs is a prerequisite for all options and is trivially cheap.
The template search query has the same structure and should get the same treatment.
+207
View File
@@ -0,0 +1,207 @@
---
name: agent-browser
description: Browser automation CLI for AI agents. Use when the user needs to interact with websites, including navigating pages, filling forms, clicking buttons, taking screenshots, extracting data, testing web apps, or automating any browser task. Triggers include requests to "open a website", "fill out a form", "click a button", "take a screenshot", "scrape data from a page", "test this web app", "login to a site", "automate browser actions", or any task requiring programmatic web interaction.
allowed-tools: Bash(agent-browser:*)
---
# Browser Automation with agent-browser
## Core Workflow
Every browser automation follows this pattern:
1. **Navigate**: `agent-browser open <url>`
2. **Snapshot**: `agent-browser snapshot -i` (get element refs like `@e1`, `@e2`)
3. **Interact**: Use refs to click, fill, select
4. **Re-snapshot**: After navigation or DOM changes, get fresh refs
```bash
agent-browser open https://example.com/form
agent-browser snapshot -i
# Output: @e1 [input type="email"], @e2 [input type="password"], @e3 [button] "Submit"
agent-browser fill @e1 "user@example.com"
agent-browser fill @e2 "password123"
agent-browser click @e3
agent-browser wait --load networkidle
agent-browser snapshot -i # Check result
```
## Essential Commands
```bash
# Navigation
agent-browser open <url> # Navigate (aliases: goto, navigate)
agent-browser close # Close browser
# Snapshot
agent-browser snapshot -i # Interactive elements with refs (recommended)
agent-browser snapshot -s "#selector" # Scope to CSS selector
# Interaction (use @refs from snapshot)
agent-browser click @e1 # Click element
agent-browser fill @e2 "text" # Clear and type text
agent-browser type @e2 "text" # Type without clearing
agent-browser select @e1 "option" # Select dropdown option
agent-browser check @e1 # Check checkbox
agent-browser press Enter # Press key
agent-browser scroll down 500 # Scroll page
# Get information
agent-browser get text @e1 # Get element text
agent-browser get url # Get current URL
agent-browser get title # Get page title
# Wait
agent-browser wait @e1 # Wait for element
agent-browser wait --load networkidle # Wait for network idle
agent-browser wait --url "**/page" # Wait for URL pattern
agent-browser wait 2000 # Wait milliseconds
# Capture
agent-browser screenshot # Screenshot to temp dir
agent-browser screenshot --full # Full page screenshot
agent-browser pdf output.pdf # Save as PDF
```
## Common Patterns
### Form Submission
```bash
agent-browser open https://example.com/signup
agent-browser snapshot -i
agent-browser fill @e1 "Jane Doe"
agent-browser fill @e2 "jane@example.com"
agent-browser select @e3 "California"
agent-browser check @e4
agent-browser click @e5
agent-browser wait --load networkidle
```
### Authentication with State Persistence
```bash
# Login once and save state
agent-browser open https://app.example.com/login
agent-browser snapshot -i
agent-browser fill @e1 "$USERNAME"
agent-browser fill @e2 "$PASSWORD"
agent-browser click @e3
agent-browser wait --url "**/dashboard"
agent-browser state save auth.json
# Reuse in future sessions
agent-browser state load auth.json
agent-browser open https://app.example.com/dashboard
```
### Data Extraction
```bash
agent-browser open https://example.com/products
agent-browser snapshot -i
agent-browser get text @e5 # Get specific element text
agent-browser get text body > page.txt # Get all page text
# JSON output for parsing
agent-browser snapshot -i --json
agent-browser get text @e1 --json
```
### Parallel Sessions
```bash
agent-browser --session site1 open https://site-a.com
agent-browser --session site2 open https://site-b.com
agent-browser --session site1 snapshot -i
agent-browser --session site2 snapshot -i
agent-browser session list
```
### Visual Browser (Debugging)
```bash
agent-browser --headed open https://example.com
agent-browser highlight @e1 # Highlight element
agent-browser record start demo.webm # Record session
```
### iOS Simulator (Mobile Safari)
```bash
# List available iOS simulators
agent-browser device list
# Launch Safari on a specific device
agent-browser -p ios --device "iPhone 16 Pro" open https://example.com
# Same workflow as desktop - snapshot, interact, re-snapshot
agent-browser -p ios snapshot -i
agent-browser -p ios tap @e1 # Tap (alias for click)
agent-browser -p ios fill @e2 "text"
agent-browser -p ios swipe up # Mobile-specific gesture
# Take screenshot
agent-browser -p ios screenshot mobile.png
# Close session (shuts down simulator)
agent-browser -p ios close
```
**Requirements:** macOS with Xcode, Appium (`npm install -g appium && appium driver install xcuitest`)
**Real devices:** Works with physical iOS devices if pre-configured. Use `--device "<UDID>"` where UDID is from `xcrun xctrace list devices`.
## Ref Lifecycle (Important)
Refs (`@e1`, `@e2`, etc.) are invalidated when the page changes. Always re-snapshot after:
- Clicking links or buttons that navigate
- Form submissions
- Dynamic content loading (dropdowns, modals)
```bash
agent-browser click @e5 # Navigates to new page
agent-browser snapshot -i # MUST re-snapshot
agent-browser click @e1 # Use new refs
```
## Semantic Locators (Alternative to Refs)
When refs are unavailable or unreliable, use semantic locators:
```bash
agent-browser find text "Sign In" click
agent-browser find label "Email" fill "user@test.com"
agent-browser find role button click --name "Submit"
agent-browser find placeholder "Search" type "query"
agent-browser find testid "submit-btn" click
```
## Deep-Dive Documentation
| Reference | When to Use |
|-----------|-------------|
| [references/commands.md](references/commands.md) | Full command reference with all options |
| [references/snapshot-refs.md](references/snapshot-refs.md) | Ref lifecycle, invalidation rules, troubleshooting |
| [references/session-management.md](references/session-management.md) | Parallel sessions, state persistence, concurrent scraping |
| [references/authentication.md](references/authentication.md) | Login flows, OAuth, 2FA handling, state reuse |
| [references/video-recording.md](references/video-recording.md) | Recording workflows for debugging and documentation |
| [references/proxy-support.md](references/proxy-support.md) | Proxy configuration, geo-testing, rotating proxies |
## Ready-to-Use Templates
| Template | Description |
|----------|-------------|
| [templates/form-automation.sh](templates/form-automation.sh) | Form filling with validation |
| [templates/authenticated-session.sh](templates/authenticated-session.sh) | Login once, reuse state |
| [templates/capture-workflow.sh](templates/capture-workflow.sh) | Content extraction with screenshots |
```bash
./templates/form-automation.sh https://example.com/form
./templates/authenticated-session.sh https://app.example.com/login
./templates/capture-workflow.sh https://example.com ./output
```
@@ -0,0 +1,202 @@
# Authentication Patterns
Login flows, session persistence, OAuth, 2FA, and authenticated browsing.
**Related**: [session-management.md](session-management.md) for state persistence details, [SKILL.md](../SKILL.md) for quick start.
## Contents
- [Basic Login Flow](#basic-login-flow)
- [Saving Authentication State](#saving-authentication-state)
- [Restoring Authentication](#restoring-authentication)
- [OAuth / SSO Flows](#oauth--sso-flows)
- [Two-Factor Authentication](#two-factor-authentication)
- [HTTP Basic Auth](#http-basic-auth)
- [Cookie-Based Auth](#cookie-based-auth)
- [Token Refresh Handling](#token-refresh-handling)
- [Security Best Practices](#security-best-practices)
## Basic Login Flow
```bash
# Navigate to login page
agent-browser open https://app.example.com/login
agent-browser wait --load networkidle
# Get form elements
agent-browser snapshot -i
# Output: @e1 [input type="email"], @e2 [input type="password"], @e3 [button] "Sign In"
# Fill credentials
agent-browser fill @e1 "user@example.com"
agent-browser fill @e2 "password123"
# Submit
agent-browser click @e3
agent-browser wait --load networkidle
# Verify login succeeded
agent-browser get url # Should be dashboard, not login
```
## Saving Authentication State
After logging in, save state for reuse:
```bash
# Login first (see above)
agent-browser open https://app.example.com/login
agent-browser snapshot -i
agent-browser fill @e1 "user@example.com"
agent-browser fill @e2 "password123"
agent-browser click @e3
agent-browser wait --url "**/dashboard"
# Save authenticated state
agent-browser state save ./auth-state.json
```
## Restoring Authentication
Skip login by loading saved state:
```bash
# Load saved auth state
agent-browser state load ./auth-state.json
# Navigate directly to protected page
agent-browser open https://app.example.com/dashboard
# Verify authenticated
agent-browser snapshot -i
```
## OAuth / SSO Flows
For OAuth redirects:
```bash
# Start OAuth flow
agent-browser open https://app.example.com/auth/google
# Handle redirects automatically
agent-browser wait --url "**/accounts.google.com**"
agent-browser snapshot -i
# Fill Google credentials
agent-browser fill @e1 "user@gmail.com"
agent-browser click @e2 # Next button
agent-browser wait 2000
agent-browser snapshot -i
agent-browser fill @e3 "password"
agent-browser click @e4 # Sign in
# Wait for redirect back
agent-browser wait --url "**/app.example.com**"
agent-browser state save ./oauth-state.json
```
## Two-Factor Authentication
Handle 2FA with manual intervention:
```bash
# Login with credentials
agent-browser open https://app.example.com/login --headed # Show browser
agent-browser snapshot -i
agent-browser fill @e1 "user@example.com"
agent-browser fill @e2 "password123"
agent-browser click @e3
# Wait for user to complete 2FA manually
echo "Complete 2FA in the browser window..."
agent-browser wait --url "**/dashboard" --timeout 120000
# Save state after 2FA
agent-browser state save ./2fa-state.json
```
## HTTP Basic Auth
For sites using HTTP Basic Authentication:
```bash
# Set credentials before navigation
agent-browser set credentials username password
# Navigate to protected resource
agent-browser open https://protected.example.com/api
```
## Cookie-Based Auth
Manually set authentication cookies:
```bash
# Set auth cookie
agent-browser cookies set session_token "abc123xyz"
# Navigate to protected page
agent-browser open https://app.example.com/dashboard
```
## Token Refresh Handling
For sessions with expiring tokens:
```bash
#!/bin/bash
# Wrapper that handles token refresh
STATE_FILE="./auth-state.json"
# Try loading existing state
if [[ -f "$STATE_FILE" ]]; then
agent-browser state load "$STATE_FILE"
agent-browser open https://app.example.com/dashboard
# Check if session is still valid
URL=$(agent-browser get url)
if [[ "$URL" == *"/login"* ]]; then
echo "Session expired, re-authenticating..."
# Perform fresh login
agent-browser snapshot -i
agent-browser fill @e1 "$USERNAME"
agent-browser fill @e2 "$PASSWORD"
agent-browser click @e3
agent-browser wait --url "**/dashboard"
agent-browser state save "$STATE_FILE"
fi
else
# First-time login
agent-browser open https://app.example.com/login
# ... login flow ...
fi
```
## Security Best Practices
1. **Never commit state files** - They contain session tokens
```bash
echo "*.auth-state.json" >> .gitignore
```
2. **Use environment variables for credentials**
```bash
agent-browser fill @e1 "$APP_USERNAME"
agent-browser fill @e2 "$APP_PASSWORD"
```
3. **Clean up after automation**
```bash
agent-browser cookies clear
rm -f ./auth-state.json
```
4. **Use short-lived sessions for CI/CD**
```bash
# Don't persist state in CI
agent-browser open https://app.example.com/login
# ... login and perform actions ...
agent-browser close # Session ends, nothing persisted
```
@@ -0,0 +1,259 @@
# Command Reference
Complete reference for all agent-browser commands. For quick start and common patterns, see SKILL.md.
## Navigation
```bash
agent-browser open <url> # Navigate to URL (aliases: goto, navigate)
# Supports: https://, http://, file://, about:, data://
# Auto-prepends https:// if no protocol given
agent-browser back # Go back
agent-browser forward # Go forward
agent-browser reload # Reload page
agent-browser close # Close browser (aliases: quit, exit)
agent-browser connect 9222 # Connect to browser via CDP port
```
## Snapshot (page analysis)
```bash
agent-browser snapshot # Full accessibility tree
agent-browser snapshot -i # Interactive elements only (recommended)
agent-browser snapshot -c # Compact output
agent-browser snapshot -d 3 # Limit depth to 3
agent-browser snapshot -s "#main" # Scope to CSS selector
```
## Interactions (use @refs from snapshot)
```bash
agent-browser click @e1 # Click
agent-browser dblclick @e1 # Double-click
agent-browser focus @e1 # Focus element
agent-browser fill @e2 "text" # Clear and type
agent-browser type @e2 "text" # Type without clearing
agent-browser press Enter # Press key (alias: key)
agent-browser press Control+a # Key combination
agent-browser keydown Shift # Hold key down
agent-browser keyup Shift # Release key
agent-browser hover @e1 # Hover
agent-browser check @e1 # Check checkbox
agent-browser uncheck @e1 # Uncheck checkbox
agent-browser select @e1 "value" # Select dropdown option
agent-browser select @e1 "a" "b" # Select multiple options
agent-browser scroll down 500 # Scroll page (default: down 300px)
agent-browser scrollintoview @e1 # Scroll element into view (alias: scrollinto)
agent-browser drag @e1 @e2 # Drag and drop
agent-browser upload @e1 file.pdf # Upload files
```
## Get Information
```bash
agent-browser get text @e1 # Get element text
agent-browser get html @e1 # Get innerHTML
agent-browser get value @e1 # Get input value
agent-browser get attr @e1 href # Get attribute
agent-browser get title # Get page title
agent-browser get url # Get current URL
agent-browser get count ".item" # Count matching elements
agent-browser get box @e1 # Get bounding box
agent-browser get styles @e1 # Get computed styles (font, color, bg, etc.)
```
## Check State
```bash
agent-browser is visible @e1 # Check if visible
agent-browser is enabled @e1 # Check if enabled
agent-browser is checked @e1 # Check if checked
```
## Screenshots and PDF
```bash
agent-browser screenshot # Save to temporary directory
agent-browser screenshot path.png # Save to specific path
agent-browser screenshot --full # Full page
agent-browser pdf output.pdf # Save as PDF
```
## Video Recording
```bash
agent-browser record start ./demo.webm # Start recording
agent-browser click @e1 # Perform actions
agent-browser record stop # Stop and save video
agent-browser record restart ./take2.webm # Stop current + start new
```
## Wait
```bash
agent-browser wait @e1 # Wait for element
agent-browser wait 2000 # Wait milliseconds
agent-browser wait --text "Success" # Wait for text (or -t)
agent-browser wait --url "**/dashboard" # Wait for URL pattern (or -u)
agent-browser wait --load networkidle # Wait for network idle (or -l)
agent-browser wait --fn "window.ready" # Wait for JS condition (or -f)
```
## Mouse Control
```bash
agent-browser mouse move 100 200 # Move mouse
agent-browser mouse down left # Press button
agent-browser mouse up left # Release button
agent-browser mouse wheel 100 # Scroll wheel
```
## Semantic Locators (alternative to refs)
```bash
agent-browser find role button click --name "Submit"
agent-browser find text "Sign In" click
agent-browser find text "Sign In" click --exact # Exact match only
agent-browser find label "Email" fill "user@test.com"
agent-browser find placeholder "Search" type "query"
agent-browser find alt "Logo" click
agent-browser find title "Close" click
agent-browser find testid "submit-btn" click
agent-browser find first ".item" click
agent-browser find last ".item" click
agent-browser find nth 2 "a" hover
```
## Browser Settings
```bash
agent-browser set viewport 1920 1080 # Set viewport size
agent-browser set device "iPhone 14" # Emulate device
agent-browser set geo 37.7749 -122.4194 # Set geolocation (alias: geolocation)
agent-browser set offline on # Toggle offline mode
agent-browser set headers '{"X-Key":"v"}' # Extra HTTP headers
agent-browser set credentials user pass # HTTP basic auth (alias: auth)
agent-browser set media dark # Emulate color scheme
agent-browser set media light reduced-motion # Light mode + reduced motion
```
## Cookies and Storage
```bash
agent-browser cookies # Get all cookies
agent-browser cookies set name value # Set cookie
agent-browser cookies clear # Clear cookies
agent-browser storage local # Get all localStorage
agent-browser storage local key # Get specific key
agent-browser storage local set k v # Set value
agent-browser storage local clear # Clear all
```
## Network
```bash
agent-browser network route <url> # Intercept requests
agent-browser network route <url> --abort # Block requests
agent-browser network route <url> --body '{}' # Mock response
agent-browser network unroute [url] # Remove routes
agent-browser network requests # View tracked requests
agent-browser network requests --filter api # Filter requests
```
## Tabs and Windows
```bash
agent-browser tab # List tabs
agent-browser tab new [url] # New tab
agent-browser tab 2 # Switch to tab by index
agent-browser tab close # Close current tab
agent-browser tab close 2 # Close tab by index
agent-browser window new # New window
```
## Frames
```bash
agent-browser frame "#iframe" # Switch to iframe
agent-browser frame main # Back to main frame
```
## Dialogs
```bash
agent-browser dialog accept [text] # Accept dialog
agent-browser dialog dismiss # Dismiss dialog
```
## JavaScript
```bash
agent-browser eval "document.title" # Simple expressions only
agent-browser eval -b "<base64>" # Any JavaScript (base64 encoded)
agent-browser eval --stdin # Read script from stdin
```
Use `-b`/`--base64` or `--stdin` for reliable execution. Shell escaping with nested quotes and special characters is error-prone.
```bash
# Base64 encode your script, then:
agent-browser eval -b "ZG9jdW1lbnQucXVlcnlTZWxlY3RvcignW3NyYyo9Il9uZXh0Il0nKQ=="
# Or use stdin with heredoc for multiline scripts:
cat <<'EOF' | agent-browser eval --stdin
const links = document.querySelectorAll('a');
Array.from(links).map(a => a.href);
EOF
```
## State Management
```bash
agent-browser state save auth.json # Save cookies, storage, auth state
agent-browser state load auth.json # Restore saved state
```
## Global Options
```bash
agent-browser --session <name> ... # Isolated browser session
agent-browser --json ... # JSON output for parsing
agent-browser --headed ... # Show browser window (not headless)
agent-browser --full ... # Full page screenshot (-f)
agent-browser --cdp <port> ... # Connect via Chrome DevTools Protocol
agent-browser -p <provider> ... # Cloud browser provider (--provider)
agent-browser --proxy <url> ... # Use proxy server
agent-browser --headers <json> ... # HTTP headers scoped to URL's origin
agent-browser --executable-path <p> # Custom browser executable
agent-browser --extension <path> ... # Load browser extension (repeatable)
agent-browser --ignore-https-errors # Ignore SSL certificate errors
agent-browser --help # Show help (-h)
agent-browser --version # Show version (-V)
agent-browser <command> --help # Show detailed help for a command
```
## Debugging
```bash
agent-browser --headed open example.com # Show browser window
agent-browser --cdp 9222 snapshot # Connect via CDP port
agent-browser connect 9222 # Alternative: connect command
agent-browser console # View console messages
agent-browser console --clear # Clear console
agent-browser errors # View page errors
agent-browser errors --clear # Clear errors
agent-browser highlight @e1 # Highlight element
agent-browser trace start # Start recording trace
agent-browser trace stop trace.zip # Stop and save trace
```
## Environment Variables
```bash
AGENT_BROWSER_SESSION="mysession" # Default session name
AGENT_BROWSER_EXECUTABLE_PATH="/path/chrome" # Custom browser path
AGENT_BROWSER_EXTENSIONS="/ext1,/ext2" # Comma-separated extension paths
AGENT_BROWSER_PROVIDER="browserbase" # Cloud browser provider
AGENT_BROWSER_STREAM_PORT="9223" # WebSocket streaming port
AGENT_BROWSER_HOME="/path/to/agent-browser" # Custom install location
```
@@ -0,0 +1,188 @@
# Proxy Support
Proxy configuration for geo-testing, rate limiting avoidance, and corporate environments.
**Related**: [commands.md](commands.md) for global options, [SKILL.md](../SKILL.md) for quick start.
## Contents
- [Basic Proxy Configuration](#basic-proxy-configuration)
- [Authenticated Proxy](#authenticated-proxy)
- [SOCKS Proxy](#socks-proxy)
- [Proxy Bypass](#proxy-bypass)
- [Common Use Cases](#common-use-cases)
- [Verifying Proxy Connection](#verifying-proxy-connection)
- [Troubleshooting](#troubleshooting)
- [Best Practices](#best-practices)
## Basic Proxy Configuration
Set proxy via environment variable before starting:
```bash
# HTTP proxy
export HTTP_PROXY="http://proxy.example.com:8080"
agent-browser open https://example.com
# HTTPS proxy
export HTTPS_PROXY="https://proxy.example.com:8080"
agent-browser open https://example.com
# Both
export HTTP_PROXY="http://proxy.example.com:8080"
export HTTPS_PROXY="http://proxy.example.com:8080"
agent-browser open https://example.com
```
## Authenticated Proxy
For proxies requiring authentication:
```bash
# Include credentials in URL
export HTTP_PROXY="http://username:password@proxy.example.com:8080"
agent-browser open https://example.com
```
## SOCKS Proxy
```bash
# SOCKS5 proxy
export ALL_PROXY="socks5://proxy.example.com:1080"
agent-browser open https://example.com
# SOCKS5 with auth
export ALL_PROXY="socks5://user:pass@proxy.example.com:1080"
agent-browser open https://example.com
```
## Proxy Bypass
Skip proxy for specific domains:
```bash
# Bypass proxy for local addresses
export NO_PROXY="localhost,127.0.0.1,.internal.company.com"
agent-browser open https://internal.company.com # Direct connection
agent-browser open https://external.com # Via proxy
```
## Common Use Cases
### Geo-Location Testing
```bash
#!/bin/bash
# Test site from different regions using geo-located proxies
PROXIES=(
"http://us-proxy.example.com:8080"
"http://eu-proxy.example.com:8080"
"http://asia-proxy.example.com:8080"
)
for proxy in "${PROXIES[@]}"; do
export HTTP_PROXY="$proxy"
export HTTPS_PROXY="$proxy"
region=$(echo "$proxy" | grep -oP '^\w+-\w+')
echo "Testing from: $region"
agent-browser --session "$region" open https://example.com
agent-browser --session "$region" screenshot "./screenshots/$region.png"
agent-browser --session "$region" close
done
```
### Rotating Proxies for Scraping
```bash
#!/bin/bash
# Rotate through proxy list to avoid rate limiting
PROXY_LIST=(
"http://proxy1.example.com:8080"
"http://proxy2.example.com:8080"
"http://proxy3.example.com:8080"
)
URLS=(
"https://site.com/page1"
"https://site.com/page2"
"https://site.com/page3"
)
for i in "${!URLS[@]}"; do
proxy_index=$((i % ${#PROXY_LIST[@]}))
export HTTP_PROXY="${PROXY_LIST[$proxy_index]}"
export HTTPS_PROXY="${PROXY_LIST[$proxy_index]}"
agent-browser open "${URLS[$i]}"
agent-browser get text body > "output-$i.txt"
agent-browser close
sleep 1 # Polite delay
done
```
### Corporate Network Access
```bash
#!/bin/bash
# Access internal sites via corporate proxy
export HTTP_PROXY="http://corpproxy.company.com:8080"
export HTTPS_PROXY="http://corpproxy.company.com:8080"
export NO_PROXY="localhost,127.0.0.1,.company.com"
# External sites go through proxy
agent-browser open https://external-vendor.com
# Internal sites bypass proxy
agent-browser open https://intranet.company.com
```
## Verifying Proxy Connection
```bash
# Check your apparent IP
agent-browser open https://httpbin.org/ip
agent-browser get text body
# Should show proxy's IP, not your real IP
```
## Troubleshooting
### Proxy Connection Failed
```bash
# Test proxy connectivity first
curl -x http://proxy.example.com:8080 https://httpbin.org/ip
# Check if proxy requires auth
export HTTP_PROXY="http://user:pass@proxy.example.com:8080"
```
### SSL/TLS Errors Through Proxy
Some proxies perform SSL inspection. If you encounter certificate errors:
```bash
# For testing only - not recommended for production
agent-browser open https://example.com --ignore-https-errors
```
### Slow Performance
```bash
# Use proxy only when necessary
export NO_PROXY="*.cdn.com,*.static.com" # Direct CDN access
```
## Best Practices
1. **Use environment variables** - Don't hardcode proxy credentials
2. **Set NO_PROXY appropriately** - Avoid routing local traffic through proxy
3. **Test proxy before automation** - Verify connectivity with simple requests
4. **Handle proxy failures gracefully** - Implement retry logic for unstable proxies
5. **Rotate proxies for large scraping jobs** - Distribute load and avoid bans
@@ -0,0 +1,193 @@
# Session Management
Multiple isolated browser sessions with state persistence and concurrent browsing.
**Related**: [authentication.md](authentication.md) for login patterns, [SKILL.md](../SKILL.md) for quick start.
## Contents
- [Named Sessions](#named-sessions)
- [Session Isolation Properties](#session-isolation-properties)
- [Session State Persistence](#session-state-persistence)
- [Common Patterns](#common-patterns)
- [Default Session](#default-session)
- [Session Cleanup](#session-cleanup)
- [Best Practices](#best-practices)
## Named Sessions
Use `--session` flag to isolate browser contexts:
```bash
# Session 1: Authentication flow
agent-browser --session auth open https://app.example.com/login
# Session 2: Public browsing (separate cookies, storage)
agent-browser --session public open https://example.com
# Commands are isolated by session
agent-browser --session auth fill @e1 "user@example.com"
agent-browser --session public get text body
```
## Session Isolation Properties
Each session has independent:
- Cookies
- LocalStorage / SessionStorage
- IndexedDB
- Cache
- Browsing history
- Open tabs
## Session State Persistence
### Save Session State
```bash
# Save cookies, storage, and auth state
agent-browser state save /path/to/auth-state.json
```
### Load Session State
```bash
# Restore saved state
agent-browser state load /path/to/auth-state.json
# Continue with authenticated session
agent-browser open https://app.example.com/dashboard
```
### State File Contents
```json
{
"cookies": [...],
"localStorage": {...},
"sessionStorage": {...},
"origins": [...]
}
```
## Common Patterns
### Authenticated Session Reuse
```bash
#!/bin/bash
# Save login state once, reuse many times
STATE_FILE="/tmp/auth-state.json"
# Check if we have saved state
if [[ -f "$STATE_FILE" ]]; then
agent-browser state load "$STATE_FILE"
agent-browser open https://app.example.com/dashboard
else
# Perform login
agent-browser open https://app.example.com/login
agent-browser snapshot -i
agent-browser fill @e1 "$USERNAME"
agent-browser fill @e2 "$PASSWORD"
agent-browser click @e3
agent-browser wait --load networkidle
# Save for future use
agent-browser state save "$STATE_FILE"
fi
```
### Concurrent Scraping
```bash
#!/bin/bash
# Scrape multiple sites concurrently
# Start all sessions
agent-browser --session site1 open https://site1.com &
agent-browser --session site2 open https://site2.com &
agent-browser --session site3 open https://site3.com &
wait
# Extract from each
agent-browser --session site1 get text body > site1.txt
agent-browser --session site2 get text body > site2.txt
agent-browser --session site3 get text body > site3.txt
# Cleanup
agent-browser --session site1 close
agent-browser --session site2 close
agent-browser --session site3 close
```
### A/B Testing Sessions
```bash
# Test different user experiences
agent-browser --session variant-a open "https://app.com?variant=a"
agent-browser --session variant-b open "https://app.com?variant=b"
# Compare
agent-browser --session variant-a screenshot /tmp/variant-a.png
agent-browser --session variant-b screenshot /tmp/variant-b.png
```
## Default Session
When `--session` is omitted, commands use the default session:
```bash
# These use the same default session
agent-browser open https://example.com
agent-browser snapshot -i
agent-browser close # Closes default session
```
## Session Cleanup
```bash
# Close specific session
agent-browser --session auth close
# List active sessions
agent-browser session list
```
## Best Practices
### 1. Name Sessions Semantically
```bash
# GOOD: Clear purpose
agent-browser --session github-auth open https://github.com
agent-browser --session docs-scrape open https://docs.example.com
# AVOID: Generic names
agent-browser --session s1 open https://github.com
```
### 2. Always Clean Up
```bash
# Close sessions when done
agent-browser --session auth close
agent-browser --session scrape close
```
### 3. Handle State Files Securely
```bash
# Don't commit state files (contain auth tokens!)
echo "*.auth-state.json" >> .gitignore
# Delete after use
rm /tmp/auth-state.json
```
### 4. Timeout Long Sessions
```bash
# Set timeout for automated scripts
timeout 60 agent-browser --session long-task get text body
```
@@ -0,0 +1,194 @@
# Snapshot and Refs
Compact element references that reduce context usage dramatically for AI agents.
**Related**: [commands.md](commands.md) for full command reference, [SKILL.md](../SKILL.md) for quick start.
## Contents
- [How Refs Work](#how-refs-work)
- [Snapshot Command](#the-snapshot-command)
- [Using Refs](#using-refs)
- [Ref Lifecycle](#ref-lifecycle)
- [Best Practices](#best-practices)
- [Ref Notation Details](#ref-notation-details)
- [Troubleshooting](#troubleshooting)
## How Refs Work
Traditional approach:
```
Full DOM/HTML → AI parses → CSS selector → Action (~3000-5000 tokens)
```
agent-browser approach:
```
Compact snapshot → @refs assigned → Direct interaction (~200-400 tokens)
```
## The Snapshot Command
```bash
# Basic snapshot (shows page structure)
agent-browser snapshot
# Interactive snapshot (-i flag) - RECOMMENDED
agent-browser snapshot -i
```
### Snapshot Output Format
```
Page: Example Site - Home
URL: https://example.com
@e1 [header]
@e2 [nav]
@e3 [a] "Home"
@e4 [a] "Products"
@e5 [a] "About"
@e6 [button] "Sign In"
@e7 [main]
@e8 [h1] "Welcome"
@e9 [form]
@e10 [input type="email"] placeholder="Email"
@e11 [input type="password"] placeholder="Password"
@e12 [button type="submit"] "Log In"
@e13 [footer]
@e14 [a] "Privacy Policy"
```
## Using Refs
Once you have refs, interact directly:
```bash
# Click the "Sign In" button
agent-browser click @e6
# Fill email input
agent-browser fill @e10 "user@example.com"
# Fill password
agent-browser fill @e11 "password123"
# Submit the form
agent-browser click @e12
```
## Ref Lifecycle
**IMPORTANT**: Refs are invalidated when the page changes!
```bash
# Get initial snapshot
agent-browser snapshot -i
# @e1 [button] "Next"
# Click triggers page change
agent-browser click @e1
# MUST re-snapshot to get new refs!
agent-browser snapshot -i
# @e1 [h1] "Page 2" ← Different element now!
```
## Best Practices
### 1. Always Snapshot Before Interacting
```bash
# CORRECT
agent-browser open https://example.com
agent-browser snapshot -i # Get refs first
agent-browser click @e1 # Use ref
# WRONG
agent-browser open https://example.com
agent-browser click @e1 # Ref doesn't exist yet!
```
### 2. Re-Snapshot After Navigation
```bash
agent-browser click @e5 # Navigates to new page
agent-browser snapshot -i # Get new refs
agent-browser click @e1 # Use new refs
```
### 3. Re-Snapshot After Dynamic Changes
```bash
agent-browser click @e1 # Opens dropdown
agent-browser snapshot -i # See dropdown items
agent-browser click @e7 # Select item
```
### 4. Snapshot Specific Regions
For complex pages, snapshot specific areas:
```bash
# Snapshot just the form
agent-browser snapshot @e9
```
## Ref Notation Details
```
@e1 [tag type="value"] "text content" placeholder="hint"
│ │ │ │ │
│ │ │ │ └─ Additional attributes
│ │ │ └─ Visible text
│ │ └─ Key attributes shown
│ └─ HTML tag name
└─ Unique ref ID
```
### Common Patterns
```
@e1 [button] "Submit" # Button with text
@e2 [input type="email"] # Email input
@e3 [input type="password"] # Password input
@e4 [a href="/page"] "Link Text" # Anchor link
@e5 [select] # Dropdown
@e6 [textarea] placeholder="Message" # Text area
@e7 [div class="modal"] # Container (when relevant)
@e8 [img alt="Logo"] # Image
@e9 [checkbox] checked # Checked checkbox
@e10 [radio] selected # Selected radio
```
## Troubleshooting
### "Ref not found" Error
```bash
# Ref may have changed - re-snapshot
agent-browser snapshot -i
```
### Element Not Visible in Snapshot
```bash
# Scroll to reveal element
agent-browser scroll --bottom
agent-browser snapshot -i
# Or wait for dynamic content
agent-browser wait 1000
agent-browser snapshot -i
```
### Too Many Elements
```bash
# Snapshot specific container
agent-browser snapshot @e5
# Or use get text for content-only extraction
agent-browser get text @e5
```
@@ -0,0 +1,173 @@
# Video Recording
Capture browser automation as video for debugging, documentation, or verification.
**Related**: [commands.md](commands.md) for full command reference, [SKILL.md](../SKILL.md) for quick start.
## Contents
- [Basic Recording](#basic-recording)
- [Recording Commands](#recording-commands)
- [Use Cases](#use-cases)
- [Best Practices](#best-practices)
- [Output Format](#output-format)
- [Limitations](#limitations)
## Basic Recording
```bash
# Start recording
agent-browser record start ./demo.webm
# Perform actions
agent-browser open https://example.com
agent-browser snapshot -i
agent-browser click @e1
agent-browser fill @e2 "test input"
# Stop and save
agent-browser record stop
```
## Recording Commands
```bash
# Start recording to file
agent-browser record start ./output.webm
# Stop current recording
agent-browser record stop
# Restart with new file (stops current + starts new)
agent-browser record restart ./take2.webm
```
## Use Cases
### Debugging Failed Automation
```bash
#!/bin/bash
# Record automation for debugging
agent-browser record start ./debug-$(date +%Y%m%d-%H%M%S).webm
# Run your automation
agent-browser open https://app.example.com
agent-browser snapshot -i
agent-browser click @e1 || {
echo "Click failed - check recording"
agent-browser record stop
exit 1
}
agent-browser record stop
```
### Documentation Generation
```bash
#!/bin/bash
# Record workflow for documentation
agent-browser record start ./docs/how-to-login.webm
agent-browser open https://app.example.com/login
agent-browser wait 1000 # Pause for visibility
agent-browser snapshot -i
agent-browser fill @e1 "demo@example.com"
agent-browser wait 500
agent-browser fill @e2 "password"
agent-browser wait 500
agent-browser click @e3
agent-browser wait --load networkidle
agent-browser wait 1000 # Show result
agent-browser record stop
```
### CI/CD Test Evidence
```bash
#!/bin/bash
# Record E2E test runs for CI artifacts
TEST_NAME="${1:-e2e-test}"
RECORDING_DIR="./test-recordings"
mkdir -p "$RECORDING_DIR"
agent-browser record start "$RECORDING_DIR/$TEST_NAME-$(date +%s).webm"
# Run test
if run_e2e_test; then
echo "Test passed"
else
echo "Test failed - recording saved"
fi
agent-browser record stop
```
## Best Practices
### 1. Add Pauses for Clarity
```bash
# Slow down for human viewing
agent-browser click @e1
agent-browser wait 500 # Let viewer see result
```
### 2. Use Descriptive Filenames
```bash
# Include context in filename
agent-browser record start ./recordings/login-flow-2024-01-15.webm
agent-browser record start ./recordings/checkout-test-run-42.webm
```
### 3. Handle Recording in Error Cases
```bash
#!/bin/bash
set -e
cleanup() {
agent-browser record stop 2>/dev/null || true
agent-browser close 2>/dev/null || true
}
trap cleanup EXIT
agent-browser record start ./automation.webm
# ... automation steps ...
```
### 4. Combine with Screenshots
```bash
# Record video AND capture key frames
agent-browser record start ./flow.webm
agent-browser open https://example.com
agent-browser screenshot ./screenshots/step1-homepage.png
agent-browser click @e1
agent-browser screenshot ./screenshots/step2-after-click.png
agent-browser record stop
```
## Output Format
- Default format: WebM (VP8/VP9 codec)
- Compatible with all modern browsers and video players
- Compressed but high quality
## Limitations
- Recording adds slight overhead to automation
- Large recordings can consume significant disk space
- Some headless environments may have codec limitations
@@ -0,0 +1,97 @@
#!/bin/bash
# Template: Authenticated Session Workflow
# Purpose: Login once, save state, reuse for subsequent runs
# Usage: ./authenticated-session.sh <login-url> [state-file]
#
# Environment variables:
# APP_USERNAME - Login username/email
# APP_PASSWORD - Login password
#
# Two modes:
# 1. Discovery mode (default): Shows form structure so you can identify refs
# 2. Login mode: Performs actual login after you update the refs
#
# Setup steps:
# 1. Run once to see form structure (discovery mode)
# 2. Update refs in LOGIN FLOW section below
# 3. Set APP_USERNAME and APP_PASSWORD
# 4. Delete the DISCOVERY section
set -euo pipefail
LOGIN_URL="${1:?Usage: $0 <login-url> [state-file]}"
STATE_FILE="${2:-./auth-state.json}"
echo "Authentication workflow: $LOGIN_URL"
# ================================================================
# SAVED STATE: Skip login if valid saved state exists
# ================================================================
if [[ -f "$STATE_FILE" ]]; then
echo "Loading saved state from $STATE_FILE..."
agent-browser state load "$STATE_FILE"
agent-browser open "$LOGIN_URL"
agent-browser wait --load networkidle
CURRENT_URL=$(agent-browser get url)
if [[ "$CURRENT_URL" != *"login"* ]] && [[ "$CURRENT_URL" != *"signin"* ]]; then
echo "Session restored successfully"
agent-browser snapshot -i
exit 0
fi
echo "Session expired, performing fresh login..."
rm -f "$STATE_FILE"
fi
# ================================================================
# DISCOVERY MODE: Shows form structure (delete after setup)
# ================================================================
echo "Opening login page..."
agent-browser open "$LOGIN_URL"
agent-browser wait --load networkidle
echo ""
echo "Login form structure:"
echo "---"
agent-browser snapshot -i
echo "---"
echo ""
echo "Next steps:"
echo " 1. Note the refs: username=@e?, password=@e?, submit=@e?"
echo " 2. Update the LOGIN FLOW section below with your refs"
echo " 3. Set: export APP_USERNAME='...' APP_PASSWORD='...'"
echo " 4. Delete this DISCOVERY MODE section"
echo ""
agent-browser close
exit 0
# ================================================================
# LOGIN FLOW: Uncomment and customize after discovery
# ================================================================
# : "${APP_USERNAME:?Set APP_USERNAME environment variable}"
# : "${APP_PASSWORD:?Set APP_PASSWORD environment variable}"
#
# agent-browser open "$LOGIN_URL"
# agent-browser wait --load networkidle
# agent-browser snapshot -i
#
# # Fill credentials (update refs to match your form)
# agent-browser fill @e1 "$APP_USERNAME"
# agent-browser fill @e2 "$APP_PASSWORD"
# agent-browser click @e3
# agent-browser wait --load networkidle
#
# # Verify login succeeded
# FINAL_URL=$(agent-browser get url)
# if [[ "$FINAL_URL" == *"login"* ]] || [[ "$FINAL_URL" == *"signin"* ]]; then
# echo "Login failed - still on login page"
# agent-browser screenshot /tmp/login-failed.png
# agent-browser close
# exit 1
# fi
#
# # Save state for future runs
# echo "Saving state to $STATE_FILE"
# agent-browser state save "$STATE_FILE"
# echo "Login successful"
# agent-browser snapshot -i
+69
View File
@@ -0,0 +1,69 @@
#!/bin/bash
# Template: Content Capture Workflow
# Purpose: Extract content from web pages (text, screenshots, PDF)
# Usage: ./capture-workflow.sh <url> [output-dir]
#
# Outputs:
# - page-full.png: Full page screenshot
# - page-structure.txt: Page element structure with refs
# - page-text.txt: All text content
# - page.pdf: PDF version
#
# Optional: Load auth state for protected pages
set -euo pipefail
TARGET_URL="${1:?Usage: $0 <url> [output-dir]}"
OUTPUT_DIR="${2:-.}"
echo "Capturing: $TARGET_URL"
mkdir -p "$OUTPUT_DIR"
# Optional: Load authentication state
# if [[ -f "./auth-state.json" ]]; then
# echo "Loading authentication state..."
# agent-browser state load "./auth-state.json"
# fi
# Navigate to target
agent-browser open "$TARGET_URL"
agent-browser wait --load networkidle
# Get metadata
TITLE=$(agent-browser get title)
URL=$(agent-browser get url)
echo "Title: $TITLE"
echo "URL: $URL"
# Capture full page screenshot
agent-browser screenshot --full "$OUTPUT_DIR/page-full.png"
echo "Saved: $OUTPUT_DIR/page-full.png"
# Get page structure with refs
agent-browser snapshot -i > "$OUTPUT_DIR/page-structure.txt"
echo "Saved: $OUTPUT_DIR/page-structure.txt"
# Extract all text content
agent-browser get text body > "$OUTPUT_DIR/page-text.txt"
echo "Saved: $OUTPUT_DIR/page-text.txt"
# Save as PDF
agent-browser pdf "$OUTPUT_DIR/page.pdf"
echo "Saved: $OUTPUT_DIR/page.pdf"
# Optional: Extract specific elements using refs from structure
# agent-browser get text @e5 > "$OUTPUT_DIR/main-content.txt"
# Optional: Handle infinite scroll pages
# for i in {1..5}; do
# agent-browser scroll down 1000
# agent-browser wait 1000
# done
# agent-browser screenshot --full "$OUTPUT_DIR/page-scrolled.png"
# Cleanup
agent-browser close
echo ""
echo "Capture complete:"
ls -la "$OUTPUT_DIR"
+62
View File
@@ -0,0 +1,62 @@
#!/bin/bash
# Template: Form Automation Workflow
# Purpose: Fill and submit web forms with validation
# Usage: ./form-automation.sh <form-url>
#
# This template demonstrates the snapshot-interact-verify pattern:
# 1. Navigate to form
# 2. Snapshot to get element refs
# 3. Fill fields using refs
# 4. Submit and verify result
#
# Customize: Update the refs (@e1, @e2, etc.) based on your form's snapshot output
set -euo pipefail
FORM_URL="${1:?Usage: $0 <form-url>}"
echo "Form automation: $FORM_URL"
# Step 1: Navigate to form
agent-browser open "$FORM_URL"
agent-browser wait --load networkidle
# Step 2: Snapshot to discover form elements
echo ""
echo "Form structure:"
agent-browser snapshot -i
# Step 3: Fill form fields (customize these refs based on snapshot output)
#
# Common field types:
# agent-browser fill @e1 "John Doe" # Text input
# agent-browser fill @e2 "user@example.com" # Email input
# agent-browser fill @e3 "SecureP@ss123" # Password input
# agent-browser select @e4 "Option Value" # Dropdown
# agent-browser check @e5 # Checkbox
# agent-browser click @e6 # Radio button
# agent-browser fill @e7 "Multi-line text" # Textarea
# agent-browser upload @e8 /path/to/file.pdf # File upload
#
# Uncomment and modify:
# agent-browser fill @e1 "Test User"
# agent-browser fill @e2 "test@example.com"
# agent-browser click @e3 # Submit button
# Step 4: Wait for submission
# agent-browser wait --load networkidle
# agent-browser wait --url "**/success" # Or wait for redirect
# Step 5: Verify result
echo ""
echo "Result:"
agent-browser get url
agent-browser snapshot -i
# Optional: Capture evidence
agent-browser screenshot /tmp/form-result.png
echo "Screenshot saved: /tmp/form-result.png"
# Cleanup
agent-browser close
echo "Done"
@@ -0,0 +1,337 @@
---
name: create-documentation
description: Generate markdown documentation for a module or feature
---
You are creating proper markdown documentation for a feature or guide in the Documenso documentation site.
**Read [WRITING_STYLE.md](../../../WRITING_STYLE.md) first** for tone, formatting conventions, and anti-patterns to avoid.
## Your Task
1. **Identify the scope** - Based on the conversation context, determine what feature or topic needs documentation. Ask the user if unclear.
2. **Identify the audience** - Is this for Users, Developers, or Self-Hosters?
3. **Read the source code** - Understand the feature, API, or configuration being documented.
4. **Read existing docs** - Check `apps/docs/content/docs/` for documentation to update.
5. **Write comprehensive documentation** - Create or update MDX docs following the patterns below.
6. **Update navigation** - Add to the relevant `meta.json` if creating a new page.
## Documentation Framework
This project uses [Fumadocs](https://fumadocs.dev). All documentation lives in `apps/docs/content/docs/` as MDX files. The docs app is a Next.js app at `apps/docs/`.
## Documentation Structure
```
apps/docs/content/docs/
├── index.mdx # Landing page with audience navigation
├── meta.json # Root navigation: guides + resources
├── users/ # Application usage guides
│ ├── meta.json # { "root": true, "pages": [...] }
│ ├── getting-started/ # Account creation, first document
│ ├── documents/ # Upload, recipients, fields, send
│ │ └── advanced/ # AI detection, visibility, placeholders
│ ├── templates/ # Create and use templates
│ ├── organisations/ # Overview, members, groups, SSO, billing
│ │ ├── single-sign-on/
│ │ └── preferences/
│ └── settings/ # Profile, security, API tokens
├── developers/ # API and integration docs
│ ├── meta.json # { "root": true, "pages": [...] }
│ ├── getting-started/ # Authentication, first API call
│ ├── api/ # Documents, recipients, fields, templates, teams
│ ├── webhooks/ # Setup, events, verification
│ ├── embedding/ # Authoring, direct links, CSS vars, SDKs
│ │ └── sdks/ # React, Vue, Svelte, Solid, Preact, Angular
│ ├── examples/ # Common workflows
│ ├── local-development/ # Quickstart, manual, translations
│ └── contributing/ # Contributing translations
├── self-hosting/ # Self-hosting documentation
│ ├── meta.json # { "root": true, "pages": [...] }
│ ├── getting-started/ # Quick start, requirements, tips
│ ├── deployment/ # Docker, docker-compose, Kubernetes, Railway
│ ├── configuration/ # Environment, database, email, storage
│ │ ├── signing-certificate/ # Local, Google Cloud HSM, timestamp
│ │ └── advanced/ # OAuth providers, AI features
│ └── maintenance/ # Upgrades, backups, troubleshooting
├── concepts/ # Shared across audiences
│ └── ... # Document lifecycle, field types, signing
├── compliance/ # eSign, GDPR, standards, certifications
└── policies/ # Terms, privacy, security, licenses
```
### Where to Put Documentation
| Type | Location | When to use |
| ------------------- | ------------------------------------------------ | -------------------------------------------------- |
| **User Guide** | `apps/docs/content/docs/users/<section>/` | UI workflows for using the Documenso web app |
| **Developer Guide** | `apps/docs/content/docs/developers/<section>/` | API reference, SDK guides, webhooks, embedding |
| **Self-Hosting** | `apps/docs/content/docs/self-hosting/<section>/` | Deployment, configuration, environment variables |
| **Concept** | `apps/docs/content/docs/concepts/` | Cross-audience concepts (document lifecycle, etc.) |
| **Compliance** | `apps/docs/content/docs/compliance/` | Legal and regulatory documentation |
### Navigation (meta.json)
Each directory has a `meta.json` controlling navigation order:
```json
{
"title": "Section Title",
"pages": ["getting-started", "documents", "templates"]
}
```
Top-level audience sections use `"root": true`:
```json
{
"title": "Users",
"description": "Send and sign documents",
"root": true,
"pages": ["getting-started", "documents", "templates", "organisations", "settings"]
}
```
Root `meta.json` uses `---Label---` for section dividers:
```json
{
"title": "Documentation",
"pages": [
"---Guides---",
"users",
"developers",
"self-hosting",
"---Resources---",
"concepts",
"compliance",
"policies"
]
}
```
## MDX File Format
### Frontmatter
Every page needs frontmatter:
```yaml
---
title: Upload Documents
description: Upload documents to Documenso to prepare them for signing. Covers supported formats, file size limits, and upload methods.
---
```
### Fumadocs Components
Import components at the top of the file (after frontmatter):
```mdx
import { Accordion, Accordions } from 'fumadocs-ui/components/accordion';
import { Callout } from 'fumadocs-ui/components/callout';
import { Step, Steps } from 'fumadocs-ui/components/steps';
import { Tab, Tabs } from 'fumadocs-ui/components/tabs';
;
```
Callouts (use sparingly for warnings, beta features, security):
```mdx
<Callout type="info">Informational note about behavior.</Callout>
<Callout type="warn">Warning about potential issues or breaking changes.</Callout>
<Callout type="error">Critical warning about data loss or security.</Callout>
```
Steps (for sequential UI instructions):
```mdx
{/* prettier-ignore */}
<Steps>
<Step>
### Step title
Step description.
</Step>
<Step>
### Next step
Next description.
</Step>
</Steps>
```
Tabs (for multiple approaches or platforms):
````mdx
<Tabs items={['cURL', 'JavaScript', 'Python']}>
<Tab value="cURL">```bash curl -X POST ... ```</Tab>
<Tab value="JavaScript">```typescript const response = await fetch(...) ```</Tab>
</Tabs>
````
## Page Structure by Audience
### User Documentation
```mdx
---
title: Feature Name
description: Brief description for SEO and previews.
---
import { Callout } from 'fumadocs-ui/components/callout';
import { Step, Steps } from 'fumadocs-ui/components/steps';
## Limitations
| Limitation | Value |
| ----------------- | -------- |
| Supported format | PDF only |
| Maximum file size | 50MB |
## How to Do the Thing
{/* prettier-ignore */}
<Steps>
<Step>
### Navigate to the page
Open **Settings > Feature**.
</Step>
<Step>
### Configure the setting
Fill in the required fields and click **Save**.
</Step>
</Steps>
---
## See Also
- [Related Guide](/docs/users/related)
```
### Developer Documentation
````mdx
---
title: Documents API
description: Create, manage, and send documents for signing via the API.
---
import { Callout } from 'fumadocs-ui/components/callout';
import { Tab, Tabs } from 'fumadocs-ui/components/tabs';
<Callout type="warn">
This guide may not reflect the latest endpoints. For an always up-to-date reference, see the
[OpenAPI Reference](https://openapi.documenso.com).
</Callout>
## Overview
Brief description of the resource and what you can do with it.
## Resource Object
| Property | Type | Description |
| -------- | ------ | ----------------- |
| `id` | string | Unique identifier |
| `status` | string | Current status |
## Create a Resource
```typescript
const response = await fetch('https://app.documenso.com/api/v2/document', {
method: 'POST',
headers: {
Authorization: 'Bearer YOUR_API_TOKEN',
'Content-Type': 'application/json',
},
body: JSON.stringify({
title: 'Service Agreement',
}),
});
```
````
---
## See Also
- [Related Guide](/docs/developers/related)
````
### Self-Hosting Documentation
```mdx
---
title: Environment Variables
description: Complete reference for all environment variables used to configure Documenso.
---
## Required Variables
| Variable | Description |
| ------------------ | ------------------------------------------------ |
| `NEXTAUTH_SECRET` | Secret key for session encryption (min 32 chars) |
| `DATABASE_URL` | PostgreSQL connection URL |
---
## Optional Variables
| Variable | Default | Description |
| -------------- | ------- | ---------------------- |
| `PORT` | `3000` | Port the server runs on |
---
## See Also
- [Database Configuration](/docs/self-hosting/configuration/database)
````
## Documentation Audiences
Tailor content to the audience:
- **User docs**: Focus on UI workflows, bold UI elements (**Settings**, **Save**), use `>` for navigation paths (**Settings > Team > Members**), number sequential steps, no code required
- **Developer docs**: API/SDK examples, authentication, webhooks, code samples in TypeScript, link to OpenAPI reference
- **Self-hosting docs**: Deployment guides, environment variables, Docker/non-Docker approaches, system requirements, troubleshooting
## Guidelines
See [WRITING_STYLE.md](../../../WRITING_STYLE.md) for complete guidelines. Key points:
- **Tone**: Direct, second-person, no emojis, no excessive personality
- **Examples**: Progressive complexity, all must be valid TypeScript
- **Tables**: Use Sharp-style nested parameter tables for API docs
- **Callouts**: Use sparingly for warnings, beta features, security
- **Cross-references**: Link related docs, add "See Also" sections
- **Navigation**: Update `meta.json` when adding new pages
- **Limitations**: Explicitly list what is NOT supported
- **Images**: Use `.webp` format, store in `apps/docs/public/`
## Process
1. **Identify the audience** - Users, Developers, or Self-Hosters?
2. **Explore the code** - Read source files to understand the feature
3. **Check existing docs** - Look in `apps/docs/content/docs/` for related pages
4. **Draft the structure** - Outline sections before writing
5. **Write content** - Fill in each section following audience-specific patterns
6. **Update navigation** - Add to relevant `meta.json` if creating a new page
7. **Add cross-references** - Link from related docs, add "See Also" section
## Begin
Analyze the conversation context to determine the documentation scope, read the relevant source code, and create comprehensive MDX documentation in `apps/docs/content/docs/`.
@@ -0,0 +1,56 @@
---
name: create-justification
description: Create a new justification file in .agents/justifications/ with a unique three-word ID, frontmatter, and formatted title
license: MIT
compatibility: opencode
metadata:
audience: agents
workflow: decision-making
---
## What I do
I help you create new justification files in the `.agents/justifications/` directory. Each justification file gets:
- A unique three-word identifier (e.g., `swift-emerald-river`)
- Frontmatter with the current date and formatted title
- Content you provide
## How to use
Run the script with a slug and content:
```bash
npx tsx scripts/create-justification.ts "decision-name" "Justification content here"
```
Or use heredoc for multi-line content:
```bash
npx tsx scripts/create-justification.ts "decision-name" << HEREDOC
Multi-line
justification content
goes here
HEREDOC
```
## File format
Files are created as: `{three-word-id}-{slug}.md`
Example: `swift-emerald-river-decision-name.md`
The file includes frontmatter:
```markdown
---
date: 2026-01-13
title: Decision Name
---
Your content here
```
## When to use me
Use this skill when you need to document the reasoning or justification for a decision, approach, or architectural choice. The unique ID ensures no filename conflicts, and the frontmatter provides metadata for organization.
+56
View File
@@ -0,0 +1,56 @@
---
name: create-plan
description: Create a new plan file in .agents/plans/ with a unique three-word ID, frontmatter, and formatted title
license: MIT
compatibility: opencode
metadata:
audience: agents
workflow: planning
---
## What I do
I help you create new plan files in the `.agents/plans/` directory. Each plan file gets:
- A unique three-word identifier (e.g., `happy-blue-moon`)
- Frontmatter with the current date and formatted title
- Content you provide
## How to use
Run the script with a slug and content:
```bash
npx tsx scripts/create-plan.ts "feature-name" "Plan content here"
```
Or use heredoc for multi-line content:
```bash
npx tsx scripts/create-plan.ts "feature-name" << HEREDOC
Multi-line
plan content
goes here
HEREDOC
```
## File format
Files are created as: `{three-word-id}-{slug}.md`
Example: `happy-blue-moon-feature-name.md`
The file includes frontmatter:
```markdown
---
date: 2026-01-13
title: Feature Name
---
Your content here
```
## When to use me
Use this skill when you need to create a new plan document for a feature, task, or project. The unique ID ensures no filename conflicts, and the frontmatter provides metadata for organization.
+56
View File
@@ -0,0 +1,56 @@
---
name: create-scratch
description: Create a new scratch file in .agents/scratches/ with a unique three-word ID, frontmatter, and formatted title
license: MIT
compatibility: opencode
metadata:
audience: agents
workflow: exploration
---
## What I do
I help you create new scratch files in the `.agents/scratches/` directory. Each scratch file gets:
- A unique three-word identifier (e.g., `calm-teal-cloud`)
- Frontmatter with the current date and formatted title
- Content you provide
## How to use
Run the script with a slug and content:
```bash
npx tsx scripts/create-scratch.ts "note-name" "Scratch content here"
```
Or use heredoc for multi-line content:
```bash
npx tsx scripts/create-scratch.ts "note-name" << HEREDOC
Multi-line
scratch content
goes here
HEREDOC
```
## File format
Files are created as: `{three-word-id}-{slug}.md`
Example: `calm-teal-cloud-note-name.md`
The file includes frontmatter:
```markdown
---
date: 2026-01-13
title: Note Name
---
Your content here
```
## When to use me
Use this skill when you need to create a temporary note, exploration document, or scratch pad for ideas. The unique ID ensures no filename conflicts, and the frontmatter provides metadata for organization.
@@ -0,0 +1,371 @@
---
name: envelope-editor-v2-e2e
description: Writing and maintaining Playwright E2E tests for the Envelope Editor V2. Use when the user needs to create, modify, debug, or extend E2E tests in packages/app-tests/e2e/envelope-editor-v2/. Triggers include requests to "write an e2e test", "add a test for the envelope editor", "test envelope settings/recipients/fields/items/attachments", "fix a failing envelope test", or any task involving Playwright tests for the envelope editor feature.
---
# Envelope Editor V2 E2E Tests
## Overview
The Envelope Editor V2 E2E test suite lives in `packages/app-tests/e2e/envelope-editor-v2/`. Each test file covers a distinct feature area of the envelope editor and follows a strict architectural pattern that tests the **same flow** across four surfaces:
1. **Document** (`documents/<id>`) - Native document editor
2. **Template** (`templates/<id>`) - Native template editor
3. **Embedded Create** (`/embed/v2/authoring/envelope/create`) - Embedded editor creating a new envelope
4. **Embedded Edit** (`/embed/v2/authoring/envelope/edit/<id>`) - Embedded editor updating an existing envelope
## Project Structure
```
packages/app-tests/
e2e/
envelope-editor-v2/
envelope-attachments.spec.ts # Attachment CRUD
envelope-fields.spec.ts # Field placement on PDF canvas
envelope-items.spec.ts # PDF document item CRUD
envelope-recipients.spec.ts # Recipient management
envelope-settings.spec.ts # Settings dialog
fixtures/
authentication.ts # apiSignin, apiSignout
documents.ts # Document tab helpers
envelope-editor.ts # Core fixture: surface openers + locator/action helpers
generic.ts # Toast assertions, text visibility
signature.ts # Signature pad helpers
playwright.config.ts # Test configuration
```
## Core Abstraction: `TEnvelopeEditorSurface`
Every test revolves around the `TEnvelopeEditorSurface` type from `fixtures/envelope-editor.ts`. This is the central abstraction that normalizes differences between the four surfaces:
```typescript
type TEnvelopeEditorSurface = {
root: Page; // The Playwright page
isEmbedded: boolean; // true for embed surfaces
envelopeId?: string; // Set for document/template/embed-edit, undefined for embed-create
envelopeType: 'DOCUMENT' | 'TEMPLATE';
userId: number; // Seeded user ID
userEmail: string; // Seeded user email
userName: string; // Seeded user name
teamId: number; // Seeded team ID
};
```
### Surface Openers (from `fixtures/envelope-editor.ts`)
```typescript
// Native surfaces - seed user + document/template, sign in, navigate
const surface = await openDocumentEnvelopeEditor(page);
const surface = await openTemplateEnvelopeEditor(page);
// Embedded surfaces - seed user, create API token, get presign token, navigate
const surface = await openEmbeddedEnvelopeEditor(page, {
envelopeType: 'DOCUMENT' | 'TEMPLATE',
mode?: 'create' | 'edit', // default: 'create'
tokenNamePrefix?: string, // for unique API token names
externalId?: string, // optional external ID in hash
features?: EmbeddedEditorConfig, // feature flags
});
```
## Test Architecture Pattern
Every test file follows this structure, with four `test.describe` blocks grouping tests by editor surface:
### 1. Imports
```typescript
import { type Page, expect, test } from '@playwright/test';
// Prisma enums if needed for DB assertions
import { SomePrismaEnum } from '@prisma/client';
import { nanoid } from '@documenso/lib/universal/id';
import { prisma } from '@documenso/prisma';
import {
type TEnvelopeEditorSurface, // Import needed helpers from the fixture
openDocumentEnvelopeEditor,
openEmbeddedEnvelopeEditor,
openTemplateEnvelopeEditor,
persistEmbeddedEnvelope, // ... other helpers
} from '../fixtures/envelope-editor';
import { expectToastTextToBeVisible } from '../fixtures/generic';
```
### 2. Type definitions and constants
```typescript
type FlowResult = {
externalId: string;
// ... other data needed for DB assertions
};
const TEST_VALUES = {
// Centralized test data constants
};
```
### 3. Local helper functions
```typescript
// Common: open settings and set external ID for DB lookup
const openSettingsDialog = async (root: Page) => {
await getEnvelopeEditorSettingsTrigger(root).click();
await expect(root.getByRole('heading', { name: 'Document Settings' })).toBeVisible();
};
const updateExternalId = async (surface: TEnvelopeEditorSurface, externalId: string) => {
await openSettingsDialog(surface.root);
await surface.root.locator('input[name="externalId"]').fill(externalId);
await surface.root.getByRole('button', { name: 'Update' }).click();
if (!surface.isEmbedded) {
await expectToastTextToBeVisible(surface.root, 'Envelope updated');
}
};
```
### 4. The flow function
A single `runXxxFlow` function that works across ALL surfaces. It handles embedded vs non-embedded differences internally:
```typescript
const runMyFeatureFlow = async (surface: TEnvelopeEditorSurface): Promise<FlowResult> => {
const externalId = `e2e-feature-${nanoid()}`;
// For embedded create, may need to add a PDF first
if (surface.isEmbedded && !surface.envelopeId) {
await addEnvelopeItemPdf(surface.root, 'embedded-feature.pdf');
}
await updateExternalId(surface, externalId);
// Handle embedded vs native differences
if (surface.isEmbedded) {
// No "Add Myself" button in embedded mode
await setRecipientEmail(surface.root, 0, 'embedded@example.com');
} else {
await clickAddMyselfButton(surface.root);
}
// ... perform feature-specific actions ...
// Navigate away and back to verify UI persistence
await clickEnvelopeEditorStep(surface.root, 'addFields');
await clickEnvelopeEditorStep(surface.root, 'upload');
// ... assert UI state after navigation ...
return { externalId /* ... */ };
};
```
### 5. Database assertion function
Uses Prisma directly to verify data was persisted correctly:
```typescript
const assertFeaturePersistedInDatabase = async ({
surface,
externalId,
// ... expected values
}: {
surface: TEnvelopeEditorSurface;
externalId: string;
// ...
}) => {
const envelope = await prisma.envelope.findFirstOrThrow({
where: {
externalId,
userId: surface.userId,
teamId: surface.teamId,
type: surface.envelopeType,
},
include: {
// Include related data as needed
documentMeta: true,
recipients: true,
fields: true,
envelopeAttachments: true,
},
orderBy: { createdAt: 'desc' },
});
// Assert expected values
expect(envelope.someField).toBe(expectedValue);
};
```
### 6. The four `test.describe` blocks
Tests are organized into four `test.describe` blocks, one per editor surface. Each describe block contains the tests relevant to that surface. This structure allows adding multiple tests per surface while keeping them grouped:
```typescript
test.describe('document editor', () => {
test('description of what is tested', async ({ page }) => {
const surface = await openDocumentEnvelopeEditor(page);
const result = await runMyFeatureFlow(surface);
await assertFeaturePersistedInDatabase({
surface,
...result,
});
});
// Additional document-editor-specific tests here...
});
test.describe('template editor', () => {
test('description of what is tested', async ({ page }) => {
const surface = await openTemplateEnvelopeEditor(page);
const result = await runMyFeatureFlow(surface);
await assertFeaturePersistedInDatabase({
surface,
...result,
});
});
// Additional template-editor-specific tests here...
});
test.describe('embedded create', () => {
test('description of what is tested', async ({ page }) => {
const surface = await openEmbeddedEnvelopeEditor(page, {
envelopeType: 'DOCUMENT',
tokenNamePrefix: 'e2e-embed-feature',
});
const result = await runMyFeatureFlow(surface);
// IMPORTANT: Must persist before DB assertions for embedded
await persistEmbeddedEnvelope(surface);
await assertFeaturePersistedInDatabase({
surface,
...result,
});
});
// Additional embedded-create-specific tests here...
});
test.describe('embedded edit', () => {
test('description of what is tested', async ({ page }) => {
const surface = await openEmbeddedEnvelopeEditor(page, {
envelopeType: 'TEMPLATE',
mode: 'edit',
tokenNamePrefix: 'e2e-embed-feature',
});
const result = await runMyFeatureFlow(surface);
// IMPORTANT: Must persist before DB assertions for embedded
await persistEmbeddedEnvelope(surface);
await assertFeaturePersistedInDatabase({
surface,
...result,
});
});
// Additional embedded-edit-specific tests here...
});
```
When a test only applies to specific surfaces (e.g., a document-only action like "send document"), only include it in the relevant describe block(s). Not every describe block needs the same tests -- the structure groups tests by surface, not by requiring symmetry.
## Key Differences Between Surfaces
| Behavior | Document/Template | Embedded Create | Embedded Edit |
| -------------------------- | -------------------------- | ----------------------------------------- | ----------------------------------------- |
| User seeding | Seed + sign in | Seed + API token | Seed + API token + seed envelope |
| "Add Myself" button | Available | Not available | Not available |
| Toast on settings update | Yes (`'Envelope updated'`) | No | No |
| PDF already attached | Yes (1 item) | No (0 items, must upload) | Yes (1 item) |
| Delete confirmation dialog | Yes (`'Delete'` button) | No (immediate) | No (immediate) |
| DB persistence timing | Immediate (autosaved) | After `persistEmbeddedEnvelope()` | After `persistEmbeddedEnvelope()` |
| Persist button label | N/A | `'Create Document'` / `'Create Template'` | `'Update Document'` / `'Update Template'` |
## Available Fixture Helpers
### From `fixtures/envelope-editor.ts`
**Locator helpers** (return Playwright Locators):
- `getEnvelopeEditorSettingsTrigger(root)` - Settings gear button
- `getEnvelopeItemTitleInputs(root)` - Title inputs for envelope items
- `getEnvelopeItemDragHandles(root)` - Drag handles for reordering items
- `getEnvelopeItemRemoveButtons(root)` - Remove buttons for items
- `getEnvelopeItemDropzoneInput(root)` - File input for PDF upload
- `getRecipientEmailInputs(root)` - Email inputs for recipients
- `getRecipientNameInputs(root)` - Name inputs for recipients
- `getRecipientRows(root)` - Full recipient row fieldsets
- `getRecipientRemoveButtons(root)` - Remove buttons for recipients
- `getSigningOrderInputs(root)` - Signing order number inputs
**Action helpers**:
- `addEnvelopeItemPdf(root, fileName?)` - Upload a PDF to the dropzone
- `clickEnvelopeEditorStep(root, stepId)` - Navigate to a step: `'upload'`, `'addFields'`, `'preview'`
- `clickAddMyselfButton(root)` - Click "Add Myself" (native only)
- `clickAddSignerButton(root)` - Click "Add Signer"
- `setRecipientEmail(root, index, email)` - Fill recipient email
- `setRecipientName(root, index, name)` - Fill recipient name
- `setRecipientRole(root, index, roleLabel)` - Set role via combobox
- `assertRecipientRole(root, index, roleLabel)` - Assert role value
- `toggleSigningOrder(root, enabled)` - Toggle signing order switch
- `toggleAllowDictateSigners(root, enabled)` - Toggle dictate signers switch
- `setSigningOrderValue(root, index, value)` - Set signing order number
- `persistEmbeddedEnvelope(surface)` - Click Create/Update button for embedded flows
### From `fixtures/generic.ts`
- `expectTextToBeVisible(page, text)` - Assert text visible on page
- `expectTextToNotBeVisible(page, text)` - Assert text not visible
- `expectToastTextToBeVisible(page, text)` - Assert toast message visible
## External ID Pattern
Every test uses an `externalId` (e.g., `e2e-feature-${nanoid()}`) set via the settings dialog. This unique ID is then used in Prisma queries to reliably locate the envelope in the database for assertions. This is critical because multiple tests run in parallel.
## Running Tests
```bash
# Run all envelope editor tests
npm run test:dev -w @documenso/app-tests -- --grep "Envelope Editor V2"
# Run a specific test file
npm run test:dev -w @documenso/app-tests -- e2e/envelope-editor-v2/envelope-recipients.spec.ts
# Run with UI
npm run test-ui:dev -w @documenso/app-tests -- e2e/envelope-editor-v2/
# Run specific test by name
npm run test:dev -w @documenso/app-tests -- --grep "documents/<id>: add myself"
```
## Checklist When Writing a New Test
1. Create the spec file in `packages/app-tests/e2e/envelope-editor-v2/`
2. Import `TEnvelopeEditorSurface` and the three opener functions
3. Import `persistEmbeddedEnvelope` if you need DB assertions for embedded flows
4. Define a `FlowResult` type for data passed between flow and assertion
5. Define `TEST_VALUES` constants for test data
6. Write `updateExternalId` helper (or reuse the pattern)
7. Write the `runXxxFlow` function handling embedded vs native differences
8. Write the `assertXxxPersistedInDatabase` function using Prisma
9. Create four `test.describe` blocks: `'document editor'`, `'template editor'`, `'embedded create'`, `'embedded edit'`
10. Place tests inside the appropriate describe block for each surface
11. For embedded create tests, add a PDF via `addEnvelopeItemPdf` before the flow
12. For embedded tests, call `persistEmbeddedEnvelope(surface)` before DB assertions
13. Use `surface.isEmbedded` to branch on behavioral differences (toasts, "Add Myself", etc.)
## Common Pitfalls
- **Missing `persistEmbeddedEnvelope`**: Embedded flows don't autosave. You MUST call this before any DB assertions.
- **PDF required for embedded create**: Embedded create starts with 0 items. Upload a PDF before navigating to fields.
- **Toast assertions in embedded**: Don't assert toasts for settings updates in embedded mode (they don't appear).
- **Parallel test isolation**: Always use a unique `externalId` via `nanoid()` so parallel tests don't collide.
- **Navigation verification**: Navigate away from and back to the current step to verify UI state persistence (the editor may re-render).
- **Delete confirmation**: Native surfaces show a confirmation dialog for item deletion; embedded surfaces delete immediately.
+75
View File
@@ -0,0 +1,75 @@
You are an expert in TypeScript, Node.js, Remix, React, Shadcn UI and Tailwind.
Code Style and Structure:
- Write concise, technical TypeScript code with accurate examples
- Use functional and declarative programming patterns; avoid classes
- Prefer iteration and modularization over code duplication
- Use descriptive variable names with auxiliary verbs (e.g., isLoading, hasError)
- Structure files: exported component, subcomponents, helpers, static content, types
Naming Conventions:
- Use lowercase with dashes for directories (e.g., components/auth-wizard)
- Favor named exports for components
TypeScript Usage:
- Use TypeScript for all code; prefer types over interfaces
- Use functional components with TypeScript interfaces
Syntax and Formatting:
- Create functions using `const fn = () => {}`
- Avoid unnecessary curly braces in conditionals; use concise syntax for simple statements
- Use declarative JSX
- Never use 'use client'
- Never use 1 line if statements
Error Handling and Validation:
- Prioritize error handling: handle errors and edge cases early
- Use early returns and guard clauses
- Implement proper error logging and user-friendly messages
- Use Zod for form validation
- Model expected errors as return values in Server Actions
- Use error boundaries for unexpected errors
UI and Styling:
- Use Shadcn UI, Radix, and Tailwind Aria for components and styling
- Implement responsive design with Tailwind CSS; use a mobile-first approach
- When using Lucide icons, prefer the longhand names, for example HomeIcon instead of Home
React forms
- Use zod for form validation react-hook-form for forms
- Look at TeamCreateDialog.tsx as an example of form usage
- Use <Form> <FormItem> elements, and also wrap the contents of form in a fieldset which should have the :disabled attribute when the form is loading
TRPC Specifics
- Every route should be in it's own file, example routers/teams/create-team.ts
- Every route should have a types file associated with it, example routers/teams/create-team.types.ts. These files should have the OpenAPI meta, and request/response zod schemas
- The request/response schemas should be named like Z[RouteName]RequestSchema and Z[RouteName]ResponseSchema
- Use create-team.ts and create-team.types.ts as an example when creating new routes.
- When creating the OpenAPI meta, only use GET and POST requests, do not use any other REST methods
- Deconstruct the input argument on it's one line of code.
Toast usage
- Use the t`string` macro from @lingui/react/macro to display toast messages
Remix/ReactRouter Usage
- Use (params: Route.Params) to get the params from the route
- Use (loaderData: Route.LoaderData) to get the loader data from the route
- When using loaderdata, deconstruct the data you need from the loader data inside the function body
- Do not use json() to return data, directly return the data
Translations
- Use <Trans>string</Trans> to display translations in jsx code, this should be imported from @lingui/react/macro
- Use the t`string` macro from @lingui/react/macro to display translations in typescript code
- t should be imported as const { t } = useLingui() where useLingui is imported from @lingui/react/macro
- String in constants should be using the t`string` macro
+32
View File
@@ -0,0 +1,32 @@
{
"name": "Documenso",
"image": "mcr.microsoft.com/devcontainers/base:bullseye",
"features": {
"ghcr.io/devcontainers/features/docker-in-docker:2": {
"version": "latest",
"enableNonRootDocker": "true",
"moby": "true"
},
"ghcr.io/devcontainers/features/node:1": {}
},
"onCreateCommand": "./.devcontainer/on-create.sh",
"forwardPorts": [3000, 54320, 9000, 2500, 1100],
"customizations": {
"vscode": {
"extensions": [
"aaron-bond.better-comments",
"bradlc.vscode-tailwindcss",
"dbaeumer.vscode-eslint",
"esbenp.prettier-vscode",
"mikestead.dotenv",
"unifiedjs.vscode-mdx",
"GitHub.copilot-chat",
"GitHub.copilot-labs",
"GitHub.copilot",
"GitHub.vscode-pull-request-github",
"Prisma.prisma",
"VisualStudioExptTeam.vscodeintellicode"
]
}
}
}
+10
View File
@@ -0,0 +1,10 @@
#!/usr/bin/env bash
# Install dependencies
npm install
# Copy the env file
cp .env.example .env
# Run the dev setup
npm run dx
+3
View File
@@ -0,0 +1,3 @@
#!/usr/bin/env bash
npm run dev
+36
View File
@@ -0,0 +1,36 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
# dependencies
node_modules
.pnp
.pnp.js
# testing
coverage
# next.js
.next/
out/
build
# misc
.DS_Store
*.pem
# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# local env files
.env
.env.local
.env.development.local
.env.test.local
.env.production.local
# turbo
.turbo
# vercel
.vercel
+9
View File
@@ -0,0 +1,9 @@
root = true
[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
indent_style = space
indent_size = 2
+199 -27
View File
@@ -1,33 +1,205 @@
# Database
# Option 1: You can use the provided remote test database, courtesy of the documenso team: postgres://documenso_test_user:GnmLG14u12sd9zHsd4vVWwP40WneFJMo@dpg-cf2hljh4reb5o45oqpq0-a.oregon-postgres.render.com/documenso_test_e2i3
# Option 2: Set up a local Postgres SQL instance (RECOMMENDED)
# ⚠ WARNING: The test database can be resetted or taken offline at any point.
# ⚠ WARNING: Please be aware that nothing written to the test databae is private.
DATABASE_URL=''
# The license key to enable enterprise features for self hosters
NEXT_PRIVATE_DOCUMENSO_LICENSE_KEY=
# URL
NEXT_PUBLIC_WEBAPP_URL='http://localhost:3000'
# [[AUTH]]
NEXTAUTH_SECRET="secret"
# AUTH
# For more see here: https://next-auth.js.org
NEXTAUTH_SECRET='lorem ipsum sit dolor random string for encryption this could literally be anything'
NEXTAUTH_URL='http://localhost:3000'
# [[CRYPTO]]
# Application Key for symmetric encryption and decryption
# REQUIRED: This should be a random string of at least 32 characters
NEXT_PRIVATE_ENCRYPTION_KEY="CAFEBABE"
# REQUIRED: This should be a random string of at least 32 characters
NEXT_PRIVATE_ENCRYPTION_SECONDARY_KEY="DEADBEEF"
# MAIL (NODEMAILER)
# SENDGRID
# Get a Sendgrid Api key here: https://signup.sendgrid.com
SENDGRID_API_KEY=''
# [[AUTH OPTIONAL]]
# Find documentation on setting up Google OAuth here:
# https://docs.documenso.com/developers/self-hosting/setting-up-oauth-providers#google-oauth-gmail
NEXT_PRIVATE_GOOGLE_CLIENT_ID=""
NEXT_PRIVATE_GOOGLE_CLIENT_SECRET=""
# Find documentation on setting up Microsoft OAuth here:
# https://docs.documenso.com/developers/self-hosting/setting-up-oauth-providers#microsoft-oauth-azure-ad
NEXT_PRIVATE_MICROSOFT_CLIENT_ID=""
NEXT_PRIVATE_MICROSOFT_CLIENT_SECRET=""
# SMTP
# Set SMTP credentials to use SMTP instead of the Sendgrid API.
SMTP_MAIL_HOST=''
SMTP_MAIL_PORT=''
SMTP_MAIL_USER=''
SMTP_MAIL_PASSWORD=''
NEXT_PRIVATE_OIDC_WELL_KNOWN=""
NEXT_PRIVATE_OIDC_CLIENT_ID=""
NEXT_PRIVATE_OIDC_CLIENT_SECRET=""
NEXT_PRIVATE_OIDC_PROVIDER_LABEL="OIDC"
NEXT_PRIVATE_OIDC_SKIP_VERIFY=""
# Specifies the prompt to use for OIDC signin, explicitly setting
# an empty string will omit the prompt parameter.
# See: https://www.cerberauth.com/blog/openid-connect-oauth2-prompts/
NEXT_PRIVATE_OIDC_PROMPT="login"
# Sender for signing requests and completion mails.
MAIL_FROM='documenso@localhost.com'
# [[URLS]]
NEXT_PUBLIC_WEBAPP_URL="http://localhost:3000"
# URL used by the web app to request itself (e.g. local background jobs)
NEXT_PRIVATE_INTERNAL_WEBAPP_URL="http://localhost:3000"
# OPTIONAL: Comma-separated hostnames or IPs whose webhooks are allowed to resolve to private/loopback addresses. (e.g., internal.example.com,192.168.1.5).
NEXT_PRIVATE_WEBHOOK_SSRF_BYPASS_HOSTS=
#FEATURE FLAGS
# Allow users to register via the /signup page. Otherwise they will be redirect to the home page.
ALLOW_SIGNUP=true
# [[SERVER]]
# OPTIONAL: The port the server will listen on. Defaults to 3000.
PORT=3000
# [[DATABASE]]
NEXT_PRIVATE_DATABASE_URL="postgres://documenso:password@127.0.0.1:54320/documenso"
# Defines the URL to use for the database when running migrations and other commands that won't work with a connection pool.
NEXT_PRIVATE_DIRECT_DATABASE_URL="postgres://documenso:password@127.0.0.1:54320/documenso"
# [[SIGNING]]
# The transport to use for document signing. Available options: local (default) | gcloud-hsm
NEXT_PRIVATE_SIGNING_TRANSPORT="local"
# OPTIONAL: The passphrase to use for the local file-based signing transport.
NEXT_PRIVATE_SIGNING_PASSPHRASE=
# OPTIONAL: The local file path to the .p12 file to use for the local signing transport.
NEXT_PRIVATE_SIGNING_LOCAL_FILE_PATH=
# OPTIONAL: The base64-encoded contents of the .p12 file to use for the local signing transport.
NEXT_PRIVATE_SIGNING_LOCAL_FILE_CONTENTS=
# OPTIONAL: The path to the Google Cloud HSM key to use for the gcloud-hsm signing transport.
NEXT_PRIVATE_SIGNING_GCLOUD_HSM_KEY_PATH=
# OPTIONAL: The path to the Google Cloud HSM public certificate file to use for the gcloud-hsm signing transport.
NEXT_PRIVATE_SIGNING_GCLOUD_HSM_PUBLIC_CRT_FILE_PATH=
# OPTIONAL: The base64-encoded contents of the Google Cloud HSM public certificate file to use for the gcloud-hsm signing transport.
NEXT_PRIVATE_SIGNING_GCLOUD_HSM_PUBLIC_CRT_FILE_CONTENTS=
# OPTIONAL: The path to the Google Cloud Credentials file to use for the gcloud-hsm signing transport.
NEXT_PRIVATE_SIGNING_GCLOUD_APPLICATION_CREDENTIALS_CONTENTS=
# OPTIONAL: The path to the certificate chain file for the gcloud-hsm signing transport.
NEXT_PRIVATE_SIGNING_GCLOUD_HSM_CERT_CHAIN_FILE_PATH=
# OPTIONAL: The base64-encoded contents of the certificate chain for the gcloud-hsm signing transport.
NEXT_PRIVATE_SIGNING_GCLOUD_HSM_CERT_CHAIN_CONTENTS=
# OPTIONAL: The Google Secret Manager path to retrieve the certificate for the gcloud-hsm signing transport.
NEXT_PRIVATE_SIGNING_GCLOUD_HSM_SECRET_MANAGER_CERT_PATH=
# OPTIONAL: Comma-separated list of timestamp authority URLs for PDF signing (enables LTV and archival timestamps).
NEXT_PRIVATE_SIGNING_TIMESTAMP_AUTHORITY=
# OPTIONAL: Contact info to embed in PDF signatures. Defaults to the webapp URL.
NEXT_PUBLIC_SIGNING_CONTACT_INFO=
# OPTIONAL: Set to "true" to use the legacy adbe.pkcs7.detached subfilter instead of ETSI.CAdES.detached.
NEXT_PRIVATE_USE_LEGACY_SIGNING_SUBFILTER=
# [[STORAGE]]
# OPTIONAL: Defines the storage transport to use. Available options: database (default) | s3
NEXT_PUBLIC_UPLOAD_TRANSPORT="database"
# OPTIONAL: Defines the endpoint to use for the S3 storage transport. Relevant when using third-party S3-compatible providers.
NEXT_PRIVATE_UPLOAD_ENDPOINT="http://127.0.0.1:9002"
# OPTIONAL: Defines the force path style to use for the S3 storage transport. Relevant when using third-party S3-compatible providers.
# This will change it from using virtual hosts <bucket>.domain.com/<path> to fully qualified paths domain.com/<bucket>/<path>
NEXT_PRIVATE_UPLOAD_FORCE_PATH_STYLE="false"
# OPTIONAL: Defines the region to use for the S3 storage transport. Defaults to us-east-1.
NEXT_PRIVATE_UPLOAD_REGION="unknown"
# REQUIRED: Defines the bucket to use for the S3 storage transport.
NEXT_PRIVATE_UPLOAD_BUCKET="documenso"
# OPTIONAL: Defines the access key ID to use for the S3 storage transport.
NEXT_PRIVATE_UPLOAD_ACCESS_KEY_ID="documenso"
# OPTIONAL: Defines the secret access key to use for the S3 storage transport.
NEXT_PRIVATE_UPLOAD_SECRET_ACCESS_KEY="password"
# [[SMTP]]
# OPTIONAL: Defines the transport to use for sending emails. Available options: smtp-auth (default) | smtp-api | mailchannels
NEXT_PRIVATE_SMTP_TRANSPORT="smtp-auth"
# OPTIONAL: Defines the host to use for sending emails.
NEXT_PRIVATE_SMTP_HOST="127.0.0.1"
# OPTIONAL: Defines the port to use for sending emails.
NEXT_PRIVATE_SMTP_PORT=2500
# OPTIONAL: Defines the username to use with the SMTP server.
NEXT_PRIVATE_SMTP_USERNAME="documenso"
# OPTIONAL: Defines the password to use with the SMTP server.
NEXT_PRIVATE_SMTP_PASSWORD="password"
# OPTIONAL: Defines the API key user to use with the SMTP server.
NEXT_PRIVATE_SMTP_APIKEY_USER=
# OPTIONAL: Defines the API key to use with the SMTP server.
NEXT_PRIVATE_SMTP_APIKEY=
# OPTIONAL: Defines whether to force the use of TLS.
NEXT_PRIVATE_SMTP_SECURE=
# OPTIONAL: if this is true and NEXT_PRIVATE_SMTP_SECURE is false then TLS is not used even if the server supports STARTTLS extension
NEXT_PRIVATE_SMTP_UNSAFE_IGNORE_TLS=
# REQUIRED: Defines the sender name to use for the from address.
NEXT_PRIVATE_SMTP_FROM_NAME="Documenso"
# REQUIRED: Defines the email address to use as the from address.
NEXT_PRIVATE_SMTP_FROM_ADDRESS="noreply@documenso.com"
# OPTIONAL: Defines the service for nodemailer
NEXT_PRIVATE_SMTP_SERVICE=
# OPTIONAL: The API key to use for Resend.com
NEXT_PRIVATE_RESEND_API_KEY=
# OPTIONAL: The API key to use for MailChannels.
NEXT_PRIVATE_MAILCHANNELS_API_KEY=
# OPTIONAL: The endpoint to use for the MailChannels API if using a proxy.
NEXT_PRIVATE_MAILCHANNELS_ENDPOINT=
# OPTIONAL: The domain to use for DKIM signing.
NEXT_PRIVATE_MAILCHANNELS_DKIM_DOMAIN=
# OPTIONAL: The selector to use for DKIM signing.
NEXT_PRIVATE_MAILCHANNELS_DKIM_SELECTOR=
# OPTIONAL: The private key to use for DKIM signing.
NEXT_PRIVATE_MAILCHANNELS_DKIM_PRIVATE_KEY=
# OPTIONAL: Displays the maximum document upload limit to the user in MBs
NEXT_PUBLIC_DOCUMENT_SIZE_UPLOAD_LIMIT=5
# [[EE ONLY]]
# OPTIONAL: The AWS SES API KEY to verify email domains with.
NEXT_PRIVATE_SES_ACCESS_KEY_ID=
NEXT_PRIVATE_SES_SECRET_ACCESS_KEY=
NEXT_PRIVATE_SES_REGION=
# [[STRIPE]]
NEXT_PRIVATE_STRIPE_API_KEY=
NEXT_PRIVATE_STRIPE_WEBHOOK_SECRET=
# [[BACKGROUND JOBS]]
# Available options: local (default) | inngest | bullmq
NEXT_PRIVATE_JOBS_PROVIDER="local"
NEXT_PRIVATE_INNGEST_EVENT_KEY=
# OPTIONAL: Redis URL for the BullMQ jobs provider.
NEXT_PRIVATE_REDIS_URL="redis://localhost:63790"
# OPTIONAL: Key prefix for Redis to namespace queues (useful when sharing a Redis instance).
NEXT_PRIVATE_REDIS_PREFIX="documenso"
# OPTIONAL: Number of concurrent jobs to process. Defaults to 10.
# NEXT_PRIVATE_BULLMQ_CONCURRENCY=10
# [[FEATURES]]
# OPTIONAL: Leave blank to disable PostHog and feature flags.
NEXT_PUBLIC_POSTHOG_KEY=""
# OPTIONAL: Leave blank to disable billing.
NEXT_PUBLIC_FEATURE_BILLING_ENABLED=
# OPTIONAL: Leave blank to allow users to signup through /signup page.
NEXT_PUBLIC_DISABLE_SIGNUP=
# OPTIONAL: Comma-separated list of email domains allowed to sign up (e.g., example.com,acme.org).
NEXT_PRIVATE_ALLOWED_SIGNUP_DOMAINS=
# OPTIONAL: Set to true to use internal webapp url in browserless requests.
NEXT_PUBLIC_USE_INTERNAL_URL_BROWSERLESS=false
# [[TELEMETRY]]
# OPTIONAL: Set to "true" to disable anonymous telemetry for self-hosted instances.
# Telemetry helps us understand how Documenso is being used and improve the product.
# We only collect: app version, installation ID, and node ID. No personal data is collected.
DOCUMENSO_DISABLE_TELEMETRY=
# [[AI]]
# OPTIONAL: Google Cloud Project ID for Vertex AI.
GOOGLE_VERTEX_PROJECT_ID=""
# OPTIONAL: Google Cloud region for Vertex AI. Defaults to "global".
GOOGLE_VERTEX_LOCATION="global"
# OPTIONAL: API key for Google Vertex AI (Gemini). Get your key from:
# https://console.cloud.google.com/vertex-ai/studio/settings/api-keys
GOOGLE_VERTEX_API_KEY=""
# [[CLOUDFLARE TURNSTILE]]
# OPTIONAL: Cloudflare Turnstile site key (public). When configured, Turnstile challenges
# will be shown on sign-up (visible) and sign-in (invisible) pages.
# See: https://developers.cloudflare.com/turnstile/
NEXT_PUBLIC_TURNSTILE_SITE_KEY=
# OPTIONAL: Cloudflare Turnstile secret key (server-side verification).
NEXT_PRIVATE_TURNSTILE_SECRET_KEY=
# [[E2E Tests]]
E2E_TEST_AUTHENTICATE_USERNAME="Test User"
E2E_TEST_AUTHENTICATE_USER_EMAIL="testuser@mail.com"
E2E_TEST_AUTHENTICATE_USER_PASSWORD="test_Password123"
# OPTIONAL: Set to "true" to disable all rate limiting. Only use for E2E tests.
DANGEROUS_BYPASS_RATE_LIMITS=
# [[LOGGER]]
# OPTIONAL: The file to save the logger output to. Will disable stdout if provided.
NEXT_PRIVATE_LOGGER_FILE_PATH=
# [[PLAIN SUPPORT]]
NEXT_PRIVATE_PLAIN_API_KEY=
+8
View File
@@ -0,0 +1,8 @@
# Config files
*.config.js
*.config.cjs
# Statically hosted javascript files
apps/*/public/*.js
apps/*/public/*.cjs
scripts/
+16
View File
@@ -0,0 +1,16 @@
/** @type {import('eslint').Linter.Config} */
module.exports = {
root: true,
extends: ['@documenso/eslint-config'],
rules: {
'@next/next/no-img-element': 'off',
'no-unreachable': 'error',
'react-hooks/exhaustive-deps': 'off',
},
settings: {
next: {
rootDir: ['apps/*/'],
},
},
ignorePatterns: ['lingui.config.ts', 'packages/lib/translations/**/*.js'],
};
+47
View File
@@ -0,0 +1,47 @@
name: 'Bug Report'
labels: ['bug']
description: Create a bug report to help us improve
body:
- type: markdown
attributes:
value: Thank you for reporting an issue.
Please fill in as much of the form below as you're able to.
- type: textarea
attributes:
label: Issue Description
description: Please provide a clear and concise description of the problem.
- type: textarea
attributes:
label: Steps to Reproduce
description: Please provide step-by-step instructions to reproduce the issue. Include code snippets, error messages, and any other relevant information.
- type: textarea
attributes:
label: Expected Behavior
description: Describe what you expected to happen.
- type: textarea
attributes:
label: Current Behavior
description: Describe what is currently happening.
- type: textarea
attributes:
label: Screenshots (optional)
description: If applicable, add screenshots to help explain the issue.
- type: input
attributes:
label: Operating System [e.g., Windows 10]
- type: input
attributes:
label: Browser [e.g., Chrome, Firefox]
- type: input
attributes:
label: Version [e.g., 2.0.1]
- type: checkboxes
attributes:
label: Please check the boxes that apply to this issue report.
options:
- label: I have searched the existing issues to make sure this is not a duplicate.
- label: I have provided steps to reproduce the issue.
- label: I have included relevant environment information.
- label: I have included any relevant screenshots.
- label: I understand that this is a voluntary contribution and that there is no guarantee of resolution.
- label: I want to work on creating a PR for this issue if approved
@@ -0,0 +1,36 @@
name: 'Feature Request'
description: Suggest a new idea or enhancement for this project
body:
- type: markdown
attributes:
value: Please provide a clear and concise title for your feature request
- type: textarea
attributes:
label: Feature Description
description: Describe the feature you are requesting in detail. Explain what problem it solves or what value it adds to the project.
- type: textarea
attributes:
label: Use Case
description: Provide a scenario or use case where this feature would be beneficial. Explain how users would interact with this feature and why it's important.
- type: textarea
attributes:
label: Proposed Solution
description: If you have an idea of how this feature could be implemented, describe it here. Include any technical details, UI/UX considerations, or design suggestions.
- type: textarea
attributes:
label: Alternatives (optional)
description: Are there any alternative ways to achieve the same goal? Describe other approaches that could be considered if this feature is not implemented.
- type: textarea
attributes:
label: Additional Context
description: Add any additional context or information that might be relevant to the feature request.
- type: checkboxes
attributes:
label: Please check the boxes that apply to this feature request.
options:
- label: I have searched the existing feature requests to make sure this is not a duplicate.
- label: I have provided a detailed description of the requested feature.
- label: I have explained the use case or scenario for this feature.
- label: I have included any relevant technical details or design suggestions.
- label: I understand that this is a suggestion and that there is no guarantee of implementation.
- label: I want to work on creating a PR for this issue if approved
+39
View File
@@ -0,0 +1,39 @@
name: 'General Improvement Request'
description: 'Suggest a minor enhancement or improvement for this project'
title: '[Title for your improvement suggestion]'
body:
- type: textarea
attributes:
label: 'Describe the improvement you are suggesting in detail'
description: 'Explain why this improvement would be beneficial. Share any context, pain points, or reasons for suggesting this change.'
validations:
required: true
- type: textarea
id: description
attributes:
label: 'Additional Information & Alternatives (optional)'
description: 'Are there any additional context or information that might be relevant to the improvement suggestion.'
validations:
required: false
- type: dropdown
id: assignee
attributes:
label: 'Do you want to work on this improvement?'
multiple: false
options:
- 'No'
- 'Yes'
default: 0
validations:
required: true
- type: checkboxes
attributes:
label: 'Please check the boxes that apply to this improvement suggestion.'
options:
- label: 'I have searched the existing issues and improvement suggestions to avoid duplication.'
- label: 'I have provided a clear description of the improvement being suggested.'
- label: 'I have explained the rationale behind this improvement.'
- label: 'I have included any relevant technical details or design suggestions.'
- label: 'I understand that this is a suggestion and that there is no guarantee of implementation.'
validations:
required: true
+44
View File
@@ -0,0 +1,44 @@
## Description
<!--- Describe the changes introduced by this pull request. -->
<!--- Explain what problem it solves or what feature/fix it adds. -->
## Related Issue
<!--- If this pull request is related to a specific issue, reference it here using #issue_number. -->
<!--- For example, "Fixes #123" or "Addresses #456". -->
## Changes Made
<!--- Provide a summary of the changes made in this pull request. -->
<!--- Include any relevant technical details or architecture changes. -->
- Change 1
- Change 2
- ...
## Testing Performed
<!--- Describe the testing that you have performed to validate these changes. -->
<!--- Include information about test cases, testing environments, and results. -->
- Tested feature X in scenario Y.
- Ran unit tests for component Z.
- Tested on browsers A, B, and C.
- ...
## Checklist
<!--- Please check the boxes that apply to this pull request. -->
<!--- You can add or remove items as needed. -->
- [ ] I have tested these changes locally and they work as expected.
- [ ] I have added/updated tests that prove the effectiveness of these changes.
- [ ] I have updated the documentation to reflect these changes, if applicable.
- [ ] I have followed the project's coding style guidelines.
- [ ] I have addressed the code review feedback from the previous submission, if applicable.
## Additional Notes
<!--- Provide any additional context or notes for the reviewers. -->
<!--- This might include details about design decisions, potential concerns, or anything else relevant. -->
@@ -0,0 +1,40 @@
---
name: Test Addition
about: Submit a new test, either unit or end-to-end (E2E), for review and inclusion
---
## Description
<!--- Provide a clear and concise description of the new test you are adding. -->
<!--- Explain the purpose of the test and what it aims to validate. -->
## Related Issue
<!--- If this test addition is related to a specific issue, reference it here using #issue_number. -->
<!--- For example, "Fixes #123" or "Addresses #456". -->
## Test Details
<!--- Describe the details of the test you're adding. -->
<!--- Include information about inputs, expected outputs, and any specific scenarios. -->
- Test Name: Name of the test
- Type: [Unit / E2E]
- Description: Brief description of what the test checks
- Inputs: What inputs the test uses (if applicable)
- Expected Output: What output or behavior the test expects
## Checklist
<!--- Please check the boxes that apply to this pull request. -->
<!--- You can add or remove items as needed. -->
- [ ] I have written the new test and ensured it works as intended.
- [ ] I have added necessary documentation to explain the purpose of the test.
- [ ] I have followed the project's testing guidelines and coding style.
- [ ] I have addressed any review feedback from previous submissions, if applicable.
## Additional Notes
<!--- Provide any additional context or notes for the reviewers. -->
<!--- This might include explanations about the testing approach or any potential concerns. -->
+39
View File
@@ -0,0 +1,39 @@
name: 'Setup node and cache node_modules'
inputs:
node_version:
required: false
default: v22.x
runs:
using: 'composite'
steps:
- name: Set up Node ${{ inputs.node_version }}
uses: actions/setup-node@v4
with:
node-version: ${{ inputs.node_version }}
- name: Cache npm
uses: actions/cache@v3
with:
path: ~/.npm
key: npm-${{ hashFiles('package-lock.json') }}
restore-keys: npm-
- name: Cache node_modules
uses: actions/cache@v3
id: cache-node-modules
with:
path: |
node_modules
packages/*/node_modules
apps/*/node_modules
key: modules-${{ hashFiles('package-lock.json') }}
- name: Install dependencies
if: steps.cache-node-modules.outputs.cache-hit != 'true'
shell: bash
run: |
npm ci --no-audit
npm run prisma:generate
env:
HUSKY: '0'
@@ -0,0 +1,19 @@
name: Install playwright binaries
description: 'Install playwright, cache and restore if necessary'
runs:
using: 'composite'
steps:
- name: Cache playwright
id: cache-playwright
uses: actions/cache@v3
with:
path: |
~/.cache/ms-playwright
${{ github.workspace }}/node_modules/playwright
key: playwright-${{ hashFiles('**/package-lock.json') }}
restore-keys: playwright-
- name: Install playwright
if: steps.cache-playwright.outputs.cache-hit != 'true'
run: npx playwright install --with-deps
shell: bash
+22
View File
@@ -0,0 +1,22 @@
version: 2
updates:
- package-ecosystem: 'github-actions'
directory: '/'
schedule:
interval: 'weekly'
target-branch: 'main'
labels:
- 'ci dependencies'
- 'ci'
open-pull-requests-limit: 0
- package-ecosystem: 'npm'
directory: '/apps/web'
schedule:
interval: 'weekly'
target-branch: 'main'
labels:
- 'npm dependencies'
- 'frontend'
open-pull-requests-limit: 0
+21
View File
@@ -0,0 +1,21 @@
'apps: web':
- apps/remix/**
'type: documentation':
- apps/docs/**
'version bump 👀':
- '**/package.json'
- '**/package-lock.json'
'🚨 migrations 🚨':
- packages/prisma/migrations/**/migration.sql
'🚨 e2e changes 🚨':
- packages/app-tests/e2e/**
'🚨 .env changes 🚨':
- .env.example
'pkg: ee changes':
- packages/ee/**
+68
View File
@@ -0,0 +1,68 @@
name: 'Continuous Integration'
on:
workflow_call:
push:
branches: ['main']
pull_request:
branches: ['main']
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
build_app:
name: Build App
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 2
- uses: ./.github/actions/node-install
- name: Copy env
run: cp .env.example .env
- name: Build app
run: npm run build
build_docker:
name: Build Docker Image
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Cache Docker layers
uses: actions/cache@v4
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-
- name: Build Docker Image
uses: docker/build-push-action@v5
with:
push: false
context: .
file: ./docker/Dockerfile
tags: documenso-${{ github.sha }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- # Temp fix
# https://github.com/docker/build-push-action/issues/252
# https://github.com/moby/buildkit/issues/1896
name: Move cache
run: |
rm -rf /tmp/.buildx-cache
mv /tmp/.buildx-cache-new /tmp/.buildx-cache
+42
View File
@@ -0,0 +1,42 @@
name: 'CodeQL'
on:
workflow_dispatch:
push:
branches: ['main']
pull_request:
branches: ['main']
jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
strategy:
fail-fast: true
matrix:
language: ['javascript']
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Copy env
run: cp .env.example .env
- uses: ./.github/actions/node-install
- name: Build app
run: npm run build
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
+24
View File
@@ -0,0 +1,24 @@
name: Deploy to Production
on:
push:
tags:
- '*'
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: main
fetch-depth: 0
token: ${{ secrets.GH_TOKEN }}
- name: Push to release branch
run: |
git checkout release || git checkout -b release
git merge --ff-only main
git push origin release
+54
View File
@@ -0,0 +1,54 @@
name: Playwright Tests
on:
push:
branches: ['main']
pull_request:
branches: ['main']
concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
e2e_tests:
name: 'E2E Tests'
timeout-minutes: 60
runs-on: warp-ubuntu-2204-x64-8x
steps:
- uses: actions/checkout@v4
- name: Copy env
run: cp .env.example .env
- uses: ./.github/actions/node-install
- name: Start Services
run: npm run dx:up
- uses: ./.github/actions/playwright-install
- name: Create the database
run: npm run prisma:migrate-dev
- name: Seed the database
run: npm run prisma:seed
- name: Install playwright browsers
run: npx playwright install --with-deps
- name: Run Playwright tests
run: npm run ci
env:
# Needed since we use next start which will set the NODE_ENV to production
NEXT_PRIVATE_SIGNING_LOCAL_FILE_PATH: './example/cert.p12'
DANGEROUS_BYPASS_RATE_LIMITS: 'true'
- uses: actions/upload-artifact@v4
if: always()
with:
name: test-results
path: 'packages/app-tests/**/test-results/*'
retention-days: 7
env:
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: ${{ vars.TURBO_TEAM }}
+29
View File
@@ -0,0 +1,29 @@
name: 'Welcome New Contributors'
on:
pull_request:
types: ['opened']
issues:
types: ['opened']
permissions:
pull-requests: write
issues: write
jobs:
welcome-message:
name: Welcome Contributors
if: github.event.action == 'opened'
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/first-interaction@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
pr-message: |
Thank you for creating your first Pull Request and for being a part of the open signing revolution! 💚🚀
<br /> Feel free to hop into our community in [Discord](https://documen.so/discord)
issue-message: |
Thank you for opening your first issue and for being a part of the open signing revolution!
<br /> One of our team members will review it and get back to you as soon as it possible 💚
<br /> Meanwhile, please feel free to hop into our community in [Discord](https://documen.so/discord)
@@ -0,0 +1,63 @@
name: 'Issue Assignee Check'
on:
issues:
types: ['assigned']
permissions:
issues: write
jobs:
countIssues:
if: ${{ github.event.issue.assignee }} && github.event.action == 'assigned' && github.event.sender.type == 'User'
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 2
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
cache: npm
- name: Install Octokit
run: npm install @octokit/rest@18
- name: Check Assigned User's Issue Count
id: parse-comment
uses: actions/github-script@v6
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const { Octokit } = require("@octokit/rest");
const octokit = new Octokit({ auth: process.env.GITHUB_TOKEN });
const username = context.payload.issue.assignee.login;
console.log(`Username Extracted: ${username}`);
const { data: issues } = await octokit.issues.listForRepo({
owner: context.repo.owner,
repo: context.repo.repo,
assignee: username,
state: 'open'
});
const issueCount = issues.length;
console.log(`Issue Count For ${username}: ${issueCount}`);
if (issueCount > 3) {
let issueCountMessage = `### 🚨 Documenso Police 🚨`;
issueCountMessage += `\n@${username} has ${issueCount} open issues assigned already. Consider whether this issue should be assigned to them or left open for another contributor.`;
await octokit.request('POST /repos/{owner}/{repo}/issues/{issue_number}/comments', {
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
body: issueCountMessage,
headers: {
'Authorization': `token ${{ secrets.GITHUB_TOKEN }}`,
}
});
}
+25
View File
@@ -0,0 +1,25 @@
name: Auto Label Assigned Issues
on:
issues:
types: [assigned]
jobs:
label-when-assigned:
runs-on: ubuntu-latest
steps:
- name: Label issue
uses: actions/github-script@v6
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
const issue = context.issue;
// To run only on issues and not on PR
if (github.context.payload.issue.pull_request === undefined) {
const labelResponse = await github.rest.issues.addLabels({
owner: issue.owner,
repo: issue.repo,
issue_number: issue.number,
labels: ['status: assigned']
});
}
+21
View File
@@ -0,0 +1,21 @@
name: 'Label Issues'
on:
issues:
types: ['opened', 'reopened']
jobs:
label_issues:
runs-on: ubuntu-latest
permissions:
issues: write
steps:
- uses: actions/github-script@v6
with:
script: |
github.rest.issues.addLabels({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
labels: ["status: triage"]
})
+20
View File
@@ -0,0 +1,20 @@
name: 'PR Labeler'
on:
- pull_request_target
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
labeler:
permissions:
contents: read
pull-requests: write
runs-on: ubuntu-latest
steps:
- uses: actions/labeler@v4
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
sync-labels: ''
+64
View File
@@ -0,0 +1,64 @@
name: 'PR Review Reminder'
on:
pull_request:
types: ['opened', 'ready_for_review']
permissions:
pull-requests: write
jobs:
checkPRs:
if: ${{ github.event.pull_request.user.login }} && github.event.action == ('opened' || 'ready_for_review')
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 2
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
cache: npm
- name: Install Octokit
run: npm install @octokit/rest@18
- name: Check user's PRs awaiting review
id: parse-prs
uses: actions/github-script@v5
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const { Octokit } = require("@octokit/rest");
const octokit = new Octokit({ auth: process.env.GITHUB_TOKEN });
const username = context.payload.pull_request.user.login;
console.log(`Username Extracted: ${username}`);
const { data: pullRequests } = await octokit.pulls.list({
owner: context.repo.owner,
repo: context.repo.repo,
state: 'open',
sort: 'created',
direction: 'asc',
});
const userPullRequests = pullRequests.filter(pr => pr.user.login === username && (pr.state === 'open' || pr.state === 'ready_for_review'));
const prCount = userPullRequests.length;
console.log(`PR Count for ${username}: ${prCount}`);
if (prCount > 3) {
let prReminderMessage = `🚨 @${username} has ${prCount} pull requests awaiting review. Please consider reviewing them when possible. 🚨`;
await octokit.request('POST /repos/{owner}/{repo}/issues/{issue_number}/comments', {
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.payload.pull_request.number,
body: prReminderMessage,
headers: {
'Authorization': `token ${{ secrets.GITHUB_TOKEN }}`,
}
});
}
+182
View File
@@ -0,0 +1,182 @@
name: Publish Docker
on:
push:
branches: ['release']
workflow_dispatch:
inputs:
tag:
description: 'Git tag to build and publish (e.g., v1.0.0)'
required: true
type: string
jobs:
build_and_publish_platform_containers:
name: Build and publish platform containers
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- warp-ubuntu-latest-x64-4x
- warp-ubuntu-latest-arm64-4x
steps:
- uses: actions/checkout@v4
with:
ref: ${{ inputs.tag || github.ref }}
fetch-tags: true
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GH_TOKEN }}
- name: Build the docker image
env:
BUILD_PLATFORM: ${{ matrix.os == 'warp-ubuntu-latest-arm64-4x' && 'arm64' || 'amd64' }}
NEXT_PRIVATE_TELEMETRY_KEY: ${{ secrets.NEXT_PRIVATE_TELEMETRY_KEY }}
NEXT_PRIVATE_TELEMETRY_HOST: ${{ secrets.NEXT_PRIVATE_TELEMETRY_HOST }}
APP_VERSION: ${{ inputs.tag || '' }}
run: |
if [ -z "$APP_VERSION" ]; then
APP_VERSION="$(git name-rev --tags --name-only $(git rev-parse HEAD) | head -n 1 | sed 's/\^0//')"
fi
GIT_SHA="$(git rev-parse HEAD)"
docker build \
-f ./docker/Dockerfile \
--progress=plain \
--build-arg NEXT_PRIVATE_TELEMETRY_KEY="${NEXT_PRIVATE_TELEMETRY_KEY:-}" \
--build-arg NEXT_PRIVATE_TELEMETRY_HOST="${NEXT_PRIVATE_TELEMETRY_HOST:-}" \
-t "documenso/documenso-$BUILD_PLATFORM:latest" \
-t "documenso/documenso-$BUILD_PLATFORM:$GIT_SHA" \
-t "documenso/documenso-$BUILD_PLATFORM:$APP_VERSION" \
-t "ghcr.io/documenso/documenso-$BUILD_PLATFORM:latest" \
-t "ghcr.io/documenso/documenso-$BUILD_PLATFORM:$GIT_SHA" \
-t "ghcr.io/documenso/documenso-$BUILD_PLATFORM:$APP_VERSION" \
.
- name: Push the docker image to DockerHub
run: docker push --all-tags "documenso/documenso-$BUILD_PLATFORM"
env:
BUILD_PLATFORM: ${{ matrix.os == 'warp-ubuntu-latest-arm64-4x' && 'arm64' || 'amd64' }}
- name: Push the docker image to GitHub Container Registry
run: docker push --all-tags "ghcr.io/documenso/documenso-$BUILD_PLATFORM"
env:
BUILD_PLATFORM: ${{ matrix.os == 'warp-ubuntu-latest-arm64-4x' && 'arm64' || 'amd64' }}
create_and_publish_manifest:
name: Create and publish manifest
runs-on: ubuntu-latest
needs: build_and_publish_platform_containers
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ inputs.tag || github.ref }}
fetch-tags: true
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GH_TOKEN }}
- name: Create and push DockerHub manifest
env:
APP_VERSION: ${{ inputs.tag || '' }}
run: |
if [ -z "$APP_VERSION" ]; then
APP_VERSION="$(git name-rev --tags --name-only $(git rev-parse HEAD) | head -n 1 | sed 's/\^0//')"
fi
GIT_SHA="$(git rev-parse HEAD)"
# Check if the version is stable (no rc or beta in the version)
if [[ "$APP_VERSION" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
docker manifest create \
documenso/documenso:latest \
--amend documenso/documenso-amd64:latest \
--amend documenso/documenso-arm64:latest
docker manifest push documenso/documenso:latest
fi
if [[ "$APP_VERSION" =~ ^v[0-9]+\.[0-9]+\.[0-9]+-rc\.[0-9]+$ ]]; then
docker manifest create \
documenso/documenso:rc \
--amend documenso/documenso-amd64:rc \
--amend documenso/documenso-arm64:rc
docker manifest push documenso/documenso:rc
fi
docker manifest create \
documenso/documenso:$GIT_SHA \
--amend documenso/documenso-amd64:$GIT_SHA \
--amend documenso/documenso-arm64:$GIT_SHA
docker manifest create \
documenso/documenso:$APP_VERSION \
--amend documenso/documenso-amd64:$APP_VERSION \
--amend documenso/documenso-arm64:$APP_VERSION
docker manifest push documenso/documenso:$GIT_SHA
docker manifest push documenso/documenso:$APP_VERSION
- name: Create and push Github Container Registry manifest
env:
APP_VERSION: ${{ inputs.tag || '' }}
run: |
if [ -z "$APP_VERSION" ]; then
APP_VERSION="$(git name-rev --tags --name-only $(git rev-parse HEAD) | head -n 1 | sed 's/\^0//')"
fi
GIT_SHA="$(git rev-parse HEAD)"
# Check if the version is stable (no rc or beta in the version)
if [[ "$APP_VERSION" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
docker manifest create \
ghcr.io/documenso/documenso:latest \
--amend ghcr.io/documenso/documenso-amd64:latest \
--amend ghcr.io/documenso/documenso-arm64:latest
docker manifest push ghcr.io/documenso/documenso:latest
fi
if [[ "$APP_VERSION" =~ ^v[0-9]+\.[0-9]+\.[0-9]+-rc\.[0-9]+$ ]]; then
docker manifest create \
ghcr.io/documenso/documenso:rc \
--amend ghcr.io/documenso/documenso-amd64:rc \
--amend ghcr.io/documenso/documenso-arm64:rc
docker manifest push ghcr.io/documenso/documenso:rc
fi
docker manifest create \
ghcr.io/documenso/documenso:$GIT_SHA \
--amend ghcr.io/documenso/documenso-amd64:$GIT_SHA \
--amend ghcr.io/documenso/documenso-arm64:$GIT_SHA
docker manifest create \
ghcr.io/documenso/documenso:$APP_VERSION \
--amend ghcr.io/documenso/documenso-amd64:$APP_VERSION \
--amend ghcr.io/documenso/documenso-arm64:$APP_VERSION
docker manifest push ghcr.io/documenso/documenso:$GIT_SHA
docker manifest push ghcr.io/documenso/documenso:$APP_VERSION
@@ -0,0 +1,62 @@
name: 'Validate PR Name'
on:
pull_request_target:
types:
- opened
- reopened
- edited
- synchronize
permissions:
pull-requests: write
jobs:
validate-pr:
name: Validate PR title
runs-on: ubuntu-latest
steps:
- name: Check PR creator's previous activity
id: check_activity
run: |
CREATOR=$(curl -s "https://api.github.com/repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}" | jq -r '.user.login')
ACTIVITY=$(curl -s "https://api.github.com/search/commits?q=author:${CREATOR}+repo:${{ github.repository }}" | jq -r '.total_count')
if [ "$ACTIVITY" -eq 0 ]; then
echo "::set-output name=is_new::true"
else
echo "::set-output name=is_new::false"
fi
- name: Count PRs created by user
id: count_prs
run: |
CREATOR=$(curl -s "https://api.github.com/repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}" | jq -r '.user.login')
PR_COUNT=$(curl -s "https://api.github.com/search/issues?q=type:pr+is:open+author:${CREATOR}+repo:${{ github.repository }}" | jq -r '.total_count')
echo "::set-output name=pr_count::$PR_COUNT"
- uses: amannn/action-semantic-pull-request@v5
id: lint_pr_title
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: marocchino/sticky-pull-request-comment@v2
if: always() && (steps.lint_pr_title.outputs.error_message != null)
with:
header: pr-title-lint-error
message: |
Hey There! and thank you for opening this pull request! 📝👋🏼
We require pull request titles to follow the [Conventional Commits Spec](https://www.conventionalcommits.org/en/v1.0.0/) and it looks like your proposed title needs to be adjusted.
Details:
```
${{ steps.lint_pr_title.outputs.error_message }}
```
- if: ${{ steps.lint_pr_title.outputs.error_message == null && steps.check_activity.outputs.is_new == 'false' && steps.count_prs.outputs.pr_count < 2}}
uses: marocchino/sticky-pull-request-comment@v2
with:
header: pr-title-lint-error
message: |
Thank you for following the naming conventions for pull request titles! 💚🚀
+24
View File
@@ -0,0 +1,24 @@
name: 'Mark Stale Issues and PRs'
on:
schedule:
- cron: '0 */8 * * *'
jobs:
stale:
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write
steps:
- uses: actions/stale@v5
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
days-before-pr-stale: 90
days-before-issue-stale: 90
days-before-issue-close: 180
stale-pr-message: 'This PR has not seen activitiy for a while. It will be closed in 30 days unless further activity is detected.'
close-pr-message: 'This PR has been closed because of inactivity.'
exempt-pr-labels: 'WIP,on-hold,needs review'
exempt-issue-labels: 'WIP,on-hold,needs review,roadmap,assigned,needs triage'
@@ -0,0 +1,51 @@
# This is similar to the "Pull Translations" workflow, but without the conditional check to allow us to
# forcefully pull down translations from Crowdin and create a PR regardless if all the translations are fulfilled.
#
# Intended to be used when we manually update translations in Crowdin UI and want to pull those down when
# they already exist.
name: 'Force pull translations'
on:
workflow_dispatch:
workflow_call:
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
pull_translations:
name: Force pull translations
runs-on: ubuntu-latest
environment: Translations
permissions:
contents: write
pull-requests: write
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: ./.github/actions/node-install
- name: Pull translations from Crowdin
uses: crowdin/github-action@v2
with:
upload_sources: false
upload_translations: false
download_translations: true
export_only_approved: false
localization_branch_name: chore/translations
commit_message: 'chore: add translations'
pull_request_title: 'chore: add translations'
env:
# A classic GitHub Personal Access Token with the 'repo' scope selected (the user should have write access to the repository).
GITHUB_TOKEN: ${{ secrets.GH_PAT }}
# A numeric ID, found at https://crowdin.com/project/<projectName>/tools/api
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }}
# Visit https://crowdin.com/settings#api-key to create this token
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
+55
View File
@@ -0,0 +1,55 @@
# Pull down translations from Crowdin every two hours or when triggered manually.
name: 'Pull translations'
on:
schedule:
- cron: '0 */2 * * *' # Every two hours.
workflow_dispatch:
workflow_call:
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
pull_translations:
name: Pull translations
runs-on: ubuntu-latest
environment: Translations
permissions:
contents: write
pull-requests: write
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: ./.github/actions/node-install
- name: Compile translations
id: compile_translations
run: npm run translate:compile -- -- --strict
continue-on-error: true
- name: Pull translations from Crowdin
if: steps.compile_translations.outcome == 'failure'
uses: crowdin/github-action@v2
with:
upload_sources: false
upload_translations: false
download_translations: true
export_only_approved: false
localization_branch_name: chore/translations
commit_message: 'chore: add translations'
pull_request_title: 'chore: add translations'
env:
# A classic GitHub Personal Access Token with the 'repo' scope selected (the user should have write access to the repository).
GITHUB_TOKEN: ${{ secrets.GH_PAT }}
# A numeric ID, found at https://crowdin.com/project/<projectName>/tools/api
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }}
# Visit https://crowdin.com/settings#api-key to create this token
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
+97
View File
@@ -0,0 +1,97 @@
name: 'Extract and upload translations'
on:
workflow_dispatch:
workflow_call:
push:
branches: ['main']
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
extract_translations:
name: Extract and upload translations
runs-on: ubuntu-latest
environment: Translations
permissions:
contents: write
pull-requests: write
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: ./.github/actions/node-install
- name: Extract translations
run: npm run translate:extract
- name: Commit changes and push to reserved branch
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
set -euo pipefail
BRANCH="chore/extract-translations"
git config --global user.name 'github-actions'
git config --global user.email 'github-actions@documenso.com'
git fetch origin
# Create branch locally (always reset to main)
git checkout -B "$BRANCH" origin/main
# Stage translation output
git add packages/lib/translations
# If no changes, exit early
if git diff --staged --quiet; then
echo "No translation changes found."
exit 0
fi
# Commit fresh snapshot
git commit -m "chore: extract translations"
# Force push reserved branch
git push origin "$BRANCH" --force
# Does a PR already exist?
EXISTING_PR=$(gh pr list \
--state open \
--head "$BRANCH" \
--json number \
--jq '.[0].number // empty')
if [ -z "$EXISTING_PR" ]; then
echo "No existing PR — creating new one."
gh pr create \
--title "chore: extract translations" \
--body "Automated translation extraction" \
--base main \
--head "$BRANCH"
else
echo "PR #$EXISTING_PR already exists — not creating a new one."
fi
- name: Compile translations
id: compile_translations
run: npm run translate:compile -- -- --strict
continue-on-error: true
- name: Upload missing translations
if: ${{ steps.compile_translations.outcome == 'failure' }}
uses: crowdin/github-action@v2
with:
upload_sources: true
upload_translations: true
download_translations: false
localization_branch_name: chore/translations
env:
# A numeric ID, found at https://crowdin.com/project/<projectName>/tools/api
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }}
# Visit https://crowdin.com/settings#api-key to create this token
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
+50 -15
View File
@@ -1,19 +1,19 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
packages/prisma/generated/types.ts
# dependencies
/node_modules
/.pnp
node_modules
.pnp
.pnp.js
# testing
/coverage
coverage
# next.js
/.next/
/out/
# production
/build
.next/
out/
build
# misc
.DS_Store
@@ -23,16 +23,51 @@
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.pnpm-debug.log*
# local env files
.env*.local
.env
.env.local
.env.development.local
.env.test.local
.env.production.local
# turbo
.turbo
.turbo-cookie
# vercel
.vercel
# typescript
*.tsbuildinfo
next-env.d.ts
.env
.env.example
# contentlayer
.contentlayer
# intellij
.idea
# vscode
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
# logs
logs.json
# claude
.claude
CLAUDE.md
# agents
.specs
# scripts
scripts/output*
scripts/bench-*
# license
.documenso-license.json
.documenso-license-backup.json
# tmp
tmp/
-3
View File
@@ -1,3 +0,0 @@
[submodule "apps/website/documenso/website"]
path = apps/website/documenso/website
url = http://github.com/documenso/website.git
+39
View File
@@ -0,0 +1,39 @@
tasks:
- init: |
npm i &&
npm run dx:up &&
cp .env.example .env &&
set -a; source .env &&
export NEXT_PUBLIC_WEBAPP_URL="$(gp url 3000)" &&
command: npm run d
ports:
- port: 3000
visibility: public
onOpen: open-preview
- port: 3001
visibility: public
onOpen: open-preview
- port: 9000
visibility: public
onOpen: ignore
- port: 1100
visibility: private
onOpen: ignore
- port: 2500
visibility: private
onOpen: ignore
- port: 54320
visibility: private
onOpen: ignore
vscode:
extensions:
- aaron-bond.better-comments
- bradlc.vscode-tailwindcss
- dbaeumer.vscode-eslint
- esbenp.prettier-vscode
- mikestead.dotenv
- unifiedjs.vscode-mdx
- GitHub.vscode-pull-request-github
- Prisma.prisma
+1
View File
@@ -0,0 +1 @@
npm run commitlint -- $1
+9
View File
@@ -0,0 +1,9 @@
SCRIPT_DIR="$(readlink -f "$(dirname "$0")")"
MONOREPO_ROOT="$(readlink -f "$SCRIPT_DIR/../")"
echo "Copying .well-known/ contents"
node "$MONOREPO_ROOT/scripts/copy-wellknown.cjs"
git add "$MONOREPO_ROOT/apps/remix/public/"
npx lint-staged
+2
View File
@@ -0,0 +1,2 @@
legacy-peer-deps = true
prefer-dedupe = true
+80
View File
@@ -0,0 +1,80 @@
---
description: Add and commit changes using conventional commits
allowed-tools: Bash, Read, Glob, Grep
---
Create a git commit for the current changes using the Conventional Commits standard.
## Process
1. **Analyze the changes** by running:
- `git status` to see all modified/untracked files
- `git diff` to see unstaged changes
- `git diff --staged` to see already-staged changes
- `git log --oneline -5` to see recent commit style
2. **Stage appropriate files**:
- Stage all related changes with `git add`
- Do NOT stage files that appear to contain secrets (.env, credentials, API keys, tokens)
- If you detect potential secrets, warn the user and skip those files
3. **Determine the commit type** based on the changes:
- `feat`: New feature or capability
- `fix`: Bug fix
- `docs`: Documentation only
- `style`: Formatting, whitespace (not CSS)
- `refactor`: Code restructuring without behavior change
- `perf`: Performance improvement
- `test`: Adding or updating tests
- `build`: Build system or dependencies
- `ci`: CI/CD configuration
- `chore`: Maintenance tasks, tooling, config
NOTE: Do not use a scope for commits
4. **Write the commit message**:
- **Subject line**: `<type>: <description>`
- Use imperative mood ("add" not "added")
- Lowercase, no period at end
- Max 50 characters if possible, 72 hard limit
- **Body** (if needed): Explain _why_, not _what_
- Wrap at 72 characters
- Separate from subject with blank line
## Commit Format
```
<type>[scope]: <subject>
[optional body explaining WHY this change was made]
```
## Examples
Simple change:
```
fix: handle empty input in parser without throwing
```
With body:
```
feat: add streaming response support
Large responses were causing memory issues in production.
Streaming allows processing chunks incrementally.
```
## Rules
- NEVER commit files that may contain secrets
- NEVER use `git commit --amend` unless the user explicitly requests it
- NEVER use `--no-verify` to skip hooks
- If the pre-commit hook fails, fix the issues and create a NEW commit
- If there are no changes to commit, inform the user and stop
- Use a HEREDOC to pass the commit message to ensure proper formatting
## Execute
Run the git commands to analyze, stage, and commit the changes now.
+112
View File
@@ -0,0 +1,112 @@
---
description: Continue implementing a spec from a previous session
argument-hint: <spec-file-path>
---
You are continuing implementation of a specification that was started in a previous session. Work autonomously until the feature is complete and tests pass.
## Your Task
1. **Read the spec** at `$ARGUMENTS`
2. **Read CODE_STYLE.md** for formatting conventions
3. **Assess current state**:
- Check git status for uncommitted changes
- Run tests to see what's passing/failing (if E2E tests exist)
- Review any existing implementation
4. **Determine what remains** by comparing the spec to the current state
5. **Plan remaining work** using TodoWrite
6. **Continue implementing** until complete
## Assessing Current State
Run these commands to understand where the previous session left off:
```bash
git status # See uncommitted changes
git log --oneline -10 # See recent commits
npm run typecheck -w @documenso/remix # Check for type errors
npm run lint:fix # Check for linting issues
```
Review the code that's already been written to understand:
- What's already implemented
- What's partially done
- What's not started yet
## Implementation Guidelines
### During Implementation
- Follow CODE_STYLE.md strictly (2-space indent, double quotes, braces always, etc.)
- Follow workspace rules for TypeScript, React, TRPC patterns, and Remix conventions
- Mark todos complete as you finish each task
- Commit logical chunks of work
### Code Quality
- No stubbed implementations
- Handle edge cases and error conditions
- Include descriptive error messages with context
- Use async/await for all I/O operations
- Use AppError class when throwing errors
- Use Zod for validation and react-hook-form for forms
### Testing
**Important**: E2E tests are time-consuming. Only write tests for non-trivial functionality.
- Write E2E tests in `packages/app-tests/e2e/` using Playwright
- Test critical user flows and edge cases
- Follow existing E2E test patterns in the codebase
- Use descriptive test names that explain what is being tested
- Skip tests for trivial changes (simple UI tweaks, minor refactors, etc.)
## Autonomous Workflow
Work continuously through these steps:
1. **Implement** - Write the code for the current task
2. **Typecheck** - Run `npm run typecheck -w @documenso/remix` to verify types
3. **Lint** - Run `npm run lint:fix` to fix linting issues
4. **Test** - If non-trivial, run E2E tests: `npm run test:dev -w @documenso/app-tests`
5. **Fix** - If tests fail, fix and re-run
6. **Repeat** - Move to next task
## Stopping Conditions
**Stop and report success when:**
- All spec requirements are implemented
- Typecheck passes
- Lint passes
- E2E tests pass (if written for non-trivial functionality)
**Stop and ask for help when:**
- The spec is ambiguous and you need clarification
- You encounter a blocking issue you cannot resolve
- You need to make a decision that significantly deviates from the spec
- External dependencies are missing
## Commands
```bash
# Type checking
npm run typecheck -w @documenso/remix
# Linting
npm run lint:fix
# E2E Tests (only for non-trivial work)
npm run test:dev -w @documenso/app-tests # Run E2E tests in dev mode
npm run test-ui:dev -w @documenso/app-tests # Run E2E tests with UI
npm run test:e2e # Run full E2E test suite
# Development
npm run dev # Start dev server
```
## Begin
Read the spec file and CODE_STYLE.md, assess the current implementation state, then continue where the previous session left off. Use TodoWrite to track your progress throughout.
@@ -0,0 +1,27 @@
---
description: Generate markdown documentation for a module or feature
argument-hint: <topic-or-feature>
---
You are generating documentation for the Documenso project.
## Your Task
Load and follow the skill at `.agents/skills/create-documentation/SKILL.md`. It contains the complete instructions for writing documentation including:
- Documentation structure and file locations
- MDX format and Fumadocs components
- Audience-specific patterns (Users, Developers, Self-Hosters)
- Navigation (`meta.json`) updates
- Writing style guidelines
## Context
The topic or feature to document is: `$ARGUMENTS`
## Begin
1. **Read the skill** at `.agents/skills/create-documentation/SKILL.md`
2. **Read WRITING_STYLE.md** for tone and formatting conventions
3. **Follow the skill instructions** to create comprehensive documentation
4. **Use TodoWrite** to track your progress throughout
@@ -0,0 +1,23 @@
---
description: Create a new justification file in .agents/justifications/
argument-hint: <justification-slug> [content]
---
You are creating a new justification file in the `.agents/justifications/` directory.
## Your Task
Load and follow the skill at `.agents/skills/create-justification/SKILL.md`. It contains the complete instructions for creating justification files including:
- Unique three-word ID generation
- Frontmatter format with date and title
- Script usage (`scripts/create-justification.ts`)
## Context
The justification slug and optional content: `$ARGUMENTS`
## Begin
1. **Read the skill** at `.agents/skills/create-justification/SKILL.md`
2. **Create the justification file** using the slug from `$ARGUMENTS` and appropriate content documenting the reasoning or justification
+23
View File
@@ -0,0 +1,23 @@
---
description: Create a new plan file in .agents/plans/
argument-hint: <plan-slug> [content]
---
You are creating a new plan file in the `.agents/plans/` directory.
## Your Task
Load and follow the skill at `.agents/skills/create-plan/SKILL.md`. It contains the complete instructions for creating plan files including:
- Unique three-word ID generation
- Frontmatter format with date and title
- Script usage (`scripts/create-plan.ts`)
## Context
The plan slug and optional content: `$ARGUMENTS`
## Begin
1. **Read the skill** at `.agents/skills/create-plan/SKILL.md`
2. **Create the plan file** using the slug from `$ARGUMENTS` and appropriate content
+23
View File
@@ -0,0 +1,23 @@
---
description: Create a new scratch file in .agents/scratches/
argument-hint: <scratch-slug> [content]
---
You are creating a new scratch file in the `.agents/scratches/` directory.
## Your Task
Load and follow the skill at `.agents/skills/create-scratch/SKILL.md`. It contains the complete instructions for creating scratch files including:
- Unique three-word ID generation
- Frontmatter format with date and title
- Script usage (`scripts/create-scratch.ts`)
## Context
The scratch slug and optional content: `$ARGUMENTS`
## Begin
1. **Read the skill** at `.agents/skills/create-scratch/SKILL.md`
2. **Create the scratch file** using the slug from `$ARGUMENTS` and appropriate content for notes or exploration
+100
View File
@@ -0,0 +1,100 @@
---
description: Implement a spec from the plans directory
argument-hint: <spec-file-path>
---
You are implementing a specification from the `.agents/plans/` directory. Work autonomously until the feature is complete and tests pass.
## Your Task
1. **Read the spec** at `$ARGUMENTS`
2. **Read CODE_STYLE.md** for formatting conventions
3. **Plan the implementation** using the TodoWrite tool to break down the work
4. **Implement the feature** following the spec and code style
5. **Write E2E tests** only for non-trivial functionality (E2E tests are time-consuming)
6. **Run tests** and fix any failures
7. **Run typecheck and lint** and fix any issues
## Implementation Guidelines
### Before Coding
- Understand the spec's goals and scope
- Identify the desired API from usage examples in the spec
- Review related existing code to understand patterns
- Break the work into discrete tasks using TodoWrite
### During Implementation
- Follow CODE_STYLE.md strictly (2-space indent, double quotes, braces always, etc.)
- Follow workspace rules for TypeScript, React, TRPC patterns, and Remix conventions
- Mark todos complete as you finish each task
- Commit logical chunks of work
### Code Quality
- No stubbed implementations
- Handle edge cases and error conditions
- Include descriptive error messages with context
- Use async/await for all I/O operations
- Use AppError class when throwing errors
- Use Zod for validation and react-hook-form for forms
### Testing
**Important**: E2E tests are time-consuming. Only write tests for non-trivial functionality.
- Write E2E tests in `packages/app-tests/e2e/` using Playwright
- Test critical user flows and edge cases
- Follow existing E2E test patterns in the codebase
- Use descriptive test names that explain what is being tested
- Skip tests for trivial changes (simple UI tweaks, minor refactors, etc.)
## Autonomous Workflow
Work continuously through these steps:
1. **Implement** - Write the code for the current task
2. **Typecheck** - Run `npm run typecheck -w @documenso/remix` to verify types
3. **Lint** - Run `npm run lint:fix` to fix linting issues
4. **Test** - If non-trivial, run E2E tests: `npm run test:dev -w @documenso/app-tests`
5. **Fix** - If tests fail, fix and re-run
6. **Repeat** - Move to next task
## Stopping Conditions
**Stop and report success when:**
- All spec requirements are implemented
- Typecheck passes
- Lint passes
- E2E tests pass (if written for non-trivial functionality)
**Stop and ask for help when:**
- The spec is ambiguous and you need clarification
- You encounter a blocking issue you cannot resolve
- You need to make a decision that significantly deviates from the spec
- External dependencies are missing
## Commands
```bash
# Type checking
npm run typecheck -w @documenso/remix
# Linting
npm run lint:fix
# E2E Tests (only for non-trivial work)
npm run test:dev -w @documenso/app-tests # Run E2E tests in dev mode
npm run test-ui:dev -w @documenso/app-tests # Run E2E tests with UI
npm run test:e2e # Run full E2E test suite
# Development
npm run dev # Start dev server
```
## Begin
Read the spec file and CODE_STYLE.md, then start implementing. Use TodoWrite to track your progress throughout.
+57
View File
@@ -0,0 +1,57 @@
---
description: Deep-dive interview to flesh out a spec or design document
agent: build
argument-hint: <file-path>
---
You are conducting a thorough interview to help flesh out and complete a specification or design document.
## Your Task
1. **Read the document** at `$ARGUMENTS`
2. **Analyze it deeply** - identify gaps, ambiguities, unexplored edge cases, and areas needing clarification
3. **Interview the user** by providing a question with some pre-determined options
4. **Write the completed spec** back to the file when the interview is complete
## Interview Guidelines
### Question Quality
- Ask **non-obvious, insightful questions** - avoid surface-level queries
- Focus on: technical implementation details, architectural decisions, edge cases, error handling, UX implications, security considerations, performance tradeoffs, integration points, migration strategies, rollback plans
- Each question should reveal something that would otherwise be missed
- Challenge assumptions embedded in the document
- Explore second and third-order consequences of design decisions
- Use the Web Search and other tools where required to ground questions (e.g. package recommendations)
### Question Strategy
- Start by identifying the 3-5 most critical unknowns or ambiguities
- Use the AskUserQuestion tool with well-crafted options that represent real tradeoffs
- When appropriate, offer multiple valid approaches with their pros/cons as options
- Don't ask about things that are already clearly specified
- Probe deeper when answers reveal new areas of uncertainty
### Topics to Explore (as relevant)
- **Technical**: Data models, API contracts, state management, concurrency, caching, validation
- **UX**: Error states, loading states, empty states, edge cases, accessibility, mobile considerations
- **Operations**: Deployment, monitoring, alerting, debugging, logging, feature flags
- **Security**: Auth, authz, input validation, rate limiting, audit trails
- **Scale**: Performance bottlenecks, data growth, traffic spikes, graceful degradation
- **Integration**: Dependencies, backwards compatibility, versioning, migration path
- **Failure modes**: What happens when X fails? How do we recover? What's the blast radius?
### Interview Flow
1. Ask 2-4 questions at a time (use multiple questions in one when they're related)
2. After each round, incorporate answers and identify follow-up questions
3. Continue until all critical areas are addressed
4. Signal when you believe the interview is complete, but offer to go deeper
## Output
When the interview is complete:
1. Synthesize all gathered information
2. Rewrite/expand the original document with the new details
3. Preserve the document's original structure where sensible, but reorganize if needed
4. Add new sections for areas that weren't originally covered
5. Write the completed spec back to `$ARGUMENTS`
Begin by reading the file and identifying your first set of deep questions.
+20
View File
@@ -0,0 +1,20 @@
node_modules
.next
public
**/**/node_modules
**/**/.next
**/**/public
packages/lib/translations/**/*.js
*.lock
*.log
*.test.ts
.gitignore
.npmignore
.prettierignore
.DS_Store
.eslintignore
# Docs MDX - Prettier strips indentation from code blocks inside components
apps/docs/content/**/*.mdx
+14 -11
View File
@@ -1,19 +1,22 @@
{
"files.autoSave": "afterDelay",
"editor.formatOnSave": true,
"editor.formatOnPaste": true,
"editor.formatOnType": true,
"typescript.tsdk": "node_modules/typescript/lib",
"editor.defaultFormatter": "esbenp.prettier-vscode",
"[html]": {
"editor.defaultFormatter": "vscode.html-language-features"
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.fixAll": "explicit"
},
"eslint.validate": ["typescript", "typescriptreact", "javascript", "javascriptreact"],
"javascript.preferences.importModuleSpecifier": "non-relative",
"javascript.preferences.useAliasesForRenames": false,
"typescript.enablePromptUseWorkspaceTsdk": true,
"files.eol": "\n",
"editor.tabSize": 2,
"editor.insertSpaces": true,
"[prisma]": {
"editor.defaultFormatter": "Prisma.prisma"
},
"editor.codeActionsOnSave": {
"source.removeUnusedImports": false
"[typescriptreact]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"typescript.tsdk": "node_modules\\typescript\\lib",
"spellright.language": ["de"],
"spellright.documentTypes": ["markdown", "latex", "plaintext"]
"prisma.pinToPrisma6": true
}
+7
View File
@@ -0,0 +1,7 @@
# General Issues
Contact: https://github.com/documenso/documenso/issues/new?assignees=&labels=bug&projects=&template=bug-report.yml
# Report critical issues privately to let us take appropriate action before publishing.
Contact: mailto:security@documenso.com
Preferred-Languages: en
Canonical: https://documenso.com/.well-known/security.txt
+59
View File
@@ -0,0 +1,59 @@
# Agent Guidelines for Documenso
## Build/Test/Lint Commands
- `npm run build` - Build all packages
- `npm run lint` - Lint all packages
- `npm run lint:fix` - Auto-fix linting issues
- `npm run test:e2e` - Run E2E tests with Playwright
- `npm run test:dev -w @documenso/app-tests` - Run single E2E test in dev mode
- `npm run test-ui:dev -w @documenso/app-tests` - Run E2E tests with UI
- `npm run format` - Format code with Prettier
- `npm run dev` - Start development server for Remix app
**Important:** Do not run `npm run build` to verify changes unless explicitly asked. Builds take a long time (~2 minutes). Use `npx tsc --noEmit` for type checking specific packages if needed.
## Code Style Guidelines
- Use TypeScript for all code; prefer `type` over `interface`
- Use functional components with `const Component = () => {}`
- Never use classes; prefer functional/declarative patterns
- Use descriptive variable names with auxiliary verbs (isLoading, hasError)
- Directory names: lowercase with dashes (auth-wizard)
- Use named exports for components
- Never use 'use client' directive
- Never use 1-line if statements
- Structure files: exported component, subcomponents, helpers, static content, types
## Error Handling & Validation
- Use custom AppError class when throwing errors
- When catching errors on the frontend use `const error = AppError.parse(error)` to get the error code
- Use early returns and guard clauses
- Use Zod for form validation and react-hook-form for forms
- Use error boundaries for unexpected errors
## UI & Styling
- Use Shadcn UI, Radix, and Tailwind CSS with mobile-first approach
- Use `<Form>` `<FormItem>` elements with fieldset having `:disabled` attribute when loading
- Use Lucide icons with longhand names (HomeIcon vs Home)
## TRPC Routes
- Each route in own file: `routers/teams/create-team.ts`
- Associated types file: `routers/teams/create-team.types.ts`
- Request/response schemas: `Z[RouteName]RequestSchema`, `Z[RouteName]ResponseSchema`
- Only use GET and POST methods in OpenAPI meta
- Deconstruct input argument on its own line
- Prefer route names such as get/getMany/find/create/update/delete
- "create" routes request schema should have the ID and data in the top level
- "update" routes request schema should have the ID in the top level and the data in a nested "data" object
## Translations & Remix
- Use `<Trans>string</Trans>` for JSX translations from `@lingui/react/macro`
- Use `t\`string\`` macro for TypeScript translations
- Use `(params: Route.Params)` and `(loaderData: Route.LoaderData)` for routes
- Directly return data from loaders, don't use `json()`
- Use `superLoaderJson` when sending complex data through loaders such as dates or prisma decimals
+360
View File
@@ -0,0 +1,360 @@
# Documenso Architecture
This document provides a high-level overview of the Documenso codebase to help humans and agents understand how the application is structured.
## Overview
Documenso is an open-source document signing platform built as a **monorepo** using npm workspaces and Turborepo. The application enables users to create, send, and sign documents electronically.
```
┌─────────────────────────────────────────────────────────────────────────────┐
│ Remix App (Hono Server) │
│ apps/remix │
├─────────────┬─────────────┬─────────────┬─────────────┬─────────────────────┤
│ /api/v1/* │ /api/v2/* │ /api/trpc/* │ /api/jobs/* │ React Router UI │
│ (ts-rest) │ (tRPC) │ (tRPC) │ (Jobs API) │ │
├─────────────┴─────────────┴─────────────┴─────────────┴─────────────────────┤
│ │
│ ┌─────────┐ ┌─────────┐ ┌─────────┐ ┌─────────┐ ┌─────────────────┐ │
│ │ @api │ │ @trpc │ │ @lib │ │ @email │ │ @signing │ │
│ │ (REST) │ │ (RPC) │ │ (CORE) │ │ │ │ │ │
│ └─────────┘ └─────────┘ └────┬────┘ └─────────┘ └─────────────────┘ │
│ │ │
│ ┌──────────────────┼──────────────────┐ │
│ │ │ │ │
│ ┌────▼────┐ ┌─────▼─────┐ ┌─────▼─────┐ │
│ │ Storage │ │ Jobs │ │ PDF │ │
│ │Provider │ │ Provider │ │ Signing │ │
│ └────┬────┘ └─────┬─────┘ └─────┬─────┘ │
│ │ │ │ │
└──────────────┼──────────────────┼──────────────────┼────────────────────────┘
│ │ │
┌──────┴──────┐ ┌──────┴──────┐ ┌──────┴──────┐
│ Database │ │ Inngest/ │ │ Google KMS/ │
│ S3 │ │ Local │ │ Local │
└─────────────┘ └─────────────┘ └─────────────┘
```
## Monorepo Structure
### Applications (`apps/`)
| Package | Description | Port |
| -------------------------- | -------------------------------------------------------- | ---- |
| `@documenso/remix` | Main application - React Router (Remix) with Hono server | 3000 |
| `@documenso/documentation` | Documentation site (Next.js + Nextra) | 3002 |
| `@documenso/openpage-api` | Public analytics API | 3003 |
### Core Packages (`packages/`)
| Package | Description |
| -------------------- | --------------------------------------------------------- |
| `@documenso/lib` | Core business logic (server-only, client-only, universal) |
| `@documenso/trpc` | tRPC API layer with OpenAPI support (API V2) |
| `@documenso/api` | REST API layer using ts-rest (API V1) |
| `@documenso/prisma` | Database layer (Prisma ORM + Kysely) |
| `@documenso/ui` | UI component library (Shadcn + Radix + Tailwind) |
| `@documenso/email` | Email templates and mailer (React Email) |
| `@documenso/auth` | Authentication (OAuth via Arctic, WebAuthn/Passkeys) |
| `@documenso/signing` | PDF signing (Local P12, Google Cloud KMS) |
| `@documenso/ee` | Enterprise Edition features |
| `@documenso/assets` | Static assets |
### Supporting Packages
| Package | Description |
| ---------------------------- | ------------------------- |
| `@documenso/app-tests` | E2E tests (Playwright) |
| `@documenso/eslint-config` | Shared ESLint config |
| `@documenso/prettier-config` | Shared Prettier config |
| `@documenso/tailwind-config` | Shared Tailwind config |
| `@documenso/tsconfig` | Shared TypeScript configs |
## Tech Stack
| Category | Technology |
| -------- | --------------------------------- |
| Frontend | React 18, React Router v7 (Remix) |
| Server | Hono |
| Database | PostgreSQL 15, Prisma, Kysely |
| API | tRPC, ts-rest, OpenAPI |
| Styling | Tailwind CSS, Radix UI, Shadcn UI |
| Auth | Arctic (OAuth), WebAuthn/Passkeys |
| Email | React Email, Nodemailer |
| Jobs | Inngest / Local |
| Storage | S3-compatible / Database |
| PDF | @libpdf/core, pdfjs-dist |
| i18n | Lingui |
| Build | Turborepo, Vite |
| Testing | Playwright |
## API Architecture
### API V1 (Deprecated)
- **Location**: `packages/api/v1/`
- **Framework**: ts-rest (contract-based REST)
- **Mount**: `/api/v1/*`
- **Auth**: API Token (Bearer header)
- **Status**: Deprecated but maintained
**Routes** (RESTful pattern):
- `GET/POST/DELETE /api/v1/documents/*`
- `GET/POST/DELETE /api/v1/templates/*`
- Recipients and fields nested under documents
### API V2 (Current)
- **Location**: `packages/trpc/server/`
- **Framework**: tRPC with trpc-to-openapi
- **Mount**: `/api/v2/*`, `/api/v2-beta/*`
- **Auth**: API Token or Session Cookie
- **Status**: Active
**Routes** (action-based pattern):
- `GET/POST /api/v2/document/*` - Document operations
- `GET/POST /api/v2/template/*` - Template operations
- `GET/POST /api/v2/envelope/*` - Envelope operations (multi-document)
- `GET/POST /api/v2/folder/*` - Folder management
**Route Organization**:
```
packages/trpc/server/
├── document-router/
│ ├── get-document.ts
│ ├── get-document.types.ts
│ └── ...
├── template-router/
├── envelope-router/
├── recipient-router/
├── field-router/
└── ...
```
### Internal tRPC API
- **Mount**: `/api/trpc/*`
- **Usage**: Frontend-to-backend communication
- **Auth**: Session-based
## Background Jobs
Jobs handle async operations like email sending, document sealing, and webhooks.
### Architecture
```
┌─────────────────┐ ┌───────────────────────────────────────┐
│ triggerJob() │────▶│ Job Provider │
│ │ │ ┌─────────────┬─────────────────┐ │
│ - name │ │ │ Inngest │ Local │ │
│ - payload │ │ │ (Cloud) │ (Database) │ │
└─────────────────┘ │ └─────────────┴─────────────────┘ │
│ │ │
│ ▼ │
│ ┌─────────────────────┐ │
│ │ Job Handler │ │
│ │ (async processing) │ │
│ └─────────────────────┘ │
└───────────────────────────────────────┘
```
### Location
- `packages/lib/jobs/client/` - Provider implementations
- `packages/lib/jobs/definitions/` - Job definitions
### Job Types
**Email Jobs**:
- `send.signing.requested.email` - Signing invitation
- `send-confirmation-email` - Email verification
- `send-recipient-signed-email` - Notify on signature
- `send-rejection-emails` - Rejection notifications
- `send-document-cancelled-emails` - Cancellation notices
**Internal Jobs**:
- `internal.seal-document` - Finalize signed documents
- `internal.bulk-send-template` - Bulk document sending
- `internal.execute-webhook` - External webhook calls
## Swappable Providers
The codebase uses a **strategy pattern** with `ts-pattern` for provider selection via environment variables.
### Storage Provider
Handles file uploads and downloads.
| Provider | Description | Env Value |
| -------- | ------------------------------------ | ---------- |
| Database | Store files as Base64 in DB | `database` |
| S3 | S3-compatible storage (+ CloudFront) | `s3` |
**Config**: `NEXT_PUBLIC_UPLOAD_TRANSPORT`
**Location**: `packages/lib/universal/upload/`
### PDF Signing Provider
Cryptographically signs PDF documents.
| Provider | Description | Env Value |
| ---------------- | -------------------- | ------------ |
| Local | P12 certificate file | `local` |
| Google Cloud HSM | Google Cloud KMS | `gcloud-hsm` |
**Config**: `NEXT_PRIVATE_SIGNING_TRANSPORT`
**Location**: `packages/signing/`
### Email Provider
Sends transactional emails.
| Provider | Description | Env Value |
| ------------ | ------------------------------ | -------------- |
| SMTP Auth | Standard SMTP with credentials | `smtp-auth` |
| SMTP API | SMTP with API key | `smtp-api` |
| Resend | Resend API | `resend` |
| MailChannels | MailChannels API | `mailchannels` |
**Config**: `NEXT_PRIVATE_SMTP_TRANSPORT`
**Location**: `packages/email/mailer.ts`
### Background Jobs Provider
Processes async jobs.
| Provider | Description | Env Value |
| -------- | --------------------- | ----------------- |
| Local | Database-backed queue | `local` (default) |
| BullMQ | Redis-backed queue | `bullmq` |
| Inngest | Managed cloud service | `inngest` |
**Config**: `NEXT_PRIVATE_JOBS_PROVIDER`
**Location**: `packages/lib/jobs/client/`
## Request Flow
### Web Application Request
```
Browser
Hono Server (apps/remix/server/)
├──▶ /api/v1/* ──▶ ts-rest handlers (packages/api/)
├──▶ /api/v2/* ──▶ tRPC OpenAPI handlers (packages/trpc/)
├──▶ /api/trpc/* ──▶ tRPC handlers (packages/trpc/)
├──▶ /api/jobs/* ──▶ Job handlers (packages/lib/jobs/)
└──▶ /* ──▶ React Router (apps/remix/app/routes/)
React Components (packages/ui/)
```
### Document Signing Flow
```
1. Upload Document ──▶ Storage Provider (DB/S3)
2. Add Recipients ────────────────┤
3. Add Fields ────────────────────┤
4. Send Document ─────────────────┤
│ │
▼ │
Email Job ──▶ Email Provider |
│ |
5. Recipient Signs ───────────────┤
│ │
▼ │
seal-document Job │
│ │
▼ │
Signing Provider ◀─────────────┘
Signed PDF ──▶ Storage Provider
```
## Key Directories
```
documenso/
├── apps/
│ └── remix/
│ ├── app/
│ │ └── routes/ # React Router routes
│ │ ├── _authenticated+/ # Protected routes
│ │ ├── _unauthenticated+/ # Public routes
│ │ └── _recipient+/ # Signing routes
│ └── server/
│ ├── router.ts # Hono route mounting
│ └── main.js # Entry point
├── packages/
│ ├── api/v1/ # API V1 (ts-rest)
│ ├── trpc/server/ # API V2 + Internal (tRPC)
│ ├── lib/
│ │ ├── server-only/ # Server business logic
│ │ ├── client-only/ # Client utilities
│ │ ├── universal/ # Shared code
│ │ └── jobs/ # Background jobs
│ ├── prisma/ # Database schema & client
│ ├── signing/ # PDF signing
│ ├── email/ # Email templates
│ └── ui/ # Component library
└── docker/ # Docker configs
```
## Development
```bash
# Full setup (install, docker, migrate, seed, dev)
npm run d
# Start development server
npm run dev
# Database GUI
npm run prisma:studio
# Type checking (faster than build)
npx tsc --noEmit
# E2E tests
npm run test:e2e
```
### Docker Services (Development)
| Service | Port |
| --------------- | ---------- |
| PostgreSQL | 54320 |
| Inbucket (Mail) | 9000 |
| MinIO (S3) | 9001, 9002 |
## Environment Variables Summary
| Variable | Purpose | Options |
| -------------------------------- | ---------------- | ------------------------------------------------- |
| `NEXT_PUBLIC_UPLOAD_TRANSPORT` | Storage provider | `database`, `s3` |
| `NEXT_PRIVATE_SIGNING_TRANSPORT` | Signing provider | `local`, `gcloud-hsm` |
| `NEXT_PRIVATE_SMTP_TRANSPORT` | Email provider | `smtp-auth`, `smtp-api`, `resend`, `mailchannels` |
| `NEXT_PRIVATE_JOBS_PROVIDER` | Jobs provider | `local`, `inngest` |
See `.env.example` for the complete list of configuration options.
+45
View File
@@ -0,0 +1,45 @@
# Documenso Contributors License Agreement
This Contributors License Agreement ("CLA") is entered into between the Contributor, and Documenso Inc. ("Documenso"), collectively referred to as the "Parties."
## Background:
Documenso is an open-source project aimed at providing an open-source document signing platform for all parties. This CLA governs the rights and contributions made by the Contributor to the Documenso project.
## Agreement:
**Contributor Grant of License:**
By submitting code, documentation, or any other materials (collectively, "Contributions") to the Documenso project, the Contributor grants Documenso a perpetual, worldwide, non-exclusive, royalty-free, sublicensable license to use, modify, distribute, and otherwise exploit the Contributions, including any intellectual property rights therein, for the purposes of the Documenso project.
**Representation of Ownership and Right to Contribute:**
The Contributor represents that they have the legal right to grant the license stated in Section 1, and that the Contributions do not infringe upon the intellectual property rights of any third party. The Contributor also represents that they have the authority to submit the Contributions on their own behalf or, if applicable, on behalf of their employer or any other entity.
**Patent Grant:**
If the Contributions include any method, process, or apparatus that is covered by a patent, the Contributor agrees to grant Documenso a non-exclusive, worldwide, royalty-free license under any patent claims necessary to use, modify, distribute, and otherwise exploit the Contributions for the purposes of the Documenso project.
**No Implied Warranties or Support:**
The Contributor acknowledges that the Contributions are provided "as is," without any warranties or support of any kind. Documenso shall have no obligation to provide maintenance, updates, bug fixes, or support for the Contributions.
**Retention of Contributor Rights:**
The Contributor retains all right, title, and interest in and to their Contributions. This CLA does not restrict the Contributor from using their own Contributions for any other purpose.
**Governing Law:**
This CLA shall be governed by and construed in accordance with the laws of California (CA), without regard to its conflict of laws principles.
**Entire Agreement:**
This CLA constitutes the entire agreement between the Parties with respect to the subject matter hereof and supersedes all prior and contemporaneous understandings, agreements, representations, and warranties.
**Acceptance:**
By submitting Contributions to the Documenso project, the Contributor acknowledges and agrees to the terms and conditions of this CLA. If the Contributor is agreeing to this CLA on behalf of an entity, they represent that they have the necessary authority to bind that entity to these terms.
**Effective Date:**
This CLA is effective as of the date of the first Contribution made by the Contributor to the Documenso project.
+126
View File
@@ -0,0 +1,126 @@
# Contributor Covenant Code of Conduct
## Our Pledge
We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of experience, education, socio-economic status,
nationality, personal appearance, race, caste, color, religion, or sexual
identity and orientation.
We pledge to act and interact in ways that contribute to an open, welcoming,
diverse, inclusive, and healthy community.
## Our Standards
Examples of behavior that contributes to a positive environment for our
community include:
- Demonstrating empathy and kindness toward other people
- Being respectful of differing opinions, viewpoints, and experiences
- Giving and gracefully accepting constructive feedback
- Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
- Focusing on what is best not just for us as individuals, but for the overall
community
Examples of unacceptable behavior include:
- The use of sexualized language or imagery, and sexual attention or advances of
any kind
- Trolling, insulting or derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or email address,
without their explicit permission
- Other conduct which could reasonably be considered inappropriate in a
professional setting
## Enforcement Responsibilities
Community leaders are responsible for clarifying and enforcing our standards of
acceptable behavior and will take appropriate and fair corrective action in
response to any behavior that they deem inappropriate, threatening, offensive,
or harmful.
Community leaders have the right and responsibility to remove, edit, or reject
comments, commits, code, wiki edits, issues, and other contributions that are
not aligned to this Code of Conduct, and will communicate reasons for moderation
decisions when appropriate.
## Scope
This Code of Conduct applies within all community spaces, and also applies when
an individual is officially representing the community in public spaces.
Examples of representing our community include using an official e-mail address,
posting via an official social media account, or acting as an appointed
representative at an online or offline event.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement at
support@documenso.com.
All complaints will be reviewed and investigated promptly and fairly.
All community leaders are obligated to respect the privacy and security of the
reporter of any incident.
## Enforcement Guidelines
Community leaders will follow these Community Impact Guidelines in determining
the consequences for any action they deem in violation of this Code of Conduct:
### 1. Correction
**Community Impact**: Use of inappropriate language or other behavior deemed
unprofessional or unwelcome in the community.
**Consequence**: A private, written warning from community leaders, providing
clarity around the nature of the violation and an explanation of why the
behavior was inappropriate. A public apology may be requested.
### 2. Warning
**Community Impact**: A violation through a single incident or series of
actions.
**Consequence**: A warning with consequences for continued behavior. No
interaction with the people involved, including unsolicited interaction with
those enforcing the Code of Conduct, for a specified period of time. This
includes avoiding interactions in community spaces as well as external channels
like social media. Violating these terms may lead to a temporary or permanent
ban.
### 3. Temporary Ban
**Community Impact**: A serious violation of community standards, including
sustained inappropriate behavior.
**Consequence**: A temporary ban from any sort of interaction or public
communication with the community for a specified period of time. No public or
private interaction with the people involved, including unsolicited interaction
with those enforcing the Code of Conduct, is allowed during this period.
Violating these terms may lead to a permanent ban.
### 4. Permanent Ban
**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior, harassment of an
individual, or aggression toward or disparagement of classes of individuals.
**Consequence**: A permanent ban from any sort of public interaction within the
community.
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 2.1, available at
[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].
Community Impact Guidelines were inspired by
[Mozilla's code of conduct enforcement ladder][Mozilla CoC].
For answers to common questions about this code of conduct, see the FAQ at
[https://www.contributor-covenant.org/faq][FAQ]. Translations are available at
[https://www.contributor-covenant.org/translations][translations].
+692
View File
@@ -0,0 +1,692 @@
# Documenso Code Style Guide
This document captures the code style, patterns, and conventions used in the Documenso codebase. It covers both enforceable rules and subjective "taste" elements that make our code consistent and maintainable.
## Table of Contents
1. [General Principles](#general-principles)
2. [TypeScript Conventions](#typescript-conventions)
3. [Imports & Dependencies](#imports--dependencies)
4. [Functions & Methods](#functions--methods)
5. [React & Components](#react--components)
6. [Error Handling](#error-handling)
7. [Async/Await Patterns](#asyncawait-patterns)
8. [Whitespace & Formatting](#whitespace--formatting)
9. [Naming Conventions](#naming-conventions)
10. [Pattern Matching](#pattern-matching)
11. [Database & Prisma](#database--prisma)
12. [TRPC Patterns](#trpc-patterns)
---
## General Principles
- **Functional over Object-Oriented**: Prefer functional programming patterns over classes
- **Explicit over Implicit**: Be explicit about types, return values, and error cases
- **Early Returns**: Use guard clauses and early returns to reduce nesting
- **Immutability**: Favor `const` over `let`; avoid mutation where possible
---
## TypeScript Conventions
### Type Definitions
```typescript
// ✅ Prefer `type` over `interface`
type CreateDocumentOptions = {
templateId: number;
userId: number;
recipients: Recipient[];
};
// ❌ Avoid interfaces unless absolutely necessary
interface CreateDocumentOptions {
templateId: number;
}
```
### Type Imports
```typescript
// ✅ Use `type` keyword for type-only imports
import type { Document, Recipient } from '@prisma/client';
import { DocumentStatus } from '@prisma/client';
// Types in function signatures
export const findDocuments = async ({ userId, teamId }: FindDocumentsOptions) => {
// ...
};
```
### Inline Types for Function Parameters
```typescript
// ✅ Extract inline types to named types
type FinalRecipient = Pick<Recipient, 'name' | 'email' | 'role' | 'authOptions'> & {
templateRecipientId: number;
fields: Field[];
};
const finalRecipients: FinalRecipient[] = [];
```
---
## Imports & Dependencies
### Import Organization
Imports should be organized in the following order with blank lines between groups:
```typescript
// 1. React imports
import { useCallback, useEffect, useMemo } from 'react';
// 2. Third-party library imports (alphabetically)
import { zodResolver } from '@hookform/resolvers/zod';
import { Trans } from '@lingui/react/macro';
import type { Document, Recipient } from '@prisma/client';
import { DocumentStatus, RecipientRole } from '@prisma/client';
import { match } from 'ts-pattern';
// 3. Internal package imports (from @documenso/*)
import { AppError } from '@documenso/lib/errors/app-error';
import { prisma } from '@documenso/prisma';
import { Button } from '@documenso/ui/primitives/button';
// 4. Relative imports
import { getTeamById } from '../team/get-team';
import type { FindResultResponse } from './types';
```
### Destructuring Imports
```typescript
// ✅ Destructure specific exports
// ✅ Use type imports for types
import type { Document } from '@prisma/client';
import { Button } from '@documenso/ui/primitives/button';
import { Input } from '@documenso/ui/primitives/input';
```
---
## Functions & Methods
### Arrow Functions
```typescript
// ✅ Always use arrow functions for functions
export const createDocument = async ({
userId,
title,
}: CreateDocumentOptions) => {
// ...
};
// ✅ Callbacks and handlers
const onSubmit = useCallback(async () => {
// ...
}, [dependencies]);
// ❌ Avoid regular function declarations
function createDocument() {
// ...
}
```
### Function Parameters
```typescript
// ✅ Use destructured object parameters for multiple params
export const findDocuments = async ({
userId,
teamId,
status = ExtendedDocumentStatus.ALL,
page = 1,
perPage = 10,
}: FindDocumentsOptions) => {
// ...
};
// ✅ Destructure on separate line when needed
const onFormSubmit = form.handleSubmit(onSubmit);
// ✅ Deconstruct nested properties explicitly
const { user } = ctx;
const { templateId } = input;
```
---
## React & Components
### Component Definition
```typescript
// ✅ Use const with arrow function
export const AddSignersFormPartial = ({
documentFlow,
recipients,
fields,
onSubmit,
}: AddSignersFormProps) => {
// ...
};
// ❌ Never use classes
class MyComponent extends React.Component {
// ...
}
```
### Hooks
```typescript
// ✅ Group related hooks together with blank line separation
const { _ } = useLingui();
const { toast } = useToast();
const { currentStep, totalSteps, previousStep } = useStep();
const form = useForm<TFormSchema>({
resolver: zodResolver(ZFormSchema),
defaultValues: {
// ...
},
});
```
### Event Handlers
```typescript
// ✅ Use arrow functions with descriptive names
const onFormSubmit = async () => {
await form.trigger();
// ...
};
const onFieldCopy = useCallback(
(event?: KeyboardEvent | null) => {
event?.preventDefault();
// ...
},
[dependencies],
);
// ✅ Inline handlers for simple operations
<Button onClick={() => setOpen(false)}>Close</Button>
```
### State Management
```typescript
// ✅ Descriptive state names with auxiliary verbs
const [isLoading, setIsLoading] = useState(false);
const [hasError, setHasError] = useState(false);
const [showAdvancedSettings, setShowAdvancedSettings] = useState(false);
// ✅ Complex state in single useState when related
const [coords, setCoords] = useState({
x: 0,
y: 0,
});
```
---
## Error Handling
### Try-Catch Blocks
```typescript
// ✅ Use try-catch for operations that might fail
try {
const document = await getDocumentById({
documentId: Number(documentId),
userId: user.id,
});
return {
status: 200,
body: document,
};
} catch (err) {
return {
status: 404,
body: {
message: 'Document not found',
},
};
}
```
### Throwing Errors
```typescript
// ✅ Use AppError for application errors
throw new AppError(AppErrorCode.NOT_FOUND, {
message: 'Template not found',
});
// ✅ Use descriptive error messages
if (!template) {
throw new AppError(AppErrorCode.NOT_FOUND, {
message: `Template with ID ${templateId} not found`,
});
}
```
### Error Parsing on Frontend
```typescript
// ✅ Parse errors on the frontend
try {
await updateOrganisation({ organisationId, data });
} catch (err) {
const error = AppError.parseError(err);
console.error(error);
toast({
title: t`An error occurred`,
description: error.message,
variant: 'destructive',
});
}
```
---
## Async/Await Patterns
### Async Function Definitions
```typescript
// ✅ Mark async functions clearly
export const createDocument = async ({
userId,
title,
}: Options): Promise<Document> => {
// ...
};
// ✅ Use await for promises
const document = await prisma.document.create({ data });
// ✅ Use Promise.all for parallel operations
const [document, recipients] = await Promise.all([
getDocumentById({ documentId }),
getRecipientsForDocument({ documentId }),
]);
```
### Void for Fire-and-Forget
```typescript
// ✅ Use void for intentionally unwaited promises
void handleAutoSave();
// ✅ Or in event handlers
onClick={() => void onFormSubmit()}
```
---
## Whitespace & Formatting
### Blank Lines Between Concepts
```typescript
// ✅ Blank line after imports
import { prisma } from '@documenso/prisma';
export const findDocuments = async () => {
// ...
};
// ✅ Blank line between logical sections
const user = await prisma.user.findFirst({ where: { id: userId } });
let team = null;
if (teamId !== undefined) {
team = await getTeamById({ userId, teamId });
}
// ✅ Blank line before return statements
const result = await someOperation();
return result;
```
### Function/Method Spacing
```typescript
// ✅ No blank lines between chained methods in same operation
const documents = await prisma.document
.findMany({ where: { userId } })
.then((docs) => docs.map(maskTokens));
// ✅ Blank line between different operations
const document = await createDocument({ userId });
await sendDocument({ documentId: document.id });
return document;
```
### Object and Array Formatting
```typescript
// ✅ Multi-line when complex
const options = {
userId,
teamId,
status: ExtendedDocumentStatus.ALL,
page: 1,
};
// ✅ Single line when simple
const coords = { x: 0, y: 0 };
// ✅ Array items on separate lines when objects
const recipients = [
{
name: 'John',
email: 'john@example.com',
},
{
name: 'Jane',
email: 'jane@example.com',
},
];
```
---
## Naming Conventions
### Variables
```typescript
// ✅ camelCase for variables and functions
const documentId = 123;
const onSubmit = () => {};
// ✅ Descriptive names with auxiliary verbs for booleans
const isLoading = false;
const hasError = false;
const canEdit = true;
const shouldRender = true;
// ✅ Prefix with $ for DOM elements
const $page = document.querySelector('.page');
const $inputRef = useRef<HTMLInputElement>(null);
```
### Types and Schemas
```typescript
// ✅ PascalCase for types
type CreateDocumentOptions = {
userId: number;
};
// ✅ Prefix Zod schemas with Z
const ZCreateDocumentSchema = z.object({
title: z.string(),
});
// ✅ Prefix type from Zod schema with T
type TCreateDocumentSchema = z.infer<typeof ZCreateDocumentSchema>;
```
### Constants
```typescript
// ✅ UPPER_SNAKE_CASE for true constants
const DEFAULT_DOCUMENT_DATE_FORMAT = 'dd/MM/yyyy';
const MAX_FILE_SIZE = 1024 * 1024 * 5;
// ✅ camelCase for const variables that aren't "constants"
const userId = await getUserId();
```
### Functions
```typescript
// ✅ Verb-based names for functions
const createDocument = async () => {};
const findDocuments = async () => {};
const updateDocument = async () => {};
const deleteDocument = async () => {};
// ✅ On prefix for event handlers
const onSubmit = () => {};
const onClick = () => {};
const onFieldCopy = () => {}; // 'on' is also acceptable
```
### Clarity Over Brevity
```typescript
// ✅ Prefer descriptive names over abbreviations
const superLongMethodThatIsCorrect = () => {};
const recipientAuthenticationOptions = {};
const documentMetadata = {};
// ❌ Avoid abbreviations that sacrifice clarity
const supLongMethThatIsCorrect = () => {};
const recipAuthOpts = {};
const docMeta = {};
// ✅ Common abbreviations that are widely understood are acceptable
const userId = 123;
const htmlElement = document.querySelector('div');
const apiResponse = await fetch('/api');
```
---
## Pattern Matching
### Using ts-pattern
```typescript
import { match } from 'ts-pattern';
// ✅ Use match for complex conditionals
const result = match(status)
.with(ExtendedDocumentStatus.DRAFT, () => ({
status: 'draft',
}))
.with(ExtendedDocumentStatus.PENDING, () => ({
status: 'pending',
}))
.with(ExtendedDocumentStatus.COMPLETED, () => ({
status: 'completed',
}))
.exhaustive();
// ✅ Use .otherwise() for default case when not exhaustive
const value = match(type)
.with('text', () => 'Text field')
.with('number', () => 'Number field')
.otherwise(() => 'Unknown field');
```
---
## Database & Prisma
### Query Structure
```typescript
// ✅ Destructure commonly used fields
const { id, email, name } = user;
// ✅ Use select to limit returned fields
const user = await prisma.user.findFirst({
where: { id: userId },
select: {
id: true,
email: true,
name: true,
},
});
// ✅ Use include for relations
const document = await prisma.document.findFirst({
where: { id: documentId },
include: {
recipients: true,
fields: true,
},
});
```
### Transactions
```typescript
// ✅ Use transactions for related operations
return await prisma.$transaction(async (tx) => {
const document = await tx.document.create({ data });
await tx.field.createMany({ data: fieldsData });
await tx.documentAuditLog.create({ data: auditData });
return document;
});
```
### Where Clauses
```typescript
// ✅ Build complex where clauses separately
const whereClause: Prisma.DocumentWhereInput = {
AND: [
{ userId: user.id },
{ deletedAt: null },
{ status: { in: [DocumentStatus.DRAFT, DocumentStatus.PENDING] } },
],
};
const documents = await prisma.document.findMany({
where: whereClause,
});
```
---
## TRPC Patterns
### Router Structure
```typescript
// ✅ Destructure context and input at start
.query(async ({ input, ctx }) => {
const { teamId } = ctx;
const { templateId } = input;
ctx.logger.info({
input: { templateId },
});
return await getTemplateById({
id: templateId,
userId: ctx.user.id,
teamId,
});
});
```
### Request/Response Schemas
```typescript
// ✅ Name schemas clearly
const ZCreateDocumentRequestSchema = z.object({
title: z.string(),
recipients: z.array(ZRecipientSchema),
});
const ZCreateDocumentResponseSchema = z.object({
documentId: z.number(),
status: z.string(),
});
```
### Error Handling in TRPC
```typescript
// ✅ Catch and transform errors appropriately
try {
const result = await createDocument({ userId, data });
return result;
} catch (err) {
return AppError.toRestAPIError(err);
}
// ✅ Or throw AppError directly
if (!template) {
throw new AppError(AppErrorCode.NOT_FOUND, {
message: 'Template not found',
});
}
```
---
## Additional Patterns
### Optional Chaining
```typescript
// ✅ Use optional chaining for potentially undefined values
const email = user?.email;
const recipientToken = recipient?.token ?? '';
// ✅ Use nullish coalescing for defaults
const pageSize = perPage ?? 10;
const status = documentStatus ?? DocumentStatus.DRAFT;
```
### Array Operations
```typescript
// ✅ Use functional array methods
const activeRecipients = recipients.filter((r) => r.signingStatus === 'SIGNED');
const recipientEmails = recipients.map((r) => r.email);
const hasSignedRecipients = recipients.some((r) => r.signingStatus === 'SIGNED');
// ✅ Use find instead of filter + [0]
const recipient = recipients.find((r) => r.id === recipientId);
```
### Conditional Rendering
```typescript
// ✅ Use && for conditional rendering
{isLoading && <Loader />}
// ✅ Use ternary for either/or
{isLoading ? <Loader /> : <Content />}
// ✅ Extract complex conditions to variables
const shouldShowAdvanced = isAdmin && hasPermission && !isDisabled;
{shouldShowAdvanced && <AdvancedSettings />}
```
---
## When in Doubt
- **Consistency**: Follow the patterns you see in similar files
- **Readability**: Favor code that's easy to read over clever one-liners
- **Explicitness**: Be explicit rather than implicit
- **Whitespace**: Use blank lines to separate logical sections
- **Early Returns**: Use guard clauses to reduce nesting
- **Functional**: Prefer functional patterns over imperative ones
+73 -6
View File
@@ -5,22 +5,39 @@ If you plan to contribute to Documenso, please take a moment to feel awesome ✨
## Before getting started
- Before jumping into a PR be sure to search [existing PRs](https://github.com/documenso/documenso/pulls) or [issues](https://github.com/documenso/documenso/issues) for an open or closed item that relates to your submission.
- Select and issue from [here](https://github.com/documenso/documenso/issues) or create a new one
- Consider the results from the discussion in the issue
- Select an issue from [here](https://github.com/documenso/documenso/issues) or create a new one
- Consider the results from the discussion on the issue
- Accept the [Contributor License Agreement](https://documen.so/cla) to ensure we can accept your contributions.
## Taking issues
Before taking an issue, ensure that:
- The issue has been assigned the public label
- The issue is clearly defined and understood
- No one has been assigned to the issue
- No one has expressed intention to work on it
You can then:
1. Comment on the issue with your intention to work on it
2. Begin work on the issue
Always feel free to ask questions or seek clarification on the issue.
## Developing
The development branch is <code>main</code>. All pull request should be made against this branch. If you need help getting started, [join us on Slack](https://join.slack.com/t/documenso/shared_invite/zt-1qwxxsvli-nDyojjt~wakhgBGl9JRl2w).
The development branch is <code>main</code>. All pull requests should be made against this branch. If you need help getting started, [join us on Discord](https://documen.so/discord).
1. [Fork](https://help.github.com/articles/fork-a-repo/) this repository to your
own GitHub account and then
[clone](https://help.github.com/articles/cloning-a-repository/) it to your local device.
2. Create a new branch:
- Create a new branch (include the issue id and somthing readable):
- Create a new branch (include the issue id and something readable):
```sh
git checkout -b doc-999-my-feature-or-fix
git checkout -b feat/doc-999-somefeature-that-rocks
```
3. See the [Developer Setup](https://github.com/documenso/documenso/blob/main/README.md#developer-setup) for more setup details.
@@ -28,10 +45,60 @@ The development branch is <code>main</code>. All pull request should be made aga
## Building
> **Note**
> Please be sure that you can make a full production build before pushing code or creating PRs.
> Please ensure you can make a full production build before pushing code or creating PRs.
You can build the project with:
```bash
npm run build
```
## AI-Assisted Development with OpenCode
We use [OpenCode](https://opencode.ai) for AI-assisted development. OpenCode provides custom commands and skills to help maintain consistency and streamline common workflows.
OpenCode works with most major AI providers (Anthropic, OpenAI, Google, etc.) or you can use [Zen](https://opencode.ai/zen) for optimized coding models. Configure your preferred provider in the OpenCode settings.
> **Important**: All AI-generated code must be thoroughly reviewed by the contributor before submitting a PR. You are responsible for understanding and validating every line of code you submit. If we detect that contributors are simply throwing AI-generated code over the wall without proper review, they will be blocked from the repository.
### Getting Started
1. Install OpenCode (see [opencode.ai](https://opencode.ai) for other install methods):
```bash
curl -fsSL https://opencode.ai/install | bash
```
2. Configure your AI provider (or use Zen for optimized models)
3. Run `opencode` in the project root
### Available Commands
Use these commands in OpenCode by typing the command name:
| Command | Description |
| ------------------------------ | -------------------------------------------------------- |
| `/implement <spec-path>` | Implement a spec from `.agents/plans/` autonomously |
| `/continue <spec-path>` | Continue implementing a spec from a previous session |
| `/interview <file-path>` | Deep-dive interview to flesh out a spec or design |
| `/document <module-path>` | Generate MDX documentation for a module or feature |
| `/commit` | Create a conventional commit for staged changes |
| `/create-plan <slug>` | Create a new plan file in `.agents/plans/` |
| `/create-scratch <slug>` | Create a scratch file for notes in `.agents/scratches/` |
| `/create-justification <slug>` | Create a justification file in `.agents/justifications/` |
### Typical Workflow
1. **Create a plan**: Use `/create-plan my-feature` to draft a spec for a new feature
2. **Flesh out the spec**: Use `/interview .agents/plans/<file>.md` to refine requirements
3. **Implement**: Use `/implement .agents/plans/<file>.md` to build the feature
4. **Continue if needed**: Use `/continue .agents/plans/<file>.md` to pick up where you left off
5. **Commit**: Use `/commit` to create a conventional commit
### Agent Files
The `.agents/` directory stores AI-generated artifacts:
- **`.agents/plans/`** - Feature specs and implementation plans
- **`.agents/scratches/`** - Temporary notes and explorations
- **`.agents/justifications/`** - Decision rationale and technical justifications
These files use a unique ID format (`{word}-{word}-{word}-{slug}.md`) to prevent conflicts.
+6
View File
@@ -0,0 +1,6 @@
# The Documenso Manifest
Signing documents is a fundamental building block of private, economic, and government interactions. Access to easy and secure signing to participate in society should therefore be a fundamental right for everyone. The technology to enable this should be accessible and widespread.
We know that open source is the key to solving this need once and for all to benefit all humankind. Using open source kickstarts innovation by putting the open sharing of ideas and solutions first. With Documenso, we will create an open and globally accessible signing platform to empower users, customers, and developers to fulfill their needs. Documenso is built by and for the global community, listening and implementing what is needed. Being transparent with the code and the processes that use it brings trust and security to the platform.
We build Documenso for longevity and scale by embracing the capital efficiency and inclusiveness of the Commercial Open Source (COSS) movement. We are building a global commodity for the world.
+304 -106
View File
@@ -1,159 +1,357 @@
<p align="center" style="margin-top: 12px">
<a href="https://github.com/documenso/documenso.com">
<img width="250px" src="https://user-images.githubusercontent.com/1309312/224986248-5b8a5cdc-2dc1-46b9-a354-985bb6808ee0.png" alt="Documenso Logo">
</a>
<h3 align="center">Open Source Signing Infrastructure</h3>
<img src="https://github.com/documenso/documenso/assets/13398220/a643571f-0239-46a6-a73e-6bef38d1228b" alt="Documenso Logo">
<p align="center" style="margin-top: 20px">
<p align="center">
The DocuSign Open Source Alternative.
<br />
The Open Source DocuSign Alternative.
<br>
<a href="https://documenso.com"><strong>Learn more »</strong></a>
<br />
<br />
<a href="https://join.slack.com/t/documenso/shared_invite/zt-1qwxxsvli-nDyojjt~wakhgBGl9JRl2w">Slack</a>
<a href="https://documen.so/discord">Discord</a>
·
<a href="https://documenso.com">Website</a>
·
<a href="https://github.com/documenso/documenso/issues">Issues</a>
·
<a href="https://github.com/documenso/documenso/milestones">Roadmap</a>
<a href="https://documen.so/live">Upcoming Releases</a>
·
<a href="https://documen.so/roadmap">Roadmap</a>
</p>
</p>
<p align="center">
<a href="https://join.slack.com/t/documenso/shared_invite/zt-1qwxxsvli-nDyojjt~wakhgBGl9JRl2w"><img src="https://img.shields.io/badge/Slack-documenso.slack.com-%234A154B" alt="Join Documenso on Slack"></a>
<a href="https://documen.so/discord"><img src="https://img.shields.io/badge/Discord-documen.so/discord-%235865F2" alt="Join Documenso on Discord"></a>
<a href="https://github.com/documenso/documenso/stargazers"><img src="https://img.shields.io/github/stars/documenso/documenso" alt="Github Stars"></a>
<a href="https://github.com/documenso/documenso/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-AGPLv3-purple" alt="License"></a>
<a href="https://github.com/documenso/documenso/pulse"><img src="https://img.shields.io/github/commit-activity/m/documenso/documenso" alt="Commits-per-month"></a>
<a href="https://vscode.dev/redirect?url=vscode://ms-vscode-remote.remote-containers/cloneInVolume?url=https://github.com/documenso/documenso">
<img alt="open in devcontainer" src="https://img.shields.io/static/v1?label=Dev%20Containers&message=Enabled&color=blue&logo=visualstudiocode" />
</a>
<a href="CODE_OF_CONDUCT.md"><img src="https://img.shields.io/badge/Contributor%20Covenant-2.1-4baaaa.svg" alt="Contributor Covenant"></a>
</p>
# Documenso 0.9 - Developer Preview
<div>
<img style="display: block; height: 120px; width: 24%"
src="https://user-images.githubusercontent.com/1309312/224570645-167128ee-3e39-4578-85d2-5394d9a0379c.png">
<img style="display: block; height: 120px; width: 24%"
src="https://user-images.githubusercontent.com/1309312/224570651-0afd12f8-cfe3-49d1-805e-e495af963d91.png">
<img style="display: block; height: 120px; width: 24%"
src="https://user-images.githubusercontent.com/1309312/224570655-328d2279-058d-4a3e-b5c3-5cbd8a1f4e05.png">
<img style="display: block; height: 120px; width: 24%"
src="https://user-images.githubusercontent.com/1309312/224571617-1f3c2811-c1ac-4d7d-b9b0-4ab183731405.png">
<img style="display: block; height: 120px; width: 24%"
src="https://user-images.githubusercontent.com/1309312/224570322-b2c76ea8-7482-4043-ad97-f1221220c591.png">
<img style="display: block; height: 120px; width: 24%"
src="https://user-images.githubusercontent.com/1309312/224570325-a8055f24-9826-4a23-b116-4fbb0577581a.png">
<img style="display: block; height: 120px; width: 24%"
src="https://user-images.githubusercontent.com/1309312/224570318-f724bbd9-c394-4bdc-bace-2d78af92de44.png">
<img style="display: block; height: 120px; width: 24%"
src="https://user-images.githubusercontent.com/1309312/224571539-f019b860-f613-4b20-86e8-4437c5784265.png">
<div align="center">
<img src="https://github.com/documenso/documenso/assets/13398220/d96ed533-6f34-4a97-be9b-442bdb189c69" style="width: 80%;" />
</div>
> **Note**
> This project is currently under community review and will publish it's first production release soon™.
## About Documenso
## About this project
Signing documents digitally should be fast and easy and should be the best practice for every document signed worldwide. This is technically quite easy today, but it also introduces a new party to every signature: The signing tool providers. While this is not a problem in itself, it should make us think about how we want these providers of trust to work. Documenso aims to be the world's most trusted document-signing tool. This trust is built by empowering you to self-host Documenso and review how it works under the hood.
Signing documents digitally is fast, easy and should be best practice for every document signed worldwide. This is technically quite easy today, but it also introduces a new party to every signature: The signing tool providers. While this is not a problem in itself, it should make us think about how we want these providers of trust to work. Documenso aims to be the world's most trusted document signing tool. This trust is built by empowering you to self-host Documenso and review how it works under the hood. Join us in creating the next generation of open trust infrastructure.
Join us in creating the next generation of open trust infrastructure.
## Recognition
<p align="center">
<a href="https://www.producthunt.com/posts/documenso?utm_source=badge-top-post-badge&utm_medium=badge&utm_souce=badge-documenso" target="_blank"><img src="https://api.producthunt.com/widgets/embed-image/v1/top-post-badge.svg?post_id=395047&theme=light&period=daily" alt="Documenso - The&#0032;open&#0032;source&#0032;DocuSign&#0032;alternative | Product Hunt" style="width: 250px; height: 54px;" width="250" height="54" /></a>
<a href="https://www.producthunt.com/posts/documenso?utm_source=badge-featured&utm_medium=badge&utm_souce=badge-documenso" target="_blank"><img src="https://api.producthunt.com/widgets/embed-image/v1/featured.svg?post_id=395047&theme=light" alt="Documenso - The&#0032;Open&#0032;Source&#0032;DocuSign&#0032;Alternative&#0046; | Product Hunt" style="width: 250px; height: 54px;" width="250" height="54" /></a>
</p>
## Community and Next Steps 🎯
The current project goal is to <b>[release a production ready version](https://github.com/documenso/documenso/milestone/1)</b> for self-hosting as soon as possible. If you want to help making that happen you can:
- Check out the first source code release in this repository and test it
- Tell us what you think in the current [Discussions](https://github.com/documenso/documenso/discussions)
- Join the [Slack Channel](https://join.slack.com/t/documenso/shared_invite/zt-1qwxxsvli-nDyojjt~wakhgBGl9JRl2w) for any questions and getting to know to other community members
- ⭐ the repository to help us raise awareness
- Spread the word on Twitter, that Documenso is working towards a more open signing tool
- Fix or create [issues](https://github.com/documenso/documenso/issues), that are needed for the first production release
- Check out the first source code release in this repository and test it.
- Tell us what you think in the [Discussions](https://github.com/documenso/documenso/discussions).
- Join the [Discord server](https://documen.so/discord) for any questions and getting to know to other community members.
- ⭐ the repository to help us raise awareness.
- Spread the word on Twitter that Documenso is working towards a more open signing tool.
- Fix or create [issues](https://github.com/documenso/documenso/issues), that are needed for the first production release.
## Contributing
- To contribute please see our [contribution guide](https://github.com/documenso/documenso/blob/main/CONTRIBUTING.md).
- To contribute, please see our [contribution guide](https://github.com/documenso/documenso/blob/main/CONTRIBUTING.md).
## Tools
## Contact us
# Tech
Contact us if you are interested in our Enterprise plan for large organizations that need extra flexibility and control.
Documenso is built using awesome open source tech including:
<a href="https://cal.com/timurercan/enterprise-customers?utm_source=banner&utm_campaign=oss"><img alt="Book us with Cal.com" src="https://cal.com/book-with-cal-dark.svg" /></a>
- [Typescript](https://www.typescriptlang.org/)
- [Javascript (when neccessary)](https://developer.mozilla.org/en-US/docs/Web/JavaScript)
- [NextJS (JS Fullstack Framework)](https://nextjs.org/)
- [Postgres SQL (Database)](https://www.postgresql.org/)
- [Prisma (ORM - Object-relational mapping)](https://www.prisma.io/)
- [Tailwind CSS (Styling)](https://tailwindcss.com/)
- [Node SignPDF (Digital Signature)](https://github.com/vbuch/node-signpdf)
- [React-PDF for viewing PDFs](https://github.com/wojtekmaj/react-pdf)
- [PDF-Lib for PDF manipulation](https://github.com/Hopding/pdf-lib)
- Check out /packages.json and /apps/web/package.json for more
- Support for [opensignpdf (requires Java on server)](https://github.com/open-pdf-sign) is currently planned.
## Tech Stack
# Getting Started
<p align="left">
<a href="https://www.typescriptlang.org"><img src="https://shields.io/badge/TypeScript-3178C6?logo=TypeScript&logoColor=FFF&style=flat-square" alt="TypeScript"></a>
<a href="https://prisma.io"><img width="122" height="20" src="http://made-with.prisma.io/indigo.svg" alt="Made with Prisma" /></a>
<a href="https://tailwindcss.com/"><img src="https://img.shields.io/badge/tailwindcss-0F172A?&logo=tailwindcss" alt="Tailwind CSS"></a>
<a href=""><img src="" alt=""></a>
<a href=""><img src="" alt=""></a>
<a href=""><img src="" alt=""></a>
<a href=""><img src="" alt=""></a>
<a href=""><img src="" alt=""></a>
</p>
## Requirements
- [Typescript](https://www.typescriptlang.org/) - Language
- [ReactRouter](https://reactrouter.com/) - Framework
- [Prisma](https://www.prisma.io/) - ORM
- [Tailwind](https://tailwindcss.com/) - CSS
- [shadcn/ui](https://ui.shadcn.com/) - Component Library
- [react-email](https://react.email/) - Email Templates
- [tRPC](https://trpc.io/) - API
- [@documenso/pdf-sign](https://www.npmjs.com/package/@documenso/pdf-sign) - PDF Signatures (launching soon)
- [React-PDF](https://github.com/wojtekmaj/react-pdf) - Viewing PDFs
- [PDF-Lib](https://github.com/Hopding/pdf-lib) - PDF manipulation
- [Stripe](https://stripe.com/) - Payments
To run Documenso locally you need
<!-- - Support for [opensignpdf (requires Java on server)](https://github.com/open-pdf-sign) is currently planned. -->
- [Node.js (Version: >=18.x)](https://nodejs.org/en/download/)
- Node Package Manger NPM - included in Node.js
- [PostgreSQL (local or remote)](https://www.postgresql.org/download/)
## Local Development
### Requirements
To run Documenso locally, you will need
- Node.js (v22 or above)
- Postgres SQL Database
- Docker (optional)
### Developer Quickstart
> **Note**: This is a quickstart for developers. It assumes that you have both [docker](https://docs.docker.com/get-docker/) and [docker-compose](https://docs.docker.com/compose/) installed on your machine.
Want to get up and running quickly? Follow these steps:
1. [Fork this repository](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/about-forks) to your GitHub account.
After forking the repository, clone it to your local device by using the following command:
```sh
git clone https://github.com/<your-username>/documenso
```
2. Set up your `.env` file using the recommendations in the `.env.example` file. Alternatively, just run `cp .env.example .env` to get started with our handpicked defaults.
3. Run `npm run dx` in the root directory
- This will spin up a postgres database and inbucket mailserver in a docker container.
4. Run `npm run dev` in the root directory
5. Want it even faster? Just use
```sh
npm run d
```
#### Access Points for Your Application
1. **App** - http://localhost:3000
2. **Incoming Mail Access** - http://localhost:9000
3. **Database Connection Details**
- **Port**: 54320
- **Connection**: Use your favorite database client to connect using the provided port.
4. **S3 Storage Dashboard** - http://localhost:9001
## Developer Setup
Follow these steps to setup documenso on you local machnine:
### Manual Setup
- [Clone the repository](https://help.github.com/articles/cloning-a-repository/) it to your local device.
```sh
git clone https://github.com/documenso/documenso
```
- Run <code>npm i</code> in root directory
- Rename <code>.env.example</code> to <code>.env</code>
- Set DATABASE_URL value in .env file
- You can use the provided test database url (may be wiped at any point)
- Or setup a local postgres sql instance (recommened)
- Create the database scheme by running <code>db-migrate:dev</code>
- Setup your mail provider
- Set <code>SENDGRID_API_KEY</code> value in .env file
- You need a SendGrid account, which you can create [here](https://signup.sendgrid.com/).
- Documenso uses [Nodemailer](https://nodemailer.com/about/) so you can easily use your own SMTP server by setting the <code>SMTP\_\* varibles</code> in your .env
- Run <code>npm run dev</code> root directory to start
- Register a new user at http://localhost:3000/signup
Follow these steps to setup Documenso on your local machine:
1. [Fork this repository](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/about-forks) to your GitHub account.
After forking the repository, clone it to your local device by using the following command:
```sh
git clone https://github.com/<your-username>/documenso
```
2. Run `npm i` in the root directory
3. Create your `.env` from the `.env.example`. You can use `cp .env.example .env` to get started with our handpicked defaults.
4. Set the following environment variables:
- NEXTAUTH_SECRET
- NEXT_PUBLIC_WEBAPP_URL
- NEXT_PRIVATE_DATABASE_URL
- NEXT_PRIVATE_DIRECT_DATABASE_URL
- NEXT_PRIVATE_SMTP_FROM_NAME
- NEXT_PRIVATE_SMTP_FROM_ADDRESS
5. Create the database schema by running `npm run prisma:migrate-dev`
6. Run `npm run translate:compile` in the root directory to compile lingui
7. Run `npm run dev` in the root directory to start
8. Register a new user at http://localhost:3000/signup
---
- Optional: Seed the database using <code>npm run db-seed</code> to create a test user and document
- Optional: Upload and sign <code>apps\web\ressources\example.pdf</code> manually to test your setup
- Optional: Seed the database using `npm run prisma:seed -w @documenso/prisma` to create a test user and document.
- Optional: Create your own signing certificate.
- To generate your own using these steps and a Linux Terminal or Windows Subsystem for Linux (WSL), see **[Create your own signing certificate](./SIGNING.md)**.
- Optional: Configure job provider for document reminders.
- The default local job provider does not support scheduled jobs required for document reminders.
- To enable reminders, set `NEXT_PRIVATE_JOBS_PROVIDER=inngest` and provide `NEXT_PRIVATE_INNGEST_EVENT_KEY` in your `.env` file.
- Optional: Create your own signing certificate
- A demo certificate is provided in /app/web/ressources/certificate.p12
- To generate you own using these steps and a linux Terminal or Windows Linux Subsystem see **Create your own signging certificate**.
### Run in Gitpod
## Updating
- Click below to launch a ready-to-use Gitpod workspace in your browser.
- If you pull the newest version from main, using <code>git pull</code>, it may be neccessary to regenerate your database client
- You can do this by running the generate command in /packages/prisma:
```sh
npx prisma generate
```
- This is not neccessary on first clone
[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/documenso/documenso)
# Creating your own signging certificate
### Run in DevContainer
For the digital signature of you documents you need a signign certificate in .p12 formate (public and private key). You can buy one (not recommended for dev) or use the steps to create a self-signed one:
We support DevContainers for VSCode. [Click here to get started.](https://vscode.dev/redirect?url=vscode://ms-vscode-remote.remote-containers/cloneInVolume?url=https://github.com/documenso/documenso)
1. Generate a private key using the OpenSSL command. You can run the following command to generate a 2048-bit RSA key:\
<code>openssl genrsa -out private.key 2048</code>
### Video walkthrough
2. Generate a self-signed certificate using the private key. You can run the following command to generate a self-signed certificate:\
<code>openssl req -new -x509 -key private.key -out certificate.crt -days 365</code> \
This will prompt you to enter some information, such as the Common Name (CN) for the certificate. Make sure you enter the correct information. The -days parameter sets the number of days for which the certificate is valid.
3. Combine the private key and the self-signed certificate to create the p12 certificate. You can run the following command to do this: \
<code>openssl pkcs12 -export -out certificate.p12 -inkey private.key -in certificate.crt</code>
4. You will be prompted to enter a password for the p12 file. Choose a strong password and remember it, as you will need it to use the certificate (**can be empty for dev certificates**)
5. Place the certificate <code>/apps/web/ressource/certificate.p12</code>
If you're a visual learner and prefer to watch a video walkthrough of setting up Documenso locally, check out this video:
# Deploying - Coming Soon™
[![Watch the video](https://img.youtube.com/vi/Y0ppIQrEnZs/hqdefault.jpg)](https://youtu.be/Y0ppIQrEnZs)
- Docker support
- One-Click-Deploy on Render.com Deploy
## Docker
We provide a Docker container for Documenso, which is published on both DockerHub and GitHub Container Registry.
- DockerHub: [https://hub.docker.com/r/documenso/documenso](https://hub.docker.com/r/documenso/documenso)
- GitHub Container Registry: [https://ghcr.io/documenso/documenso](https://ghcr.io/documenso/documenso)
You can pull the Docker image from either of these registries and run it with your preferred container hosting provider.
Please note that you will need to provide environment variables for connecting to the database, mailserver, and so forth.
For detailed instructions on how to configure and run the Docker container, please refer to the [Docker README](./docker/README.md) in the `docker` directory.
## Self Hosting
We support a variety of deployment methods, and are actively working on adding more. Stay tuned for updates!
### Fetch, configure, and build
First, clone the code from Github:
```
git clone https://github.com/documenso/documenso.git
```
Then, inside the `documenso` folder, copy the example env file:
```
cp .env.example .env
```
The following environment variables must be set:
- `NEXTAUTH_SECRET`
- `NEXT_PUBLIC_WEBAPP_URL`
- `NEXT_PRIVATE_DATABASE_URL`
- `NEXT_PRIVATE_DIRECT_DATABASE_URL`
- `NEXT_PRIVATE_SMTP_FROM_NAME`
- `NEXT_PRIVATE_SMTP_FROM_ADDRESS`
> If you are using a reverse proxy in front of Documenso, don't forget to provide the public URL for the `NEXT_PUBLIC_WEBAPP_URL` variable!
Now you can install the dependencies and build it:
```
npm i
npm run build
npm run prisma:migrate-deploy
```
Finally, you can start it with:
```
cd apps/remix
npm run start
```
This will start the server on `localhost:3000`. For now, any reverse proxy can then do the frontend and SSL termination.
> If you want to run with another port than 3000, you can start the application with `next -p <ANY PORT>` from the `apps/remix` folder.
### Run as a service
You can use a systemd service file to run the app. Here is a simple example of the service running on port 3500 (using 3000 by default):
```bash
[Unit]
Description=documenso
After=network.target
[Service]
Environment=PATH=/path/to/your/node/binaries
Type=simple
User=www-data
WorkingDirectory=/var/www/documenso/apps/remix
ExecStart=/usr/bin/next start -p 3500
TimeoutSec=15
Restart=always
[Install]
WantedBy=multi-user.target
```
### Railway
[![Deploy on Railway](https://railway.app/button.svg)](https://railway.app/template/bG6D4p)
### Render
[![Deploy to Render](https://render.com/images/deploy-to-render-button.svg)](https://render.com/deploy?repo=https://github.com/documenso/documenso)
### Koyeb
[![Deploy to Koyeb](https://www.koyeb.com/static/images/deploy/button.svg)](https://app.koyeb.com/deploy?type=git&repository=github.com/documenso/documenso&branch=main&name=documenso-app&builder=dockerfile&dockerfile=/docker/Dockerfile)
## Elestio
[![Deploy on Elestio](https://elest.io/images/logos/deploy-to-elestio-btn.png)](https://elest.io/open-source/documenso)
## Troubleshooting
### I'm not receiving any emails when using the developer quickstart.
When using the developer quickstart, an [Inbucket](https://inbucket.org/) server will be spun up in a docker container that will store all outgoing emails locally for you to view.
The Web UI can be found at http://localhost:9000, while the SMTP port will be on localhost:2500.
### Support IPv6
If you are deploying to a cluster that uses only IPv6, You can use a custom command to pass a parameter to the Remix start command
For local docker run
```bash
docker run -it documenso:latest npm run start -- -H ::
```
For k8s or docker-compose
```yaml
containers:
- name: documenso
image: documenso:latest
imagePullPolicy: IfNotPresent
command:
- npm
args:
- run
- start
- --
- -H
- '::'
```
### I can't see environment variables in my package scripts.
Wrap your package script with the `with:env` script like such:
```
npm run with:env -- npm run myscript
```
The same can be done when using `npx` for one of the bin scripts:
```
npm run with:env -- npx myscript
```
This will load environment variables from your `.env` and `.env.local` files.
## Repo Activity
![Repository Activity](https://repobeats.axiom.co/api/embed/622a2e9aa709696f7226304b5b7178a5741b3868.svg)
+67
View File
@@ -0,0 +1,67 @@
# Creating your own signing certificate
For the digital signature of your documents you need a signing certificate in .p12 format (public and private key). You can buy one (not recommended for dev) or use the steps to create a self-signed one:
1. Generate a private key using the OpenSSL command. You can run the following command to generate a 2048-bit RSA key:
`openssl genrsa -out private.key 2048`
2. Generate a self-signed certificate using the private key. You can run the following command to generate a self-signed certificate:
`openssl req -new -x509 -key private.key -out certificate.crt -days 365`
This will prompt you to enter some information, such as the Common Name (CN) for the certificate. Make sure you enter the correct information. The `-days` parameter sets the number of days for which the certificate is valid.
3. Combine the private key and the self-signed certificate to create the p12 certificate. You can run the following commands to do this:
```bash
# Set certificate password securely (won't appear in command history)
read -s -p "Enter certificate password: " CERT_PASS
echo
# Create the p12 certificate using the environment variable
openssl pkcs12 -export -out certificate.p12 -inkey private.key -in certificate.crt \
-password env:CERT_PASS \
-keypbe PBE-SHA1-3DES \
-certpbe PBE-SHA1-3DES \
-macalg sha1
```
4. **IMPORTANT**: A certificate password is required to prevent signing failures. Make sure to use a strong password (minimum 4 characters) when prompted. Certificates without passwords will cause "Failed to get private key bags" errors during document signing.
5. Place the certificate `/apps/remix/resources/certificate.p12` (If the path does not exist, it needs to be created)
## Docker
> We are still working on the publishing of docker images, in the meantime you can follow the steps below to create a production ready docker image.
Want to create a production ready docker image? Follow these steps:
- cd into `docker` directory
- Make `build.sh` executable by running `chmod +x build.sh`
- Run `./build.sh` to start building the docker image.
- Publish the image to your docker registry of choice (or) If you prefer running the image from local, run the below command
```
docker run -d --restart=unless-stopped -p 3000:3000 -v documenso:/app/data --name documenso documenso:latest
```
Command Breakdown:
- `-d` - Let's you run the container in background
- `-p` - Passes down which ports to use. First half is the host port, Second half is the app port. You can change the first half anything you want and reverse proxy to that port.
- `-v` - Volume let's you persist the data
- `--name` - Name of the container
- `documenso:latest` - Image you have built
## Deployment
We support a variety of deployment methods, and are actively working on adding more. Stay tuned for updates!
## Railway
[![Deploy on Railway](https://railway.app/button.svg)](https://railway.app/template/DjrRRX)
## Render
[![Deploy to Render](https://render.com/images/deploy-to-render-button.svg)](https://render.com/deploy?repo=https://github.com/documenso/documenso)
+343
View File
@@ -0,0 +1,343 @@
# Documentation Writing Style Guide
This document defines the writing conventions for Documenso documentation.
Documentation lives in `apps/docs/` as MDX files and uses [Fumadocs](https://fumadocs.dev).
## Core Principles
1. **Task-based navigation** - Organize by what users want to do, not by feature hierarchy
2. **Progressive examples** - Start simple, build to complex
3. **Explicit limitations** - List what's NOT supported clearly
4. **Real-world context** - Explain document signing concepts with familiar comparisons
## Tone
- Direct and action-oriented
- Second person ("you") with imperative voice
- Technical but accessible
- Acknowledge complexity without condescension
- No emojis or excessive personality
## Anti-Patterns to Avoid
- Assuming document signing domain knowledge
- Hiding default values
- Separate "TypeScript" sections (types integrated throughout)
- Monolithic single-page references
- Examples that don't work with current API
## Documentation Audiences
The docs serve three distinct audiences:
1. **Users** - People using the Documenso web application to send and sign documents
2. **Developers** - Building integrations with the API or SDKs
3. **Self-hosters** - Running their own Documenso instance
Tailor content to the audience:
- User docs: Focus on UI workflows, no code required
- Developer docs: API/SDK examples, authentication, webhooks
- Self-hosting docs: Deployment, configuration, infrastructure
## File Structure
```
apps/docs/
├── index.mdx # Landing page with audience navigation
├── getting-started/ # Quick starts for each audience
├── users/ # Application usage guides
│ ├── documents/ # Creating and managing documents
│ ├── templates/ # Working with templates
│ ├── signing/ # Signing documents
│ └── settings/ # Account and team settings
├── developers/ # API and SDK documentation
│ ├── api/ # REST API reference
│ ├── sdk/ # SDK guides
│ ├── webhooks/ # Webhook integration
│ └── examples/ # Code examples and recipes
├── self-hosting/ # Self-hosting documentation
│ ├── deployment/ # Deployment guides
│ ├── configuration/ # Environment and settings
│ └── maintenance/ # Upgrades and backups
├── concepts/ # Shared concepts across audiences
└── migration/ # Migration guides
```
Each directory has a `meta.json` controlling navigation order:
```json
{
"title": "Section Title",
"pages": ["index", "page-one", "page-two"]
}
```
Use `---Label---` for section dividers in `meta.json`.
## MDX Frontmatter
Every page needs frontmatter for search and SEO:
```yaml
---
title: Working with Pages
description: Add, remove, reorder, copy, and merge PDF pages.
---
```
## Page Structure
### User Documentation
```mdx
---
title: Feature Name
description: Brief description for SEO and previews.
---
# Feature Name
Brief description of what this does and when to use it.
## Steps
1. Navigate to **Settings > Feature**
2. Click **Add New**
3. Fill in the required fields
---
## See Also
- [Related Guide](/docs/users/related)
```
### Developer Documentation
```mdx
---
title: Feature Name
description: Brief description for SEO and previews.
---
# Feature Name
Brief description of what this does and when to use it.
## Quick Start
\`\`\`typescript
// Minimal working example
\`\`\`
---
## Section Name
Content organized by task or concept.
---
## See Also
- [Related Guide](/docs/developers/related)
```
### Self-Hosting Documentation
```mdx
---
title: Configuration Topic
description: Brief description for SEO and previews.
---
# Configuration Topic
Brief description of what this configures.
## Environment Variables
| Variable | Required | Default | Description |
| ---------- | -------- | ------- | ------------ |
| `VAR_NAME` | Yes | - | What it does |
---
## See Also
- [Related Guide](/docs/self-hosting/related)
```
## Parameter Tables
Use Sharp-style nested parameter tables for developer documentation (API/SDK):
```markdown
### methodName(param, options?)
Description of what the method does.
| Param | Type | Default | Description |
| ------------------- | --------- | -------- | --------------------- |
| `param` | `string` | required | What it does |
| `[options]` | `Options` | | |
| `[options.setting]` | `boolean` | `false` | Nested option |
| `[options.timeout]` | `number` | `5000` | Another nested option |
**Returns**: `Promise<Result>`
**Throws**:
- `SpecificError` - When something goes wrong
```
Key conventions:
- Square brackets `[param]` indicate optional parameters
- Nested options indented with `[options.name]` pattern
- Always show default values
- Group related options under their parent
## Code Examples
For developer documentation, use progressive complexity:
```typescript
// Basic usage
const document = await documenso.documents.create({
title: "Contract",
file: pdfBuffer,
});
// With recipients
const document = await documenso.documents.create({
title: "Contract",
file: pdfBuffer,
recipients: [{ email: "signer@example.com", name: "John Doe" }],
});
// Full example with error handling
try {
const document = await documenso.documents.create({
title: "Contract",
file: pdfBuffer,
recipients: [{ email: "signer@example.com", name: "John Doe" }],
});
} catch (error) {
if (error instanceof DocumentError) {
// Handle document creation error
}
}
```
### Example Guidelines
- All examples must be valid TypeScript
- Show imports when not obvious
- Include expected output in comments where helpful
- Use realistic values, not `foo`/`bar`
## UI Instructions
For user documentation, use clear step-by-step instructions:
- Bold UI elements: **Settings**, **Save**, **Documents**
- Use `>` for navigation paths: **Settings > Team > Members**
- Number sequential steps
- Include screenshots sparingly for complex workflows
- Describe what the user should see after each action
## Callouts
Use Fumadocs callouts sparingly for important information:
```mdx
<Callout type="info">Informational note about behavior.</Callout>
<Callout type="warn">Warning about potential issues or breaking changes.</Callout>
<Callout type="error">Critical warning about data loss or security.</Callout>
```
Reserve callouts for:
- Beta/unstable features
- Security considerations
- Common mistakes
- Breaking changes
## Tables
Use tables for:
- Feature matrices
- Parameter documentation
- Comparison charts
- Error catalogs
```markdown
| Feature | Status | Notes |
| ---------------- | ------ | ------------------------ |
| Email signing | Full | All recipient types |
| Embedded signing | Full | Via SDK or direct links |
| Templates | Full | Create and use templates |
```
## Linking
- Link to related docs: `[Documents](/docs/api/documents)`
- Use relative paths within docs
- Add "See Also" sections for discoverability
## Error Documentation
Categorize errors by when they occur:
```markdown
## Document Errors
Thrown when creating or updating documents.
### InvalidDocumentError
Document could not be processed.
**Common causes:**
- File is not a valid PDF
- File exceeds size limits
**Solution:** Verify the file is a valid PDF within size limits.
```
## Concept Explanations
Use analogies for document signing concepts:
```markdown
Think of a **signing workflow** like passing a physical document around an office.
Each recipient gets the document in turn, adds their signature or initials,
and passes it to the next person. The **document status** tracks where it
is in this journey.
```
## Self-Hosting Specific
For self-hosting documentation:
- Always specify required vs optional environment variables
- Include example `.env` snippets
- Document Docker and non-Docker approaches where applicable
- Link to troubleshooting for common deployment issues
- Specify minimum system requirements
## Maintenance
- Include types inline so docs don't get stale
- Reference source file locations for complex behavior
- Update examples when API changes
- Test all code examples work
- Keep environment variable documentation in sync with actual defaults
+26
View File
@@ -0,0 +1,26 @@
# deps
/node_modules
# generated content
.source
# test & build
/coverage
/.next/
/out/
/build
*.tsbuildinfo
# misc
.DS_Store
*.pem
/.pnp
.pnp.js
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# others
.env*.local
.vercel
next-env.d.ts
+45
View File
@@ -0,0 +1,45 @@
# docs
This is a Next.js application generated with
[Create Fumadocs](https://github.com/fuma-nama/fumadocs).
Run development server:
```bash
npm run dev
# or
pnpm dev
# or
yarn dev
```
Open http://localhost:3000 with your browser to see the result.
## Explore
In the project, you can see:
- `lib/source.ts`: Code for content source adapter, [`loader()`](https://fumadocs.dev/docs/headless/source-api) provides the interface to access your content.
- `lib/layout.shared.tsx`: Shared options for layouts, optional but preferred to keep.
| Route | Description |
| ------------------------- | ------------------------------------------------------ |
| `app/(home)` | The route group for your landing page and other pages. |
| `app/docs` | The documentation layout and pages. |
| `app/api/search/route.ts` | The Route Handler for search. |
### Fumadocs MDX
A `source.config.ts` config file has been included, you can customise different options like frontmatter schema.
Read the [Introduction](https://fumadocs.dev/docs/mdx) for further details.
## Learn More
To learn more about Next.js and Fumadocs, take a look at the following
resources:
- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js
features and API.
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
- [Fumadocs](https://fumadocs.dev) - learn about Fumadocs
+13
View File
@@ -0,0 +1,13 @@
{
"$schema": "node_modules/@fumadocs/cli/dist/schema/src.json",
"aliases": {
"uiDir": "./components/ui",
"componentsDir": "./components",
"blockDir": "./components",
"cssDir": "./styles",
"libDir": "./lib"
},
"baseDir": "src",
"uiLibrary": "radix-ui",
"commands": {}
}
@@ -0,0 +1,57 @@
---
title: Certifications & Regulatory Compliance
description: Documenso's compliance status for industry certifications and regulatory frameworks.
---
import { Callout } from 'fumadocs-ui/components/callout';
### Compliance Status Overview
| Certification | Status |
| -------------- | ---------------------- |
| 21 CFR Part 11 | Compliant (Enterprise) |
| SOC 2 | Compliant |
| ISO 27001 | Planned |
| HIPAA | Planned |
## 21 CFR Part 11
<Callout type="info">Status: Compliant (Enterprise License)</Callout>
21 CFR Part 11 is a regulation by the FDA that establishes the criteria for electronic records and electronic signatures to ensure their authenticity, integrity, and confidentiality in the pharmaceutical, medical device, and other FDA-regulated industries.
Read more about [21 CFR Part 11 with Documenso](https://documen.so/21-CFR-Part-11).
### Main Requirements
- Strong Identity Checks for each Signature
- Signature and Audit Trails
- User Access Management
- Quality Assurance Documentation
## SOC 2
<Callout type="info">Status: [Compliant](https://documen.so/trust)</Callout>
SOC 2 is a framework for managing and auditing the security, availability, processing integrity, confidentiality, and data privacy in cloud and IT service organizations, established by the American Institute of Certified Public Accountants (AICPA).
## ISO 27001
<Callout type="warn">Status: [Planned](https://github.com/documenso/backlog/issues/26)</Callout>
ISO 27001 is an international standard for managing information security, specifying requirements for establishing, implementing, maintaining, and continually improving an information security management system (ISMS).
## HIPAA
<Callout type="info">Status: [Compliant](https://documen.so/trust)</Callout>
The HIPAA (Health Insurance Portability and Accountability Act) is a U.S. law designed to protect patient health information's privacy and security and improve the healthcare system's efficiency and effectiveness.
---
## See Also
- [Standards](/docs/compliance/standards) - Technical signing standards (PDF/A, PAdES, X.509)
- [Signature Levels](/docs/compliance/signature-levels) - eIDAS and other signature level compliance
- [Enterprise Edition](/docs/policies/enterprise-edition) - Enterprise licensing for compliance features
- [GDPR](/docs/compliance/gdpr) - Data protection compliance
+187
View File
@@ -0,0 +1,187 @@
---
title: E-Sign Compliance
description: Understand ESIGN, UETA, eIDAS, and other electronic signature laws that govern digital documents.
---
## ESIGN Act (United States)
The Electronic Signatures in Global and National Commerce Act (ESIGN Act) is a U.S. federal law enacted in 2000. It ensures that electronic signatures and records have the same legal validity as paper documents and handwritten signatures in interstate and foreign commerce.
### Key Requirements
| Requirement | Description |
| ----------------------- | ----------------------------------------------------------------------------------------- |
| **Intent to Sign** | Signers must demonstrate clear intent to sign the document |
| **Consent** | All parties must agree to conduct the transaction electronically |
| **Consumer Disclosure** | For consumer transactions, specific disclosures must be provided before obtaining consent |
| **Record Retention** | Electronic records must be accurately preserved and accessible for later reference |
| **Association** | The signature must be associated with the record being signed |
### Exclusions
The ESIGN Act does not apply to certain document types, including:
- Wills, codicils, and testamentary trusts
- Family law documents (adoption, divorce)
- Court orders and official court documents
- Cancellation of utility services
- Documents related to hazardous materials transportation
---
## UETA (United States)
The Uniform Electronic Transactions Act (UETA) is a model law adopted by 49 U.S. states (all except New York, which has its own Electronic Signatures and Records Act). UETA provides a legal framework for electronic signatures and records at the state level.
### Relationship to ESIGN
UETA and the ESIGN Act have similar requirements and purposes. The federal ESIGN Act allows states to modify or supersede certain ESIGN provisions if they adopt UETA or an equivalent law. In practice, the requirements for electronic signatures under both laws align closely.
### Key Requirements
- Intent to sign demonstrated by the signer
- Consent to conduct transactions electronically
- Retention of records in their original electronic form
- Attribution of the signature to the signer
---
## eIDAS (European Union)
The Electronic Identification, Authentication and Trust Services (eIDAS) regulation governs electronic signatures across all EU member states. eIDAS establishes three levels of electronic signatures, each with different requirements and legal effects.
### Signature Levels
| Level | Description | Legal Effect |
| ------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------- |
| **Simple (SES)** | Basic electronic signature with no specific technical requirements | Admissible as evidence; legal effect varies by use |
| **Advanced (AES)** | Uniquely linked to signer, capable of identifying signer, under sole control | Higher evidentiary weight than SES |
| **Qualified (QES)** | AES created by a qualified signature creation device, based on a qualified certificate | Equivalent to handwritten signature across the EU |
### Simple Electronic Signatures (SES)
SES is the baseline level. Any data in electronic form attached to or logically associated with other electronic data, used by the signatory to sign, qualifies as an SES. There are no specific technical requirements beyond demonstrating intent to sign.
### Advanced Electronic Signatures (AES)
AES must meet additional criteria:
- Uniquely linked to the signatory
- Capable of identifying the signatory
- Created using signature creation data under the signatory's sole control
- Linked to the signed data in a way that detects subsequent changes
### Qualified Electronic Signatures (QES)
QES requires:
- A qualified certificate issued by a qualified trust service provider
- Creation using a qualified electronic signature creation device
- Identity verification compliant with eIDAS requirements
QES carries the same legal standing as a handwritten signature in all EU member states.
---
## Other Jurisdictions
Electronic signature laws exist in most countries. Below are selected examples:
| Jurisdiction | Framework | Notes |
| ------------------ | --------------------------------------------- | ------------------------------------------------------------ |
| **United Kingdom** | UK eIDAS / Electronic Communications Act 2000 | Post-Brexit, UK maintains eIDAS-like framework |
| **Canada** | PIPEDA, provincial laws | Federal and provincial laws govern e-signatures |
| **Australia** | Electronic Transactions Act 1999 | Generally technology-neutral approach |
| **Switzerland** | ZertES | Swiss federal law with qualified signature requirements |
| **Brazil** | MP 2200-2, ICP-Brasil | PKI-based framework for digital signatures |
| **India** | IT Act 2000, Aadhaar e-KYC | Recognizes electronic signatures; Aadhaar-based verification |
| **China** | Electronic Signature Law | Requires reliable electronic signatures for certain uses |
| **Japan** | Electronic Signatures Act | Three-tier system similar to eIDAS |
Requirements vary significantly by jurisdiction. Some transactions may require specific signature types or have exclusions similar to the ESIGN Act.
---
## How Documenso Supports Compliance
Documenso provides features that support compliance with e-signature laws across jurisdictions:
### Intent to Sign
- Signers must actively interact with signature fields to apply their signature
- The signing interface clearly indicates the document being signed
- Signers receive a copy of the completed document
### Consent
- Recipients receive clear notification that they are being asked to sign electronically
- The signing process requires affirmative action from the signer
### Record Retention
- Signed documents are stored and accessible to all parties
- Original documents and audit trails are preserved
- Documents can be downloaded in their signed form at any time
### Document Integrity
- All completed documents are cryptographically sealed
- Any modification after signing invalidates the digital signature
- PDF readers can verify the document has not been altered
### Signer Identification
- Email-based delivery establishes signer identity
- Optional access codes add verification
- Signing activity is logged with timestamps and metadata
---
## Audit Trails
Documenso maintains an audit trail for each document, recording:
| Event | Recorded Data |
| ------------------ | -------------------------------------- |
| Document creation | Timestamp, creator identity |
| Recipient addition | Recipient details, assigned fields |
| Document sent | Timestamp, delivery method |
| Document viewed | Timestamp, viewer identity, IP address |
| Field completed | Timestamp, field type, signer identity |
| Document completed | Timestamp, final document hash |
The audit trail provides evidence of the signing process, including who signed, when they signed, and the sequence of events. This information supports the legal enforceability of the signed document.
---
## What Documenso Does NOT Provide
Documenso supports compliance with Simple Electronic Signature (SES) requirements. The following are not currently provided:
| Capability | Status |
| ----------------------------------------- | ------------------------------------------------------------------------------------- |
| **Qualified Electronic Signatures (QES)** | Not supported; requires integration with qualified trust service providers |
| **Advanced Electronic Signatures (AES)** | Partial support; full AES requires identity verification services |
| **Identity Verification (KYC)** | Not built-in; optional integrations may be available |
| **Qualified Certificates** | Not issued; would require becoming a qualified trust service provider |
| **Industry-Specific Compliance** | Features for specific regulations (e.g., healthcare, finance) depend on configuration |
For transactions requiring AES or QES, consult with legal counsel about appropriate solutions.
---
## Disclaimer
This page provides general information about electronic signature laws for educational purposes. It does not constitute legal advice.
Electronic signature requirements vary by jurisdiction, transaction type, and specific circumstances. Some documents may have specific legal requirements that electronic signatures cannot satisfy.
Consult qualified legal counsel in your jurisdiction to determine whether electronic signatures are appropriate for your specific use case and what requirements must be met.
---
## Related
- [Signature Levels](/docs/compliance/signature-levels) - Simple, Advanced, and Qualified electronic signatures explained
- [Standards & Regulations](/docs/compliance/standards) - SOC 2, 21 CFR Part 11, and other compliance frameworks
- [Signing Certificates](/docs/concepts/signing-certificates) - How documents are digitally signed and verified
+174
View File
@@ -0,0 +1,174 @@
---
title: GDPR
description: Understand how Documenso handles GDPR compliance for data processing and storage.
---
import { Accordion, Accordions } from 'fumadocs-ui/components/accordion';
import { Tab, Tabs } from 'fumadocs-ui/components/tabs';
## Documenso's Role
When using Documenso for document signing, two distinct data processing roles apply:
| Role | Description |
| ------------------- | ------------------------------------------------------------------------------------- |
| **Data Controller** | You (the organisation using Documenso) determine the purposes and means of processing |
| **Data Processor** | Documenso processes personal data on your behalf according to your instructions |
As the data controller, you are responsible for:
- Obtaining appropriate consent or legal basis for processing
- Informing data subjects about how their data is used
- Responding to data subject access requests
- Ensuring compliance with GDPR requirements
As the data processor, Documenso:
- Processes data only according to your instructions
- Implements appropriate security measures
- Assists with data subject requests when needed
- Maintains records of processing activities
## Data Processing
Documenso processes personal data necessary to provide document signing services:
| Data Category | Examples | Purpose |
| ------------------ | ---------------------------------------------- | --------------------------------------- |
| **Identity Data** | Name, email address | User accounts, recipient identification |
| **Document Data** | Uploaded PDFs, field values | Document storage and signing |
| **Signature Data** | Signature images, signing timestamps | Recording signing actions |
| **Audit Data** | IP addresses, browser information, action logs | Audit trail and verification |
Data is processed for the following purposes:
- Delivering documents to recipients
- Recording signatures and other recipient actions
- Generating signed documents with audit trails
- Sending email notifications
## Data Storage Locations
Where your data is stored depends on how you use Documenso:
<Tabs items={['Documenso Cloud', 'Self-Hosted']}>
<Tab value="Documenso Cloud">
For the hosted cloud service:
- Application data is stored in data centres within the European Union
- Document storage uses EU-based infrastructure
- Backups are maintained in geographically separate EU locations
Contact Documenso for specific information about sub-processors and data centre locations.
</Tab>
<Tab value="Self-Hosted">
When you self-host Documenso:
- You control all data storage locations
- No data is transmitted to Documenso's infrastructure
- You choose your own database, file storage, and backup locations
Self-hosting provides complete control over data residency, which may be required for certain compliance scenarios.
</Tab>
</Tabs>
## Data Subject Rights
GDPR grants individuals specific rights regarding their personal data. As the data controller, you are responsible for fulfilling these requests:
| Right | Description |
| ----------------- | -------------------------------------------------------------------------- |
| **Access** | Data subjects can request a copy of their personal data |
| **Rectification** | Data subjects can request correction of inaccurate data |
| **Erasure** | Data subjects can request deletion of their data ("right to be forgotten") |
| **Portability** | Data subjects can request their data in a machine-readable format |
| **Restriction** | Data subjects can request limited processing of their data |
| **Objection** | Data subjects can object to certain types of processing |
When you receive a data subject request, you can:
- Export user and document data from your Documenso account
- Delete user accounts and associated documents
- Contact Documenso support for assistance with cloud-hosted data
## Data Deletion
Documenso supports data deletion to help fulfill erasure requests:
<Accordions type="multiple">
<Accordion title="User Account Deletion">
- Users can delete their own accounts
- Account deletion removes profile data and authentication credentials
- Team owners can remove members from teams
</Accordion>
<Accordion title="Document Deletion">
- Document owners can delete documents in draft state
- Completed documents can be deleted by the owner
- Deletion removes the document, recipient data, and associated audit logs
</Accordion>
<Accordion title="Retention Considerations">
For signed documents, you may need to balance deletion requests against:
- Legal requirements to retain signed contracts
- Your organisation's record-keeping policies
- The rights of other parties to the signed document
Consult with legal counsel to establish appropriate retention policies.
</Accordion>
</Accordions>
## Self-Hosting for GDPR Compliance
Self-hosting Documenso can simplify GDPR compliance:
- **Data residency** - Store all data in your chosen jurisdiction
- **Sub-processor control** - No third-party data processors beyond your own infrastructure
- **Direct access** - Full database access for data subject requests
- **Retention control** - Implement custom data retention and deletion policies
See the [Self-Hosting Guide](/docs/self-hosting) for deployment options.
## Data Processing Agreement
A Data Processing Agreement (DPA) is a contract required by GDPR when a data controller engages a data processor.
<Tabs items={['Documenso Cloud', 'Self-Hosted']}>
<Tab value="Documenso Cloud">
- A DPA is available upon request
- Contact [support@documenso.com](mailto:support@documenso.com) to request a DPA
- The DPA covers Documenso's obligations as a data processor
</Tab>
<Tab value="Self-Hosted">
No DPA with Documenso is required since no personal data is processed by Documenso.
</Tab>
</Tabs>
---
## Disclaimer
This documentation is provided for informational purposes only and does not constitute legal advice. GDPR compliance depends on your specific circumstances, including how you use Documenso, what data you process, and your organisation's obligations.
Consult with qualified legal counsel to:
- Determine your GDPR obligations
- Draft appropriate privacy notices
- Establish lawful bases for processing
- Implement compliant data handling procedures
---
## Related
- [Standards & Regulations](/docs/compliance/standards) - eIDAS, ESIGN Act, and other compliance frameworks
- [Self-Hosting Guide](/docs/self-hosting) - Deploy Documenso on your own infrastructure
- [Security Settings](/docs/users/settings/security) - Configure authentication and security options
@@ -0,0 +1,58 @@
---
title: Compliance
description: Legal and regulatory compliance information for electronic signatures.
---
## Overview
<Cards>
<Card
title="E-Sign Compliance"
description="ESIGN Act, UETA, eIDAS, and electronic signature laws by jurisdiction."
href="/docs/compliance/esign"
/>
<Card
title="GDPR"
description="Data protection requirements for processing personal data in the EU."
href="/docs/compliance/gdpr"
/>
</Cards>
## Additional Topics
<Cards>
<Card
title="Standards & Regulations"
description="SOC 2, 21 CFR Part 11, and other compliance frameworks."
href="/docs/compliance/standards"
/>
<Card
title="Signature Levels"
description="Simple, Advanced, and Qualified electronic signatures under eIDAS."
href="/docs/compliance/signature-levels"
/>
<Card
title="Certifications"
description="Compliance status for industry certifications and regulatory frameworks."
href="/docs/compliance/certifications"
/>
</Cards>
## Disclaimer
This documentation is provided for informational purposes only. It does not constitute legal advice and should not be relied upon as such.
Compliance requirements vary based on:
- Your jurisdiction and applicable laws
- The type of documents being signed
- Industry-specific regulations
- The parties involved in the transaction
Consult with qualified legal counsel to determine the specific requirements for your use case.
## Related
- [Privacy Policy](/docs/policies/privacy) - How Documenso handles personal data
- [Security](/docs/policies/security) - Security practices and measures
- [Terms of Service](/docs/policies/terms) - Terms governing use of Documenso
@@ -0,0 +1,4 @@
{
"title": "Compliance",
"pages": ["esign", "standards", "signature-levels", "gdpr", "certifications"]
}
@@ -0,0 +1,284 @@
---
title: Signature Levels
description: Understand the three eIDAS signature levels — SES, AES, and QES — their requirements, legal effect, and when to use each.
---
import { Accordion, Accordions } from 'fumadocs-ui/components/accordion';
import { Callout } from 'fumadocs-ui/components/callout';
<Callout type="info">
Documenso seals all signed documents cryptographically, regardless of signature level, to prevent
any alterations after signing.
</Callout>
### Compliance Status Overview
| Regulation | Status |
| ------------ | --------- |
| ESIGN / UETA | Compliant |
| eIDAS SES | Compliant |
| eIDAS AES | Planned |
| eIDAS QES | Planned |
| ZertES | Planned |
## U.S. ESIGN Act
<Callout type="info">Status: Compliant</Callout>
The Electronic Signatures in Global and National Commerce Act (ESIGN Act) is a U.S. federal law that ensures the legal validity and enforceability of electronic signatures and records in commerce.
### Main Requirements
- **Intent to Sign** - Parties must demonstrate their intent to sign
- **Consent** - All parties must consent to the use of electronic signatures and records
- **Consumer Disclosures** - Financial institutions must provide clear statements informing consumers before obtaining consent
- **Record Retention** - Electronic records must be maintained for later access by signers
- **Security** - Parties must take reasonable steps to ensure the security and integrity of electronic signatures and records
## UETA (Uniform Electronic Transactions Act)
<Callout type="info">Status: Compliant</Callout>
The Uniform Electronic Transactions Act provides a legal framework for the use of electronic signatures and records in electronic transactions, ensuring they have the same validity and enforceability as paper documents and handwritten signatures.
UETA shares the same core requirements as the [ESIGN Act](#us-esign-act).
## Simple Electronic Signatures (SES)
A Simple Electronic Signature is the most basic form of electronic signature. It includes any data in electronic form that is attached to or logically associated with other electronic data and used by the signatory to sign.
### Characteristics
| Aspect | Description |
| -------------------------- | ------------------------------------------------------------------------------------- |
| **Technical Requirements** | No specific technical requirements beyond demonstrating intent to sign |
| **Identity Verification** | None required; relies on email delivery or other indirect identification |
| **Legal Status** | Admissible as evidence; cannot be denied legal effect solely because it is electronic |
| **Examples** | Typed name, scanned signature image, checkbox acceptance, click-to-sign |
### When SES Is Appropriate
SES is suitable for many common business transactions:
- Standard contracts and agreements
- Internal approvals and sign-offs
- Terms of service acceptance
- Non-disclosure agreements
- Purchase orders and invoices
- Employment documents (in most jurisdictions)
The legal validity of SES depends on the specific transaction and jurisdiction. Many everyday business documents do not require higher signature levels.
---
## Advanced Electronic Signatures (AES)
An Advanced Electronic Signature meets additional technical and procedural requirements that provide stronger evidence of the signer's identity and the document's integrity.
### Requirements
Under eIDAS, an AES must satisfy four criteria:
1. **Uniquely linked to the signatory** - The signature is associated with a specific individual
2. **Capable of identifying the signatory** - The signature data reveals who signed
3. **Created using signature creation data under the signatory's sole control** - Only the signer can create the signature (e.g., private key, secure device)
4. **Linked to the data in such a way that any subsequent change is detectable** - Tampering invalidates the signature
### Characteristics
| Aspect | Description |
| -------------------------- | -------------------------------------------------------------------------- |
| **Technical Requirements** | Cryptographic signature with signer identification |
| **Identity Verification** | Required; must establish signer identity through verification process |
| **Legal Status** | Higher evidentiary weight than SES; stronger presumption of validity |
| **Implementation** | Typically requires identity verification service and personal certificates |
### Compliance Status
<Callout type="warn">
Status: [Planned](https://github.com/documenso/backlog/issues/9) via third party until [Let's
Sign](https://github.com/documenso/backlog/issues/21) is realized.
</Callout>
Current AES progress:
- Cryptographic signature sealing the document against tampering
- Signing using dedicated hardware (Hardware Security Module)
- Embedding signer identity in the cryptographic signature (planned)
- Being a government-audited trusted qualified services provider (planned)
### When AES Is Appropriate
AES is used when stronger proof of identity and intent is needed:
- Financial services agreements
- Real estate transactions (in some jurisdictions)
- Healthcare consent forms
- Government submissions
- High-value contracts
- Cross-border agreements within the EU
---
## Qualified Electronic Signatures (QES)
A Qualified Electronic Signature is the highest level of electronic signature under eIDAS. It is legally equivalent to a handwritten signature in all EU member states and carries a presumption of validity.
### Requirements
QES must meet all AES requirements plus:
1. **Qualified Certificate** - Issued by a Qualified Trust Service Provider (QTSP) that is accredited by an EU member state
2. **Qualified Electronic Signature Creation Device (QSCD)** - The signature is created using hardware or software that meets specific security standards
3. **Identity Verification** - In-person or equivalent remote verification compliant with eIDAS requirements
### Characteristics
| Aspect | Description |
| -------------------------- | --------------------------------------------------------------------- |
| **Technical Requirements** | Qualified certificate + qualified signature creation device |
| **Identity Verification** | Strict verification by a Qualified Trust Service Provider |
| **Legal Status** | Equivalent to handwritten signature across all EU member states |
| **Implementation** | Requires integration with a QTSP; typically involves external service |
### Compliance Status
<Callout type="warn">
Status: [Planned](https://github.com/documenso/backlog/issues/32) via third party until [Let's
Sign](https://github.com/documenso/backlog/issues/21) is realized.
</Callout>
### When QES Is Required
Certain transactions require or benefit from QES:
- Documents that legally require a handwritten signature under national law
- Court filings and legal documents
- Company formation documents
- Land registry transactions
- Notarized documents
- Regulated financial transactions
- Cross-border transactions requiring guaranteed recognition
---
## Comparison of Signature Levels
| Aspect | SES | AES | QES |
| ------------------------- | ------------ | ------------------------ | --------------------- |
| **Technical Complexity** | Low | Medium | High |
| **Identity Verification** | None | Required | Strict (QTSP) |
| **Legal Effect (EU)** | Admissible | Higher evidentiary value | Equal to handwritten |
| **Cost** | Low | Medium | Higher |
| **User Experience** | Simple | More steps | Most steps |
| **Signer Requirements** | Email access | Identity verification | Certificate from QTSP |
### Legal Recognition
| Jurisdiction | SES | AES | QES |
| ------------------ | ------------------------------- | -------------------------- | ------------------------------------ |
| **European Union** | Valid, evidentiary value varies | Enhanced evidentiary value | Equivalent to handwritten |
| **United States** | Valid under ESIGN/UETA | No formal distinction | No formal distinction |
| **United Kingdom** | Valid | Enhanced value | Equivalent to handwritten (UK eIDAS) |
| **Switzerland** | Valid | Valid | Equivalent to handwritten (ZertES) |
---
## What Documenso Provides
Documenso supports Simple Electronic Signatures (SES) with features that enhance evidentiary value:
### SES Features
- **Intent to Sign** - Signers actively interact with signature fields
- **Email-Based Delivery** - Documents sent to specific email addresses
- **Audit Trail** - Complete record of signing events, timestamps, and IP addresses
- **Document Integrity** - Cryptographic sealing detects any post-signing modifications
- **Record Retention** - Signed documents stored and accessible to all parties
### Additional Verification Options
- **Access Codes** - Require signers to enter a code before accessing documents
- **Signing Order** - Control the sequence of signatures
### What Documenso Does Not Provide
| Capability | Status |
| ----------------------------------------- | --------------------------------------------------------- |
| **Qualified Electronic Signatures (QES)** | Not supported; requires QTSP integration |
| **Advanced Electronic Signatures (AES)** | Partial; full AES requires identity verification services |
| **Identity Verification (KYC)** | Not built-in |
| **Qualified Certificates** | Not issued; would require QTSP status |
For transactions requiring AES or QES, you would need to integrate with external identity verification services or Qualified Trust Service Providers.
---
## ZertES (Swiss Federal Law)
<Callout type="warn">Status: [Planned](https://github.com/documenso/backlog/issues/34)</Callout>
ZertES is a Swiss federal law that regulates electronic signature compliance. It defines requirements similar to eIDAS for qualified electronic signatures within Switzerland.
---
## When You Need Higher Signature Levels
Consider using AES or QES when:
<Accordions type="multiple">
<Accordion title="Legal Requirements">
- National law requires a handwritten signature (QES may substitute)
- Regulations specify signature requirements (e.g., certain financial or healthcare documents)
- Cross-border enforceability is critical
</Accordion>
<Accordion title="Risk Factors">
- High contract value or significant liability
- Higher likelihood of disputes
- Need for stronger non-repudiation
- Counterparty or regulatory requirements specify higher levels
</Accordion>
<Accordion title="Industry Standards">
- Financial services with regulatory oversight
- Healthcare with patient consent requirements
- Government or public sector contracts
- Real estate transactions in regulated markets
</Accordion>
<Accordion title="Evaluating Your Needs">
Most business transactions do not require AES or QES. Consider:
1. What does your jurisdiction require for this document type?
2. What do your counterparties or customers expect?
3. What is the risk if the signature is disputed?
4. Does your industry have specific requirements?
When in doubt, consult with legal counsel to determine the appropriate signature level for your specific use case.
</Accordion>
</Accordions>
---
## Disclaimer
This documentation is provided for informational purposes only and does not constitute legal advice.
The appropriate signature level for your documents depends on:
- Your jurisdiction and applicable laws
- The type of document being signed
- Industry-specific regulations
- Contractual requirements from counterparties
- Risk tolerance and dispute likelihood
Electronic signature requirements vary significantly across jurisdictions and document types. Some transactions have specific legal requirements that may mandate particular signature levels or exclude electronic signatures entirely.
Consult with qualified legal counsel to determine the signature level requirements for your specific use case.
---
## Related
- [E-Sign Compliance](/docs/compliance/esign) - ESIGN Act, UETA, eIDAS, and electronic signature laws
- [Signing Certificates](/docs/concepts/signing-certificates) - How documents are digitally signed and verified
- [Standards & Regulations](/docs/compliance/standards) - SOC 2, 21 CFR Part 11, and other frameworks

Some files were not shown because too many files have changed in this diff Show More