Compare commits
612 Commits
exp/millio
...
feat/strip
| Author | SHA1 | Date | |
|---|---|---|---|
| ede9eb052d | |||
| 4d5275f915 | |||
| 01e6367b72 | |||
| 565602f8e1 | |||
| e0271cace3 | |||
| cc8c4b8297 | |||
| a287aab4f4 | |||
| b5ed703553 | |||
| f49880125a | |||
| 8380c357d9 | |||
| 4e010c5624 | |||
| f53cdbace9 | |||
| b4d04e2ce9 | |||
| 2470aeee1f | |||
| fd07b47325 | |||
| 9257a05831 | |||
| 1faa6f2944 | |||
| 5584bbe9ca | |||
| cc65537ea3 | |||
| 04a80b7c03 | |||
| c71a89d1b7 | |||
| e2abfd2312 | |||
| 49d55227e8 | |||
| 0dadec3b8d | |||
| e2d8591d66 | |||
| eac7aa84b0 | |||
| bd941202c8 | |||
| b854f0eedc | |||
| 1814bd4167 | |||
| b6f9d70fec | |||
| 7c54913bf5 | |||
| e8d5044ac5 | |||
| ddf097ede3 | |||
| 1bad85e1d6 | |||
| 68458b50d2 | |||
| e00f28cf87 | |||
| 4cc34ec50a | |||
| 693249916d | |||
| 381a248543 | |||
| f637381198 | |||
| 071335cc66 | |||
| 4d4b011146 | |||
| 97dfacd133 | |||
| 87a5bab734 | |||
| fa61bb660e | |||
| 83dd079e03 | |||
| f7933d8a4d | |||
| 4bd0cfd283 | |||
| 86f39f3824 | |||
| 94216f5219 | |||
| a2e6187dae | |||
| 15e3926ce4 | |||
| 69738d7ed3 | |||
| 649620c1c9 | |||
| 99df006019 | |||
| be40e28f47 | |||
| 8899d82e1b | |||
| 0527641a4f | |||
| 54e32af1d4 | |||
| b1645ec09a | |||
| 5b9ce55a6d | |||
| 833584bd4f | |||
| ca52a22bcd | |||
| ba611b9adb | |||
| e8643850a0 | |||
| bec7376fe8 | |||
| 7363bbc8f7 | |||
| d0f679e177 | |||
| e9769904ab | |||
| a2746742a7 | |||
| 459e3dc45b | |||
| 21fedab707 | |||
| 323f1974ab | |||
| 5bc9d625c2 | |||
| 4885cf5154 | |||
| 2f66eca925 | |||
| af042a62cd | |||
| 2bfc2b0c1f | |||
| df8bdda718 | |||
| 873f99ae86 | |||
| 17fe135027 | |||
| 2eed0ae063 | |||
| f4ae0389d8 | |||
| 9bdff9a61f | |||
| f003a2864e | |||
| ab26af19b8 | |||
| dc512600dc | |||
| cdb71c3a62 | |||
| 39d7b3ca58 | |||
| 748c3636d5 | |||
| 6e2d1fb148 | |||
| 7bd847c0d3 | |||
| 81f9b2f776 | |||
| 334671ef85 | |||
| a20b1e2f6a | |||
| 572f9d5ad6 | |||
| e49c102e8c | |||
| 2348221b03 | |||
| a0c327cfcf | |||
| ddbeb9e3db | |||
| e8205c1390 | |||
| fbb53fc8c3 | |||
| d7fed5a5dc | |||
| 3285881586 | |||
| 3ff61607a2 | |||
| 2a124b03e9 | |||
| e1aa23bc55 | |||
| 818c5c7ba4 | |||
| 668011d1c7 | |||
| 562fd043a9 | |||
| b4781c011c | |||
| 5c7d3d5503 | |||
| 0f2b6c0ebf | |||
| ab5bdfeae4 | |||
| e5fa2f4490 | |||
| 2d2615447e | |||
| 46465acd73 | |||
| 2dea9ec3e7 | |||
| 584d5bd8ea | |||
| e4b6d42672 | |||
| 109ad190cf | |||
| 78498793fa | |||
| b2e916378d | |||
| d950634aab | |||
| a52c19355a | |||
| e67e96333b | |||
| 7aa75b0c64 | |||
| 9b1069f208 | |||
| abe20b8dcf | |||
| 58509c54a9 | |||
| fd545cee0c | |||
| 1f92bffe7d | |||
| 5615627001 | |||
| 78c55875ef | |||
| a3674947b8 | |||
| 63cc57b035 | |||
| d4bc1eb0d1 | |||
| c9f5496acb | |||
| 99481b6144 | |||
| cee147bc9a | |||
| 3a825391b9 | |||
| bb347e4614 | |||
| d0fad4775a | |||
| 68d624ac78 | |||
| 8012d665ae | |||
| 0732aa317d | |||
| fde53e355f | |||
| 8e0a10298e | |||
| eef63c9adc | |||
| 1e5ecd79c2 | |||
| 58f10268e2 | |||
| 43ce76d928 | |||
| c3d52c68e7 | |||
| 201ba65e1c | |||
| 0d130b17c8 | |||
| 2c90f767fd | |||
| 946b2fe129 | |||
| 2a2dbb65c6 | |||
| ef2300a600 | |||
| eea99ac871 | |||
| f4c7799537 | |||
| 764c6b88c5 | |||
| 989d7a351f | |||
| 78325d9b39 | |||
| 679fb80f9a | |||
| dc49277bf9 | |||
| 190ae18edc | |||
| 82ffbeeb21 | |||
| 9affd7b7fa | |||
| 897ba629df | |||
| b3f26055d9 | |||
| 1b276a0469 | |||
| 17fbf2673c | |||
| cdc50ec876 | |||
| 181af24b78 | |||
| 4b13a42731 | |||
| e330e90688 | |||
| f2d3c51651 | |||
| c9c111cdf2 | |||
| c247295131 | |||
| d417255910 | |||
| 677a15327b | |||
| d5238939ad | |||
| 6860726e83 | |||
| a55197fb2d | |||
| 7eed5c7c96 | |||
| 1c629af651 | |||
| 4b8aa3298b | |||
| bcb163693a | |||
| e6e8de62c8 | |||
| 71c7a6ee8c | |||
| ecc8e59c8c | |||
| d0f027c4ea | |||
| 2c667f785c | |||
| 1adf7e183e | |||
| 7771d7acbe | |||
| 58580c7fac | |||
| 4cd56fa98c | |||
| 68020006b4 | |||
| 70cb65d266 | |||
| cef8cad14c | |||
| def8f45f8b | |||
| ca325cc90b | |||
| a1ce6f696a | |||
| 4d485940ea | |||
| cbe118b74f | |||
| de9116e9b2 | |||
| 09c7f9dde8 | |||
| 0060b9da8c | |||
| bad88a2a83 | |||
| 96a79b8879 | |||
| 60ef9df721 | |||
| 2d8ca8fea0 | |||
| b411db40da | |||
| 1be0b9e01f | |||
| d41ca8e0e6 | |||
| eaa3e0a303 | |||
| a283c88d7f | |||
| d4659eee07 | |||
| b93e3c0b52 | |||
| 079963cde8 | |||
| 45f447c796 | |||
| 2327b15e0d | |||
| 166cbc150f | |||
| f561ef3cda | |||
| 027a588604 | |||
| 773566f193 | |||
| 29bd4cb9c3 | |||
| 1237944b71 | |||
| b331e3c780 | |||
| 7f641e3e73 | |||
| b84f0548d2 | |||
| 0f92534f00 | |||
| 7a489f241a | |||
| f88e529111 | |||
| 47d55a5eab | |||
| 9dcab76cd5 | |||
| c2a9647c90 | |||
| 02424596db | |||
| 776324c875 | |||
| 6f4c280583 | |||
| dfebdfccda | |||
| 5809109c05 | |||
| a6400eb6c9 | |||
| 39958ed22c | |||
| c3d9cac43f | |||
| 74355244a4 | |||
| 7c4ba1b1ea | |||
| f588897531 | |||
| 5629e08f83 | |||
| 37394c054c | |||
| 8be52e2fa3 | |||
| 0d702e9189 | |||
| 425db8fc1f | |||
| 2356f58e7b | |||
| 6c12ed4afc | |||
| d76ee7f33c | |||
| f8534b2c3d | |||
| 9014f01276 | |||
| 71818c0f1f | |||
| 974dc74073 | |||
| b255eb21e5 | |||
| 9a58178ea5 | |||
| 3c36eedfba | |||
| 46dfaa70a3 | |||
| 61da354a48 | |||
| fbb332fb35 | |||
| 7e1cce9155 | |||
| ed4cbe9fa6 | |||
| 599e857a1e | |||
| 581f08c59b | |||
| 24a2e9e6d4 | |||
| e8796a7d86 | |||
| db3f75c42f | |||
| b7c0df67b1 | |||
| e8b5b3b24a | |||
| 00574325b9 | |||
| 99706e0ed6 | |||
| 326743d8a1 | |||
| 3f67b0f27e | |||
| 24036b0f24 | |||
| fbf32404a6 | |||
| 975d52a07e | |||
| f8a193c0f8 | |||
| 9186cb4d7b | |||
| 898f5a629c | |||
| 933076fa3f | |||
| 27edcebef6 | |||
| abc91f7eac | |||
| 5862af3034 | |||
| 35acf05997 | |||
| 2bad1b9f55 | |||
| 73b0dc315e | |||
| 5969f148c8 | |||
| 660f5894a6 | |||
| 77058220a8 | |||
| 6cdba45396 | |||
| 67571158e8 | |||
| 171a5ba4ee | |||
| 525ff21563 | |||
| 863e53a2d5 | |||
| da2033692c | |||
| dbbe17a0a8 | |||
| a2ef9468ae | |||
| 0c145fab0b | |||
| f6e49e3f21 | |||
| 1f027d75d3 | |||
| 1ba7767f8e | |||
| 8220b2f086 | |||
| a74374e39f | |||
| ff957a2f82 | |||
| 6640f0496a | |||
| e47ab838c5 | |||
| 551918ab9b | |||
| 739f3763dd | |||
| 0cdd980a4b | |||
| b43ddcbea2 | |||
| 75feaefbf2 | |||
| de3ebe16ee | |||
| 84a2d3baf6 | |||
| 74180defd1 | |||
| aeeaaf0d8d | |||
| 2b84293c4e | |||
| b38ef6c0a7 | |||
| d524ea77ab | |||
| 17af4d25bd | |||
| 6e095921e6 | |||
| 150c42b246 | |||
| aecf2f32b9 | |||
| b23967d777 | |||
| 2524458b0c | |||
| 12c45fb882 | |||
| 118483b6cc | |||
| fd6350b397 | |||
| b3291c65bc | |||
| 4b849e286c | |||
| 7bcc26a987 | |||
| 692722d32e | |||
| e4f06d8e30 | |||
| c799380787 | |||
| 5540fcf0d2 | |||
| d9da09c1e7 | |||
| fe90aa3b7b | |||
| 0c680e0111 | |||
| 7bcf5fbd86 | |||
| 7218b950fe | |||
| 8d4df7d3dd | |||
| f1f6e2e40a | |||
| 901013fdc6 | |||
| 5c9017f3cd | |||
| 34e962cc48 | |||
| bf9254597a | |||
| b5efa0d3ea | |||
| a2bdb46076 | |||
| ed150d9574 | |||
| e756a21fda | |||
| 13084049da | |||
| 055e723777 | |||
| 419318c151 | |||
| 7722e63e1b | |||
| 40274021ba | |||
| 8529ac3ffe | |||
| 7ec8e762b0 | |||
| 2acada6dc7 | |||
| d4d76dce03 | |||
| 3832ce2c80 | |||
| fd36e39a38 | |||
| 14fd0eb906 | |||
| af6c62d0bf | |||
| 8d7d6a19e7 | |||
| 463dc48ea6 | |||
| d8f6a25059 | |||
| 93962625ed | |||
| 249211bd4f | |||
| bfe0d50661 | |||
| 5d4a07bcc5 | |||
| d28bb5de99 | |||
| 83a83164d4 | |||
| d71e43c5d6 | |||
| ed6fa4dc2a | |||
| 4f3970c361 | |||
| 40767430d9 | |||
| 1edfe9548d | |||
| fead48c2f0 | |||
| 0abd3da7fd | |||
| 2f78922421 | |||
| 3df0f61947 | |||
| 8e42dcb7ee | |||
| 1888ee97e6 | |||
| 068aef665d | |||
| 2772fc1678 | |||
| 66dfdc5ad0 | |||
| b45978374b | |||
| 81c3e701e2 | |||
| 874d919a6a | |||
| e8559cecd5 | |||
| 8c4120f0a2 | |||
| 9f93af6134 | |||
| 3cbc722b94 | |||
| 3440c47c3c | |||
| 68a5a9da1e | |||
| 1f8d5e45e1 | |||
| 8fd9730e2b | |||
| 04f6df6839 | |||
| ca40e983e3 | |||
| 9257454a96 | |||
| ba054ae915 | |||
| 1d1c6e5a55 | |||
| 8844143ff5 | |||
| c161a8109b | |||
| e340c4ed6f | |||
| b5f96ee2fc | |||
| 3c1790ba83 | |||
| f41c78e8e3 | |||
| b8b8b4dbad | |||
| d195dc1a46 | |||
| 3ac29d8da3 | |||
| 2418612507 | |||
| e8336ae9b4 | |||
| aad52a3e2e | |||
| 829122c486 | |||
| 090752c539 | |||
| fad6414995 | |||
| c817c67a1c | |||
| c7001e62f3 | |||
| bf71d2a14e | |||
| 163911255e | |||
| 24e38a3bbc | |||
| dfd714f16a | |||
| 722081f89e | |||
| f0e1df22b8 | |||
| 615cb263fb | |||
| 18faaf49d9 | |||
| 650b69ae56 | |||
| eb4be963e3 | |||
| 27c27743e3 | |||
| 92930a2f63 | |||
| 7ad3365b0e | |||
| 7de7624477 | |||
| 7c6b5ac59d | |||
| 9c45ce61b8 | |||
| f8bf4fea36 | |||
| 10cd8144eb | |||
| 66973a3745 | |||
| 85677bb792 | |||
| 7ae99d2038 | |||
| 70a5105783 | |||
| 420372ac9e | |||
| 6b00282a87 | |||
| dae1001cbb | |||
| af81d99b2a | |||
| 2751adc463 | |||
| 396ce9f3f3 | |||
| 3f4f66d878 | |||
| d6751d7a26 | |||
| 0e32baff0b | |||
| f76bf4c2c7 | |||
| 0d8532ab6d | |||
| 490d3d51e1 | |||
| 2ab796910e | |||
| 07102588be | |||
| 04f9422f24 | |||
| 05a7f5e178 | |||
| 7bae814f96 | |||
| ea45e38fa0 | |||
| 6d9a85112f | |||
| 346efd19db | |||
| 617143a47f | |||
| 66f067276e | |||
| fc10d0449f | |||
| 083f3e7108 | |||
| af307a2a49 | |||
| b063758ee5 | |||
| 4964b252e3 | |||
| e468f5bbc9 | |||
| c5b7b8a18a | |||
| a8a1fbb829 | |||
| 3c2a4892e7 | |||
| 6d9e84d327 | |||
| 73b4e30c97 | |||
| bd01545a70 | |||
| 6d360e581d | |||
| ba95818da4 | |||
| d0720f4c70 | |||
| f60cb22f11 | |||
| e0cb4314fb | |||
| 0571137a60 | |||
| 30aabf50eb | |||
| 8441a5eb98 | |||
| 259ab49bc1 | |||
| 2f2d5dfc0b | |||
| 0f27f4261b | |||
| 9b92cad2db | |||
| ad1ff6159c | |||
| f633b17f17 | |||
| 8fa16001e6 | |||
| e111234460 | |||
| 034072f50e | |||
| a7664d79fd | |||
| 8ed2393300 | |||
| 94cf150ffd | |||
| c571a3d0d9 | |||
| 1c7431b859 | |||
| 2f7d6548ef | |||
| a16525be5e | |||
| 21e377d3ff | |||
| 45d0d3f7e8 | |||
| 6e62eb8d81 | |||
| e098449af4 | |||
| 47d0030cf0 | |||
| b564e5e72f | |||
| e46607c1cb | |||
| 77c5db169a | |||
| 0157bf9576 | |||
| 454c2f45bd | |||
| badb897c06 | |||
| 9bb5768598 | |||
| 951de8baf5 | |||
| 48ceb1e5c7 | |||
| 96e8962956 | |||
| f3259aedea | |||
| 9fdc9dcbf7 | |||
| 0a30403719 | |||
| 0e1fcd86e6 | |||
| 8038f3ad00 | |||
| 44369ee7f6 | |||
| 7e46cb0d8e | |||
| 10e39246ce | |||
| 5e45767e44 | |||
| 61d7f7cbcd | |||
| 8f3c47d659 | |||
| 3b9c57fe5c | |||
| 6017d35cfd | |||
| 90e28cd3a4 | |||
| e743e56787 | |||
| ba25ea1370 | |||
| b7543298e1 | |||
| 29b4cb7793 | |||
| f7c3190346 | |||
| 5130dc5f31 | |||
| d3cdd2c317 | |||
| 96f7ca4e36 | |||
| e2471a8eb4 | |||
| 5f33b1da1e | |||
| bca048c026 | |||
| f999ca48f6 | |||
| f0c607d87a | |||
| 6f394138f5 | |||
| b710693009 | |||
| fb4b96a838 | |||
| af2dae8822 | |||
| e400dbe2ea | |||
| b718bdeb15 | |||
| 9ca84f5ede | |||
| 1a31cc321c | |||
| 2ec3cebcc9 | |||
| 659af87592 | |||
| beb1a4c214 | |||
| 16a7030922 | |||
| c036858d45 | |||
| 84d295e324 | |||
| 90eb54f768 | |||
| 547ed337a6 | |||
| 3f5937717f | |||
| 3cdfde5e0f | |||
| 6b1fcb8193 | |||
| 9431e7f0ad | |||
| 817569a333 | |||
| 0bbaa64080 | |||
| c403812389 | |||
| 25d7390b27 | |||
| 918018c7ca | |||
| 58baf5ddf4 | |||
| 32dcd4aa0e | |||
| cacfc2c535 | |||
| 8115ea3bf2 | |||
| c64ff8ec95 | |||
| 38323b5ea5 | |||
| 34d10bd313 | |||
| d743f8411a | |||
| d8a6aa2686 | |||
| dfcfe1d8d2 | |||
| 6038c3cc78 | |||
| 97efcf3d62 | |||
| 889ad1c49f | |||
| b3fa837967 | |||
| a5334ca6e6 | |||
| 0ad0524157 | |||
| b50f64d4ad | |||
| 88d15376e3 | |||
| aa884310eb | |||
| dbcf7771b9 | |||
| 60b150cc58 | |||
| bd0db0f8fd | |||
| 2e8e39c5a9 | |||
| f22baca569 | |||
| d8a094a324 | |||
| 4b063b68ab | |||
| 3c02331cb9 | |||
| eea09dcfac | |||
| 3aea62e898 | |||
| 76674523c5 | |||
| e0e2f3e440 | |||
| d1bc948f3c | |||
| 2b84636993 | |||
| 05238f096b | |||
| dd83d4607c | |||
| 07d13c74f5 | |||
| 64d1d6df37 | |||
| 877a579533 | |||
| b0e364acf4 | |||
| 803ebccee3 |
26
.env.example
@ -2,11 +2,6 @@
|
|||||||
NEXTAUTH_URL="http://localhost:3000"
|
NEXTAUTH_URL="http://localhost:3000"
|
||||||
NEXTAUTH_SECRET="secret"
|
NEXTAUTH_SECRET="secret"
|
||||||
|
|
||||||
# [[CRYPTO]]
|
|
||||||
# Application Key for symmetric encryption and decryption
|
|
||||||
# This should be a random string of at least 32 characters
|
|
||||||
NEXT_PRIVATE_ENCRYPTION_KEY="CAFEBABE"
|
|
||||||
|
|
||||||
# [[AUTH OPTIONAL]]
|
# [[AUTH OPTIONAL]]
|
||||||
NEXT_PRIVATE_GOOGLE_CLIENT_ID=""
|
NEXT_PRIVATE_GOOGLE_CLIENT_ID=""
|
||||||
NEXT_PRIVATE_GOOGLE_CLIENT_SECRET=""
|
NEXT_PRIVATE_GOOGLE_CLIENT_SECRET=""
|
||||||
@ -20,24 +15,19 @@ NEXT_PRIVATE_DATABASE_URL="postgres://documenso:password@127.0.0.1:54320/documen
|
|||||||
# Defines the URL to use for the database when running migrations and other commands that won't work with a connection pool.
|
# 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"
|
NEXT_PRIVATE_DIRECT_DATABASE_URL="postgres://documenso:password@127.0.0.1:54320/documenso"
|
||||||
|
|
||||||
# [[E2E Tests]]
|
|
||||||
E2E_TEST_AUTHENTICATE_USERNAME="Test User"
|
|
||||||
E2E_TEST_AUTHENTICATE_USER_EMAIL="testuser@mail.com"
|
|
||||||
E2E_TEST_AUTHENTICATE_USER_PASSWORD="test_password"
|
|
||||||
|
|
||||||
# [[STORAGE]]
|
# [[STORAGE]]
|
||||||
# OPTIONAL: Defines the storage transport to use. Available options: database (default) | s3
|
# OPTIONAL: Defines the storage transport to use. Available options: database (default) | s3
|
||||||
NEXT_PUBLIC_UPLOAD_TRANSPORT="database"
|
NEXT_PUBLIC_UPLOAD_TRANSPORT="database"
|
||||||
# OPTIONAL: Defines the endpoint to use for the S3 storage transport. Relevant when using third-party S3-compatible providers.
|
# 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"
|
NEXT_PRIVATE_UPLOAD_ENDPOINT=
|
||||||
# OPTIONAL: Defines the region to use for the S3 storage transport. Defaults to us-east-1.
|
# OPTIONAL: Defines the region to use for the S3 storage transport. Defaults to us-east-1.
|
||||||
NEXT_PRIVATE_UPLOAD_REGION="unknown"
|
NEXT_PRIVATE_UPLOAD_REGION=
|
||||||
# REQUIRED: Defines the bucket to use for the S3 storage transport.
|
# REQUIRED: Defines the bucket to use for the S3 storage transport.
|
||||||
NEXT_PRIVATE_UPLOAD_BUCKET="documenso"
|
NEXT_PRIVATE_UPLOAD_BUCKET=
|
||||||
# OPTIONAL: Defines the access key ID to use for the S3 storage transport.
|
# OPTIONAL: Defines the access key ID to use for the S3 storage transport.
|
||||||
NEXT_PRIVATE_UPLOAD_ACCESS_KEY_ID="documenso"
|
NEXT_PRIVATE_UPLOAD_ACCESS_KEY_ID=
|
||||||
# OPTIONAL: Defines the secret access key to use for the S3 storage transport.
|
# OPTIONAL: Defines the secret access key to use for the S3 storage transport.
|
||||||
NEXT_PRIVATE_UPLOAD_SECRET_ACCESS_KEY="password"
|
NEXT_PRIVATE_UPLOAD_SECRET_ACCESS_KEY=
|
||||||
|
|
||||||
# [[SMTP]]
|
# [[SMTP]]
|
||||||
# OPTIONAL: Defines the transport to use for sending emails. Available options: smtp-auth (default) | smtp-api | mailchannels
|
# OPTIONAL: Defines the transport to use for sending emails. Available options: smtp-auth (default) | smtp-api | mailchannels
|
||||||
@ -77,14 +67,16 @@ NEXT_PRIVATE_MAILCHANNELS_DKIM_PRIVATE_KEY=
|
|||||||
NEXT_PRIVATE_STRIPE_API_KEY=
|
NEXT_PRIVATE_STRIPE_API_KEY=
|
||||||
NEXT_PRIVATE_STRIPE_WEBHOOK_SECRET=
|
NEXT_PRIVATE_STRIPE_WEBHOOK_SECRET=
|
||||||
NEXT_PUBLIC_STRIPE_COMMUNITY_PLAN_MONTHLY_PRICE_ID=
|
NEXT_PUBLIC_STRIPE_COMMUNITY_PLAN_MONTHLY_PRICE_ID=
|
||||||
|
NEXT_PUBLIC_STRIPE_COMMUNITY_PLAN_YEARLY_PRICE_ID=
|
||||||
|
NEXT_PUBLIC_STRIPE_FREE_PLAN_ID=
|
||||||
|
|
||||||
# [[FEATURES]]
|
# [[FEATURES]]
|
||||||
# OPTIONAL: Leave blank to disable PostHog and feature flags.
|
# OPTIONAL: Leave blank to disable PostHog and feature flags.
|
||||||
NEXT_PUBLIC_POSTHOG_KEY=""
|
NEXT_PUBLIC_POSTHOG_KEY=""
|
||||||
|
# OPTIONAL: Defines the host to use for PostHog.
|
||||||
|
NEXT_PUBLIC_POSTHOG_HOST="https://eu.posthog.com"
|
||||||
# OPTIONAL: Leave blank to disable billing.
|
# OPTIONAL: Leave blank to disable billing.
|
||||||
NEXT_PUBLIC_FEATURE_BILLING_ENABLED=
|
NEXT_PUBLIC_FEATURE_BILLING_ENABLED=
|
||||||
# OPTIONAL: Leave blank to allow users to signup through /signup page.
|
|
||||||
NEXT_PUBLIC_DISABLE_SIGNUP=
|
|
||||||
|
|
||||||
# This is only required for the marketing site
|
# This is only required for the marketing site
|
||||||
# [[REDIS]]
|
# [[REDIS]]
|
||||||
|
|||||||
50
.github/ISSUE_TEMPLATE/bug-report.md
vendored
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
---
|
||||||
|
name: Bug Report
|
||||||
|
about: Create a bug report to help us improve
|
||||||
|
---
|
||||||
|
|
||||||
|
<!--- Please provide a general summary of the issue in the Title above -->
|
||||||
|
|
||||||
|
## Issue Description
|
||||||
|
|
||||||
|
<!--- Please provide a clear and concise description of the problem. -->
|
||||||
|
|
||||||
|
## Steps to Reproduce
|
||||||
|
|
||||||
|
<!--- Please provide step-by-step instructions to reproduce the issue. -->
|
||||||
|
<!--- Include code snippets, error messages, and any other relevant information. -->
|
||||||
|
|
||||||
|
1. Step 1
|
||||||
|
2. Step 2
|
||||||
|
3. ...
|
||||||
|
|
||||||
|
## Expected Behavior
|
||||||
|
|
||||||
|
<!--- Describe what you expected to happen. -->
|
||||||
|
|
||||||
|
## Current Behavior
|
||||||
|
|
||||||
|
<!--- Describe what is currently happening. -->
|
||||||
|
|
||||||
|
## Screenshots (optional)
|
||||||
|
|
||||||
|
<!--- If applicable, add screenshots to help explain the issue. -->
|
||||||
|
|
||||||
|
## Environment
|
||||||
|
|
||||||
|
<!--- Please provide information about your environment, such as operating system, browser, version, etc. -->
|
||||||
|
|
||||||
|
- OS: [e.g., Windows 10]
|
||||||
|
- Browser: [e.g., Chrome, Firefox]
|
||||||
|
- Version: [e.g., 2.0.1]
|
||||||
|
|
||||||
|
## Checklist
|
||||||
|
|
||||||
|
<!--- Please check the boxes that apply to this issue report. -->
|
||||||
|
<!--- You can add or remove items as needed. -->
|
||||||
|
|
||||||
|
- [ ] I have searched the existing issues to make sure this is not a duplicate.
|
||||||
|
- [ ] I have provided steps to reproduce the issue.
|
||||||
|
- [ ] I have included relevant environment information.
|
||||||
|
- [ ] I have included any relevant screenshots.
|
||||||
|
- [ ] I understand that this is a voluntary contribution and that there is no guarantee of resolution.
|
||||||
47
.github/ISSUE_TEMPLATE/bug-report.yml
vendored
@ -1,47 +0,0 @@
|
|||||||
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
|
|
||||||
41
.github/ISSUE_TEMPLATE/feature-request.md
vendored
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
---
|
||||||
|
name: Feature Request
|
||||||
|
about: Suggest a new idea or enhancement for this project
|
||||||
|
---
|
||||||
|
|
||||||
|
<!--- Please provide a clear and concise title for your feature request -->
|
||||||
|
|
||||||
|
## Feature Description
|
||||||
|
|
||||||
|
<!--- Describe the feature you are requesting in detail. -->
|
||||||
|
<!--- Explain what problem it solves or what value it adds to the project. -->
|
||||||
|
|
||||||
|
## Use Case
|
||||||
|
|
||||||
|
<!--- 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. -->
|
||||||
|
|
||||||
|
## Proposed Solution
|
||||||
|
|
||||||
|
<!--- 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. -->
|
||||||
|
|
||||||
|
## Alternatives (optional)
|
||||||
|
|
||||||
|
<!--- Are there any alternative ways to achieve the same goal? -->
|
||||||
|
<!--- Describe other approaches that could be considered if this feature is not implemented. -->
|
||||||
|
|
||||||
|
## Additional Context
|
||||||
|
|
||||||
|
<!--- Add any additional context or information that might be relevant to the feature request. -->
|
||||||
|
|
||||||
|
## Checklist
|
||||||
|
|
||||||
|
<!--- Please check the boxes that apply to this feature request. -->
|
||||||
|
<!--- You can add or remove items as needed. -->
|
||||||
|
|
||||||
|
- [ ] I have searched the existing feature requests to make sure this is not a duplicate.
|
||||||
|
- [ ] I have provided a detailed description of the requested feature.
|
||||||
|
- [ ] I have explained the use case or scenario for this feature.
|
||||||
|
- [ ] I have included any relevant technical details or design suggestions.
|
||||||
|
- [ ] I understand that this is a suggestion and that there is no guarantee of implementation.
|
||||||
35
.github/ISSUE_TEMPLATE/feature-request.yml
vendored
@ -1,35 +0,0 @@
|
|||||||
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.
|
|
||||||
41
.github/ISSUE_TEMPLATE/improvement.md
vendored
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
---
|
||||||
|
name: General Improvement
|
||||||
|
about: Suggest a minor enhancement or improvement for this project
|
||||||
|
---
|
||||||
|
|
||||||
|
<!--- Please provide a clear and concise title for your improvement suggestion -->
|
||||||
|
|
||||||
|
## Improvement Description
|
||||||
|
|
||||||
|
<!--- Describe the improvement you are suggesting in detail. -->
|
||||||
|
<!--- Explain what specific aspect of the project it addresses or enhances. -->
|
||||||
|
|
||||||
|
## Rationale
|
||||||
|
|
||||||
|
<!--- Explain why this improvement would be beneficial. -->
|
||||||
|
<!--- Share any context, pain points, or reasons for suggesting this change. -->
|
||||||
|
|
||||||
|
## Proposed Solution
|
||||||
|
|
||||||
|
<!--- If you have a suggestion for how this improvement could be implemented, describe it here. -->
|
||||||
|
<!--- Include any technical details, design suggestions, or other relevant information. -->
|
||||||
|
|
||||||
|
## Alternatives (optional)
|
||||||
|
|
||||||
|
<!--- Are there any alternative approaches to achieve the same improvement? -->
|
||||||
|
<!--- Describe other ways to address the issue or enhance the project. -->
|
||||||
|
|
||||||
|
## Additional Context
|
||||||
|
|
||||||
|
<!--- Add any additional context or information that might be relevant to the improvement suggestion. -->
|
||||||
|
|
||||||
|
## Checklist
|
||||||
|
|
||||||
|
<!--- Please check the boxes that apply to this improvement suggestion. -->
|
||||||
|
<!--- You can add or remove items as needed. -->
|
||||||
|
|
||||||
|
- [ ] I have searched the existing issues and improvement suggestions to avoid duplication.
|
||||||
|
- [ ] I have provided a clear description of the improvement being suggested.
|
||||||
|
- [ ] I have explained the rationale behind this improvement.
|
||||||
|
- [ ] I have included any relevant technical details or design suggestions.
|
||||||
|
- [ ] I understand that this is a suggestion and that there is no guarantee of implementation.
|
||||||
39
.github/ISSUE_TEMPLATE/improvement.yml
vendored
@ -1,39 +0,0 @@
|
|||||||
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
|
|
||||||
32
.github/dependabot.yml
vendored
@ -4,29 +4,29 @@ updates:
|
|||||||
- package-ecosystem: 'github-actions'
|
- package-ecosystem: 'github-actions'
|
||||||
directory: '/'
|
directory: '/'
|
||||||
schedule:
|
schedule:
|
||||||
interval: 'weekly'
|
interval: "weekly"
|
||||||
target-branch: 'main'
|
target-branch: "feat/refresh"
|
||||||
labels:
|
labels:
|
||||||
- 'ci dependencies'
|
- "ci dependencies"
|
||||||
- 'ci'
|
- "ci"
|
||||||
open-pull-requests-limit: 0
|
open-pull-requests-limit: 0
|
||||||
|
|
||||||
- package-ecosystem: 'npm'
|
- package-ecosystem: "npm"
|
||||||
directory: '/apps/marketing'
|
directory: "/apps/marketing"
|
||||||
schedule:
|
schedule:
|
||||||
interval: 'weekly'
|
interval: "weekly"
|
||||||
target-branch: 'main'
|
target-branch: "feat/refresh"
|
||||||
labels:
|
labels:
|
||||||
- 'npm dependencies'
|
- "npm dependencies"
|
||||||
- 'frontend'
|
- "frontend"
|
||||||
open-pull-requests-limit: 0
|
open-pull-requests-limit: 0
|
||||||
|
|
||||||
- package-ecosystem: 'npm'
|
- package-ecosystem: "npm"
|
||||||
directory: '/apps/web'
|
directory: "/apps/web"
|
||||||
schedule:
|
schedule:
|
||||||
interval: 'weekly'
|
interval: "weekly"
|
||||||
target-branch: 'main'
|
target-branch: "feat/refresh"
|
||||||
labels:
|
labels:
|
||||||
- 'npm dependencies'
|
- "npm dependencies"
|
||||||
- 'frontend'
|
- "frontend"
|
||||||
open-pull-requests-limit: 0
|
open-pull-requests-limit: 0
|
||||||
|
|||||||
21
.github/labeler.yml
vendored
@ -1,21 +0,0 @@
|
|||||||
'apps: marketing':
|
|
||||||
- apps/marketing/**
|
|
||||||
|
|
||||||
'apps: web':
|
|
||||||
- apps/web/**
|
|
||||||
|
|
||||||
'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/**
|
|
||||||
26
.github/workflows/ci.yml
vendored
@ -1,10 +1,10 @@
|
|||||||
name: 'Continuous Integration'
|
name: "Continuous Integration"
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: ['main']
|
branches: [ "feat/refresh" ]
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: ['main']
|
branches: [ "feat/refresh" ]
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
|
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
|
||||||
@ -14,17 +14,17 @@ env:
|
|||||||
HUSKY: 0
|
HUSKY: 0
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build_app:
|
build:
|
||||||
name: Build App
|
name: Build
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
fetch-depth: 2
|
fetch-depth: 2
|
||||||
|
|
||||||
- name: Install Node.js
|
- name: Install Node.js
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
node-version: 18
|
node-version: 18
|
||||||
cache: npm
|
cache: npm
|
||||||
@ -37,15 +37,3 @@ jobs:
|
|||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: npm run build
|
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: Build Docker Image
|
|
||||||
run: ./docker/build.sh
|
|
||||||
|
|||||||
12
.github/workflows/codeql-analysis.yml
vendored
@ -1,11 +1,11 @@
|
|||||||
name: 'CodeQL'
|
name: "CodeQL"
|
||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
push:
|
push:
|
||||||
branches: ['main']
|
branches: [ feat/refresh ]
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: ['main']
|
branches: [ feat/refresh ]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
analyze:
|
analyze:
|
||||||
@ -19,13 +19,13 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
fail-fast: true
|
fail-fast: true
|
||||||
matrix:
|
matrix:
|
||||||
language: ['javascript']
|
language: [ 'javascript' ]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- uses: actions/setup-node@v4
|
- uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
node-version: 18
|
node-version: 18
|
||||||
cache: npm
|
cache: npm
|
||||||
|
|||||||
24
.github/workflows/deploy.yml
vendored
@ -1,24 +0,0 @@
|
|||||||
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
|
|
||||||
50
.github/workflows/e2e-tests.yml
vendored
@ -1,50 +0,0 @@
|
|||||||
name: Playwright Tests
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches: ['main']
|
|
||||||
pull_request:
|
|
||||||
branches: ['main']
|
|
||||||
jobs:
|
|
||||||
e2e_tests:
|
|
||||||
name: "E2E Tests"
|
|
||||||
timeout-minutes: 60
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
- uses: actions/setup-node@v4
|
|
||||||
with:
|
|
||||||
node-version: 18
|
|
||||||
cache: npm
|
|
||||||
- name: Install dependencies
|
|
||||||
run: npm ci
|
|
||||||
|
|
||||||
- name: Copy env
|
|
||||||
run: cp .env.example .env
|
|
||||||
|
|
||||||
- name: Start Services
|
|
||||||
run: npm run dx:up
|
|
||||||
|
|
||||||
- name: Install Playwright Browsers
|
|
||||||
run: npx playwright install --with-deps
|
|
||||||
|
|
||||||
- name: Generate Prisma Client
|
|
||||||
run: npm run prisma:generate -w @documenso/prisma
|
|
||||||
|
|
||||||
- name: Create the database
|
|
||||||
run: npm run prisma:migrate-dev
|
|
||||||
|
|
||||||
- name: Seed the database
|
|
||||||
run: npm run prisma:seed
|
|
||||||
|
|
||||||
- name: Run Playwright tests
|
|
||||||
run: npm run ci
|
|
||||||
|
|
||||||
- uses: actions/upload-artifact@v3
|
|
||||||
if: always()
|
|
||||||
with:
|
|
||||||
name: test-results
|
|
||||||
path: "packages/app-tests/**/test-results/*"
|
|
||||||
retention-days: 30
|
|
||||||
env:
|
|
||||||
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
|
|
||||||
TURBO_TEAM: ${{ vars.TURBO_TEAM }}
|
|
||||||
29
.github/workflows/first-interaction.yml
vendored
@ -1,29 +0,0 @@
|
|||||||
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)
|
|
||||||
63
.github/workflows/issue-assignee-check.yml
vendored
@ -1,63 +0,0 @@
|
|||||||
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@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.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 }}`,
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
21
.github/workflows/issue-opened.yml
vendored
@ -1,21 +0,0 @@
|
|||||||
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: ["needs triage"]
|
|
||||||
})
|
|
||||||
20
.github/workflows/pr-labeler.yml
vendored
@ -1,20 +0,0 @@
|
|||||||
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
.github/workflows/pr-review-reminder.yml
vendored
@ -1,64 +0,0 @@
|
|||||||
name: 'PR Review Reminder'
|
|
||||||
|
|
||||||
on:
|
|
||||||
pull_request:
|
|
||||||
types: ['opened', 'reopened', 'ready_for_review', 'review_requested']
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
pull-requests: write
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
checkPRs:
|
|
||||||
if: ${{ github.event.pull_request.user.login }} && github.event.action == ('opened' || 'reopened' || 'ready_for_review' || 'review_requested')
|
|
||||||
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 }}`,
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
45
.github/workflows/semantic-pull-requests.yml
vendored
@ -1,4 +1,4 @@
|
|||||||
name: 'Validate PR Name'
|
name: "Validate PR Name"
|
||||||
|
|
||||||
on:
|
on:
|
||||||
pull_request_target:
|
pull_request_target:
|
||||||
@ -9,54 +9,13 @@ on:
|
|||||||
- synchronize
|
- synchronize
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
pull-requests: write
|
pull-requests: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
validate-pr:
|
validate-pr:
|
||||||
name: Validate PR title
|
name: Validate PR title
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
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
|
- uses: amannn/action-semantic-pull-request@v5
|
||||||
id: lint_pr_title
|
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
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
.github/workflows/stale.yml
vendored
@ -1,24 +0,0 @@
|
|||||||
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@v4
|
|
||||||
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'
|
|
||||||
1
.gitignore
vendored
@ -31,7 +31,6 @@ yarn-error.log*
|
|||||||
|
|
||||||
# turbo
|
# turbo
|
||||||
.turbo
|
.turbo
|
||||||
.turbo-cookie
|
|
||||||
|
|
||||||
# vercel
|
# vercel
|
||||||
.vercel
|
.vercel
|
||||||
|
|||||||
@ -1,16 +0,0 @@
|
|||||||
node_modules
|
|
||||||
.next
|
|
||||||
public
|
|
||||||
**/**/node_modules
|
|
||||||
**/**/.next
|
|
||||||
**/**/public
|
|
||||||
|
|
||||||
*.lock
|
|
||||||
*.log
|
|
||||||
*.test.ts
|
|
||||||
|
|
||||||
.gitignore
|
|
||||||
.npmignore
|
|
||||||
.prettierignore
|
|
||||||
.DS_Store
|
|
||||||
.eslintignore
|
|
||||||
7
.vscode/settings.json
vendored
@ -1,13 +1,10 @@
|
|||||||
{
|
{
|
||||||
"typescript.tsdk": "node_modules/typescript/lib",
|
"typescript.tsdk": "node_modules/typescript/lib",
|
||||||
"editor.codeActionsOnSave": {
|
"editor.codeActionsOnSave": {
|
||||||
"source.fixAll.eslint": "explicit"
|
"source.fixAll.eslint": true
|
||||||
},
|
},
|
||||||
"eslint.validate": ["typescript", "typescriptreact", "javascript", "javascriptreact"],
|
"eslint.validate": ["typescript", "typescriptreact", "javascript", "javascriptreact"],
|
||||||
"javascript.preferences.importModuleSpecifier": "non-relative",
|
"javascript.preferences.importModuleSpecifier": "non-relative",
|
||||||
"javascript.preferences.useAliasesForRenames": false,
|
"javascript.preferences.useAliasesForRenames": false,
|
||||||
"typescript.enablePromptUseWorkspaceTsdk": true,
|
"typescript.enablePromptUseWorkspaceTsdk": true
|
||||||
"files.eol": "\n",
|
|
||||||
"editor.tabSize": 2,
|
|
||||||
"editor.insertSpaces": true
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -37,7 +37,7 @@ The development branch is <code>main</code>. All pull requests should be made ag
|
|||||||
- Create a new branch (include the issue id and something readable):
|
- Create a new branch (include the issue id and something readable):
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
git checkout -b feat/doc-999-somefeature-that-rocks
|
git checkout -b doc-999-my-feature-or-fix
|
||||||
```
|
```
|
||||||
|
|
||||||
3. See the [Developer Setup](https://github.com/documenso/documenso/blob/main/README.md#developer-setup) for more setup details.
|
3. See the [Developer Setup](https://github.com/documenso/documenso/blob/main/README.md#developer-setup) for more setup details.
|
||||||
|
|||||||
@ -1,6 +0,0 @@
|
|||||||
# 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.
|
|
||||||
157
README.md
@ -1,5 +1,3 @@
|
|||||||
>We are nominated for a Product Hunt Gold Kitty 😺✨ and appreciate any support: https://documen.so/kitty
|
|
||||||
|
|
||||||
<img src="https://github.com/documenso/documenso/assets/13398220/a643571f-0239-46a6-a73e-6bef38d1228b" alt="Documenso Logo">
|
<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" style="margin-top: 20px">
|
||||||
@ -15,9 +13,9 @@
|
|||||||
·
|
·
|
||||||
<a href="https://github.com/documenso/documenso/issues">Issues</a>
|
<a href="https://github.com/documenso/documenso/issues">Issues</a>
|
||||||
·
|
·
|
||||||
<a href="https://documen.so/live">Upcoming Releases</a>
|
<a href="https://github.com/documenso/documenso/milestones">Roadmap</a>
|
||||||
·
|
·
|
||||||
<a href="https://documen.so/roadmap">Roadmap</a>
|
<a href="https://documen.so/launches">Upcoming Launches</a>
|
||||||
</p>
|
</p>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
@ -32,6 +30,14 @@
|
|||||||
<a href="code_of_conduct.md"><img src="https://img.shields.io/badge/Contributor%20Covenant-2.1-4baaaa.svg" alt="Contributor Covenant"></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>
|
</p>
|
||||||
|
|
||||||
|
> 🦺 Documenso 1.0 is deployed to our <a href="https://documen.so/staging" target="_blank">Staging Environment</a>.
|
||||||
|
>
|
||||||
|
> The code can be found on the [feat/refresh](https://github.com/documenso/documenso/tree/feat/refresh) branch.
|
||||||
|
>
|
||||||
|
> The new version will be released after the current testing phase.
|
||||||
|
|
||||||
|
# Join us in testing Documenso 1.0 during [MALFUNCTION MANIA](https://documenso.com/blog/malfunction-mania)
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<img style="display: block; height: 120px; width: 24%"
|
<img style="display: block; height: 120px; width: 24%"
|
||||||
src="https://github.com/documenso/documenso/assets/1309312/67e08c98-c153-4115-aa2d-77979bb12c94)">
|
src="https://github.com/documenso/documenso/assets/1309312/67e08c98-c153-4115-aa2d-77979bb12c94)">
|
||||||
@ -64,14 +70,14 @@ Join us in creating the next generation of open trust infrastructure.
|
|||||||
|
|
||||||
## Community and Next Steps 🎯
|
## Community and Next Steps 🎯
|
||||||
|
|
||||||
We're currently working on a redesign of the application, including a revamp of the codebase, so Documenso can be more intuitive to use and robust to develop upon.
|
We're currently working on a redesign of the application, including a revamp of the codebase so Documenso can be more intuitive to use and robust to develop upon.
|
||||||
|
|
||||||
- Check out the first source code release in this repository and test it.
|
- 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).
|
- 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.
|
- 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.
|
- ⭐ the repository to help us raise awareness
|
||||||
- Spread the word on Twitter that Documenso is working towards a more open signing tool.
|
- 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.
|
- Fix or create [issues](https://github.com/documenso/documenso/issues), that are needed for the first production release
|
||||||
|
|
||||||
## Contributing
|
## Contributing
|
||||||
|
|
||||||
@ -105,7 +111,7 @@ Contact us if you are interested in our Enterprise plan for large organizations
|
|||||||
|
|
||||||
### Requirements
|
### Requirements
|
||||||
|
|
||||||
To run Documenso locally, you will need
|
To run Documenso locally you will need
|
||||||
|
|
||||||
- Node.js
|
- Node.js
|
||||||
- Postgres SQL Database
|
- Postgres SQL Database
|
||||||
@ -117,15 +123,13 @@ To run Documenso locally, you will need
|
|||||||
|
|
||||||
Want to get up and running quickly? Follow these steps:
|
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.
|
1. [Clone the repository](https://help.github.com/articles/cloning-a-repository/) it to your local device.
|
||||||
|
|
||||||
After forking the repository, clone it to your local device by using the following command:
|
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
git clone https://github.com/<your-username>/documenso
|
git clone https://github.com/documenso/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.
|
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
|
3. Run `npm run dx` in the root directory
|
||||||
|
|
||||||
@ -143,32 +147,28 @@ npm run d
|
|||||||
|
|
||||||
1. **App** - http://localhost:3000
|
1. **App** - http://localhost:3000
|
||||||
2. **Incoming Mail Access** - http://localhost:9000
|
2. **Incoming Mail Access** - http://localhost:9000
|
||||||
3. **Database Connection Details**
|
|
||||||
|
|
||||||
|
3. **Database Connection Details**
|
||||||
- **Port**: 54320
|
- **Port**: 54320
|
||||||
- **Connection**: Use your favorite database client to connect using the provided port.
|
- **Connection**: Use your favorite database client to connect using the provided port.
|
||||||
|
|
||||||
4. **S3 Storage Dashboard** - http://localhost:9001
|
|
||||||
|
|
||||||
## Developer Setup
|
## Developer Setup
|
||||||
|
|
||||||
### Manual Setup
|
### Manual Setup
|
||||||
|
|
||||||
Follow these steps to setup Documenso on your local machine:
|
Follow these steps to setup documenso on you 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.
|
1. [Clone the repository](https://help.github.com/articles/cloning-a-repository/) it to your local device.
|
||||||
|
|
||||||
After forking the repository, clone it to your local device by using the following command:
|
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
git clone https://github.com/<your-username>/documenso
|
git clone https://github.com/documenso/documenso
|
||||||
```
|
```
|
||||||
|
|
||||||
2. Run `npm i` in the root directory
|
2. Run `npm i` in root directory
|
||||||
|
|
||||||
3. Create your `.env` from the `.env.example`. You can use `cp .env.example .env` to get started with our handpicked defaults.
|
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:
|
4. Set the following environement variables.
|
||||||
|
|
||||||
- NEXTAUTH_URL
|
- NEXTAUTH_URL
|
||||||
- NEXTAUTH_SECRET
|
- NEXTAUTH_SECRET
|
||||||
@ -181,15 +181,15 @@ git clone https://github.com/<your-username>/documenso
|
|||||||
|
|
||||||
5. Create the database schema by running `npm run prisma:migrate-dev`
|
5. Create the database schema by running `npm run prisma:migrate-dev`
|
||||||
|
|
||||||
6. Run `npm run dev` in the root directory to start
|
6. Run `npm run dev` root directory to start
|
||||||
|
|
||||||
7. Register a new user at http://localhost:3000/signup
|
7. Register a new user at http://localhost:3000/signup
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
- Optional: Seed the database using `npm run prisma:seed -w @documenso/prisma` to create a test user and document.
|
- 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.
|
- 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)**.
|
- 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)**.
|
||||||
|
|
||||||
### Run in Gitpod
|
### Run in Gitpod
|
||||||
|
|
||||||
@ -201,112 +201,35 @@ git clone https://github.com/<your-username>/documenso
|
|||||||
|
|
||||||
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)
|
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)
|
||||||
|
|
||||||
### Video walkthrough
|
|
||||||
|
|
||||||
If you're a visual learner and prefer to watch a video walkthrough of setting up Documenso locally, check out this video:
|
|
||||||
|
|
||||||
[](https://youtu.be/Y0ppIQrEnZs)
|
|
||||||
|
|
||||||
## Docker
|
## Docker
|
||||||
|
|
||||||
🚧 Docker containers and images are current in progress. We are actively working on bringing a simple Docker build and publish pipeline for Documenso.
|
🚧 Docker containers and images are current in progress. We are actively working on bringing a simple docker build and publish pipeline for Documenso.
|
||||||
|
|
||||||
## Self Hosting
|
## Self Hosting
|
||||||
|
|
||||||
We support a variety of deployment methods, and are actively working on adding more. Stay tuned for updates!
|
We support a variety of deployment methods, and are actively working on adding more. Stay tuned for updates!
|
||||||
|
|
||||||
> Please note that the below deployment methods are for v0.9, we will update these to v1.0 once it has been released.
|
> Please note the below deployment methods are for v0.9, we will update these to v1.0 once it has been released.
|
||||||
|
|
||||||
### 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_URL`
|
|
||||||
* `NEXTAUTH_SECRET`
|
|
||||||
* `NEXT_PUBLIC_WEBAPP_URL`
|
|
||||||
* `NEXT_PUBLIC_MARKETING_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 both `NEXTAUTH_URL` and `NEXT_PUBLIC_WEBAPP_URL` variables!
|
|
||||||
|
|
||||||
Now you can install the dependencies and build it:
|
|
||||||
|
|
||||||
```
|
|
||||||
npm i
|
|
||||||
npm run build:web
|
|
||||||
npm run prisma:migrate-deploy
|
|
||||||
```
|
|
||||||
|
|
||||||
Finally, you can start it with:
|
|
||||||
|
|
||||||
```
|
|
||||||
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/web` 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/web
|
|
||||||
ExecStart=/usr/bin/next start -p 3500
|
|
||||||
TimeoutSec=15
|
|
||||||
Restart=always
|
|
||||||
|
|
||||||
[Install]
|
|
||||||
WantedBy=multi-user.target
|
|
||||||
```
|
|
||||||
|
|
||||||
### Railway
|
### Railway
|
||||||
|
|
||||||
[](https://railway.app/template/bG6D4p)
|
[](https://railway.app/template/DjrRRX)
|
||||||
|
|
||||||
### Render
|
### Render
|
||||||
|
|
||||||
[](https://render.com/deploy?repo=https://github.com/documenso/documenso)
|
[](https://render.com/deploy?repo=https://github.com/documenso/documenso)
|
||||||
|
|
||||||
### Koyeb
|
|
||||||
|
|
||||||
[](https://app.koyeb.com/deploy?type=git&repository=github.com/documenso/documenso&branch=main&name=documenso-app&builder=dockerfile&dockerfile=/docker/Dockerfile)
|
|
||||||
|
|
||||||
## Troubleshooting
|
## Troubleshooting
|
||||||
|
|
||||||
### I'm not receiving any emails when using the developer quickstart.
|
### 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.
|
When using the developer quickstart an [Inbucket](https://inbucket.org/) server will be spun up in a docker container that will store all outgoing email locally for you to view.
|
||||||
|
|
||||||
The Web UI can be found at http://localhost:9000, while the SMTP port will be on localhost:2500.
|
The Web UI can be found at http://localhost:9000 while the SMTP port will be on localhost:2500.
|
||||||
|
|
||||||
### Support IPv6
|
### 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 Next.js start command
|
In case you are deploying to a cluster that uses only IPv6. You can use a custom command to pass a parameter to the Next.js start command
|
||||||
|
|
||||||
For local docker run
|
For local docker run
|
||||||
|
|
||||||
@ -331,7 +254,7 @@ containers:
|
|||||||
- '::'
|
- '::'
|
||||||
```
|
```
|
||||||
|
|
||||||
### I can't see environment variables in my package scripts.
|
### I can't see environment variables in my package scripts
|
||||||
|
|
||||||
Wrap your package script with the `with:env` script like such:
|
Wrap your package script with the `with:env` script like such:
|
||||||
|
|
||||||
@ -339,7 +262,7 @@ Wrap your package script with the `with:env` script like such:
|
|||||||
npm run with:env -- npm run myscript
|
npm run with:env -- npm run myscript
|
||||||
```
|
```
|
||||||
|
|
||||||
The same can be done when using `npx` for one of the bin scripts:
|
The same can be done when using `npx` for one of bin scripts:
|
||||||
|
|
||||||
```
|
```
|
||||||
npm run with:env -- npx myscript
|
npm run with:env -- npx myscript
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
title: 'Building Documenso — Part 1: Certificates'
|
title: 'Building Documenso — Part 1: Certificates'
|
||||||
description: In today's fast-paced world, productivity and efficiency are crucial for success, both in personal and professional endeavors. We all strive to make the most of our time and energy to achieve our goals effectively. However, it's not always easy to stay on track and maintain peak performance. In this blog post, we'll explore 10 valuable tips to help you boost productivity and efficiency in your daily life.
|
description: This is the first part of the new Building Documenso series, where I describe the challenges and design choices that we make while building the world’s most open signing platform.
|
||||||
authorName: 'Timur Ercan'
|
authorName: 'Timur Ercan'
|
||||||
authorImage: '/blog/blog-author-timur.jpeg'
|
authorImage: '/blog/blog-author-timur.jpeg'
|
||||||
authorRole: 'Co-Founder'
|
authorRole: 'Co-Founder'
|
||||||
|
|||||||
@ -1,49 +0,0 @@
|
|||||||
---
|
|
||||||
title: Open Sourcing Documenso's Design
|
|
||||||
description: It's day 1 of our first launch week. We are kicking it off by open sourcing Documenso's design system! Let's go..
|
|
||||||
authorName: 'Timur Ercan'
|
|
||||||
authorImage: '/blog/blog-author-timur.jpeg'
|
|
||||||
authorRole: 'Co-Founder'
|
|
||||||
date: 2023-09-25
|
|
||||||
tags:
|
|
||||||
- Design
|
|
||||||
- Open Source
|
|
||||||
- Community
|
|
||||||
---
|
|
||||||
|
|
||||||
<figure>
|
|
||||||
<MdxNextImage
|
|
||||||
src="/blog/designsystem.png"
|
|
||||||
width="1260"
|
|
||||||
height="630"
|
|
||||||
alt="Documenso's Design System"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<figcaption className="text-center">
|
|
||||||
Documenso's Design System ✨
|
|
||||||
</figcaption>
|
|
||||||
</figure>
|
|
||||||
|
|
||||||
> TLDR; Our design system is OSS under MIT at [design.documenso.com](https://design.documenso.com)
|
|
||||||
|
|
||||||
Today, we are open sourcing our design system, lovingly crafted by [Thilo](https://twitter.com/thilokonzok). The system is public on Figma and will be available at [design.documenso.com](https://design.documenso.com) from here on out.
|
|
||||||
We are publishing it under the MIT License so everyone can share, remix, and use it as it helps them most.
|
|
||||||
|
|
||||||
We chose to start our first launch week with a design topic to emphasize the role design will play in Documenso's company and community culture. As it is historically difficult to bring together open-source software with great design, this is our first step towards encouraging a more design-driven COSS (Commercial Open Source) movement.
|
|
||||||
|
|
||||||
## Designers Welcome
|
|
||||||
|
|
||||||
We added a designer role in our Discord to create a space for designers to explore and discuss design-related topics of Documenso and signing in general. In the future, we want to foster more coding contributions and start a design culture around the product. As it is much more difficult to incorporate design contributions, we have yet to find a clear plan of what that will look like. I would like to see contributions around stuff we are NOT working on. Designs in that area can inspire and start discussions without the complexities of implementing them immediately — a free-thinking space around everything Documenso. Having a free mandate to design without restriction can create many exciting ideas. Some Ideas worth exploring:
|
|
||||||
|
|
||||||
## Areas for design contributions
|
|
||||||
|
|
||||||
- Explorations of exciting aspects of signing and document handling:
|
|
||||||
- What does signing look like when we no longer have skeuomorphic signatures?
|
|
||||||
- What is signing if we move beyond paper-inspired documents?
|
|
||||||
- What would the government process look like using Documenso?
|
|
||||||
- Solutions Concepts for features further down the roadmap, e.g., Widgets in websites
|
|
||||||
|
|
||||||
These are fascinating ideas for explorative design. They won't be built 1:1 but shape how we think about signing and where it can go, which is even more critical. If you are interested in product design, you are invited to join our [Discord](https://documen.so/discord) and discuss the future of signing design or the future of Documenso's design system. Also let me know what you think on [X (formerly Twitter)](https://x.com/eltimuro).
|
|
||||||
|
|
||||||
Best from Hamburg\
|
|
||||||
Timur
|
|
||||||
@ -24,6 +24,8 @@ tags:
|
|||||||
</figcaption>
|
</figcaption>
|
||||||
</figure>
|
</figure>
|
||||||
|
|
||||||
|
> TLDR; we have 100 early adopter accounts available at a great price. [Secure yours now](https://documenso.com/pricing).
|
||||||
|
|
||||||
## Community-Driven Development
|
## Community-Driven Development
|
||||||
|
|
||||||
As we ramp up hiring and development speed for Documenso, I want to discuss how we plan to build its core version.
|
As we ramp up hiring and development speed for Documenso, I want to discuss how we plan to build its core version.
|
||||||
@ -48,7 +50,7 @@ Documenso currently runs the community reviewed 0.9.1 version. Getting from here
|
|||||||
|
|
||||||
## Extending our open metrics
|
## Extending our open metrics
|
||||||
|
|
||||||
As part of our ongoing effort to be open and transparent in our doing, we are adding "Early Adopters" to our [/open page](https://documenso.com/open) page. After we exceed the early adopter slots, this metric will transition to "Customers". When no more early adopter seats can be claimed, the early adopter plan will transition to a standard paid plan. It will still be priced at $30/mo., but will no longer include upcoming features or unlimited seats.
|
As part of our ongoing effort to be open and transparent in our doing, we are adding "Early Adopters" to our [/open page](https://documenso.com/open) page. After we exceed the early adopter slots, this metric will transition to "Customers". When no more early adopter seats can be claimed, the early adopter plan will transition to a standard paid plan. It will still be priced at $30/mo., but will no longer include upcoming features or unlimited seats. You can [claim your early adopter account here](https://documenso.com/pricing).
|
||||||
|
|
||||||
If you have any questions or comments, please reach out on [Twitter / X](https://twitter.com/eltimuro) (DM open) or [Discord](https://documen.so/discord).
|
If you have any questions or comments, please reach out on [Twitter / X](https://twitter.com/eltimuro) (DM open) or [Discord](https://documen.so/discord).
|
||||||
|
|
||||||
|
|||||||
@ -1,28 +0,0 @@
|
|||||||
---
|
|
||||||
title: Jan 10th Email Provider Security Incident
|
|
||||||
description: On January 10th, 2022, we were notified by our email provider that they had experienced a security incident.
|
|
||||||
authorName: 'Lucas Smith'
|
|
||||||
authorImage: '/blog/blog-author-lucas.png'
|
|
||||||
authorRole: 'Co-Founder'
|
|
||||||
date: 2024-01-17
|
|
||||||
tags:
|
|
||||||
- Security
|
|
||||||
---
|
|
||||||
|
|
||||||
On January 10th, 2024 we were notified by our email provider that a security incident had occurred. This security incident which had started on January 7th led to a bad actor obtaining access to their database which contains ours and other customer’s data.
|
|
||||||
|
|
||||||
We understand that during this security incident the following has been accessed:
|
|
||||||
|
|
||||||
- Email addresses.
|
|
||||||
- Metadata on emails sent excluding the email body.
|
|
||||||
|
|
||||||
While the incident is unfortunate we are pleased with the remediation and the processes that our email provider has put in place to help avoid this kind of situation in the future. Since the incident, our provider has rectified the issue and has engaged a security company to conduct an exhaustive investigation and to help improve their security posture moving forward.
|
|
||||||
|
|
||||||
We remain steadfast in our commitment to our current email provider, and will not be taking any further action with relation to changing providers.
|
|
||||||
|
|
||||||
We are now working with our legal counsel to ensure that we provide the appropriate notice to all our customers in each jurisdiction. If you have any further questions on this incident please feel free to contact our support team at [support@documenso.com](mailto:support@documenso.com).
|
|
||||||
|
|
||||||
We appreciate your ongoing support in this matter.
|
|
||||||
|
|
||||||
You can read more on the incident on our providers blog post below:
|
|
||||||
[https://resend.com/blog/incident-report-for-january-10-2024](https://resend.com/blog/incident-report-for-january-10-2024)
|
|
||||||
@ -1,75 +0,0 @@
|
|||||||
---
|
|
||||||
title: The 🔴 LIVE Roadmap
|
|
||||||
description: It's the Launch Week Day finale, Day 5! We are going out with a bang and introducing the 🔴 LIVE roadmap, featuring our next Product Hunt Launch - Free Singleplayer Documenso - Sign without creating an account!
|
|
||||||
authorName: 'Timur Ercan'
|
|
||||||
authorImage: '/blog/blog-author-timur.jpeg'
|
|
||||||
authorRole: 'Co-Founder'
|
|
||||||
date: 2023-09-29
|
|
||||||
tags:
|
|
||||||
- Free Plan
|
|
||||||
- Launch
|
|
||||||
- Roadmap
|
|
||||||
---
|
|
||||||
|
|
||||||
<figure>
|
|
||||||
<MdxNextImage
|
|
||||||
src="/blog/roadmap.png"
|
|
||||||
width="1260"
|
|
||||||
height="630"
|
|
||||||
alt="XKCD: Bug"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<figcaption className="text-center">
|
|
||||||
"Being early is, uh, good." -Unknown
|
|
||||||
</figcaption>
|
|
||||||
</figure>
|
|
||||||
|
|
||||||
> TLDR; We are launching a [🔴 LIVE roadmap](https://documen.so/launches), that gets updated regularly.\
|
|
||||||
> First upcoming launch: A free single signer experience.
|
|
||||||
|
|
||||||
## The Road Ahead
|
|
||||||
|
|
||||||
It's been quite a week, launching our [design system](https://documenso.com/blog/design-system), [kicking of a Malfunction Mania](https://documenso.com/blog/malfunction-mania), a [shiny new contributor perk](https://documenso.com/blog/shop) and our [early adopter deal](https://documenso.com/blog/early-adopters). After discussing Version 1.0 a lot, we want to close the week by looking ahead. As an open company, we want transparency about what we are working on and what to expect next. Especially for our Early Adopters, we want to paint a clear picture of what to expect in the near term.
|
|
||||||
|
|
||||||
Communicating software development progress and goals is historically tricky because of it's complex nature. Exact release dates are notoriously unreliable; if they are not, they force a particular style of development, forcing the team to make tradeoffs on scope and quality.
|
|
||||||
|
|
||||||
To give an appropriate insight into our work, we are launching our new [🔴 LIVE roadmap](https://documen.so/launches) today:
|
|
||||||
|
|
||||||
- A List of quarterly development and feature goals
|
|
||||||
- That gets updated regularly (bi-weekly)
|
|
||||||
- Has up-to-date insights from the team on where we stand
|
|
||||||
|
|
||||||
**While there are some great features planned, one stands out: Single Player Mode!**
|
|
||||||
|
|
||||||
## Announcing Documenso Singleplayer Mode
|
|
||||||
|
|
||||||
<a href="https://www.producthunt.com/products/documenso" target="_blank">
|
|
||||||
<figure>
|
|
||||||
<MdxNextImage
|
|
||||||
src="/blog/sp5.png"
|
|
||||||
width="1260"
|
|
||||||
height="630"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<figcaption className="text-center font-bold">
|
|
||||||
🚨 We are going back to Product Hunt! Are you ready, player one?
|
|
||||||
</figcaption>
|
|
||||||
</figure>
|
|
||||||
</a>
|
|
||||||
|
|
||||||
Single Player Mode will be a free, loginless signing experience for single signers. If you hate creating an account to sign a single, once-in-a-while-document yourself as much as we do, we've got you. Our new free tier will accompany Singleplayer. While you don't HAVE to create an account to sign sth. quickly, you can. A free tier Documenso Account will give you the following:
|
|
||||||
|
|
||||||
- A place to store all your sent and received Documenso-signed documents
|
|
||||||
- Free forever
|
|
||||||
- Unlimited recipients
|
|
||||||
- 5 free signatures per month (for now, excluding third party types like QES)
|
|
||||||
- The use of templates, as soon as we [release](https://documen.so/launches) them
|
|
||||||
|
|
||||||
Singleplayer will launch in the first half of October, shortly after the release of 1.0, **[ON PRODUCT HUNT!](https://www.producthunt.com/products/documenso)** That's right, we are going back to Product Hunt to kick of this new phase of Documenso and you are invited to join us once again :)
|
|
||||||
|
|
||||||
**[Subscribe on PH](https://www.producthunt.com/products/documenso)** to be notified when we launch.
|
|
||||||
|
|
||||||
If you have any questions or comments, please reach out on [Twitter / X](https://twitter.com/eltimuro) (DM open) or [Discord](https://documen.so/discord).
|
|
||||||
|
|
||||||
Best from Hamburg\
|
|
||||||
Timur
|
|
||||||
@ -16,7 +16,7 @@ tags:
|
|||||||
src="/blog/mm.png"
|
src="/blog/mm.png"
|
||||||
width="1260"
|
width="1260"
|
||||||
height="630"
|
height="630"
|
||||||
alt="Malfunctioning Documenso Logo in broken colors"
|
alt="Malfunctioning Documenso Logo inbroken colors"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<figcaption className="text-center">
|
<figcaption className="text-center">
|
||||||
@ -49,9 +49,9 @@ As Documenso 1.0 just hit the staging environment, we're calling a MALFUNCTION M
|
|||||||
- Fix bugs by creating a Pull Request (PR);
|
- Fix bugs by creating a Pull Request (PR);
|
||||||
- Look over and add missing documentation/ Quickstarts and other useful resources.
|
- Look over and add missing documentation/ Quickstarts and other useful resources.
|
||||||
|
|
||||||
|
We don't have a specific end date for Malfunction Mania. We plan to move the staging version into the production environment by the end of the month once we're happy with the results. Bug reports and fixes are, of course, always welcome going forward.
|
||||||
|
|
||||||
Best from Hamburg
|
Best from Hamburg
|
||||||
Timur
|
Timur
|
||||||
|
|
||||||
We don't have a specific end date for Malfunction Mania. We plan to move the staging version into the production environment by the end of the month once we're happy with the results. Bug reports and fixes are, of course, always welcome going forward.
|
|
||||||
|
|
||||||
**[Follow Documenso on Twitter / X](https://documen.so/tw) and [join the Discord server](https://documen.so/discord) to get the latest about Malfunction Mania.**
|
**[Follow Documenso on Twitter / X](https://documen.so/tw) and [join the Discord server](https://documen.so/discord) to get the latest about Malfunction Mania.**
|
||||||
|
|||||||
@ -12,7 +12,7 @@ tags:
|
|||||||
|
|
||||||
Since we launched [Documenso 0.9 on Product Hunt](https://producthunt.com/products/documenso#documenso) last May, the team's been hard at work behind the scenes to ramp up development and design to deliver an excellent next version.
|
Since we launched [Documenso 0.9 on Product Hunt](https://producthunt.com/products/documenso#documenso) last May, the team's been hard at work behind the scenes to ramp up development and design to deliver an excellent next version.
|
||||||
|
|
||||||
Last week, Lucas shared the reasoning how [why we're doing a rewrite](https://documenso.com/blog/why-were-doing-a-rewrite).
|
Last week, Lucas shared the reasoning on [why we're doing a rewrite](https://documenso.com/blog/why-were-doing-a-rewrite).
|
||||||
|
|
||||||
Today, I'm pleased to share with you a preview of the next Documenso.
|
Today, I'm pleased to share with you a preview of the next Documenso.
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
title: Announcing Pre-Seed and Open Metrics
|
title: Announcing Pre-Seed and Open Metrics
|
||||||
description: We are excited to report the closing of our Pre-Seed round. You can find the juicy details on our new /open page. Yes, it was signed using Documenso.
|
description: We are exicited to report the closing of our Pre-Seed round. You can find the juicy details on our new /open page. Yes, it was signed using Documenso.
|
||||||
authorName: 'Timur Ercan'
|
authorName: 'Timur Ercan'
|
||||||
authorImage: '/blog/blog-author-timur.jpeg'
|
authorImage: '/blog/blog-author-timur.jpeg'
|
||||||
authorRole: 'Co-Founder'
|
authorRole: 'Co-Founder'
|
||||||
@ -14,11 +14,9 @@ tags:
|
|||||||
Today I'm happy to announce that we closed a \$1.25M Pre-Seed round for Documenso, bringing our total funding to \$1.54M. The round actually closed last month, we just were sneaky about it.
|
Today I'm happy to announce that we closed a \$1.25M Pre-Seed round for Documenso, bringing our total funding to \$1.54M. The round actually closed last month, we just were sneaky about it.
|
||||||
|
|
||||||
## Two more for the road (to open signing)
|
## Two more for the road (to open signing)
|
||||||
|
|
||||||
We're ecstatic to welcome [OSS Capital](https://twitter.com/osscapital) and especially [Joseph Jacks](https://twitter.com/JosephJacks_) to the inner circle of the open signing revolution. We're also fortunate to be joined by Orrick's very own [John Harrison](https://www.linkedin.com/in/john-harrison-a1213b9/) and his legal experience. For those who are wondering, yes, the round was, of course, signed using Documenso.
|
We're ecstatic to welcome [OSS Capital](https://twitter.com/osscapital) and especially [Joseph Jacks](https://twitter.com/JosephJacks_) to the inner circle of the open signing revolution. We're also fortunate to be joined by Orrick's very own [John Harrison](https://www.linkedin.com/in/john-harrison-a1213b9/) and his legal experience. For those who are wondering, yes, the round was, of course, signed using Documenso.
|
||||||
|
|
||||||
## Open Source, Open Metrics
|
## Open Source, Open Metrics
|
||||||
|
|
||||||
If you follow us, you know we're firmly committed to the open source values of openness and transparency. For us, this includes not only the code side of things but also the business. As we aim to build trust among our investors, customers, and partners, we want to be open about what's going on. We also want to allow everyone to learn from our data and choices, just as we did from so many other COSS (Commercial Open Source) startups. The term "Open Startup" isn't precisely defined (and probably will never be, just like startup). There is however a [great write-up](https://cal.com/blog/open-startup) about the basics by the founder of our favorite open source scheduling tool Cal.com.
|
If you follow us, you know we're firmly committed to the open source values of openness and transparency. For us, this includes not only the code side of things but also the business. As we aim to build trust among our investors, customers, and partners, we want to be open about what's going on. We also want to allow everyone to learn from our data and choices, just as we did from so many other COSS (Commercial Open Source) startups. The term "Open Startup" isn't precisely defined (and probably will never be, just like startup). There is however a [great write-up](https://cal.com/blog/open-startup) about the basics by the founder of our favorite open source scheduling tool Cal.com.
|
||||||
|
|
||||||
The two main takeaways are:
|
The two main takeaways are:
|
||||||
|
|||||||
@ -30,7 +30,7 @@ We kicked off [Malfunction Mania](https://documenso.com/blog/malfunction-mania)
|
|||||||
|
|
||||||
## Documenso Merch Shop
|
## Documenso Merch Shop
|
||||||
|
|
||||||
The shirt will be available in our [merch shop](https://documen.so/shop) via a unique discount code. While the shirt will be gone after Malfunction Mania, the shop is here to stay and provide a well-deserved reward for great community members and contributors. All items can be earned by contributing to Documenso.
|
The shirt will be available in our [merch shop](https://documen.so/shop) via a unique discount code. While the shirt will be gone after Malfunction Mania, the shop is here to stay and provide a well-deserved reward for great community members and contributors. All items can be earned by contrinuting to Documenso.
|
||||||
|
|
||||||
<figure>
|
<figure>
|
||||||
<MdxNextImage
|
<MdxNextImage
|
||||||
|
|||||||
@ -24,9 +24,9 @@ We’re an open-source project and focus on building a great developer experienc
|
|||||||
|
|
||||||
So, we’re switching all conversations, team and community-wide, to Discord.
|
So, we’re switching all conversations, team and community-wide, to Discord.
|
||||||
|
|
||||||
In this post, we won’t debate _why_ we’re switching — Slack vs. Discord is a long-lasting debate with pros and cons, and fans on both sides. There are great [stories](https://blog.meilisearch.com/from-slack-to-discord-our-migration/) and [threads](https://twitter.com/McPizza0/status/1655519558600470528) on the topic. We just don’t want to write yet another story here.
|
In this post, we won’t debate *why* we’re switching — Slack vs. Discord is a long-lasting debate with pros and cons, and fans on both sides. There are great [stories](https://blog.meilisearch.com/from-slack-to-discord-our-migration/) and [threads](https://twitter.com/McPizza0/status/1655519558600470528) on the topic. We just don’t want to write yet another story here.
|
||||||
|
|
||||||
Instead, we’ll focus on _how_ we plan to make the switch.
|
Instead, we’ll focus on *how* we plan to make the switch.
|
||||||
|
|
||||||
## Who is this story for?
|
## Who is this story for?
|
||||||
|
|
||||||
@ -47,13 +47,14 @@ The detailed plan goes like this:
|
|||||||
- 2023-08-02 `t+8`: We announce to the community the upcoming changes in the different channels — GitHub, Twitter, and Slack.
|
- 2023-08-02 `t+8`: We announce to the community the upcoming changes in the different channels — GitHub, Twitter, and Slack.
|
||||||
|
|
||||||
- **GitHub**
|
- **GitHub**
|
||||||
|
|
||||||
- Create new Pull Request
|
- Create new Pull Request
|
||||||
- Add story to the blog
|
- Add story to the blog
|
||||||
- Update link to the community
|
- Update link to the community
|
||||||
|
|
||||||
```
|
```
|
||||||
https://documen.so/discord
|
https://documen.so/discord
|
||||||
```
|
```
|
||||||
|
|
||||||
- Start a new Discussion
|
- Start a new Discussion
|
||||||
|
|
||||||
```markdown
|
```markdown
|
||||||
@ -72,7 +73,6 @@ The detailed plan goes like this:
|
|||||||
```
|
```
|
||||||
|
|
||||||
- **Twitter**
|
- **Twitter**
|
||||||
|
|
||||||
- [Tweet the announcement](https://twitter.com/documenso/status/1686719482096766977)
|
- [Tweet the announcement](https://twitter.com/documenso/status/1686719482096766977)
|
||||||
- Pin Tweet
|
- Pin Tweet
|
||||||
- Update link in bio
|
- Update link in bio
|
||||||
@ -87,7 +87,6 @@ The detailed plan goes like this:
|
|||||||
```
|
```
|
||||||
|
|
||||||
- **Slack**
|
- **Slack**
|
||||||
|
|
||||||
- Post message in `#general`
|
- Post message in `#general`
|
||||||
|
|
||||||
```markdown
|
```markdown
|
||||||
@ -107,15 +106,15 @@ The detailed plan goes like this:
|
|||||||
|
|
||||||
- Pin post
|
- Pin post
|
||||||
- Set topic and description
|
- Set topic and description
|
||||||
|
|
||||||
```
|
```
|
||||||
We're switching to Discord. Join the fun: https://documen.so/discord
|
We're switching to Discord. Join the fun: https://documen.so/discord
|
||||||
```
|
```
|
||||||
|
|
||||||
- Archive channels: `#code-review` `#how-to` `#meet-and-greet` `#random-memes` `#self-hosting` `#support`
|
- Archive channels: `#code-review` `#how-to` `#meet-and-greet` `#random-memes` `#self-hosting` `#support`
|
||||||
|
|
||||||
- 2023-08-09 `t+15`: 7 days later, we send a reminder on Slack.
|
- 2023-08-09 `t+15`: 7 days later, we send a reminder on Slack.
|
||||||
|
|
||||||
- **Slack**
|
- **Slack**
|
||||||
|
|
||||||
- Schedule reminder in `#general`
|
- Schedule reminder in `#general`
|
||||||
|
|
||||||
```
|
```
|
||||||
@ -132,5 +131,5 @@ The detailed plan goes like this:
|
|||||||
## Final thoughts
|
## Final thoughts
|
||||||
|
|
||||||
- We’re at the very, early stage on our journey to building a beautiful, open-source DocuSign alternative. We want to build a great developer experience with the open-source community and, switching to Discord, we want to set up the foundations of an open, safe place for community members to get in touch, brainstorm ideas, and have fun.
|
- We’re at the very, early stage on our journey to building a beautiful, open-source DocuSign alternative. We want to build a great developer experience with the open-source community and, switching to Discord, we want to set up the foundations of an open, safe place for community members to get in touch, brainstorm ideas, and have fun.
|
||||||
- It doesn’t mean we won’t ever switch back to Slack. The tools of today aren’t the ones of tomorrow. We don’t delete the Slack workspace, we archive it, and keep the `documenso` handle. May it be just an _au revoir?_
|
- It doesn’t mean we won’t ever switch back to Slack. The tools of today aren’t the ones of tomorrow. We don’t delete the Slack workspace, we archive it, and keep the `documenso` handle. May it be just an *au revoir?*
|
||||||
- For now, we’re pushing forward and are eager to welcome you on Discord. Make sure to [join the server](https://documen.so/discord) in order to keep up to date on all things Documenso. See you there!
|
- For now, we’re pushing forward and are eager to welcome you on Discord. Make sure to [join the server](https://documen.so/discord) in order to keep up to date on all things Documenso. See you there!
|
||||||
|
|||||||
@ -1,13 +0,0 @@
|
|||||||
---
|
|
||||||
title: Careers at Documenso
|
|
||||||
---
|
|
||||||
|
|
||||||
# Careers at Documenso
|
|
||||||
|
|
||||||
So you love Documenso and all the things that we do and now you want to work with us to unlock the future of open signing?
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## Open Positions
|
|
||||||
|
|
||||||
Unfortunately we have no open positions available at the moment. Our team has grown and so we must grow with it, please check back from time to time as now is not forever and we may be hiring again in the future.
|
|
||||||
@ -1,42 +0,0 @@
|
|||||||
---
|
|
||||||
title: Design System
|
|
||||||
---
|
|
||||||
|
|
||||||
# We're building a beautiful, open-source alternative to DocuSign
|
|
||||||
|
|
||||||
> Read more about our design culture here:
|
|
||||||
>
|
|
||||||
> [https://documenso.com/blog/design-system](https://documenso.com/blog/design-system)
|
|
||||||
|
|
||||||
At Documenso, we aim to be a design-driven company.
|
|
||||||
|
|
||||||
We believe that design isn't just about how things look, but also how they work. We want to make sure that the product is easy to use and intuitive. We also want to ensure that the website, desktop and mobile apps are consistent and look and feel like they belong together.
|
|
||||||
|
|
||||||
To achieve this, we've created Documenso's design system containing tokens, primitives, and components, screens, and brand assets.
|
|
||||||
|
|
||||||
We're open-sourcing this design system so you can see how we build the product and think about design as a whole.
|
|
||||||
|
|
||||||
## Check out the design system
|
|
||||||
|
|
||||||
<iframe
|
|
||||||
src="https://documen.so/design-system-embed"
|
|
||||||
className="aspect-square w-full border-none"
|
|
||||||
frameBorder="0"
|
|
||||||
/>
|
|
||||||
|
|
||||||
## Remix and Share the community version on Figma
|
|
||||||
|
|
||||||
<a href="https://documen.so/design" target="_blank">
|
|
||||||
<figure>
|
|
||||||
<MdxNextImage
|
|
||||||
src="/blog/designsystem.png"
|
|
||||||
width="1260"
|
|
||||||
height="630"
|
|
||||||
alt="Documenso's Design System"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<figcaption className="text-center">
|
|
||||||
Documenso's Design System ✨
|
|
||||||
</figcaption>
|
|
||||||
</figure>
|
|
||||||
</a>
|
|
||||||
@ -1,56 +1,27 @@
|
|||||||
const million = require('million/compiler');
|
|
||||||
/* eslint-disable @typescript-eslint/no-var-requires */
|
/* eslint-disable @typescript-eslint/no-var-requires */
|
||||||
const fs = require('fs');
|
|
||||||
const path = require('path');
|
const path = require('path');
|
||||||
const { withContentlayer } = require('next-contentlayer');
|
const { withContentlayer } = require('next-contentlayer');
|
||||||
|
|
||||||
const ENV_FILES = ['.env', '.env.local', `.env.${process.env.NODE_ENV || 'development'}`];
|
require('dotenv').config({
|
||||||
|
path: path.join(__dirname, '../../.env.local'),
|
||||||
for (file of ENV_FILES) {
|
});
|
||||||
require('dotenv').config({
|
|
||||||
path: path.join(__dirname, `../../${file}`),
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
// !: This is a temp hack to get caveat working without placing it back in the public directory.
|
|
||||||
// !: By inlining this at build time we should be able to sign faster.
|
|
||||||
const FONT_CAVEAT_BYTES = fs.readFileSync(
|
|
||||||
path.join(__dirname, '../../packages/assets/fonts/caveat.ttf'),
|
|
||||||
);
|
|
||||||
|
|
||||||
/** @type {import('next').NextConfig} */
|
/** @type {import('next').NextConfig} */
|
||||||
const config = {
|
const config = {
|
||||||
experimental: {
|
experimental: {
|
||||||
outputFileTracingRoot: path.join(__dirname, '../../'),
|
serverActions: true,
|
||||||
serverActions: {
|
serverActionsBodySizeLimit: '10mb',
|
||||||
bodySizeLimit: '50mb',
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
reactStrictMode: true,
|
reactStrictMode: true,
|
||||||
transpilePackages: [
|
transpilePackages: ['@documenso/lib', '@documenso/prisma', '@documenso/trpc', '@documenso/ui'],
|
||||||
'@documenso/assets',
|
|
||||||
'@documenso/lib',
|
|
||||||
'@documenso/tailwind-config',
|
|
||||||
'@documenso/trpc',
|
|
||||||
'@documenso/ui',
|
|
||||||
],
|
|
||||||
env: {
|
env: {
|
||||||
NEXT_PUBLIC_PROJECT: 'marketing',
|
NEXT_PUBLIC_PROJECT: 'marketing',
|
||||||
FONT_CAVEAT_URI: `data:font/ttf;base64,${FONT_CAVEAT_BYTES.toString('base64')}`,
|
|
||||||
},
|
},
|
||||||
modularizeImports: {
|
modularizeImports: {
|
||||||
'lucide-react': {
|
'lucide-react': {
|
||||||
transform: 'lucide-react/dist/esm/icons/{{ kebabCase member }}',
|
transform: 'lucide-react/dist/esm/icons/{{ kebabCase member }}',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
webpack: (config, { isServer }) => {
|
|
||||||
// fixes: Module not found: Can’t resolve ‘../build/Release/canvas.node’
|
|
||||||
if (isServer) {
|
|
||||||
config.resolve.alias.canvas = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return config;
|
|
||||||
},
|
|
||||||
async headers() {
|
async headers() {
|
||||||
return [
|
return [
|
||||||
{
|
{
|
||||||
@ -95,6 +66,4 @@ const config = {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
module.exports = million.next(
|
module.exports = withContentlayer(config);
|
||||||
withContentlayer(config), { auto: { rsc: true } }
|
|
||||||
);
|
|
||||||
|
|||||||
@ -1,19 +1,17 @@
|
|||||||
{
|
{
|
||||||
"name": "@documenso/marketing",
|
"name": "@documenso/marketing",
|
||||||
"version": "1.2.3",
|
"version": "0.1.0",
|
||||||
"private": true,
|
"private": true,
|
||||||
"license": "AGPL-3.0",
|
"license": "AGPL-3.0",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "next dev -p 3001",
|
"dev": "next dev -p 3001",
|
||||||
"build": "next build",
|
"build": "next build",
|
||||||
"start": "next start -p 3001",
|
"start": "next start",
|
||||||
"lint": "next lint",
|
"lint": "next lint",
|
||||||
"lint:fix": "next lint --fix",
|
|
||||||
"clean": "rimraf .next && rimraf node_modules",
|
"clean": "rimraf .next && rimraf node_modules",
|
||||||
"copy:pdfjs": "node ../../scripts/copy-pdfjs.cjs"
|
"copy:pdfjs": "node ../../scripts/copy-pdfjs.cjs"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@documenso/assets": "*",
|
|
||||||
"@documenso/lib": "*",
|
"@documenso/lib": "*",
|
||||||
"@documenso/tailwind-config": "*",
|
"@documenso/tailwind-config": "*",
|
||||||
"@documenso/trpc": "*",
|
"@documenso/trpc": "*",
|
||||||
@ -22,11 +20,9 @@
|
|||||||
"contentlayer": "^0.3.4",
|
"contentlayer": "^0.3.4",
|
||||||
"framer-motion": "^10.12.8",
|
"framer-motion": "^10.12.8",
|
||||||
"lucide-react": "^0.279.0",
|
"lucide-react": "^0.279.0",
|
||||||
"luxon": "^3.4.0",
|
|
||||||
"micro": "^10.0.1",
|
"micro": "^10.0.1",
|
||||||
"million": "^2.6.4",
|
"next": "13.4.19",
|
||||||
"next": "14.0.3",
|
"next-auth": "4.22.3",
|
||||||
"next-auth": "4.24.5",
|
|
||||||
"next-contentlayer": "^0.3.4",
|
"next-contentlayer": "^0.3.4",
|
||||||
"next-plausible": "^3.10.1",
|
"next-plausible": "^3.10.1",
|
||||||
"perfect-freehand": "^1.2.0",
|
"perfect-freehand": "^1.2.0",
|
||||||
@ -37,21 +33,13 @@
|
|||||||
"react-hook-form": "^7.43.9",
|
"react-hook-form": "^7.43.9",
|
||||||
"react-icons": "^4.11.0",
|
"react-icons": "^4.11.0",
|
||||||
"recharts": "^2.7.2",
|
"recharts": "^2.7.2",
|
||||||
"sharp": "0.33.1",
|
"sharp": "0.32.5",
|
||||||
"typescript": "5.2.2",
|
"typescript": "5.1.6",
|
||||||
"zod": "^3.22.4"
|
"zod": "^3.21.4"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/node": "20.1.0",
|
"@types/node": "20.1.0",
|
||||||
"@types/react": "18.2.18",
|
"@types/react": "18.2.18",
|
||||||
"@types/react-dom": "18.2.7"
|
"@types/react-dom": "18.2.7"
|
||||||
},
|
|
||||||
"overrides": {
|
|
||||||
"next-auth": {
|
|
||||||
"next": "$next"
|
|
||||||
},
|
|
||||||
"next-contentlayer": {
|
|
||||||
"next": "$next"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
2
apps/marketing/process-env.d.ts
vendored
@ -6,6 +6,8 @@ declare namespace NodeJS {
|
|||||||
NEXT_PRIVATE_DATABASE_URL: string;
|
NEXT_PRIVATE_DATABASE_URL: string;
|
||||||
|
|
||||||
NEXT_PUBLIC_STRIPE_COMMUNITY_PLAN_MONTHLY_PRICE_ID: string;
|
NEXT_PUBLIC_STRIPE_COMMUNITY_PLAN_MONTHLY_PRICE_ID: string;
|
||||||
|
NEXT_PUBLIC_STRIPE_COMMUNITY_PLAN_YEARLY_PRICE_ID: string;
|
||||||
|
NEXT_PUBLIC_STRIPE_FREE_PLAN_ID?: string;
|
||||||
|
|
||||||
NEXT_PRIVATE_STRIPE_API_KEY: string;
|
NEXT_PRIVATE_STRIPE_API_KEY: string;
|
||||||
NEXT_PRIVATE_STRIPE_WEBHOOK_SECRET: string;
|
NEXT_PRIVATE_STRIPE_WEBHOOK_SECRET: string;
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 43 KiB |
|
Before Width: | Height: | Size: 47 KiB |
|
Before Width: | Height: | Size: 29 KiB After Width: | Height: | Size: 29 KiB |
|
Before Width: | Height: | Size: 8.0 KiB After Width: | Height: | Size: 8.0 KiB |
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 629 B After Width: | Height: | Size: 629 B |
@ -20,7 +20,7 @@ export const generateMetadata = ({ params }: { params: { content: string } }) =>
|
|||||||
|
|
||||||
const mdxComponents: MDXComponents = {
|
const mdxComponents: MDXComponents = {
|
||||||
MdxNextImage: (props: { width: number; height: number; alt?: string; src: string }) => (
|
MdxNextImage: (props: { width: number; height: number; alt?: string; src: string }) => (
|
||||||
<Image width={props.width} height={props.height} src={props.src} alt={props.alt ?? ''} />
|
<Image {...props} alt={props.alt ?? ''} />
|
||||||
),
|
),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -1,16 +1,16 @@
|
|||||||
import { ImageResponse } from 'next/og';
|
import { ImageResponse } from 'next/server';
|
||||||
|
|
||||||
import { allBlogPosts } from 'contentlayer/generated';
|
import { allBlogPosts } from 'contentlayer/generated';
|
||||||
|
|
||||||
export const runtime = 'edge';
|
export const runtime = 'edge';
|
||||||
|
|
||||||
export const contentType = 'image/png';
|
export const size = {
|
||||||
|
|
||||||
export const IMAGE_SIZE = {
|
|
||||||
width: 1200,
|
width: 1200,
|
||||||
height: 630,
|
height: 630,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export const contentType = 'image/png';
|
||||||
|
|
||||||
type BlogPostOpenGraphImageProps = {
|
type BlogPostOpenGraphImageProps = {
|
||||||
params: { post: string };
|
params: { post: string };
|
||||||
};
|
};
|
||||||
@ -25,23 +25,23 @@ export default async function BlogPostOpenGraphImage({ params }: BlogPostOpenGra
|
|||||||
// The long urls are needed for a compiler optimisation on the Next.js side, lifting this up
|
// The long urls are needed for a compiler optimisation on the Next.js side, lifting this up
|
||||||
// to a constant will break og image generation.
|
// to a constant will break og image generation.
|
||||||
const [interBold, interRegular, backgroundImage, logoImage] = await Promise.all([
|
const [interBold, interRegular, backgroundImage, logoImage] = await Promise.all([
|
||||||
fetch(new URL('@documenso/assets/fonts/inter-bold.ttf', import.meta.url)).then(async (res) =>
|
fetch(new URL('./../../../../assets/inter-bold.ttf', import.meta.url)).then(async (res) =>
|
||||||
res.arrayBuffer(),
|
res.arrayBuffer(),
|
||||||
),
|
),
|
||||||
fetch(new URL('@documenso/assets/fonts/inter-regular.ttf', import.meta.url)).then(async (res) =>
|
fetch(new URL('./../../../../assets/inter-regular.ttf', import.meta.url)).then(async (res) =>
|
||||||
res.arrayBuffer(),
|
res.arrayBuffer(),
|
||||||
),
|
),
|
||||||
fetch(new URL('@documenso/assets/images/background-blog-og.png', import.meta.url)).then(
|
fetch(new URL('./../../../../assets/background-blog-og.png', import.meta.url)).then(
|
||||||
async (res) => res.arrayBuffer(),
|
async (res) => res.arrayBuffer(),
|
||||||
),
|
),
|
||||||
fetch(new URL('@documenso/assets/logo.png', import.meta.url)).then(async (res) =>
|
fetch(new URL('./../../../../../public/logo.png', import.meta.url)).then(async (res) =>
|
||||||
res.arrayBuffer(),
|
res.arrayBuffer(),
|
||||||
),
|
),
|
||||||
]);
|
]);
|
||||||
|
|
||||||
return new ImageResponse(
|
return new ImageResponse(
|
||||||
(
|
(
|
||||||
<div tw="relative h-full w-full flex flex-col items-center justify-center text-center bg-white">
|
<div tw="relative h-full w-full flex flex-col items-center justify-center text-center">
|
||||||
{/* @ts-expect-error Lack of typing from ImageResponse */}
|
{/* @ts-expect-error Lack of typing from ImageResponse */}
|
||||||
<img src={backgroundImage} alt="og-background" tw="absolute inset-0 w-full h-full" />
|
<img src={backgroundImage} alt="og-background" tw="absolute inset-0 w-full h-full" />
|
||||||
|
|
||||||
@ -56,7 +56,7 @@ export default async function BlogPostOpenGraphImage({ params }: BlogPostOpenGra
|
|||||||
</div>
|
</div>
|
||||||
),
|
),
|
||||||
{
|
{
|
||||||
...IMAGE_SIZE,
|
...size,
|
||||||
fonts: [
|
fonts: [
|
||||||
{
|
{
|
||||||
name: 'Inter',
|
name: 'Inter',
|
||||||
|
|||||||
@ -25,7 +25,7 @@ export const generateMetadata = ({ params }: { params: { post: string } }) => {
|
|||||||
|
|
||||||
const mdxComponents: MDXComponents = {
|
const mdxComponents: MDXComponents = {
|
||||||
MdxNextImage: (props: { width: number; height: number; alt?: string; src: string }) => (
|
MdxNextImage: (props: { width: number; height: number; alt?: string; src: string }) => (
|
||||||
<Image width={props.width} height={props.height} src={props.src} alt={props.alt ?? ''} />
|
<Image {...props} alt={props.alt ?? ''} />
|
||||||
),
|
),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -32,21 +32,10 @@ export default async function ClaimedPlanPage({ searchParams = {} }: ClaimedPlan
|
|||||||
}
|
}
|
||||||
|
|
||||||
const session = await stripe.checkout.sessions.retrieve(sessionId);
|
const session = await stripe.checkout.sessions.retrieve(sessionId);
|
||||||
const customerId = typeof session.customer === 'string' ? session.customer : session.customer?.id;
|
|
||||||
|
|
||||||
if (!customerId) {
|
|
||||||
redirect('/');
|
|
||||||
}
|
|
||||||
|
|
||||||
const customer = await stripe.customers.retrieve(customerId);
|
|
||||||
|
|
||||||
if (!customer || customer.deleted) {
|
|
||||||
redirect('/');
|
|
||||||
}
|
|
||||||
|
|
||||||
const user = await prisma.user.findFirst({
|
const user = await prisma.user.findFirst({
|
||||||
where: {
|
where: {
|
||||||
id: Number(customer.metadata.userId),
|
id: Number(session.client_reference_id),
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -176,7 +165,7 @@ export default async function ClaimedPlanPage({ searchParams = {} }: ClaimedPlan
|
|||||||
</p>
|
</p>
|
||||||
|
|
||||||
<Link
|
<Link
|
||||||
href={`${process.env.NEXT_PUBLIC_WEBAPP_URL}/signin`}
|
href={`${process.env.NEXT_PUBLIC_WEBAPP_URL}/login`}
|
||||||
target="_blank"
|
target="_blank"
|
||||||
className="mt-4 block"
|
className="mt-4 block"
|
||||||
>
|
>
|
||||||
|
|||||||
@ -2,8 +2,6 @@
|
|||||||
|
|
||||||
import React, { useEffect, useState } from 'react';
|
import React, { useEffect, useState } from 'react';
|
||||||
|
|
||||||
import { usePathname } from 'next/navigation';
|
|
||||||
|
|
||||||
import { cn } from '@documenso/ui/lib/utils';
|
import { cn } from '@documenso/ui/lib/utils';
|
||||||
|
|
||||||
import { Footer } from '~/components/(marketing)/footer';
|
import { Footer } from '~/components/(marketing)/footer';
|
||||||
@ -15,7 +13,6 @@ export type MarketingLayoutProps = {
|
|||||||
|
|
||||||
export default function MarketingLayout({ children }: MarketingLayoutProps) {
|
export default function MarketingLayout({ children }: MarketingLayoutProps) {
|
||||||
const [scrollY, setScrollY] = useState(0);
|
const [scrollY, setScrollY] = useState(0);
|
||||||
const pathname = usePathname();
|
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const onScroll = () => {
|
const onScroll = () => {
|
||||||
@ -28,11 +25,7 @@ export default function MarketingLayout({ children }: MarketingLayoutProps) {
|
|||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div
|
<div className="relative max-w-[100vw] overflow-y-auto overflow-x-hidden pt-20 md:pt-28">
|
||||||
className={cn('relative flex min-h-[100vh] max-w-[100vw] flex-col pt-20 md:pt-28', {
|
|
||||||
'overflow-y-auto overflow-x-hidden': pathname !== '/singleplayer',
|
|
||||||
})}
|
|
||||||
>
|
|
||||||
<div
|
<div
|
||||||
className={cn('fixed left-0 top-0 z-50 w-full bg-transparent', {
|
className={cn('fixed left-0 top-0 z-50 w-full bg-transparent', {
|
||||||
'bg-background/50 backdrop-blur-md': scrollY > 5,
|
'bg-background/50 backdrop-blur-md': scrollY > 5,
|
||||||
@ -41,7 +34,7 @@ export default function MarketingLayout({ children }: MarketingLayoutProps) {
|
|||||||
<Header className="mx-auto h-16 max-w-screen-xl px-4 md:h-20 lg:px-8" />
|
<Header className="mx-auto h-16 max-w-screen-xl px-4 md:h-20 lg:px-8" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="relative mx-auto max-w-screen-xl flex-1 px-4 lg:px-8">{children}</div>
|
<div className="relative mx-auto max-w-screen-xl px-4 lg:px-8">{children}</div>
|
||||||
|
|
||||||
<Footer className="bg-background border-muted mt-24 border-t" />
|
<Footer className="bg-background border-muted mt-24 border-t" />
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
'use client';
|
'use client';
|
||||||
|
|
||||||
import type { HTMLAttributes } from 'react';
|
import { HTMLAttributes } from 'react';
|
||||||
|
|
||||||
import { Bar, BarChart, ResponsiveContainer, Tooltip, XAxis, YAxis } from 'recharts';
|
import { Bar, BarChart, ResponsiveContainer, Tooltip, XAxis, YAxis } from 'recharts';
|
||||||
|
|
||||||
@ -24,6 +24,7 @@ export const BarMetric = <T extends Record<string, Record<keyof T[string], unkno
|
|||||||
label,
|
label,
|
||||||
chartHeight = 400,
|
chartHeight = 400,
|
||||||
extraInfo,
|
extraInfo,
|
||||||
|
...props
|
||||||
}: BarMetricProps<T>) => {
|
}: BarMetricProps<T>) => {
|
||||||
const formattedData = Object.keys(data)
|
const formattedData = Object.keys(data)
|
||||||
.map((key) => ({
|
.map((key) => ({
|
||||||
@ -33,34 +34,25 @@ export const BarMetric = <T extends Record<string, Record<keyof T[string], unkno
|
|||||||
.reverse();
|
.reverse();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={cn('flex flex-col', className)}>
|
<div className={cn('flex flex-col', className)} {...props}>
|
||||||
<div className="flex items-center px-4">
|
<div className="flex items-center px-4">
|
||||||
<h3 className="text-lg font-semibold">{title}</h3>
|
<h3 className="text-lg font-semibold">{title}</h3>
|
||||||
<span>{extraInfo}</span>
|
<span>{extraInfo}</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="border-border mt-2.5 flex flex-1 items-center justify-center rounded-2xl border p-6 pl-2 pt-12 shadow-sm hover:shadow">
|
<div className="border-border mt-2.5 flex flex-1 items-center justify-center rounded-2xl border pr-2 shadow-sm hover:shadow">
|
||||||
<ResponsiveContainer width="100%" height={chartHeight}>
|
<ResponsiveContainer width="100%" height={chartHeight}>
|
||||||
<BarChart data={formattedData}>
|
<BarChart data={formattedData} margin={{ top: 30, right: 20 }}>
|
||||||
<XAxis dataKey="month" />
|
<XAxis dataKey="month" />
|
||||||
<YAxis />
|
<YAxis />
|
||||||
<Tooltip
|
<Tooltip
|
||||||
labelStyle={{
|
|
||||||
color: 'hsl(var(--primary-foreground))',
|
|
||||||
}}
|
|
||||||
itemStyle={{
|
itemStyle={{
|
||||||
color: 'hsl(var(--primary-foreground))',
|
color: 'hsl(var(--primary-foreground))',
|
||||||
}}
|
}}
|
||||||
formatter={(value) => [Number(value), label]}
|
formatter={(value) => [Number(value), label]}
|
||||||
cursor={{ fill: 'hsl(var(--primary) / 10%)' }}
|
cursor={{ fill: 'hsl(var(--primary) / 10%)' }}
|
||||||
/>
|
/>
|
||||||
<Bar
|
<Bar dataKey={metricKey as string} fill="hsl(var(--primary))" label={label} />{' '}
|
||||||
dataKey={metricKey as string}
|
|
||||||
maxBarSize={60}
|
|
||||||
fill="hsl(var(--primary))"
|
|
||||||
label={label}
|
|
||||||
radius={[4, 4, 0, 0]}
|
|
||||||
/>
|
|
||||||
</BarChart>
|
</BarChart>
|
||||||
</ResponsiveContainer>
|
</ResponsiveContainer>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -1,7 +1,6 @@
|
|||||||
'use client';
|
'use client';
|
||||||
|
|
||||||
import type { HTMLAttributes } from 'react';
|
import { HTMLAttributes, useEffect, useState } from 'react';
|
||||||
import { useEffect, useState } from 'react';
|
|
||||||
|
|
||||||
import { Cell, Legend, Pie, PieChart, Tooltip } from 'recharts';
|
import { Cell, Legend, Pie, PieChart, Tooltip } from 'recharts';
|
||||||
|
|
||||||
@ -42,14 +41,14 @@ const renderCustomizedLabel = ({
|
|||||||
|
|
||||||
export type CapTableProps = HTMLAttributes<HTMLDivElement>;
|
export type CapTableProps = HTMLAttributes<HTMLDivElement>;
|
||||||
|
|
||||||
export const CapTable = ({ className }: CapTableProps) => {
|
export const CapTable = ({ className, ...props }: CapTableProps) => {
|
||||||
const [isSSR, setIsSSR] = useState(true);
|
const [isSSR, setIsSSR] = useState(true);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
setIsSSR(false);
|
setIsSSR(false);
|
||||||
}, []);
|
}, []);
|
||||||
return (
|
return (
|
||||||
<div className={cn('flex flex-col', className)}>
|
<div className={cn('flex flex-col', className)} {...props}>
|
||||||
<h3 className="px-4 text-lg font-semibold">Cap Table</h3>
|
<h3 className="px-4 text-lg font-semibold">Cap Table</h3>
|
||||||
|
|
||||||
<div className="border-border mt-2.5 flex flex-1 items-center justify-center rounded-2xl border shadow-sm hover:shadow">
|
<div className="border-border mt-2.5 flex flex-1 items-center justify-center rounded-2xl border shadow-sm hover:shadow">
|
||||||
@ -72,12 +71,12 @@ export const CapTable = ({ className }: CapTableProps) => {
|
|||||||
</Pie>
|
</Pie>
|
||||||
<Legend
|
<Legend
|
||||||
formatter={(value) => {
|
formatter={(value) => {
|
||||||
return <span className="text-foreground text-sm">{value}</span>;
|
return <span className="text-sm text-black">{value}</span>;
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
<Tooltip
|
<Tooltip
|
||||||
formatter={(percent: number, name, props) => {
|
formatter={(percent: number, name, props) => {
|
||||||
return [`${percent}%`, name || props.name || props.payload.name];
|
return [`${percent}%`, name || props['name'] || props['payload']['name']];
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</PieChart>
|
</PieChart>
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
'use client';
|
'use client';
|
||||||
|
|
||||||
import type { HTMLAttributes } from 'react';
|
import { HTMLAttributes } from 'react';
|
||||||
|
|
||||||
import { Bar, BarChart, ResponsiveContainer, Tooltip, XAxis, YAxis } from 'recharts';
|
import { Bar, BarChart, ResponsiveContainer, Tooltip, XAxis, YAxis } from 'recharts';
|
||||||
|
|
||||||
@ -11,17 +11,17 @@ export type FundingRaisedProps = HTMLAttributes<HTMLDivElement> & {
|
|||||||
data: Record<string, string | number>[];
|
data: Record<string, string | number>[];
|
||||||
};
|
};
|
||||||
|
|
||||||
export const FundingRaised = ({ className, data }: FundingRaisedProps) => {
|
export const FundingRaised = ({ className, data, ...props }: FundingRaisedProps) => {
|
||||||
const formattedData = data.map((item) => ({
|
const formattedData = data.map((item) => ({
|
||||||
amount: Number(item.amount),
|
amount: Number(item.amount),
|
||||||
date: formatMonth(item.date as string),
|
date: formatMonth(item.date as string),
|
||||||
}));
|
}));
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={cn('flex flex-col', className)}>
|
<div className={cn('flex flex-col', className)} {...props}>
|
||||||
<h3 className="px-4 text-lg font-semibold">Total Funding Raised</h3>
|
<h3 className="px-4 text-lg font-semibold">Total Funding Raised</h3>
|
||||||
|
|
||||||
<div className="border-border mt-2.5 flex flex-1 flex-col items-center justify-center rounded-2xl border p-6 pl-2 pt-12 shadow-sm hover:shadow">
|
<div className="border-border mt-2.5 flex flex-1 flex-col items-center justify-center rounded-2xl border p-4 shadow-sm hover:shadow">
|
||||||
<ResponsiveContainer width="100%" height={400}>
|
<ResponsiveContainer width="100%" height={400}>
|
||||||
<BarChart data={formattedData} margin={{ top: 40, right: 40, bottom: 20, left: 40 }}>
|
<BarChart data={formattedData} margin={{ top: 40, right: 40, bottom: 20, left: 40 }}>
|
||||||
<XAxis dataKey="date" />
|
<XAxis dataKey="date" />
|
||||||
@ -35,9 +35,6 @@ export const FundingRaised = ({ className, data }: FundingRaisedProps) => {
|
|||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
<Tooltip
|
<Tooltip
|
||||||
labelStyle={{
|
|
||||||
color: 'hsl(var(--primary-foreground))',
|
|
||||||
}}
|
|
||||||
itemStyle={{
|
itemStyle={{
|
||||||
color: 'hsl(var(--primary-foreground))',
|
color: 'hsl(var(--primary-foreground))',
|
||||||
}}
|
}}
|
||||||
@ -51,13 +48,7 @@ export const FundingRaised = ({ className, data }: FundingRaisedProps) => {
|
|||||||
]}
|
]}
|
||||||
cursor={{ fill: 'hsl(var(--primary) / 10%)' }}
|
cursor={{ fill: 'hsl(var(--primary) / 10%)' }}
|
||||||
/>
|
/>
|
||||||
<Bar
|
<Bar dataKey="amount" fill="hsl(var(--primary))" label="Amount Raised" />
|
||||||
dataKey="amount"
|
|
||||||
fill="hsl(var(--primary))"
|
|
||||||
label="Amount Raised"
|
|
||||||
maxBarSize={60}
|
|
||||||
radius={[4, 4, 0, 0]}
|
|
||||||
/>
|
|
||||||
</BarChart>
|
</BarChart>
|
||||||
</ResponsiveContainer>
|
</ResponsiveContainer>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import type { HTMLAttributes } from 'react';
|
import { HTMLAttributes } from 'react';
|
||||||
|
|
||||||
import { cn } from '@documenso/ui/lib/utils';
|
import { cn } from '@documenso/ui/lib/utils';
|
||||||
|
|
||||||
@ -7,9 +7,9 @@ export type MetricCardProps = HTMLAttributes<HTMLDivElement> & {
|
|||||||
value: string;
|
value: string;
|
||||||
};
|
};
|
||||||
|
|
||||||
export const MetricCard = ({ className, title, value }: MetricCardProps) => {
|
export const MetricCard = ({ className, title, value, ...props }: MetricCardProps) => {
|
||||||
return (
|
return (
|
||||||
<div className={cn('rounded-md border p-4 shadow-sm hover:shadow', className)}>
|
<div className={cn('rounded-md border p-4 shadow-sm hover:shadow', className)} {...props}>
|
||||||
<h4 className="text-muted-foreground text-sm font-medium">{title}</h4>
|
<h4 className="text-muted-foreground text-sm font-medium">{title}</h4>
|
||||||
|
|
||||||
<p className="mb-2 mt-6 text-4xl font-bold">{value}</p>
|
<p className="mb-2 mt-6 text-4xl font-bold">{value}</p>
|
||||||
|
|||||||
@ -1,51 +0,0 @@
|
|||||||
'use client';
|
|
||||||
|
|
||||||
import { DateTime } from 'luxon';
|
|
||||||
import { Bar, BarChart, ResponsiveContainer, Tooltip, XAxis, YAxis } from 'recharts';
|
|
||||||
|
|
||||||
import type { GetUserMonthlyGrowthResult } from '@documenso/lib/server-only/user/get-user-monthly-growth';
|
|
||||||
import { cn } from '@documenso/ui/lib/utils';
|
|
||||||
|
|
||||||
export type MonthlyNewUsersChartProps = {
|
|
||||||
className?: string;
|
|
||||||
data: GetUserMonthlyGrowthResult;
|
|
||||||
};
|
|
||||||
|
|
||||||
export const MonthlyNewUsersChart = ({ className, data }: MonthlyNewUsersChartProps) => {
|
|
||||||
const formattedData = [...data].reverse().map(({ month, count }) => {
|
|
||||||
return {
|
|
||||||
month: DateTime.fromFormat(month, 'yyyy-MM').toFormat('LLL'),
|
|
||||||
count: Number(count),
|
|
||||||
};
|
|
||||||
});
|
|
||||||
|
|
||||||
return (
|
|
||||||
<div className={cn('flex flex-col', className)}>
|
|
||||||
<div className="flex items-center px-4">
|
|
||||||
<h3 className="text-lg font-semibold">New Users</h3>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div className="border-border mt-2.5 flex flex-1 items-center justify-center rounded-2xl border p-6 pl-2 pt-12 shadow-sm hover:shadow">
|
|
||||||
<ResponsiveContainer width="100%" height={400}>
|
|
||||||
<BarChart data={formattedData}>
|
|
||||||
<XAxis dataKey="month" />
|
|
||||||
<YAxis />
|
|
||||||
|
|
||||||
<Tooltip
|
|
||||||
formatter={(value) => [Number(value).toLocaleString('en-US'), 'New Users']}
|
|
||||||
cursor={{ fill: 'hsl(var(--primary) / 10%)' }}
|
|
||||||
/>
|
|
||||||
|
|
||||||
<Bar
|
|
||||||
dataKey="count"
|
|
||||||
fill="hsl(var(--primary))"
|
|
||||||
radius={[4, 4, 0, 0]}
|
|
||||||
maxBarSize={60}
|
|
||||||
label="New Users"
|
|
||||||
/>
|
|
||||||
</BarChart>
|
|
||||||
</ResponsiveContainer>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
@ -1,51 +0,0 @@
|
|||||||
'use client';
|
|
||||||
|
|
||||||
import { DateTime } from 'luxon';
|
|
||||||
import { Bar, BarChart, ResponsiveContainer, Tooltip, XAxis, YAxis } from 'recharts';
|
|
||||||
|
|
||||||
import type { GetUserMonthlyGrowthResult } from '@documenso/lib/server-only/user/get-user-monthly-growth';
|
|
||||||
import { cn } from '@documenso/ui/lib/utils';
|
|
||||||
|
|
||||||
export type MonthlyTotalUsersChartProps = {
|
|
||||||
className?: string;
|
|
||||||
data: GetUserMonthlyGrowthResult;
|
|
||||||
};
|
|
||||||
|
|
||||||
export const MonthlyTotalUsersChart = ({ className, data }: MonthlyTotalUsersChartProps) => {
|
|
||||||
const formattedData = [...data].reverse().map(({ month, cume_count: count }) => {
|
|
||||||
return {
|
|
||||||
month: DateTime.fromFormat(month, 'yyyy-MM').toFormat('LLL'),
|
|
||||||
count: Number(count),
|
|
||||||
};
|
|
||||||
});
|
|
||||||
|
|
||||||
return (
|
|
||||||
<div className={cn('flex flex-col', className)}>
|
|
||||||
<div className="flex items-center px-4">
|
|
||||||
<h3 className="text-lg font-semibold">Total Users</h3>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div className="border-border mt-2.5 flex flex-1 items-center justify-center rounded-2xl border p-6 pl-2 pt-12 shadow-sm hover:shadow">
|
|
||||||
<ResponsiveContainer width="100%" height={400}>
|
|
||||||
<BarChart data={formattedData}>
|
|
||||||
<XAxis dataKey="month" />
|
|
||||||
<YAxis />
|
|
||||||
|
|
||||||
<Tooltip
|
|
||||||
formatter={(value) => [Number(value).toLocaleString('en-US'), 'Total Users']}
|
|
||||||
cursor={{ fill: 'hsl(var(--primary) / 10%)' }}
|
|
||||||
/>
|
|
||||||
|
|
||||||
<Bar
|
|
||||||
dataKey="count"
|
|
||||||
fill="hsl(var(--primary))"
|
|
||||||
radius={[4, 4, 0, 0]}
|
|
||||||
maxBarSize={60}
|
|
||||||
label="Total Users"
|
|
||||||
/>
|
|
||||||
</BarChart>
|
|
||||||
</ResponsiveContainer>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
@ -1,7 +1,5 @@
|
|||||||
import { z } from 'zod';
|
import { z } from 'zod';
|
||||||
|
|
||||||
import { getUserMonthlyGrowth } from '@documenso/lib/server-only/user/get-user-monthly-growth';
|
|
||||||
|
|
||||||
import { FUNDING_RAISED } from '~/app/(marketing)/open/data';
|
import { FUNDING_RAISED } from '~/app/(marketing)/open/data';
|
||||||
import { MetricCard } from '~/app/(marketing)/open/metric-card';
|
import { MetricCard } from '~/app/(marketing)/open/metric-card';
|
||||||
import { SalaryBands } from '~/app/(marketing)/open/salary-bands';
|
import { SalaryBands } from '~/app/(marketing)/open/salary-bands';
|
||||||
@ -9,23 +7,11 @@ import { SalaryBands } from '~/app/(marketing)/open/salary-bands';
|
|||||||
import { BarMetric } from './bar-metrics';
|
import { BarMetric } from './bar-metrics';
|
||||||
import { CapTable } from './cap-table';
|
import { CapTable } from './cap-table';
|
||||||
import { FundingRaised } from './funding-raised';
|
import { FundingRaised } from './funding-raised';
|
||||||
import { MonthlyNewUsersChart } from './monthly-new-users-chart';
|
|
||||||
import { MonthlyTotalUsersChart } from './monthly-total-users-chart';
|
|
||||||
import { TeamMembers } from './team-members';
|
import { TeamMembers } from './team-members';
|
||||||
import { OpenPageTooltip } from './tooltip';
|
import { OpenPageTooltip } from './tooltip';
|
||||||
|
|
||||||
export const revalidate = 3600;
|
export const revalidate = 3600;
|
||||||
|
|
||||||
export const dynamic = 'force-dynamic';
|
|
||||||
|
|
||||||
const GITHUB_HEADERS: Record<string, string> = {
|
|
||||||
accept: 'application/vnd.github.v3+json',
|
|
||||||
};
|
|
||||||
|
|
||||||
if (process.env.NEXT_PRIVATE_GITHUB_TOKEN) {
|
|
||||||
GITHUB_HEADERS.authorization = `Bearer ${process.env.NEXT_PRIVATE_GITHUB_TOKEN}`;
|
|
||||||
}
|
|
||||||
|
|
||||||
const ZGithubStatsResponse = z.object({
|
const ZGithubStatsResponse = z.object({
|
||||||
stargazers_count: z.number(),
|
stargazers_count: z.number(),
|
||||||
forks_count: z.number(),
|
forks_count: z.number(),
|
||||||
@ -36,10 +22,6 @@ const ZMergedPullRequestsResponse = z.object({
|
|||||||
total_count: z.number(),
|
total_count: z.number(),
|
||||||
});
|
});
|
||||||
|
|
||||||
const ZOpenIssuesResponse = z.object({
|
|
||||||
total_count: z.number(),
|
|
||||||
});
|
|
||||||
|
|
||||||
const ZStargazersLiveResponse = z.record(
|
const ZStargazersLiveResponse = z.record(
|
||||||
z.object({
|
z.object({
|
||||||
stars: z.number(),
|
stars: z.number(),
|
||||||
@ -60,78 +42,45 @@ const ZEarlyAdoptersResponse = z.record(
|
|||||||
export type StargazersType = z.infer<typeof ZStargazersLiveResponse>;
|
export type StargazersType = z.infer<typeof ZStargazersLiveResponse>;
|
||||||
export type EarlyAdoptersType = z.infer<typeof ZEarlyAdoptersResponse>;
|
export type EarlyAdoptersType = z.infer<typeof ZEarlyAdoptersResponse>;
|
||||||
|
|
||||||
const fetchGithubStats = async () => {
|
export default async function OpenPage() {
|
||||||
return await fetch('https://api.github.com/repos/documenso/documenso', {
|
const {
|
||||||
|
forks_count: forksCount,
|
||||||
|
open_issues: openIssues,
|
||||||
|
stargazers_count: stargazersCount,
|
||||||
|
} = await fetch('https://api.github.com/repos/documenso/documenso', {
|
||||||
headers: {
|
headers: {
|
||||||
...GITHUB_HEADERS,
|
accept: 'application/vnd.github.v3+json',
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
.then(async (res) => res.json())
|
.then(async (res) => res.json())
|
||||||
.then((res) => ZGithubStatsResponse.parse(res));
|
.then((res) => ZGithubStatsResponse.parse(res));
|
||||||
};
|
|
||||||
|
|
||||||
const fetchOpenIssues = async () => {
|
const { total_count: mergedPullRequests } = await fetch(
|
||||||
return await fetch(
|
|
||||||
'https://api.github.com/search/issues?q=repo:documenso/documenso+type:issue+state:open&page=0&per_page=1',
|
|
||||||
{
|
|
||||||
headers: {
|
|
||||||
...GITHUB_HEADERS,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
)
|
|
||||||
.then(async (res) => res.json())
|
|
||||||
.then((res) => ZOpenIssuesResponse.parse(res));
|
|
||||||
};
|
|
||||||
|
|
||||||
const fetchMergedPullRequests = async () => {
|
|
||||||
return await fetch(
|
|
||||||
'https://api.github.com/search/issues?q=repo:documenso/documenso/+is:pr+merged:>=2010-01-01&page=0&per_page=1',
|
'https://api.github.com/search/issues?q=repo:documenso/documenso/+is:pr+merged:>=2010-01-01&page=0&per_page=1',
|
||||||
{
|
{
|
||||||
headers: {
|
headers: {
|
||||||
...GITHUB_HEADERS,
|
accept: 'application/vnd.github.v3+json',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
.then(async (res) => res.json())
|
.then(async (res) => res.json())
|
||||||
.then((res) => ZMergedPullRequestsResponse.parse(res));
|
.then((res) => ZMergedPullRequestsResponse.parse(res));
|
||||||
};
|
|
||||||
|
|
||||||
const fetchStargazers = async () => {
|
const STARGAZERS_DATA = await fetch('https://stargrazer-live.onrender.com/api/stats', {
|
||||||
return await fetch('https://stargrazer-live.onrender.com/api/stats', {
|
|
||||||
headers: {
|
headers: {
|
||||||
accept: 'application/json',
|
accept: 'application/json',
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
.then(async (res) => res.json())
|
.then(async (res) => res.json())
|
||||||
.then((res) => ZStargazersLiveResponse.parse(res));
|
.then((res) => ZStargazersLiveResponse.parse(res));
|
||||||
};
|
|
||||||
|
|
||||||
const fetchEarlyAdopters = async () => {
|
const EARLY_ADOPTERS_DATA = await fetch('https://stargrazer-live.onrender.com/api/stats/stripe', {
|
||||||
return await fetch('https://stargrazer-live.onrender.com/api/stats/stripe', {
|
|
||||||
headers: {
|
headers: {
|
||||||
accept: 'application/json',
|
accept: 'application/json',
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
.then(async (res) => res.json())
|
.then(async (res) => res.json())
|
||||||
.then((res) => ZEarlyAdoptersResponse.parse(res));
|
.then((res) => ZEarlyAdoptersResponse.parse(res));
|
||||||
};
|
|
||||||
|
|
||||||
export default async function OpenPage() {
|
|
||||||
const [
|
|
||||||
{ forks_count: forksCount, stargazers_count: stargazersCount },
|
|
||||||
{ total_count: openIssues },
|
|
||||||
{ total_count: mergedPullRequests },
|
|
||||||
STARGAZERS_DATA,
|
|
||||||
EARLY_ADOPTERS_DATA,
|
|
||||||
] = await Promise.all([
|
|
||||||
fetchGithubStats(),
|
|
||||||
fetchOpenIssues(),
|
|
||||||
fetchMergedPullRequests(),
|
|
||||||
fetchStargazers(),
|
|
||||||
fetchEarlyAdopters(),
|
|
||||||
]);
|
|
||||||
|
|
||||||
const MONTHLY_USERS = await getUserMonthlyGrowth();
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="mx-auto mt-6 max-w-screen-lg sm:mt-12">
|
<div className="mx-auto mt-6 max-w-screen-lg sm:mt-12">
|
||||||
@ -141,12 +90,7 @@ export default async function OpenPage() {
|
|||||||
<p className="text-muted-foreground mt-4 max-w-[60ch] text-center text-lg leading-normal">
|
<p className="text-muted-foreground mt-4 max-w-[60ch] text-center text-lg leading-normal">
|
||||||
All our metrics, finances, and learnings are public. We believe in transparency and want
|
All our metrics, finances, and learnings are public. We believe in transparency and want
|
||||||
to share our journey with you. You can read more about why here:{' '}
|
to share our journey with you. You can read more about why here:{' '}
|
||||||
<a
|
<a className="font-bold" href="https://documenso.com/blog/pre-seed" target="_blank">
|
||||||
className="font-bold"
|
|
||||||
href="https://documenso.com/blog/pre-seed"
|
|
||||||
target="_blank"
|
|
||||||
rel="noreferrer"
|
|
||||||
>
|
|
||||||
Announcing Open Metrics
|
Announcing Open Metrics
|
||||||
</a>
|
</a>
|
||||||
</p>
|
</p>
|
||||||
@ -178,7 +122,7 @@ export default async function OpenPage() {
|
|||||||
|
|
||||||
<TeamMembers className="col-span-12" />
|
<TeamMembers className="col-span-12" />
|
||||||
|
|
||||||
<SalaryBands className="col-span-12" />
|
<SalaryBands className="col-span-12 lg:col-span-6" />
|
||||||
|
|
||||||
<FundingRaised data={FUNDING_RAISED} className="col-span-12 lg:col-span-6" />
|
<FundingRaised data={FUNDING_RAISED} className="col-span-12 lg:col-span-6" />
|
||||||
|
|
||||||
@ -228,9 +172,6 @@ export default async function OpenPage() {
|
|||||||
className="col-span-12 lg:col-span-6"
|
className="col-span-12 lg:col-span-6"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<MonthlyTotalUsersChart data={MONTHLY_USERS} className="col-span-12 lg:col-span-6" />
|
|
||||||
<MonthlyNewUsersChart data={MONTHLY_USERS} className="col-span-12 lg:col-span-6" />
|
|
||||||
|
|
||||||
<div className="col-span-12 mt-12 flex flex-col items-center justify-center">
|
<div className="col-span-12 mt-12 flex flex-col items-center justify-center">
|
||||||
<h2 className="text-2xl font-bold">Where's the rest?</h2>
|
<h2 className="text-2xl font-bold">Where's the rest?</h2>
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import type { HTMLAttributes } from 'react';
|
import { HTMLAttributes } from 'react';
|
||||||
|
|
||||||
import { cn } from '@documenso/ui/lib/utils';
|
import { cn } from '@documenso/ui/lib/utils';
|
||||||
import {
|
import {
|
||||||
@ -14,9 +14,9 @@ import { SALARY_BANDS } from '~/app/(marketing)/open/data';
|
|||||||
|
|
||||||
export type SalaryBandsProps = HTMLAttributes<HTMLDivElement>;
|
export type SalaryBandsProps = HTMLAttributes<HTMLDivElement>;
|
||||||
|
|
||||||
export const SalaryBands = ({ className }: SalaryBandsProps) => {
|
export const SalaryBands = ({ className, ...props }: SalaryBandsProps) => {
|
||||||
return (
|
return (
|
||||||
<div className={cn('flex flex-col', className)}>
|
<div className={cn('flex flex-col', className)} {...props}>
|
||||||
<h3 className="px-4 text-lg font-semibold">Global Salary Bands</h3>
|
<h3 className="px-4 text-lg font-semibold">Global Salary Bands</h3>
|
||||||
|
|
||||||
<div className="border-border mt-2.5 flex-1 rounded-2xl border shadow-sm hover:shadow">
|
<div className="border-border mt-2.5 flex-1 rounded-2xl border shadow-sm hover:shadow">
|
||||||
@ -30,7 +30,7 @@ export const SalaryBands = ({ className }: SalaryBandsProps) => {
|
|||||||
</TableHeader>
|
</TableHeader>
|
||||||
<TableBody>
|
<TableBody>
|
||||||
{SALARY_BANDS.map((band, index) => (
|
{SALARY_BANDS.map((band, index) => (
|
||||||
<TableRow key={band.title + index.toString()}>
|
<TableRow key={index}>
|
||||||
<TableCell className="font-medium">{band.title}</TableCell>
|
<TableCell className="font-medium">{band.title}</TableCell>
|
||||||
<TableCell>{band.seniority}</TableCell>
|
<TableCell>{band.seniority}</TableCell>
|
||||||
<TableCell className="text-right">
|
<TableCell className="text-right">
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import type { HTMLAttributes } from 'react';
|
import { HTMLAttributes } from 'react';
|
||||||
|
|
||||||
import { cn } from '@documenso/ui/lib/utils';
|
import { cn } from '@documenso/ui/lib/utils';
|
||||||
import {
|
import {
|
||||||
@ -14,9 +14,9 @@ import { TEAM_MEMBERS } from './data';
|
|||||||
|
|
||||||
export type TeamMembersProps = HTMLAttributes<HTMLDivElement>;
|
export type TeamMembersProps = HTMLAttributes<HTMLDivElement>;
|
||||||
|
|
||||||
export const TeamMembers = ({ className }: TeamMembersProps) => {
|
export const TeamMembers = ({ className, ...props }: TeamMembersProps) => {
|
||||||
return (
|
return (
|
||||||
<div className={cn('flex flex-col', className)}>
|
<div className={cn('flex flex-col', className)} {...props}>
|
||||||
<h2 className="px-4 text-2xl font-semibold">Team</h2>
|
<h2 className="px-4 text-2xl font-semibold">Team</h2>
|
||||||
|
|
||||||
<div className="border-border mt-2.5 flex-1 rounded-2xl border shadow-sm hover:shadow">
|
<div className="border-border mt-2.5 flex-1 rounded-2xl border shadow-sm hover:shadow">
|
||||||
|
|||||||
@ -23,13 +23,16 @@ export function OpenPageTooltip() {
|
|||||||
<path
|
<path
|
||||||
d="M7.49991 0.876892C3.84222 0.876892 0.877075 3.84204 0.877075 7.49972C0.877075 11.1574 3.84222 14.1226 7.49991 14.1226C11.1576 14.1226 14.1227 11.1574 14.1227 7.49972C14.1227 3.84204 11.1576 0.876892 7.49991 0.876892ZM1.82707 7.49972C1.82707 4.36671 4.36689 1.82689 7.49991 1.82689C10.6329 1.82689 13.1727 4.36671 13.1727 7.49972C13.1727 10.6327 10.6329 13.1726 7.49991 13.1726C4.36689 13.1726 1.82707 10.6327 1.82707 7.49972ZM8.24992 4.49999C8.24992 4.9142 7.91413 5.24999 7.49992 5.24999C7.08571 5.24999 6.74992 4.9142 6.74992 4.49999C6.74992 4.08577 7.08571 3.74999 7.49992 3.74999C7.91413 3.74999 8.24992 4.08577 8.24992 4.49999ZM6.00003 5.99999H6.50003H7.50003C7.77618 5.99999 8.00003 6.22384 8.00003 6.49999V9.99999H8.50003H9.00003V11H8.50003H7.50003H6.50003H6.00003V9.99999H6.50003H7.00003V6.99999H6.50003H6.00003V5.99999Z"
|
d="M7.49991 0.876892C3.84222 0.876892 0.877075 3.84204 0.877075 7.49972C0.877075 11.1574 3.84222 14.1226 7.49991 14.1226C11.1576 14.1226 14.1227 11.1574 14.1227 7.49972C14.1227 3.84204 11.1576 0.876892 7.49991 0.876892ZM1.82707 7.49972C1.82707 4.36671 4.36689 1.82689 7.49991 1.82689C10.6329 1.82689 13.1727 4.36671 13.1727 7.49972C13.1727 10.6327 10.6329 13.1726 7.49991 13.1726C4.36689 13.1726 1.82707 10.6327 1.82707 7.49972ZM8.24992 4.49999C8.24992 4.9142 7.91413 5.24999 7.49992 5.24999C7.08571 5.24999 6.74992 4.9142 6.74992 4.49999C6.74992 4.08577 7.08571 3.74999 7.49992 3.74999C7.91413 3.74999 8.24992 4.08577 8.24992 4.49999ZM6.00003 5.99999H6.50003H7.50003C7.77618 5.99999 8.00003 6.22384 8.00003 6.49999V9.99999H8.50003H9.00003V11H8.50003H7.50003H6.50003H6.00003V9.99999H6.50003H7.00003V6.99999H6.50003H6.00003V5.99999Z"
|
||||||
fill="currentColor"
|
fill="currentColor"
|
||||||
fillRule="evenodd"
|
fill-rule="evenodd"
|
||||||
clipRule="evenodd"
|
clip-rule="evenodd"
|
||||||
></path>
|
></path>
|
||||||
</svg>
|
</svg>
|
||||||
</TooltipTrigger>
|
</TooltipTrigger>
|
||||||
<TooltipContent>
|
<TooltipContent>
|
||||||
<p>Active Subscriptions.</p>
|
<p>
|
||||||
|
August and earlier: Active subscribers. September and beyond: Numbers of active
|
||||||
|
subscriptions.
|
||||||
|
</p>
|
||||||
</TooltipContent>
|
</TooltipContent>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
</TooltipProvider>
|
</TooltipProvider>
|
||||||
|
|||||||
@ -2,7 +2,7 @@ import Image from 'next/image';
|
|||||||
|
|
||||||
import { z } from 'zod';
|
import { z } from 'zod';
|
||||||
|
|
||||||
import backgroundPattern from '@documenso/assets/images/background-pattern.png';
|
import backgroundPattern from '~/assets/background-pattern.png';
|
||||||
|
|
||||||
import { OSSFriendsContainer } from './container';
|
import { OSSFriendsContainer } from './container';
|
||||||
import { TOSSFriendsSchema, ZOSSFriendsSchema } from './schema';
|
import { TOSSFriendsSchema, ZOSSFriendsSchema } from './schema';
|
||||||
|
|||||||
@ -1,5 +1,3 @@
|
|||||||
'use client';
|
|
||||||
|
|
||||||
import Link from 'next/link';
|
import Link from 'next/link';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
@ -8,7 +6,6 @@ import {
|
|||||||
AccordionItem,
|
AccordionItem,
|
||||||
AccordionTrigger,
|
AccordionTrigger,
|
||||||
} from '@documenso/ui/primitives/accordion';
|
} from '@documenso/ui/primitives/accordion';
|
||||||
import { Button } from '@documenso/ui/primitives/button';
|
|
||||||
|
|
||||||
import { PricingTable } from '~/components/(marketing)/pricing-table';
|
import { PricingTable } from '~/components/(marketing)/pricing-table';
|
||||||
|
|
||||||
@ -37,26 +34,6 @@ export default function PricingPage() {
|
|||||||
<PricingTable />
|
<PricingTable />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="mx-auto mt-36 max-w-2xl">
|
|
||||||
<h2 className="text-center text-2xl font-semibold">
|
|
||||||
None of these work for you? Try self-hosting!
|
|
||||||
</h2>
|
|
||||||
|
|
||||||
<p className="text-muted-foreground mt-4 text-center leading-relaxed">
|
|
||||||
Our self-hosted option is great for small teams and individuals who need a simple
|
|
||||||
solution. You can use our docker based setup to get started in minutes. Take control with
|
|
||||||
full customizability and data ownership.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<div className="mt-4 flex justify-center">
|
|
||||||
<Button variant="outline" size="lg" className="rounded-full hover:cursor-pointer" asChild>
|
|
||||||
<Link href="https://github.com/documenso/documenso" target="_blank">
|
|
||||||
Get Started
|
|
||||||
</Link>
|
|
||||||
</Button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div className="mx-auto mt-36 max-w-2xl">
|
<div className="mx-auto mt-36 max-w-2xl">
|
||||||
{/* FAQ Section */}
|
{/* FAQ Section */}
|
||||||
|
|
||||||
@ -119,10 +96,10 @@ export default function PricingPage() {
|
|||||||
and join our{' '}
|
and join our{' '}
|
||||||
<Link
|
<Link
|
||||||
className="text-documenso-700 font-bold"
|
className="text-documenso-700 font-bold"
|
||||||
href="https://documen.so/discord"
|
href="https://join.slack.com/t/documenso/shared_invite/zt-1vibm8txi-DqsDFtdp44Hn2H5lc~RpPQ"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
>
|
>
|
||||||
Discord Community
|
Slack Community
|
||||||
</Link>{' '}
|
</Link>{' '}
|
||||||
to keep up to date, on what the current priorities are. In any case, we are an open
|
to keep up to date, on what the current priorities are. In any case, we are an open
|
||||||
community and welcome all input, technical and non-technical ❤️
|
community and welcome all input, technical and non-technical ❤️
|
||||||
@ -170,10 +147,10 @@ export default function PricingPage() {
|
|||||||
or{' '}
|
or{' '}
|
||||||
<a
|
<a
|
||||||
className="text-documenso-700 font-bold"
|
className="text-documenso-700 font-bold"
|
||||||
href="https://documen.so/discord"
|
href="https://join.slack.com/t/documenso/shared_invite/zt-1vibm8txi-DqsDFtdp44Hn2H5lc~RpPQ"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
>
|
>
|
||||||
in our Discord-Support-Channel
|
in our Slack-Support-Channel
|
||||||
</a>{' '}
|
</a>{' '}
|
||||||
please message either Lucas or Timur to get added to the channel if you are not
|
please message either Lucas or Timur to get added to the channel if you are not
|
||||||
already a member.
|
already a member.
|
||||||
|
|||||||
@ -1,7 +1,6 @@
|
|||||||
import { notFound } from 'next/navigation';
|
import { notFound } from 'next/navigation';
|
||||||
|
|
||||||
import { getDocumentAndRecipientByToken } from '@documenso/lib/server-only/document/get-document-by-token';
|
import { getDocumentAndRecipientByToken } from '@documenso/lib/server-only/document/get-document-by-token';
|
||||||
import { getRecipientSignatures } from '@documenso/lib/server-only/recipient/get-recipient-signatures';
|
|
||||||
import { DocumentStatus } from '@documenso/prisma/client';
|
import { DocumentStatus } from '@documenso/prisma/client';
|
||||||
|
|
||||||
import { SinglePlayerModeSuccess } from '~/components/(marketing)/single-player-mode/single-player-mode-success';
|
import { SinglePlayerModeSuccess } from '~/components/(marketing)/single-player-mode/single-player-mode-success';
|
||||||
@ -27,7 +26,5 @@ export default async function SinglePlayerModeSuccessPage({
|
|||||||
return notFound();
|
return notFound();
|
||||||
}
|
}
|
||||||
|
|
||||||
const signatures = await getRecipientSignatures({ recipientId: document.Recipient.id });
|
return <SinglePlayerModeSuccess document={document} />;
|
||||||
|
|
||||||
return <SinglePlayerModeSuccess document={document} signatures={signatures} />;
|
|
||||||
}
|
}
|
||||||
@ -8,28 +8,26 @@ import { useRouter } from 'next/navigation';
|
|||||||
import { useAnalytics } from '@documenso/lib/client-only/hooks/use-analytics';
|
import { useAnalytics } from '@documenso/lib/client-only/hooks/use-analytics';
|
||||||
import { base64 } from '@documenso/lib/universal/base64';
|
import { base64 } from '@documenso/lib/universal/base64';
|
||||||
import { putFile } from '@documenso/lib/universal/upload/put-file';
|
import { putFile } from '@documenso/lib/universal/upload/put-file';
|
||||||
import type { Field, Recipient } from '@documenso/prisma/client';
|
import { Field, Prisma, Recipient } from '@documenso/prisma/client';
|
||||||
import { DocumentDataType, Prisma } from '@documenso/prisma/client';
|
|
||||||
import { trpc } from '@documenso/trpc/react';
|
|
||||||
import { Card, CardContent } from '@documenso/ui/primitives/card';
|
import { Card, CardContent } from '@documenso/ui/primitives/card';
|
||||||
import { DocumentDropzone } from '@documenso/ui/primitives/document-dropzone';
|
import { DocumentDropzone } from '@documenso/ui/primitives/document-dropzone';
|
||||||
import { AddFieldsFormPartial } from '@documenso/ui/primitives/document-flow/add-fields';
|
import { AddFieldsFormPartial } from '@documenso/ui/primitives/document-flow/add-fields';
|
||||||
import type { TAddFieldsFormSchema } from '@documenso/ui/primitives/document-flow/add-fields.types';
|
import { TAddFieldsFormSchema } from '@documenso/ui/primitives/document-flow/add-fields.types';
|
||||||
import { AddSignatureFormPartial } from '@documenso/ui/primitives/document-flow/add-signature';
|
import { AddSignatureFormPartial } from '@documenso/ui/primitives/document-flow/add-signature';
|
||||||
import type { TAddSignatureFormSchema } from '@documenso/ui/primitives/document-flow/add-signature.types';
|
import { TAddSignatureFormSchema } from '@documenso/ui/primitives/document-flow/add-signature.types';
|
||||||
import { DocumentFlowFormContainer } from '@documenso/ui/primitives/document-flow/document-flow-root';
|
import {
|
||||||
import type { DocumentFlowStep } from '@documenso/ui/primitives/document-flow/types';
|
DocumentFlowFormContainer,
|
||||||
|
DocumentFlowFormContainerHeader,
|
||||||
|
} from '@documenso/ui/primitives/document-flow/document-flow-root';
|
||||||
|
import { DocumentFlowStep } from '@documenso/ui/primitives/document-flow/types';
|
||||||
import { LazyPDFViewer } from '@documenso/ui/primitives/lazy-pdf-viewer';
|
import { LazyPDFViewer } from '@documenso/ui/primitives/lazy-pdf-viewer';
|
||||||
import { Stepper } from '@documenso/ui/primitives/stepper';
|
|
||||||
import { useToast } from '@documenso/ui/primitives/use-toast';
|
import { useToast } from '@documenso/ui/primitives/use-toast';
|
||||||
|
|
||||||
const SinglePlayerModeSteps = ['fields', 'sign'] as const;
|
import { createSinglePlayerDocument } from '~/components/(marketing)/single-player-mode/create-single-player-document.action';
|
||||||
type SinglePlayerModeStep = (typeof SinglePlayerModeSteps)[number];
|
|
||||||
|
|
||||||
// !: This entire file is a hack to get around failed prerendering of
|
type SinglePlayerModeStep = 'fields' | 'sign';
|
||||||
// !: the Single Player Mode page. This regression was introduced during
|
|
||||||
// !: the upgrade of Next.js to v13.5.x.
|
export default function SinglePlayerModePage() {
|
||||||
export const SinglePlayerClient = () => {
|
|
||||||
const analytics = useAnalytics();
|
const analytics = useAnalytics();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
|
||||||
@ -40,9 +38,6 @@ export const SinglePlayerClient = () => {
|
|||||||
const [step, setStep] = useState<SinglePlayerModeStep>('fields');
|
const [step, setStep] = useState<SinglePlayerModeStep>('fields');
|
||||||
const [fields, setFields] = useState<Field[]>([]);
|
const [fields, setFields] = useState<Field[]>([]);
|
||||||
|
|
||||||
const { mutateAsync: createSinglePlayerDocument } =
|
|
||||||
trpc.singleplayer.createSinglePlayerDocument.useMutation();
|
|
||||||
|
|
||||||
const documentFlow: Record<SinglePlayerModeStep, DocumentFlowStep> = {
|
const documentFlow: Record<SinglePlayerModeStep, DocumentFlowStep> = {
|
||||||
fields: {
|
fields: {
|
||||||
title: 'Add document',
|
title: 'Add document',
|
||||||
@ -86,7 +81,6 @@ export const SinglePlayerClient = () => {
|
|||||||
data.fields.map((field, i) => ({
|
data.fields.map((field, i) => ({
|
||||||
id: i,
|
id: i,
|
||||||
documentId: -1,
|
documentId: -1,
|
||||||
templateId: null,
|
|
||||||
recipientId: -1,
|
recipientId: -1,
|
||||||
type: field.type,
|
type: field.type,
|
||||||
page: field.pageNumber,
|
page: field.pageNumber,
|
||||||
@ -136,7 +130,7 @@ export const SinglePlayerClient = () => {
|
|||||||
signer: data.email,
|
signer: data.email,
|
||||||
});
|
});
|
||||||
|
|
||||||
router.push(`/singleplayer/${documentToken}/success`);
|
router.push(`/single-player-mode/${documentToken}/success`);
|
||||||
} catch {
|
} catch {
|
||||||
toast({
|
toast({
|
||||||
title: 'Something went wrong',
|
title: 'Something went wrong',
|
||||||
@ -149,7 +143,6 @@ export const SinglePlayerClient = () => {
|
|||||||
const placeholderRecipient: Recipient = {
|
const placeholderRecipient: Recipient = {
|
||||||
id: -1,
|
id: -1,
|
||||||
documentId: -1,
|
documentId: -1,
|
||||||
templateId: null,
|
|
||||||
email: '',
|
email: '',
|
||||||
name: '',
|
name: '',
|
||||||
token: '',
|
token: '',
|
||||||
@ -163,11 +156,11 @@ export const SinglePlayerClient = () => {
|
|||||||
const onFileDrop = async (file: File) => {
|
const onFileDrop = async (file: File) => {
|
||||||
try {
|
try {
|
||||||
const arrayBuffer = await file.arrayBuffer();
|
const arrayBuffer = await file.arrayBuffer();
|
||||||
const fileBase64 = base64.encode(new Uint8Array(arrayBuffer));
|
const base64String = base64.encode(new Uint8Array(arrayBuffer));
|
||||||
|
|
||||||
setUploadedFile({
|
setUploadedFile({
|
||||||
file,
|
file,
|
||||||
fileBase64,
|
fileBase64: `data:application/pdf;base64,${base64String}`,
|
||||||
});
|
});
|
||||||
|
|
||||||
analytics.capture('Marketing: SPM - Document uploaded');
|
analytics.capture('Marketing: SPM - Document uploaded');
|
||||||
@ -186,15 +179,7 @@ export const SinglePlayerClient = () => {
|
|||||||
<h1 className="text-3xl font-bold lg:text-5xl">Single Player Mode</h1>
|
<h1 className="text-3xl font-bold lg:text-5xl">Single Player Mode</h1>
|
||||||
|
|
||||||
<p className="text-foreground mx-auto mt-4 max-w-[50ch] text-lg leading-normal">
|
<p className="text-foreground mx-auto mt-4 max-w-[50ch] text-lg leading-normal">
|
||||||
Create a{' '}
|
View our{' '}
|
||||||
<Link
|
|
||||||
href={`${process.env.NEXT_PUBLIC_WEBAPP_URL}/signup`}
|
|
||||||
target="_blank"
|
|
||||||
className="hover:text-foreground/80 font-semibold transition-colors"
|
|
||||||
>
|
|
||||||
free account
|
|
||||||
</Link>{' '}
|
|
||||||
or view our{' '}
|
|
||||||
<Link
|
<Link
|
||||||
href={'/pricing'}
|
href={'/pricing'}
|
||||||
target="_blank"
|
target="_blank"
|
||||||
@ -211,14 +196,7 @@ export const SinglePlayerClient = () => {
|
|||||||
{uploadedFile ? (
|
{uploadedFile ? (
|
||||||
<Card gradient>
|
<Card gradient>
|
||||||
<CardContent className="p-2">
|
<CardContent className="p-2">
|
||||||
<LazyPDFViewer
|
<LazyPDFViewer document={uploadedFile.fileBase64} />
|
||||||
documentData={{
|
|
||||||
id: '',
|
|
||||||
data: uploadedFile.fileBase64,
|
|
||||||
initialData: uploadedFile.fileBase64,
|
|
||||||
type: DocumentDataType.BYTES_64,
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
</CardContent>
|
</CardContent>
|
||||||
</Card>
|
</Card>
|
||||||
) : (
|
) : (
|
||||||
@ -227,38 +205,40 @@ export const SinglePlayerClient = () => {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="col-span-12 lg:col-span-6 xl:col-span-5">
|
<div className="col-span-12 lg:col-span-6 xl:col-span-5">
|
||||||
<DocumentFlowFormContainer
|
<DocumentFlowFormContainer className="top-24" onSubmit={(e) => e.preventDefault()}>
|
||||||
className="top-24 lg:h-[calc(100vh-7rem)]"
|
<DocumentFlowFormContainerHeader
|
||||||
onSubmit={(e) => e.preventDefault()}
|
title={currentDocumentFlow.title}
|
||||||
>
|
description={currentDocumentFlow.description}
|
||||||
<Stepper
|
/>
|
||||||
currentStep={currentDocumentFlow.stepIndex}
|
|
||||||
setCurrentStep={(step) => setStep(SinglePlayerModeSteps[step - 1])}
|
|
||||||
>
|
|
||||||
{/* Add fields to PDF page. */}
|
{/* Add fields to PDF page. */}
|
||||||
|
{step === 'fields' && (
|
||||||
<fieldset disabled={!uploadedFile} className="flex h-full flex-col">
|
<fieldset disabled={!uploadedFile} className="flex h-full flex-col">
|
||||||
<AddFieldsFormPartial
|
<AddFieldsFormPartial
|
||||||
documentFlow={documentFlow.fields}
|
documentFlow={documentFlow.fields}
|
||||||
hideRecipients={true}
|
hideRecipients={true}
|
||||||
recipients={uploadedFile ? [placeholderRecipient] : []}
|
recipients={uploadedFile ? [placeholderRecipient] : []}
|
||||||
|
numberOfSteps={Object.keys(documentFlow).length}
|
||||||
fields={fields}
|
fields={fields}
|
||||||
onSubmit={onFieldsSubmit}
|
onSubmit={onFieldsSubmit}
|
||||||
/>
|
/>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
)}
|
||||||
|
|
||||||
{/* Enter user details and signature. */}
|
{/* Enter user details and signature. */}
|
||||||
|
{step === 'sign' && (
|
||||||
<AddSignatureFormPartial
|
<AddSignatureFormPartial
|
||||||
documentFlow={documentFlow.sign}
|
documentFlow={documentFlow.sign}
|
||||||
|
numberOfSteps={Object.keys(documentFlow).length}
|
||||||
fields={fields}
|
fields={fields}
|
||||||
onSubmit={onSignSubmit}
|
onSubmit={onSignSubmit}
|
||||||
requireName={Boolean(fields.find((field) => field.type === 'NAME'))}
|
requireName={Boolean(fields.find((field) => field.type === 'NAME'))}
|
||||||
requireSignature={Boolean(fields.find((field) => field.type === 'SIGNATURE'))}
|
requireSignature={Boolean(fields.find((field) => field.type === 'SIGNATURE'))}
|
||||||
/>
|
/>
|
||||||
</Stepper>
|
)}
|
||||||
</DocumentFlowFormContainer>
|
</DocumentFlowFormContainer>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
};
|
}
|
||||||
@ -1,10 +0,0 @@
|
|||||||
import { SinglePlayerClient } from './client';
|
|
||||||
|
|
||||||
export const revalidate = 0;
|
|
||||||
|
|
||||||
// !: This entire file is a hack to get around failed prerendering of
|
|
||||||
// !: the Single Player Mode page. This regression was introduced during
|
|
||||||
// !: the upgrade of Next.js to v13.5.x.
|
|
||||||
export default function SingleplayerPage() {
|
|
||||||
return <SinglePlayerClient />;
|
|
||||||
}
|
|
||||||
@ -4,7 +4,6 @@ import { Caveat, Inter } from 'next/font/google';
|
|||||||
|
|
||||||
import { FeatureFlagProvider } from '@documenso/lib/client-only/providers/feature-flag';
|
import { FeatureFlagProvider } from '@documenso/lib/client-only/providers/feature-flag';
|
||||||
import { getAllAnonymousFlags } from '@documenso/lib/universal/get-feature-flag';
|
import { getAllAnonymousFlags } from '@documenso/lib/universal/get-feature-flag';
|
||||||
import { TrpcProvider } from '@documenso/trpc/react';
|
|
||||||
import { cn } from '@documenso/ui/lib/utils';
|
import { cn } from '@documenso/ui/lib/utils';
|
||||||
import { Toaster } from '@documenso/ui/primitives/toaster';
|
import { Toaster } from '@documenso/ui/primitives/toaster';
|
||||||
|
|
||||||
@ -64,9 +63,7 @@ export default async function RootLayout({ children }: { children: React.ReactNo
|
|||||||
<body>
|
<body>
|
||||||
<FeatureFlagProvider initialFlags={flags}>
|
<FeatureFlagProvider initialFlags={flags}>
|
||||||
<ThemeProvider attribute="class" defaultTheme="system" enableSystem>
|
<ThemeProvider attribute="class" defaultTheme="system" enableSystem>
|
||||||
<PlausibleProvider>
|
<PlausibleProvider>{children}</PlausibleProvider>
|
||||||
<TrpcProvider>{children}</TrpcProvider>
|
|
||||||
</PlausibleProvider>
|
|
||||||
</ThemeProvider>
|
</ThemeProvider>
|
||||||
</FeatureFlagProvider>
|
</FeatureFlagProvider>
|
||||||
|
|
||||||
|
|||||||
@ -7,10 +7,11 @@ import { useRouter } from 'next/navigation';
|
|||||||
import { motion } from 'framer-motion';
|
import { motion } from 'framer-motion';
|
||||||
import { ChevronLeft } from 'lucide-react';
|
import { ChevronLeft } from 'lucide-react';
|
||||||
|
|
||||||
import backgroundPattern from '@documenso/assets/images/background-pattern.png';
|
|
||||||
import { cn } from '@documenso/ui/lib/utils';
|
import { cn } from '@documenso/ui/lib/utils';
|
||||||
import { Button } from '@documenso/ui/primitives/button';
|
import { Button } from '@documenso/ui/primitives/button';
|
||||||
|
|
||||||
|
import backgroundPattern from '~/assets/background-pattern.png';
|
||||||
|
|
||||||
export default function NotFound() {
|
export default function NotFound() {
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 34 KiB |
|
Before Width: | Height: | Size: 896 KiB After Width: | Height: | Size: 896 KiB |
|
Before Width: | Height: | Size: 1.3 MiB After Width: | Height: | Size: 1.3 MiB |
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 337 KiB After Width: | Height: | Size: 337 KiB |
|
Before Width: | Height: | Size: 56 KiB After Width: | Height: | Size: 56 KiB |
|
Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 27 KiB |
|
Before Width: | Height: | Size: 251 KiB After Width: | Height: | Size: 251 KiB |
|
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 31 KiB After Width: | Height: | Size: 31 KiB |
|
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 23 KiB |
|
Before Width: | Height: | Size: 394 KiB After Width: | Height: | Size: 394 KiB |
|
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 23 KiB |
|
Before Width: | Height: | Size: 254 KiB After Width: | Height: | Size: 254 KiB |
|
Before Width: | Height: | Size: 20 MiB After Width: | Height: | Size: 20 MiB |
160
apps/marketing/src/components/(marketing)/claim-plan-dialog.tsx
Normal file
@ -0,0 +1,160 @@
|
|||||||
|
'use client';
|
||||||
|
|
||||||
|
import React, { useEffect, useState } from 'react';
|
||||||
|
|
||||||
|
import { useSearchParams } from 'next/navigation';
|
||||||
|
|
||||||
|
import { zodResolver } from '@hookform/resolvers/zod';
|
||||||
|
import { Info } from 'lucide-react';
|
||||||
|
import { usePlausible } from 'next-plausible';
|
||||||
|
import { useForm } from 'react-hook-form';
|
||||||
|
import { z } from 'zod';
|
||||||
|
|
||||||
|
import { useAnalytics } from '@documenso/lib/client-only/hooks/use-analytics';
|
||||||
|
import { cn } from '@documenso/ui/lib/utils';
|
||||||
|
import { Button } from '@documenso/ui/primitives/button';
|
||||||
|
import {
|
||||||
|
Dialog,
|
||||||
|
DialogContent,
|
||||||
|
DialogDescription,
|
||||||
|
DialogHeader,
|
||||||
|
DialogTitle,
|
||||||
|
DialogTrigger,
|
||||||
|
} from '@documenso/ui/primitives/dialog';
|
||||||
|
import { Input } from '@documenso/ui/primitives/input';
|
||||||
|
import { Label } from '@documenso/ui/primitives/label';
|
||||||
|
import { useToast } from '@documenso/ui/primitives/use-toast';
|
||||||
|
|
||||||
|
import { claimPlan } from '~/api/claim-plan/fetcher';
|
||||||
|
|
||||||
|
import { FormErrorMessage } from '../form/form-error-message';
|
||||||
|
|
||||||
|
export const ZClaimPlanDialogFormSchema = z.object({
|
||||||
|
name: z.string().min(3),
|
||||||
|
email: z.string().email(),
|
||||||
|
});
|
||||||
|
|
||||||
|
export type TClaimPlanDialogFormSchema = z.infer<typeof ZClaimPlanDialogFormSchema>;
|
||||||
|
|
||||||
|
export type ClaimPlanDialogProps = {
|
||||||
|
className?: string;
|
||||||
|
planId: string;
|
||||||
|
children: React.ReactNode;
|
||||||
|
};
|
||||||
|
|
||||||
|
export const ClaimPlanDialog = ({ className, planId, children }: ClaimPlanDialogProps) => {
|
||||||
|
const params = useSearchParams();
|
||||||
|
const analytics = useAnalytics();
|
||||||
|
const event = usePlausible();
|
||||||
|
|
||||||
|
const { toast } = useToast();
|
||||||
|
|
||||||
|
const [open, setOpen] = useState(() => params?.get('cancelled') === 'true');
|
||||||
|
|
||||||
|
const {
|
||||||
|
register,
|
||||||
|
handleSubmit,
|
||||||
|
formState: { errors, isSubmitting },
|
||||||
|
reset,
|
||||||
|
} = useForm<TClaimPlanDialogFormSchema>({
|
||||||
|
defaultValues: {
|
||||||
|
name: params?.get('name') ?? '',
|
||||||
|
email: params?.get('email') ?? '',
|
||||||
|
},
|
||||||
|
resolver: zodResolver(ZClaimPlanDialogFormSchema),
|
||||||
|
});
|
||||||
|
|
||||||
|
const onFormSubmit = async ({ name, email }: TClaimPlanDialogFormSchema) => {
|
||||||
|
try {
|
||||||
|
const delay = new Promise<void>((resolve) => {
|
||||||
|
setTimeout(resolve, 1000);
|
||||||
|
});
|
||||||
|
|
||||||
|
const [redirectUrl] = await Promise.all([
|
||||||
|
claimPlan({ name, email, planId, signatureText: name, signatureDataUrl: null }),
|
||||||
|
delay,
|
||||||
|
]);
|
||||||
|
|
||||||
|
event('claim-plan-pricing');
|
||||||
|
analytics.capture('Marketing: Claim plan', { planId, email });
|
||||||
|
|
||||||
|
window.location.href = redirectUrl;
|
||||||
|
} catch (error) {
|
||||||
|
event('claim-plan-failed');
|
||||||
|
analytics.capture('Marketing: Claim plan failure', { planId, email });
|
||||||
|
|
||||||
|
toast({
|
||||||
|
title: 'Something went wrong',
|
||||||
|
description: error instanceof Error ? error.message : 'Please try again later.',
|
||||||
|
variant: 'destructive',
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
if (!isSubmitting && !open) {
|
||||||
|
reset();
|
||||||
|
}
|
||||||
|
}, [open]);
|
||||||
|
|
||||||
|
return (
|
||||||
|
<Dialog open={open} onOpenChange={(value) => !isSubmitting && setOpen(value)}>
|
||||||
|
<DialogTrigger asChild>{children}</DialogTrigger>
|
||||||
|
|
||||||
|
<DialogContent>
|
||||||
|
<DialogHeader>
|
||||||
|
<DialogTitle>Claim your plan</DialogTitle>
|
||||||
|
|
||||||
|
<DialogDescription className="mt-4">
|
||||||
|
We're almost there! Please enter your email address and name to claim your plan.
|
||||||
|
</DialogDescription>
|
||||||
|
</DialogHeader>
|
||||||
|
|
||||||
|
<form onSubmit={handleSubmit(onFormSubmit)}>
|
||||||
|
<fieldset disabled={isSubmitting} className={cn('flex flex-col gap-y-4', className)}>
|
||||||
|
{params?.get('cancelled') === 'true' && (
|
||||||
|
<div className="rounded-lg border border-yellow-400 bg-yellow-50 p-4">
|
||||||
|
<div className="flex">
|
||||||
|
<div className="flex-shrink-0">
|
||||||
|
<Info className="h-5 w-5 text-yellow-400" />
|
||||||
|
</div>
|
||||||
|
<div className="ml-3">
|
||||||
|
<p className="text-sm leading-5 text-yellow-700">
|
||||||
|
You have cancelled the payment process. If you didn't mean to do this, please
|
||||||
|
try again.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<Label className="text-muted-foreground">Name</Label>
|
||||||
|
|
||||||
|
<Input type="text" className="mt-2" {...register('name')} autoFocus />
|
||||||
|
|
||||||
|
<FormErrorMessage className="mt-1" error={errors.name} />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<Label className="text-muted-foreground">Email</Label>
|
||||||
|
|
||||||
|
<Input type="email" className="mt-2" {...register('email')} />
|
||||||
|
|
||||||
|
<FormErrorMessage className="mt-1" error={errors.email} />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<Button type="submit" size="lg" loading={isSubmitting}>
|
||||||
|
Claim the early adopters Plan (
|
||||||
|
{/* eslint-disable-next-line turbo/no-undeclared-env-vars */}
|
||||||
|
{planId === process.env.NEXT_PUBLIC_STRIPE_COMMUNITY_PLAN_MONTHLY_PRICE_ID
|
||||||
|
? 'Monthly'
|
||||||
|
: 'Yearly'}
|
||||||
|
)
|
||||||
|
</Button>
|
||||||
|
</fieldset>
|
||||||
|
</form>
|
||||||
|
</DialogContent>
|
||||||
|
</Dialog>
|
||||||
|
);
|
||||||
|
};
|
||||||
@ -8,10 +8,10 @@ import { createPortal } from 'react-dom';
|
|||||||
import { useIsMounted } from '@documenso/lib/client-only/hooks/use-is-mounted';
|
import { useIsMounted } from '@documenso/lib/client-only/hooks/use-is-mounted';
|
||||||
import { useWindowSize } from '@documenso/lib/client-only/hooks/use-window-size';
|
import { useWindowSize } from '@documenso/lib/client-only/hooks/use-window-size';
|
||||||
|
|
||||||
export const ConfettiScreen = ({
|
export default function ConfettiScreen({
|
||||||
numberOfPieces: numberOfPiecesProp = 200,
|
numberOfPieces: numberOfPiecesProp = 200,
|
||||||
...props
|
...props
|
||||||
}: React.ComponentPropsWithoutRef<typeof Confetti> & { duration?: number }) => {
|
}: React.ComponentPropsWithoutRef<typeof Confetti> & { duration?: number }) {
|
||||||
const isMounted = useIsMounted();
|
const isMounted = useIsMounted();
|
||||||
const { width, height } = useWindowSize();
|
const { width, height } = useWindowSize();
|
||||||
|
|
||||||
@ -34,7 +34,13 @@ export const ConfettiScreen = ({
|
|||||||
}
|
}
|
||||||
|
|
||||||
return createPortal(
|
return createPortal(
|
||||||
<Confetti className="w-full" numberOfPieces={numberOfPieces} width={width} height={height} />,
|
<Confetti
|
||||||
|
{...props}
|
||||||
|
className="w-full"
|
||||||
|
numberOfPieces={numberOfPieces}
|
||||||
|
width={width}
|
||||||
|
height={height}
|
||||||
|
/>,
|
||||||
document.body,
|
document.body,
|
||||||
);
|
);
|
||||||
};
|
}
|
||||||
|
|||||||
@ -1,19 +1,23 @@
|
|||||||
import type { HTMLAttributes } from 'react';
|
import { HTMLAttributes } from 'react';
|
||||||
|
|
||||||
import Image from 'next/image';
|
import Image from 'next/image';
|
||||||
|
|
||||||
import backgroundPattern from '@documenso/assets/images/background-pattern.png';
|
|
||||||
import cardBeautifulFigure from '@documenso/assets/images/card-beautiful-figure.png';
|
|
||||||
import cardFastFigure from '@documenso/assets/images/card-fast-figure.png';
|
|
||||||
import cardSmartFigure from '@documenso/assets/images/card-smart-figure.png';
|
|
||||||
import { cn } from '@documenso/ui/lib/utils';
|
import { cn } from '@documenso/ui/lib/utils';
|
||||||
import { Card, CardContent } from '@documenso/ui/primitives/card';
|
import { Card, CardContent } from '@documenso/ui/primitives/card';
|
||||||
|
|
||||||
|
import backgroundPattern from '~/assets/background-pattern.png';
|
||||||
|
import cardBeautifulFigure from '~/assets/card-beautiful-figure.png';
|
||||||
|
import cardFastFigure from '~/assets/card-fast-figure.png';
|
||||||
|
import cardSmartFigure from '~/assets/card-smart-figure.png';
|
||||||
|
|
||||||
export type FasterSmarterBeautifulBentoProps = HTMLAttributes<HTMLDivElement>;
|
export type FasterSmarterBeautifulBentoProps = HTMLAttributes<HTMLDivElement>;
|
||||||
|
|
||||||
export const FasterSmarterBeautifulBento = ({ className }: FasterSmarterBeautifulBentoProps) => {
|
export const FasterSmarterBeautifulBento = ({
|
||||||
|
className,
|
||||||
|
...props
|
||||||
|
}: FasterSmarterBeautifulBentoProps) => {
|
||||||
return (
|
return (
|
||||||
<div className={cn('relative', className)}>
|
<div className={cn('relative', className)} {...props}>
|
||||||
<div className="absolute inset-0 -z-10 flex items-center justify-center">
|
<div className="absolute inset-0 -z-10 flex items-center justify-center">
|
||||||
<Image
|
<Image
|
||||||
src={backgroundPattern}
|
src={backgroundPattern}
|
||||||
|
|||||||
@ -1,17 +1,17 @@
|
|||||||
'use client';
|
'use client';
|
||||||
|
|
||||||
import type { HTMLAttributes } from 'react';
|
import { HTMLAttributes } from 'react';
|
||||||
|
|
||||||
import Image from 'next/image';
|
import Image from 'next/image';
|
||||||
import Link from 'next/link';
|
import Link from 'next/link';
|
||||||
|
|
||||||
|
import { Moon, Sun } from 'lucide-react';
|
||||||
|
import { useTheme } from 'next-themes';
|
||||||
import { FaXTwitter } from 'react-icons/fa6';
|
import { FaXTwitter } from 'react-icons/fa6';
|
||||||
import { LiaDiscord } from 'react-icons/lia';
|
import { LiaDiscord } from 'react-icons/lia';
|
||||||
import { LuGithub } from 'react-icons/lu';
|
import { LuGithub } from 'react-icons/lu';
|
||||||
|
|
||||||
import LogoImage from '@documenso/assets/logo.png';
|
|
||||||
import { cn } from '@documenso/ui/lib/utils';
|
import { cn } from '@documenso/ui/lib/utils';
|
||||||
import { ThemeSwitcher } from '@documenso/ui/primitives/theme-switcher';
|
|
||||||
|
|
||||||
export type FooterProps = HTMLAttributes<HTMLDivElement>;
|
export type FooterProps = HTMLAttributes<HTMLDivElement>;
|
||||||
|
|
||||||
@ -23,26 +23,25 @@ const SOCIAL_LINKS = [
|
|||||||
|
|
||||||
const FOOTER_LINKS = [
|
const FOOTER_LINKS = [
|
||||||
{ href: '/pricing', text: 'Pricing' },
|
{ href: '/pricing', text: 'Pricing' },
|
||||||
{ href: '/singleplayer', text: 'Singleplayer' },
|
{ href: '/single-player-mode', text: 'Single Player Mode' },
|
||||||
{ href: '/blog', text: 'Blog' },
|
{ href: '/blog', text: 'Blog' },
|
||||||
{ href: '/design-system', text: 'Design' },
|
{ href: '/open', text: 'Open' },
|
||||||
{ href: '/open', text: 'Open Startup' },
|
|
||||||
{ href: 'https://shop.documenso.com', text: 'Shop', target: '_blank' },
|
{ href: 'https://shop.documenso.com', text: 'Shop', target: '_blank' },
|
||||||
{ href: 'https://status.documenso.com', text: 'Status', target: '_blank' },
|
{ href: 'https://status.documenso.com', text: 'Status', target: '_blank' },
|
||||||
{ href: 'mailto:support@documenso.com', text: 'Support', target: '_blank' },
|
{ href: 'mailto:support@documenso.com', text: 'Support' },
|
||||||
{ href: '/oss-friends', text: 'OSS Friends' },
|
|
||||||
{ href: '/careers', text: 'Careers' },
|
|
||||||
{ href: '/privacy', text: 'Privacy' },
|
{ href: '/privacy', text: 'Privacy' },
|
||||||
];
|
];
|
||||||
|
|
||||||
export const Footer = ({ className }: FooterProps) => {
|
export const Footer = ({ className, ...props }: FooterProps) => {
|
||||||
|
const { setTheme } = useTheme();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={cn('border-t py-12', className)}>
|
<div className={cn('border-t py-12', className)} {...props}>
|
||||||
<div className="mx-auto flex w-full max-w-screen-xl flex-wrap items-start justify-between gap-8 px-8">
|
<div className="mx-auto flex w-full max-w-screen-xl flex-wrap items-start justify-between gap-8 px-8">
|
||||||
<div className="flex-shrink-0">
|
<div>
|
||||||
<Link href="/">
|
<Link href="/">
|
||||||
<Image
|
<Image
|
||||||
src={LogoImage}
|
src="/logo.png"
|
||||||
alt="Documenso Logo"
|
alt="Documenso Logo"
|
||||||
className="dark:invert"
|
className="dark:invert"
|
||||||
width={170}
|
width={170}
|
||||||
@ -53,7 +52,7 @@ export const Footer = ({ className }: FooterProps) => {
|
|||||||
<div className="mt-4 flex flex-wrap items-center gap-x-4 gap-y-4">
|
<div className="mt-4 flex flex-wrap items-center gap-x-4 gap-y-4">
|
||||||
{SOCIAL_LINKS.map((link, index) => (
|
{SOCIAL_LINKS.map((link, index) => (
|
||||||
<Link
|
<Link
|
||||||
key={link.href + index.toString()}
|
key={index}
|
||||||
href={link.href}
|
href={link.href}
|
||||||
target="_blank"
|
target="_blank"
|
||||||
className="text-muted-foreground hover:text-muted-foreground/80"
|
className="text-muted-foreground hover:text-muted-foreground/80"
|
||||||
@ -64,26 +63,34 @@ export const Footer = ({ className }: FooterProps) => {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="grid w-full max-w-sm grid-cols-2 gap-x-4 gap-y-2 md:w-auto md:gap-x-8">
|
<div className="flex flex-wrap items-center gap-x-4 gap-y-2.5">
|
||||||
{FOOTER_LINKS.map((link, index) => (
|
{FOOTER_LINKS.map((link, index) => (
|
||||||
<Link
|
<Link
|
||||||
key={link.href + index.toString()}
|
key={index}
|
||||||
href={link.href}
|
href={link.href}
|
||||||
target={link.target}
|
target={link.target}
|
||||||
className="text-muted-foreground hover:text-muted-foreground/80 flex-shrink-0 break-words text-sm"
|
className="text-muted-foreground hover:text-muted-foreground/80 flex-shrink-0 text-sm"
|
||||||
>
|
>
|
||||||
{link.text}
|
{link.text}
|
||||||
</Link>
|
</Link>
|
||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="mx-auto mt-4 flex w-full max-w-screen-xl flex-wrap items-center justify-between gap-4 px-8 md:mt-12 lg:mt-24">
|
<div className="mx-auto mt-4 flex w-full max-w-screen-xl flex-wrap justify-between gap-4 px-8 md:mt-12 lg:mt-24">
|
||||||
<p className="text-muted-foreground text-sm">
|
<p className="text-muted-foreground text-sm">
|
||||||
© {new Date().getFullYear()} Documenso, Inc. All rights reserved.
|
© {new Date().getFullYear()} Documenso, Inc. All rights reserved.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<div className="flex flex-wrap">
|
<div className="flex flex-wrap items-center gap-x-4 gap-y-2.5">
|
||||||
<ThemeSwitcher />
|
<button type="button" className="text-muted-foreground" onClick={() => setTheme('light')}>
|
||||||
|
<Sun className="h-5 w-5" />
|
||||||
|
<span className="sr-only">Light</span>
|
||||||
|
</button>
|
||||||
|
|
||||||
|
<button type="button" className="text-muted-foreground" onClick={() => setTheme('dark')}>
|
||||||
|
<Moon className="h-5 w-5" />
|
||||||
|
<span className="sr-only">Dark</span>
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -1,12 +1,10 @@
|
|||||||
'use client';
|
'use client';
|
||||||
|
|
||||||
import type { HTMLAttributes } from 'react';
|
import { HTMLAttributes, useState } from 'react';
|
||||||
import { useState } from 'react';
|
|
||||||
|
|
||||||
import Image from 'next/image';
|
import Image from 'next/image';
|
||||||
import Link from 'next/link';
|
import Link from 'next/link';
|
||||||
|
|
||||||
import LogoImage from '@documenso/assets/logo.png';
|
|
||||||
import { useFeatureFlags } from '@documenso/lib/client-only/providers/feature-flag';
|
import { useFeatureFlags } from '@documenso/lib/client-only/providers/feature-flag';
|
||||||
import { cn } from '@documenso/ui/lib/utils';
|
import { cn } from '@documenso/ui/lib/utils';
|
||||||
|
|
||||||
@ -15,7 +13,7 @@ import { MobileNavigation } from './mobile-navigation';
|
|||||||
|
|
||||||
export type HeaderProps = HTMLAttributes<HTMLElement>;
|
export type HeaderProps = HTMLAttributes<HTMLElement>;
|
||||||
|
|
||||||
export const Header = ({ className }: HeaderProps) => {
|
export const Header = ({ className, ...props }: HeaderProps) => {
|
||||||
const [isHamburgerMenuOpen, setIsHamburgerMenuOpen] = useState(false);
|
const [isHamburgerMenuOpen, setIsHamburgerMenuOpen] = useState(false);
|
||||||
|
|
||||||
const { getFlag } = useFeatureFlags();
|
const { getFlag } = useFeatureFlags();
|
||||||
@ -23,11 +21,11 @@ export const Header = ({ className }: HeaderProps) => {
|
|||||||
const isSinglePlayerModeMarketingEnabled = getFlag('marketing_header_single_player_mode');
|
const isSinglePlayerModeMarketingEnabled = getFlag('marketing_header_single_player_mode');
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<header className={cn('flex items-center justify-between', className)}>
|
<header className={cn('flex items-center justify-between', className)} {...props}>
|
||||||
<div className="flex items-center space-x-4">
|
<div className="flex items-center space-x-4">
|
||||||
<Link href="/" className="z-10" onClick={() => setIsHamburgerMenuOpen(false)}>
|
<Link href="/" className="z-10" onClick={() => setIsHamburgerMenuOpen(false)}>
|
||||||
<Image
|
<Image
|
||||||
src={LogoImage}
|
src="/logo.png"
|
||||||
alt="Documenso Logo"
|
alt="Documenso Logo"
|
||||||
className="dark:invert"
|
className="dark:invert"
|
||||||
width={170}
|
width={170}
|
||||||
@ -37,7 +35,7 @@ export const Header = ({ className }: HeaderProps) => {
|
|||||||
|
|
||||||
{isSinglePlayerModeMarketingEnabled && (
|
{isSinglePlayerModeMarketingEnabled && (
|
||||||
<Link
|
<Link
|
||||||
href="/singleplayer"
|
href="/single-player-mode"
|
||||||
className="bg-primary dark:text-background rounded-full px-2 py-1 text-xs font-semibold sm:px-3"
|
className="bg-primary dark:text-background rounded-full px-2 py-1 text-xs font-semibold sm:px-3"
|
||||||
>
|
>
|
||||||
Try now!
|
Try now!
|
||||||
@ -64,11 +62,11 @@ export const Header = ({ className }: HeaderProps) => {
|
|||||||
href="/open"
|
href="/open"
|
||||||
className="text-muted-foreground hover:text-muted-foreground/80 text-sm font-semibold"
|
className="text-muted-foreground hover:text-muted-foreground/80 text-sm font-semibold"
|
||||||
>
|
>
|
||||||
Open Startup
|
Open
|
||||||
</Link>
|
</Link>
|
||||||
|
|
||||||
<Link
|
<Link
|
||||||
href="https://app.documenso.com/signin"
|
href="https://app.documenso.com/login"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
className="text-muted-foreground hover:text-muted-foreground/80 text-sm font-semibold"
|
className="text-muted-foreground hover:text-muted-foreground/80 text-sm font-semibold"
|
||||||
>
|
>
|
||||||
|
|||||||
@ -3,17 +3,17 @@
|
|||||||
import Image from 'next/image';
|
import Image from 'next/image';
|
||||||
import Link from 'next/link';
|
import Link from 'next/link';
|
||||||
|
|
||||||
import type { Variants } from 'framer-motion';
|
import { Variants, motion } from 'framer-motion';
|
||||||
import { motion } from 'framer-motion';
|
|
||||||
import { usePlausible } from 'next-plausible';
|
import { usePlausible } from 'next-plausible';
|
||||||
import { LuGithub } from 'react-icons/lu';
|
import { LuGithub } from 'react-icons/lu';
|
||||||
import { match } from 'ts-pattern';
|
import { match } from 'ts-pattern';
|
||||||
|
|
||||||
import backgroundPattern from '@documenso/assets/images/background-pattern.png';
|
|
||||||
import { useFeatureFlags } from '@documenso/lib/client-only/providers/feature-flag';
|
import { useFeatureFlags } from '@documenso/lib/client-only/providers/feature-flag';
|
||||||
import { cn } from '@documenso/ui/lib/utils';
|
import { cn } from '@documenso/ui/lib/utils';
|
||||||
import { Button } from '@documenso/ui/primitives/button';
|
import { Button } from '@documenso/ui/primitives/button';
|
||||||
|
|
||||||
|
import backgroundPattern from '~/assets/background-pattern.png';
|
||||||
|
|
||||||
import { Widget } from './widget';
|
import { Widget } from './widget';
|
||||||
|
|
||||||
export type HeroProps = {
|
export type HeroProps = {
|
||||||
@ -50,7 +50,7 @@ const HeroTitleVariants: Variants = {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
export const Hero = ({ className }: HeroProps) => {
|
export const Hero = ({ className, ...props }: HeroProps) => {
|
||||||
const event = usePlausible();
|
const event = usePlausible();
|
||||||
|
|
||||||
const { getFlag } = useFeatureFlags();
|
const { getFlag } = useFeatureFlags();
|
||||||
@ -75,7 +75,7 @@ export const Hero = ({ className }: HeroProps) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<motion.div className={cn('relative', className)}>
|
<motion.div className={cn('relative', className)} {...props}>
|
||||||
<div className="absolute -inset-24 -z-10">
|
<div className="absolute -inset-24 -z-10">
|
||||||
<motion.div
|
<motion.div
|
||||||
className="flex h-full w-full origin-top-right items-center justify-center"
|
className="flex h-full w-full origin-top-right items-center justify-center"
|
||||||
@ -134,9 +134,9 @@ export const Hero = ({ className }: HeroProps) => {
|
|||||||
variants={HeroTitleVariants}
|
variants={HeroTitleVariants}
|
||||||
initial="initial"
|
initial="initial"
|
||||||
animate="animate"
|
animate="animate"
|
||||||
className="border-primary bg-background hover:bg-muted mx-auto mt-8 w-60 rounded-xl border transition-colors duration-300"
|
className="border-primary bg-background hover:bg-muted mx-auto mt-8 w-60 rounded-xl border transition duration-300"
|
||||||
>
|
>
|
||||||
<Link href="/singleplayer" className="block px-4 py-2 text-center">
|
<Link href="/single-player-mode" className="block px-4 py-2 text-center">
|
||||||
<h2 className="text-muted-foreground text-xs font-semibold">
|
<h2 className="text-muted-foreground text-xs font-semibold">
|
||||||
Introducing Single Player Mode
|
Introducing Single Player Mode
|
||||||
</h2>
|
</h2>
|
||||||
|
|||||||
@ -8,7 +8,6 @@ import { FaXTwitter } from 'react-icons/fa6';
|
|||||||
import { LiaDiscord } from 'react-icons/lia';
|
import { LiaDiscord } from 'react-icons/lia';
|
||||||
import { LuGithub } from 'react-icons/lu';
|
import { LuGithub } from 'react-icons/lu';
|
||||||
|
|
||||||
import LogoImage from '@documenso/assets/logo.png';
|
|
||||||
import { Sheet, SheetContent } from '@documenso/ui/primitives/sheet';
|
import { Sheet, SheetContent } from '@documenso/ui/primitives/sheet';
|
||||||
|
|
||||||
export type MobileNavigationProps = {
|
export type MobileNavigationProps = {
|
||||||
@ -18,8 +17,8 @@ export type MobileNavigationProps = {
|
|||||||
|
|
||||||
export const MENU_NAVIGATION_LINKS = [
|
export const MENU_NAVIGATION_LINKS = [
|
||||||
{
|
{
|
||||||
href: '/singleplayer',
|
href: '/single-player-mode',
|
||||||
text: 'Singleplayer',
|
text: 'Single Player Mode',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
href: '/blog',
|
href: '/blog',
|
||||||
@ -31,7 +30,7 @@ export const MENU_NAVIGATION_LINKS = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
href: '/open',
|
href: '/open',
|
||||||
text: 'Open Startup',
|
text: 'Open',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
href: 'https://status.documenso.com',
|
href: 'https://status.documenso.com',
|
||||||
@ -40,14 +39,13 @@ export const MENU_NAVIGATION_LINKS = [
|
|||||||
{
|
{
|
||||||
href: 'mailto:support@documenso.com',
|
href: 'mailto:support@documenso.com',
|
||||||
text: 'Support',
|
text: 'Support',
|
||||||
target: '_blank',
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
href: '/privacy',
|
href: '/privacy',
|
||||||
text: 'Privacy',
|
text: 'Privacy',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
href: 'https://app.documenso.com/signin',
|
href: 'https://app.documenso.com/login',
|
||||||
text: 'Sign in',
|
text: 'Sign in',
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
@ -64,7 +62,7 @@ export const MobileNavigation = ({ isMenuOpen, onMenuOpenChange }: MobileNavigat
|
|||||||
<SheetContent className="w-full max-w-[400px]">
|
<SheetContent className="w-full max-w-[400px]">
|
||||||
<Link href="/" className="z-10" onClick={handleMenuItemClick}>
|
<Link href="/" className="z-10" onClick={handleMenuItemClick}>
|
||||||
<Image
|
<Image
|
||||||
src={LogoImage}
|
src="/logo.png"
|
||||||
alt="Documenso Logo"
|
alt="Documenso Logo"
|
||||||
className="dark:invert"
|
className="dark:invert"
|
||||||
width={170}
|
width={170}
|
||||||
@ -80,7 +78,7 @@ export const MobileNavigation = ({ isMenuOpen, onMenuOpenChange }: MobileNavigat
|
|||||||
staggerChildren: 0.03,
|
staggerChildren: 0.03,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{MENU_NAVIGATION_LINKS.map(({ href, text, target }) => (
|
{MENU_NAVIGATION_LINKS.map(({ href, text }) => (
|
||||||
<motion.div
|
<motion.div
|
||||||
key={href}
|
key={href}
|
||||||
variants={{
|
variants={{
|
||||||
@ -102,7 +100,6 @@ export const MobileNavigation = ({ isMenuOpen, onMenuOpenChange }: MobileNavigat
|
|||||||
className="text-foreground hover:text-foreground/80 text-2xl font-semibold"
|
className="text-foreground hover:text-foreground/80 text-2xl font-semibold"
|
||||||
href={href}
|
href={href}
|
||||||
onClick={() => handleMenuItemClick()}
|
onClick={() => handleMenuItemClick()}
|
||||||
target={target}
|
|
||||||
>
|
>
|
||||||
{text}
|
{text}
|
||||||
</Link>
|
</Link>
|
||||||
|
|||||||
@ -1,19 +1,20 @@
|
|||||||
import type { HTMLAttributes } from 'react';
|
import { HTMLAttributes } from 'react';
|
||||||
|
|
||||||
import Image from 'next/image';
|
import Image from 'next/image';
|
||||||
|
|
||||||
import backgroundPattern from '@documenso/assets/images/background-pattern.png';
|
|
||||||
import cardBuildFigure from '@documenso/assets/images/card-build-figure.png';
|
|
||||||
import cardOpenFigure from '@documenso/assets/images/card-open-figure.png';
|
|
||||||
import cardTemplateFigure from '@documenso/assets/images/card-template-figure.png';
|
|
||||||
import { cn } from '@documenso/ui/lib/utils';
|
import { cn } from '@documenso/ui/lib/utils';
|
||||||
import { Card, CardContent } from '@documenso/ui/primitives/card';
|
import { Card, CardContent } from '@documenso/ui/primitives/card';
|
||||||
|
|
||||||
|
import backgroundPattern from '~/assets/background-pattern.png';
|
||||||
|
import cardBuildFigure from '~/assets/card-build-figure.png';
|
||||||
|
import cardOpenFigure from '~/assets/card-open-figure.png';
|
||||||
|
import cardTemplateFigure from '~/assets/card-template-figure.png';
|
||||||
|
|
||||||
export type OpenBuildTemplateBentoProps = HTMLAttributes<HTMLDivElement>;
|
export type OpenBuildTemplateBentoProps = HTMLAttributes<HTMLDivElement>;
|
||||||
|
|
||||||
export const OpenBuildTemplateBento = ({ className }: OpenBuildTemplateBentoProps) => {
|
export const OpenBuildTemplateBento = ({ className, ...props }: OpenBuildTemplateBentoProps) => {
|
||||||
return (
|
return (
|
||||||
<div className={cn('relative', className)}>
|
<div className={cn('relative', className)} {...props}>
|
||||||
<div className="absolute inset-0 -z-10 flex items-center justify-center">
|
<div className="absolute inset-0 -z-10 flex items-center justify-center">
|
||||||
<Image
|
<Image
|
||||||
src={backgroundPattern}
|
src={backgroundPattern}
|
||||||
|
|||||||
@ -1,8 +1,9 @@
|
|||||||
'use client';
|
'use client';
|
||||||
|
|
||||||
import { useCopyToClipboard } from '@documenso/lib/client-only/hooks/use-copy-to-clipboard';
|
|
||||||
import { useToast } from '@documenso/ui/primitives/use-toast';
|
import { useToast } from '@documenso/ui/primitives/use-toast';
|
||||||
|
|
||||||
|
import { useCopyToClipboard } from '~/hooks/use-copy-to-clipboard';
|
||||||
|
|
||||||
export type PasswordRevealProps = {
|
export type PasswordRevealProps = {
|
||||||
password: string;
|
password: string;
|
||||||
};
|
};
|
||||||
|
|||||||
@ -1,9 +1,9 @@
|
|||||||
'use client';
|
'use client';
|
||||||
|
|
||||||
import type { HTMLAttributes } from 'react';
|
import { HTMLAttributes, useMemo, useState } from 'react';
|
||||||
import { useState } from 'react';
|
|
||||||
|
|
||||||
import Link from 'next/link';
|
import Link from 'next/link';
|
||||||
|
import { useSearchParams } from 'next/navigation';
|
||||||
|
|
||||||
import { AnimatePresence, motion } from 'framer-motion';
|
import { AnimatePresence, motion } from 'framer-motion';
|
||||||
import { usePlausible } from 'next-plausible';
|
import { usePlausible } from 'next-plausible';
|
||||||
@ -11,17 +11,32 @@ import { usePlausible } from 'next-plausible';
|
|||||||
import { cn } from '@documenso/ui/lib/utils';
|
import { cn } from '@documenso/ui/lib/utils';
|
||||||
import { Button } from '@documenso/ui/primitives/button';
|
import { Button } from '@documenso/ui/primitives/button';
|
||||||
|
|
||||||
|
import { ClaimPlanDialog } from './claim-plan-dialog';
|
||||||
|
|
||||||
export type PricingTableProps = HTMLAttributes<HTMLDivElement>;
|
export type PricingTableProps = HTMLAttributes<HTMLDivElement>;
|
||||||
|
|
||||||
const SELECTED_PLAN_BAR_LAYOUT_ID = 'selected-plan-bar';
|
const SELECTED_PLAN_BAR_LAYOUT_ID = 'selected-plan-bar';
|
||||||
|
|
||||||
export const PricingTable = ({ className }: PricingTableProps) => {
|
export const PricingTable = ({ className, ...props }: PricingTableProps) => {
|
||||||
|
const params = useSearchParams();
|
||||||
const event = usePlausible();
|
const event = usePlausible();
|
||||||
|
|
||||||
const [period, setPeriod] = useState<'MONTHLY' | 'YEARLY'>('MONTHLY');
|
const [period, setPeriod] = useState<'MONTHLY' | 'YEARLY'>(() =>
|
||||||
|
params?.get('planId') === process.env.NEXT_PUBLIC_STRIPE_COMMUNITY_PLAN_YEARLY_PRICE_ID
|
||||||
|
? 'YEARLY'
|
||||||
|
: 'MONTHLY',
|
||||||
|
);
|
||||||
|
|
||||||
|
const planId = useMemo(() => {
|
||||||
|
if (period === 'MONTHLY') {
|
||||||
|
return process.env.NEXT_PUBLIC_STRIPE_COMMUNITY_PLAN_MONTHLY_PRICE_ID;
|
||||||
|
}
|
||||||
|
|
||||||
|
return process.env.NEXT_PUBLIC_STRIPE_COMMUNITY_PLAN_YEARLY_PRICE_ID;
|
||||||
|
}, [period]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={cn('', className)}>
|
<div className={cn('', className)} {...props}>
|
||||||
<div className="flex items-center justify-center gap-x-6">
|
<div className="flex items-center justify-center gap-x-6">
|
||||||
<AnimatePresence>
|
<AnimatePresence>
|
||||||
<motion.button
|
<motion.button
|
||||||
@ -71,33 +86,33 @@ export const PricingTable = ({ className }: PricingTableProps) => {
|
|||||||
|
|
||||||
<div className="mt-12 grid grid-cols-1 gap-x-6 gap-y-12 md:grid-cols-2 lg:grid-cols-3">
|
<div className="mt-12 grid grid-cols-1 gap-x-6 gap-y-12 md:grid-cols-2 lg:grid-cols-3">
|
||||||
<div
|
<div
|
||||||
data-plan="free"
|
data-plan="self-hosted"
|
||||||
className="bg-background shadow-foreground/5 flex flex-col items-center justify-center rounded-lg border px-8 py-12 shadow-lg"
|
className="bg-background shadow-foreground/5 flex flex-col items-center justify-center rounded-lg border px-8 py-12 shadow-lg"
|
||||||
>
|
>
|
||||||
<p className="text-foreground text-4xl font-medium">Free Plan</p>
|
<p className="text-foreground text-4xl font-medium">Self Hosted</p>
|
||||||
<p className="text-primary mt-2.5 text-xl font-medium">$0</p>
|
<p className="text-primary mt-2.5 text-xl font-medium">Free</p>
|
||||||
|
|
||||||
<p className="text-foreground mt-4 max-w-[30ch] text-center">
|
<p className="text-foreground mt-4 max-w-[30ch] text-center">
|
||||||
For small teams and individuals with basic needs.
|
For small teams and individuals who need a simple solution
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<Button className="rounded-full text-base" asChild>
|
|
||||||
<Link
|
<Link
|
||||||
href={`${process.env.NEXT_PUBLIC_WEBAPP_URL}/signup`}
|
href="https://github.com/documenso/documenso"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
className="mt-6"
|
className="mt-6"
|
||||||
|
onClick={() => event('view-github')}
|
||||||
>
|
>
|
||||||
Signup Now
|
<Button className="rounded-full text-base">View on Github</Button>
|
||||||
</Link>
|
</Link>
|
||||||
</Button>
|
|
||||||
|
|
||||||
<div className="mt-8 flex w-full flex-col divide-y">
|
<div className="mt-8 flex w-full flex-col divide-y">
|
||||||
<p className="text-foreground py-4">5 standard documents per month</p>
|
<p className="text-foreground py-4 font-medium">Host your own instance</p>
|
||||||
<p className="text-foreground py-4">Up to 10 recipients per document</p>
|
<p className="text-foreground py-4">Full Control</p>
|
||||||
<p className="text-foreground py-4">No credit card required</p>
|
<p className="text-foreground py-4">Customizability</p>
|
||||||
|
<p className="text-foreground py-4">Docker Ready</p>
|
||||||
|
<p className="text-foreground py-4">Community Support</p>
|
||||||
|
<p className="text-foreground py-4">Free, Forever</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="flex-1" />
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div
|
<div
|
||||||
@ -116,9 +131,9 @@ export const PricingTable = ({ className }: PricingTableProps) => {
|
|||||||
For fast-growing companies that aim to scale across multiple teams.
|
For fast-growing companies that aim to scale across multiple teams.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<Button className="mt-6 rounded-full text-base" asChild>
|
<ClaimPlanDialog planId={planId}>
|
||||||
<Link href={`${process.env.NEXT_PUBLIC_WEBAPP_URL}/signup`}>Signup Now</Link>
|
<Button className="mt-6 rounded-full text-base">Signup Now</Button>
|
||||||
</Button>
|
</ClaimPlanDialog>
|
||||||
|
|
||||||
<div className="mt-8 flex w-full flex-col divide-y">
|
<div className="mt-8 flex w-full flex-col divide-y">
|
||||||
<p className="text-foreground py-4 font-medium">
|
<p className="text-foreground py-4 font-medium">
|
||||||
|
|||||||
@ -1,20 +1,24 @@
|
|||||||
import type { HTMLAttributes } from 'react';
|
import { HTMLAttributes } from 'react';
|
||||||
|
|
||||||
import Image from 'next/image';
|
import Image from 'next/image';
|
||||||
|
|
||||||
import backgroundPattern from '@documenso/assets/images/background-pattern.png';
|
|
||||||
import cardConnectionsFigure from '@documenso/assets/images/card-connections-figure.png';
|
|
||||||
import cardPaidFigure from '@documenso/assets/images/card-paid-figure.png';
|
|
||||||
import cardSharingFigure from '@documenso/assets/images/card-sharing-figure.png';
|
|
||||||
import cardWidgetFigure from '@documenso/assets/images/card-widget-figure.png';
|
|
||||||
import { cn } from '@documenso/ui/lib/utils';
|
import { cn } from '@documenso/ui/lib/utils';
|
||||||
import { Card, CardContent } from '@documenso/ui/primitives/card';
|
import { Card, CardContent } from '@documenso/ui/primitives/card';
|
||||||
|
|
||||||
|
import backgroundPattern from '~/assets/background-pattern.png';
|
||||||
|
import cardConnectionsFigure from '~/assets/card-connections-figure.png';
|
||||||
|
import cardPaidFigure from '~/assets/card-paid-figure.png';
|
||||||
|
import cardSharingFigure from '~/assets/card-sharing-figure.png';
|
||||||
|
import cardWidgetFigure from '~/assets/card-widget-figure.png';
|
||||||
|
|
||||||
export type ShareConnectPaidWidgetBentoProps = HTMLAttributes<HTMLDivElement>;
|
export type ShareConnectPaidWidgetBentoProps = HTMLAttributes<HTMLDivElement>;
|
||||||
|
|
||||||
export const ShareConnectPaidWidgetBento = ({ className }: ShareConnectPaidWidgetBentoProps) => {
|
export const ShareConnectPaidWidgetBento = ({
|
||||||
|
className,
|
||||||
|
...props
|
||||||
|
}: ShareConnectPaidWidgetBentoProps) => {
|
||||||
return (
|
return (
|
||||||
<div className={cn('relative', className)}>
|
<div className={cn('relative', className)} {...props}>
|
||||||
<div className="absolute inset-0 -z-10 flex items-center justify-center">
|
<div className="absolute inset-0 -z-10 flex items-center justify-center">
|
||||||
<Image
|
<Image
|
||||||
src={backgroundPattern}
|
src={backgroundPattern}
|
||||||
|
|||||||
@ -0,0 +1,233 @@
|
|||||||
|
'use server';
|
||||||
|
|
||||||
|
import { createElement } from 'react';
|
||||||
|
|
||||||
|
import { DateTime } from 'luxon';
|
||||||
|
import { PDFDocument } from 'pdf-lib';
|
||||||
|
import { match } from 'ts-pattern';
|
||||||
|
import { z } from 'zod';
|
||||||
|
|
||||||
|
import { mailer } from '@documenso/email/mailer';
|
||||||
|
import { render } from '@documenso/email/render';
|
||||||
|
import { DocumentSelfSignedEmailTemplate } from '@documenso/email/templates/document-self-signed';
|
||||||
|
import { FROM_ADDRESS, FROM_NAME, SERVICE_USER_EMAIL } from '@documenso/lib/constants/email';
|
||||||
|
import { insertFieldInPDF } from '@documenso/lib/server-only/pdf/insert-field-in-pdf';
|
||||||
|
import { alphaid } from '@documenso/lib/universal/id';
|
||||||
|
import { getFile } from '@documenso/lib/universal/upload/get-file';
|
||||||
|
import { prisma } from '@documenso/prisma';
|
||||||
|
import {
|
||||||
|
DocumentDataType,
|
||||||
|
DocumentStatus,
|
||||||
|
FieldType,
|
||||||
|
Prisma,
|
||||||
|
ReadStatus,
|
||||||
|
SendStatus,
|
||||||
|
SigningStatus,
|
||||||
|
} from '@documenso/prisma/client';
|
||||||
|
|
||||||
|
const ZCreateSinglePlayerDocumentSchema = z.object({
|
||||||
|
documentData: z.object({
|
||||||
|
data: z.string(),
|
||||||
|
type: z.nativeEnum(DocumentDataType),
|
||||||
|
}),
|
||||||
|
documentName: z.string(),
|
||||||
|
signer: z.object({
|
||||||
|
email: z.string().email().min(1),
|
||||||
|
name: z.string(),
|
||||||
|
signature: z.string(),
|
||||||
|
}),
|
||||||
|
fields: z.array(
|
||||||
|
z.object({
|
||||||
|
page: z.number(),
|
||||||
|
type: z.nativeEnum(FieldType),
|
||||||
|
positionX: z.number(),
|
||||||
|
positionY: z.number(),
|
||||||
|
width: z.number(),
|
||||||
|
height: z.number(),
|
||||||
|
}),
|
||||||
|
),
|
||||||
|
});
|
||||||
|
|
||||||
|
export type TCreateSinglePlayerDocumentSchema = z.infer<typeof ZCreateSinglePlayerDocumentSchema>;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create and self signs a document.
|
||||||
|
*
|
||||||
|
* Returns the document token.
|
||||||
|
*/
|
||||||
|
export const createSinglePlayerDocument = async (
|
||||||
|
value: TCreateSinglePlayerDocumentSchema,
|
||||||
|
): Promise<string> => {
|
||||||
|
const { signer, fields, documentData, documentName } =
|
||||||
|
ZCreateSinglePlayerDocumentSchema.parse(value);
|
||||||
|
|
||||||
|
const document = await getFile({
|
||||||
|
data: documentData.data,
|
||||||
|
type: documentData.type,
|
||||||
|
});
|
||||||
|
|
||||||
|
const doc = await PDFDocument.load(document);
|
||||||
|
const createdAt = new Date();
|
||||||
|
|
||||||
|
const isBase64 = signer.signature.startsWith('data:image/png;base64,');
|
||||||
|
const signatureImageAsBase64 = isBase64 ? signer.signature : null;
|
||||||
|
const typedSignature = !isBase64 ? signer.signature : null;
|
||||||
|
|
||||||
|
// Update the document with the fields inserted.
|
||||||
|
for (const field of fields) {
|
||||||
|
const isSignatureField = field.type === FieldType.SIGNATURE;
|
||||||
|
|
||||||
|
await insertFieldInPDF(doc, {
|
||||||
|
...mapField(field, signer),
|
||||||
|
Signature: isSignatureField
|
||||||
|
? {
|
||||||
|
created: createdAt,
|
||||||
|
signatureImageAsBase64,
|
||||||
|
typedSignature,
|
||||||
|
// Dummy data.
|
||||||
|
id: -1,
|
||||||
|
recipientId: -1,
|
||||||
|
fieldId: -1,
|
||||||
|
}
|
||||||
|
: null,
|
||||||
|
// Dummy data.
|
||||||
|
id: -1,
|
||||||
|
documentId: -1,
|
||||||
|
recipientId: -1,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
const pdfBytes = await doc.save();
|
||||||
|
|
||||||
|
const documentToken = await prisma.$transaction(
|
||||||
|
async (tx) => {
|
||||||
|
const documentToken = alphaid();
|
||||||
|
|
||||||
|
// Fetch service user who will be the owner of the document.
|
||||||
|
const serviceUser = await tx.user.findFirstOrThrow({
|
||||||
|
where: {
|
||||||
|
email: SERVICE_USER_EMAIL,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
const documentDataBytes = Buffer.from(pdfBytes).toString('base64');
|
||||||
|
|
||||||
|
const { id: documentDataId } = await tx.documentData.create({
|
||||||
|
data: {
|
||||||
|
type: DocumentDataType.BYTES_64,
|
||||||
|
data: documentDataBytes,
|
||||||
|
initialData: documentDataBytes,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
// Create document.
|
||||||
|
const document = await tx.document.create({
|
||||||
|
data: {
|
||||||
|
title: documentName,
|
||||||
|
status: DocumentStatus.COMPLETED,
|
||||||
|
documentDataId,
|
||||||
|
userId: serviceUser.id,
|
||||||
|
createdAt,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
// Create recipient.
|
||||||
|
const recipient = await tx.recipient.create({
|
||||||
|
data: {
|
||||||
|
documentId: document.id,
|
||||||
|
name: signer.name,
|
||||||
|
email: signer.email,
|
||||||
|
token: documentToken,
|
||||||
|
signedAt: createdAt,
|
||||||
|
readStatus: ReadStatus.OPENED,
|
||||||
|
signingStatus: SigningStatus.SIGNED,
|
||||||
|
sendStatus: SendStatus.SENT,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
// Create fields and signatures.
|
||||||
|
await Promise.all(
|
||||||
|
fields.map(async (field) => {
|
||||||
|
const insertedField = await tx.field.create({
|
||||||
|
data: {
|
||||||
|
documentId: document.id,
|
||||||
|
recipientId: recipient.id,
|
||||||
|
...mapField(field, signer),
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
if (field.type === FieldType.SIGNATURE || field.type === FieldType.FREE_SIGNATURE) {
|
||||||
|
await tx.signature.create({
|
||||||
|
data: {
|
||||||
|
fieldId: insertedField.id,
|
||||||
|
signatureImageAsBase64,
|
||||||
|
typedSignature,
|
||||||
|
recipientId: recipient.id,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}),
|
||||||
|
);
|
||||||
|
|
||||||
|
return documentToken;
|
||||||
|
},
|
||||||
|
{
|
||||||
|
maxWait: 5000,
|
||||||
|
timeout: 30000,
|
||||||
|
},
|
||||||
|
);
|
||||||
|
|
||||||
|
const template = createElement(DocumentSelfSignedEmailTemplate, {
|
||||||
|
documentName: documentName,
|
||||||
|
assetBaseUrl: process.env.NEXT_PUBLIC_WEBAPP_URL || 'http://localhost:3000',
|
||||||
|
});
|
||||||
|
|
||||||
|
// Send email to signer.
|
||||||
|
await mailer.sendMail({
|
||||||
|
to: {
|
||||||
|
address: signer.email,
|
||||||
|
name: signer.name,
|
||||||
|
},
|
||||||
|
from: {
|
||||||
|
name: FROM_NAME,
|
||||||
|
address: FROM_ADDRESS,
|
||||||
|
},
|
||||||
|
subject: 'Document signed',
|
||||||
|
html: render(template),
|
||||||
|
text: render(template, { plainText: true }),
|
||||||
|
attachments: [{ content: Buffer.from(pdfBytes), filename: documentName }],
|
||||||
|
});
|
||||||
|
|
||||||
|
return documentToken;
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Map the fields provided by the user to fields compatible with Prisma.
|
||||||
|
*
|
||||||
|
* Signature fields are handled separately.
|
||||||
|
*
|
||||||
|
* @param field The field passed in by the user.
|
||||||
|
* @param signer The details of the person who is signing this document.
|
||||||
|
* @returns A field compatible with Prisma.
|
||||||
|
*/
|
||||||
|
const mapField = (
|
||||||
|
field: TCreateSinglePlayerDocumentSchema['fields'][number],
|
||||||
|
signer: TCreateSinglePlayerDocumentSchema['signer'],
|
||||||
|
) => {
|
||||||
|
const customText = match(field.type)
|
||||||
|
.with(FieldType.DATE, () => DateTime.now().toFormat('yyyy-MM-dd hh:mm a'))
|
||||||
|
.with(FieldType.EMAIL, () => signer.email)
|
||||||
|
.with(FieldType.NAME, () => signer.name)
|
||||||
|
.otherwise(() => '');
|
||||||
|
|
||||||
|
return {
|
||||||
|
type: field.type,
|
||||||
|
page: field.page,
|
||||||
|
positionX: new Prisma.Decimal(field.positionX),
|
||||||
|
positionY: new Prisma.Decimal(field.positionY),
|
||||||
|
width: new Prisma.Decimal(field.width),
|
||||||
|
height: new Prisma.Decimal(field.height),
|
||||||
|
customText,
|
||||||
|
inserted: true,
|
||||||
|
};
|
||||||
|
};
|
||||||