Commit Graph
100 Commits
Author SHA1 Message Date
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
Lucas Smith bc3c9424c4 docs: add article about public api (#1005) 2024-03-13 21:23:44 +11:00
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
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
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
Lucas Smith 4476cf8fd1 Merge branch 'main' into fix/layout-shift-on-table 2024-03-09 00:41:20 +11: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
Lucas Smith fd4ea3aca5 fix: update docker docs 2024-03-08 20:00:24 +11: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
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
Lucas Smith 35b2405921 chore: use warpbuild for docker publishing 2024-03-07 10:02:33 +00: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
Lucas Smith 9525b9bd63 fix: resolve issue with testing compose file 2024-03-06 23:48:28 +11:00
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
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
Lucas Smith 00c36782ff fix: why didn't prettier catch this 2024-03-01 22:59:52 +11:00
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
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
Lucas Smith 077da72b68 feat: implement webhooks (#913) 2024-02-28 18:31:48 +11: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
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
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
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
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