mirror of
https://github.com/documenso/documenso.git
synced 2025-11-10 04:22:32 +10:00
Merge branch 'main' into bugfix/long_filename
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@ -36,3 +36,6 @@ yarn-error.log*
|
||||
next-env.d.ts
|
||||
.env
|
||||
.env.example
|
||||
|
||||
# turborepo
|
||||
.turbo
|
||||
10
README.md
10
README.md
@ -78,8 +78,6 @@ The current project goal is to <b>[release a production ready version](https://g
|
||||
|
||||
- To contribute please see our [contribution guide](https://github.com/documenso/documenso/blob/main/CONTRIBUTING.md).
|
||||
|
||||
|
||||
|
||||
# Tech
|
||||
|
||||
Documenso is built using awesome open source tech including:
|
||||
@ -123,7 +121,7 @@ Want to get up and running quickly? Follow these steps:
|
||||
- This will spin up a postgres database and inbucket mail server in docker containers.
|
||||
- Run `npm run dev` in the root directory
|
||||
- Want it even faster? Just use
|
||||
```sh
|
||||
```sh
|
||||
npm run d
|
||||
```
|
||||
|
||||
@ -157,10 +155,10 @@ Follow these steps to setup documenso on you local machine:
|
||||
---
|
||||
|
||||
- Optional: Seed the database using <code>npm run db-seed</code> to create a test user and document
|
||||
- Optional: Upload and sign <code>apps/web/ressources/example.pdf</code> manually to test your setup
|
||||
- Optional: Upload and sign <code>apps/web/resources/example.pdf</code> manually to test your setup
|
||||
|
||||
- Optional: Create your own signing certificate
|
||||
- A demo certificate is provided in `/app/web/ressources/certificate.p12`
|
||||
- A demo certificate is provided in `/app/web/resources/certificate.p12`
|
||||
- To generate your own using these steps and a Linux Terminal or Windows Subsystem for Linux (WSL) see **[Create your own signing certificate](#creating-your-own-signing-certificate)**.
|
||||
|
||||
## Updating
|
||||
@ -185,7 +183,7 @@ For the digital signature of your documents you need a signing certificate in .p
|
||||
3. Combine the private key and the self-signed certificate to create the p12 certificate. You can run the following command to do this: \
|
||||
<code>openssl pkcs12 -export -out certificate.p12 -inkey private.key -in certificate.crt</code>
|
||||
4. You will be prompted to enter a password for the p12 file. Choose a strong password and remember it, as you will need it to use the certificate (**can be empty for dev certificates**)
|
||||
5. Place the certificate <code>/apps/web/ressource/certificate.p12</code>
|
||||
5. Place the certificate <code>/apps/web/resources/certificate.p12</code>
|
||||
|
||||
# Docker
|
||||
|
||||
|
||||
@ -4,22 +4,15 @@ require("dotenv").config({ path: "../../.env" });
|
||||
const nextConfig = {
|
||||
reactStrictMode: true,
|
||||
swcMinify: false,
|
||||
transpilePackages: [
|
||||
"@documenso/prisma",
|
||||
"@documenso/lib",
|
||||
"@documenso/ui",
|
||||
"@documenso/pdf",
|
||||
"@documenso/features",
|
||||
"@documenso/signing",
|
||||
"react-signature-canvas",
|
||||
],
|
||||
};
|
||||
|
||||
const transpileModules = require("next-transpile-modules")([
|
||||
"@documenso/prisma",
|
||||
"@documenso/lib",
|
||||
"@documenso/ui",
|
||||
"@documenso/pdf",
|
||||
"@documenso/features",
|
||||
"@documenso/signing",
|
||||
"react-signature-canvas",
|
||||
]);
|
||||
|
||||
const plugins = [
|
||||
transpileModules
|
||||
];
|
||||
|
||||
const moduleExports = () => plugins.reduce((acc, next) => next(acc), nextConfig);
|
||||
|
||||
module.exports = moduleExports;
|
||||
module.exports = nextConfig;
|
||||
|
||||
@ -56,11 +56,10 @@
|
||||
"eslint": "8.27.0",
|
||||
"eslint-config-next": "13.0.3",
|
||||
"file-loader": "^6.2.0",
|
||||
"next-transpile-modules": "^10.0.0",
|
||||
"postcss": "^8.4.19",
|
||||
"sass": "^1.57.1",
|
||||
"stripe-cli": "^0.1.0",
|
||||
"tailwindcss": "^3.2.4",
|
||||
"typescript": "4.8.4"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
153
package-lock.json
generated
153
package-lock.json
generated
@ -40,6 +40,7 @@
|
||||
"npm-run-all": "^4.1.5",
|
||||
"prettier": "^2.8.7",
|
||||
"prettier-plugin-tailwindcss": "^0.2.5",
|
||||
"turbo": "^1.9.9",
|
||||
"typescript": "4.8.4"
|
||||
}
|
||||
},
|
||||
@ -7665,6 +7666,102 @@
|
||||
"node": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/turbo": {
|
||||
"version": "1.9.9",
|
||||
"resolved": "https://registry.npmjs.org/turbo/-/turbo-1.9.9.tgz",
|
||||
"integrity": "sha512-+ZS66LOT7ahKHxh6XrIdcmf2Yk9mNpAbPEj4iF2cs0cAeaDU3xLVPZFF0HbSho89Uxwhx7b5HBgPbdcjQTwQkg==",
|
||||
"dev": true,
|
||||
"hasInstallScript": true,
|
||||
"bin": {
|
||||
"turbo": "bin/turbo"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"turbo-darwin-64": "1.9.9",
|
||||
"turbo-darwin-arm64": "1.9.9",
|
||||
"turbo-linux-64": "1.9.9",
|
||||
"turbo-linux-arm64": "1.9.9",
|
||||
"turbo-windows-64": "1.9.9",
|
||||
"turbo-windows-arm64": "1.9.9"
|
||||
}
|
||||
},
|
||||
"node_modules/turbo-darwin-64": {
|
||||
"version": "1.9.9",
|
||||
"resolved": "https://registry.npmjs.org/turbo-darwin-64/-/turbo-darwin-64-1.9.9.tgz",
|
||||
"integrity": "sha512-UDGM9E21eCDzF5t1F4rzrjwWutcup33e7ZjNJcW/mJDPorazZzqXGKEPIy9kXwKhamUUXfC7668r6ZuA1WXF2Q==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"os": [
|
||||
"darwin"
|
||||
]
|
||||
},
|
||||
"node_modules/turbo-darwin-arm64": {
|
||||
"version": "1.9.9",
|
||||
"resolved": "https://registry.npmjs.org/turbo-darwin-arm64/-/turbo-darwin-arm64-1.9.9.tgz",
|
||||
"integrity": "sha512-VyfkXzTJpYLTAQ9krq2myyEq7RPObilpS04lgJ4OO1piq76RNmSpX9F/t9JCaY9Pj/4TL7i0d8PM7NGhwEA5Ag==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"os": [
|
||||
"darwin"
|
||||
]
|
||||
},
|
||||
"node_modules/turbo-linux-64": {
|
||||
"version": "1.9.9",
|
||||
"resolved": "https://registry.npmjs.org/turbo-linux-64/-/turbo-linux-64-1.9.9.tgz",
|
||||
"integrity": "sha512-Fu1MY29Odg8dHOqXcpIIGC3T63XLOGgnGfbobXMKdrC7JQDvtJv8TUCYciRsyknZYjyyKK1z6zKuYIiDjf3KeQ==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"os": [
|
||||
"linux"
|
||||
]
|
||||
},
|
||||
"node_modules/turbo-linux-arm64": {
|
||||
"version": "1.9.9",
|
||||
"resolved": "https://registry.npmjs.org/turbo-linux-arm64/-/turbo-linux-arm64-1.9.9.tgz",
|
||||
"integrity": "sha512-50LI8NafPuJxdnMCBeDdzgyt1cgjQG7FwkyY336v4e95WJPUVjrHdrKH6jYXhOUyrv9+jCJxwX1Yrg02t5yJ1g==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"os": [
|
||||
"linux"
|
||||
]
|
||||
},
|
||||
"node_modules/turbo-windows-64": {
|
||||
"version": "1.9.9",
|
||||
"resolved": "https://registry.npmjs.org/turbo-windows-64/-/turbo-windows-64-1.9.9.tgz",
|
||||
"integrity": "sha512-9IsTReoLmQl1IRsy3WExe2j2RKWXQyXujfJ4fXF+jp08KxjVF4/tYP2CIRJx/A7UP/7keBta27bZqzAjsmbSTA==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"os": [
|
||||
"win32"
|
||||
]
|
||||
},
|
||||
"node_modules/turbo-windows-arm64": {
|
||||
"version": "1.9.9",
|
||||
"resolved": "https://registry.npmjs.org/turbo-windows-arm64/-/turbo-windows-arm64-1.9.9.tgz",
|
||||
"integrity": "sha512-CUu4hpeQo68JjDr0V0ygTQRLbS+/sNfdqEVV+Xz9136vpKn2WMQLAuUBVZV0Sp0S/7i+zGnplskT0fED+W46wQ==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"os": [
|
||||
"win32"
|
||||
]
|
||||
},
|
||||
"node_modules/tweetnacl": {
|
||||
"version": "0.14.5",
|
||||
"resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz",
|
||||
@ -13859,6 +13956,62 @@
|
||||
"safe-buffer": "^5.0.1"
|
||||
}
|
||||
},
|
||||
"turbo": {
|
||||
"version": "1.9.9",
|
||||
"resolved": "https://registry.npmjs.org/turbo/-/turbo-1.9.9.tgz",
|
||||
"integrity": "sha512-+ZS66LOT7ahKHxh6XrIdcmf2Yk9mNpAbPEj4iF2cs0cAeaDU3xLVPZFF0HbSho89Uxwhx7b5HBgPbdcjQTwQkg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"turbo-darwin-64": "1.9.9",
|
||||
"turbo-darwin-arm64": "1.9.9",
|
||||
"turbo-linux-64": "1.9.9",
|
||||
"turbo-linux-arm64": "1.9.9",
|
||||
"turbo-windows-64": "1.9.9",
|
||||
"turbo-windows-arm64": "1.9.9"
|
||||
}
|
||||
},
|
||||
"turbo-darwin-64": {
|
||||
"version": "1.9.9",
|
||||
"resolved": "https://registry.npmjs.org/turbo-darwin-64/-/turbo-darwin-64-1.9.9.tgz",
|
||||
"integrity": "sha512-UDGM9E21eCDzF5t1F4rzrjwWutcup33e7ZjNJcW/mJDPorazZzqXGKEPIy9kXwKhamUUXfC7668r6ZuA1WXF2Q==",
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"turbo-darwin-arm64": {
|
||||
"version": "1.9.9",
|
||||
"resolved": "https://registry.npmjs.org/turbo-darwin-arm64/-/turbo-darwin-arm64-1.9.9.tgz",
|
||||
"integrity": "sha512-VyfkXzTJpYLTAQ9krq2myyEq7RPObilpS04lgJ4OO1piq76RNmSpX9F/t9JCaY9Pj/4TL7i0d8PM7NGhwEA5Ag==",
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"turbo-linux-64": {
|
||||
"version": "1.9.9",
|
||||
"resolved": "https://registry.npmjs.org/turbo-linux-64/-/turbo-linux-64-1.9.9.tgz",
|
||||
"integrity": "sha512-Fu1MY29Odg8dHOqXcpIIGC3T63XLOGgnGfbobXMKdrC7JQDvtJv8TUCYciRsyknZYjyyKK1z6zKuYIiDjf3KeQ==",
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"turbo-linux-arm64": {
|
||||
"version": "1.9.9",
|
||||
"resolved": "https://registry.npmjs.org/turbo-linux-arm64/-/turbo-linux-arm64-1.9.9.tgz",
|
||||
"integrity": "sha512-50LI8NafPuJxdnMCBeDdzgyt1cgjQG7FwkyY336v4e95WJPUVjrHdrKH6jYXhOUyrv9+jCJxwX1Yrg02t5yJ1g==",
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"turbo-windows-64": {
|
||||
"version": "1.9.9",
|
||||
"resolved": "https://registry.npmjs.org/turbo-windows-64/-/turbo-windows-64-1.9.9.tgz",
|
||||
"integrity": "sha512-9IsTReoLmQl1IRsy3WExe2j2RKWXQyXujfJ4fXF+jp08KxjVF4/tYP2CIRJx/A7UP/7keBta27bZqzAjsmbSTA==",
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"turbo-windows-arm64": {
|
||||
"version": "1.9.9",
|
||||
"resolved": "https://registry.npmjs.org/turbo-windows-arm64/-/turbo-windows-arm64-1.9.9.tgz",
|
||||
"integrity": "sha512-CUu4hpeQo68JjDr0V0ygTQRLbS+/sNfdqEVV+Xz9136vpKn2WMQLAuUBVZV0Sp0S/7i+zGnplskT0fED+W46wQ==",
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"tweetnacl": {
|
||||
"version": "0.14.5",
|
||||
"resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz",
|
||||
|
||||
@ -2,9 +2,9 @@
|
||||
"name": "documenso-monorepo",
|
||||
"version": "0.0.0",
|
||||
"scripts": {
|
||||
"dev": "npm run dev -w apps/web",
|
||||
"build": "npm i && cd apps && cd web && npm i && next build",
|
||||
"start": "cd apps && cd web && next start",
|
||||
"dev": "turbo run dev --filter=web",
|
||||
"build": "turbo run build --filter=web",
|
||||
"start": "turbo run start --filter=web",
|
||||
"db-migrate:dev": "prisma migrate dev",
|
||||
"db-seed": "prisma db seed",
|
||||
"db-studio": "prisma studio",
|
||||
@ -52,6 +52,7 @@
|
||||
"npm-run-all": "^4.1.5",
|
||||
"prettier": "^2.8.7",
|
||||
"prettier-plugin-tailwindcss": "^0.2.5",
|
||||
"turbo": "^1.9.9",
|
||||
"typescript": "4.8.4"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -10,7 +10,7 @@ export const addDigitalSignature = async (documentAsBase64: string): Promise<str
|
||||
const pdfBuffer = Buffer.from(documentAsBase64, "base64");
|
||||
const p12Buffer = Buffer.from(
|
||||
fs
|
||||
.readFileSync(process.env.CERT_FILE_PATH || "ressources/certificate.p12")
|
||||
.readFileSync(process.env.CERT_FILE_PATH || "resources/certificate.p12")
|
||||
.toString(process.env.CERT_FILE_ENCODING ? undefined : "binary"),
|
||||
(process.env.CERT_FILE_ENCODING as BufferEncoding) || "binary"
|
||||
);
|
||||
|
||||
38
turbo.json
Normal file
38
turbo.json
Normal file
@ -0,0 +1,38 @@
|
||||
{
|
||||
"$schema": "https://turbo.build/schema.json",
|
||||
"globalEnv": [
|
||||
"DATABASE_URL",
|
||||
"NEXT_PUBLIC_WEBAPP_URL",
|
||||
"NEXTAUTH_SECRET",
|
||||
"NEXTAUTH_URL",
|
||||
"CERT_FILE_PATH",
|
||||
"CERT_PASSPHRASE",
|
||||
"CERT_FILE_ENCODING",
|
||||
"SENDGRID_API_KEY",
|
||||
"SMTP_MAIL_HOST",
|
||||
"SMTP_MAIL_PORT",
|
||||
"SMTP_MAIL_USER",
|
||||
"SMTP_MAIL_PASSWORD",
|
||||
"MAIL_FROM",
|
||||
"STRIPE_API_KEY",
|
||||
"STRIPE_WEBHOOK_SECRET",
|
||||
"NEXT_PUBLIC_STRIPE_COMMUNITY_PLAN_MONTHLY_PRICE_ID",
|
||||
"NEXT_PUBLIC_STRIPE_COMMUNITY_PLAN_YEARLY_PRICE_ID",
|
||||
"NEXT_PUBLIC_ALLOW_SIGNUP",
|
||||
"NEXT_PUBLIC_ALLOW_SUBSCRIPTIONS"
|
||||
],
|
||||
"pipeline": {
|
||||
"build": {
|
||||
"outputs": [".next/**", "!.next/cache/**"]
|
||||
},
|
||||
"start": {
|
||||
"dependsOn": ["build"],
|
||||
"cache": false,
|
||||
"persistent": true
|
||||
},
|
||||
"dev": {
|
||||
"cache": false,
|
||||
"persistent": true
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user