mirror of
https://github.com/documenso/documenso.git
synced 2026-06-22 04:12:06 +10:00
Compare commits
14 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 652951ed7f | |||
| 40db5baa17 | |||
| 4cdfa2d1f0 | |||
| ba82b1fca8 | |||
| e5a80a701f | |||
| f8aebbc484 | |||
| 4e60d4ac09 | |||
| b5328eebde | |||
| e87c57c97c | |||
| cef5c8e33f | |||
| b03dd1553f | |||
| f6d1b8c8a1 | |||
| cb29ffef37 | |||
| f7d0bb9823 |
+29
@@ -0,0 +1,29 @@
|
||||
DATABASE_URL="postgres://documenso:password@127.0.0.1:54320/documenso"
|
||||
NEXT_PUBLIC_WEBAPP_URL=""
|
||||
|
||||
# AUTH
|
||||
NEXTAUTH_SECRET='lorem ipsum sit dolor random string for encryption this could literally be anything'
|
||||
NEXTAUTH_URL=""
|
||||
|
||||
# SIGNING
|
||||
CERT_FILE_PATH=""
|
||||
CERT_PASSPHRASE=""
|
||||
CERT_FILE_ENCODING=""
|
||||
|
||||
# EMAIL
|
||||
SMTP_MAIL_HOST='127.0.0.1'
|
||||
SMTP_MAIL_PORT='2500'
|
||||
SMTP_MAIL_USER='documenso'
|
||||
SMTP_MAIL_PASSWORD='documenso'
|
||||
MAIL_FROM='documenso@gitpod.io'
|
||||
|
||||
# STRIPE
|
||||
STRIPE_API_KEY=""
|
||||
STRIPE_WEBHOOK_SECRET=""
|
||||
NEXT_PUBLIC_STRIPE_COMMUNITY_PLAN_MONTHLY_PRICE_ID=""
|
||||
NEXT_PUBLIC_STRIPE_COMMUNITY_PLAN_YEARLY_PRICE_ID=""
|
||||
|
||||
#FEATURE FLAGS
|
||||
# Allow users to register via the /signup page. Otherwise they will be redirect to the home page.
|
||||
NEXT_PUBLIC_ALLOW_SIGNUP=true
|
||||
NEXT_PUBLIC_ALLOW_SUBSCRIPTIONS=false
|
||||
+60
@@ -0,0 +1,60 @@
|
||||
tasks:
|
||||
- name: Dependencies & Database
|
||||
init: |
|
||||
npm install &&
|
||||
npm run docker:compose-up &&
|
||||
cp .env.gitpod .env &&
|
||||
next_auth_secret=$(openssl rand -base64 32) &&
|
||||
sed -i -e "s|^NEXTAUTH_SECRET=.*|NEXTAUTH_SECRET=$next_auth_secret|" .env &&
|
||||
sed -i "s|NEXTAUTH_URL=\"\"|NEXTAUTH_URL=https://3000-${HOSTNAME}.${GITPOD_WORKSPACE_CLUSTER_HOST}|" .env &&
|
||||
sed -i "s|NEXT_PUBLIC_WEBAPP_URL=\"\"|NEXT_PUBLIC_WEBAPP_URL=https://3000-${HOSTNAME}.${GITPOD_WORKSPACE_CLUSTER_HOST}|" .env
|
||||
command: npm run d
|
||||
|
||||
- name: Database Studio
|
||||
command: |
|
||||
gp ports await 3000
|
||||
npm run db-studio
|
||||
|
||||
ports:
|
||||
- name: App
|
||||
port: 3000
|
||||
visibility: public
|
||||
onOpen: open-browser
|
||||
|
||||
- name: Mailbox
|
||||
port: 9000
|
||||
visibility: public
|
||||
onOpen: open-browser
|
||||
|
||||
- name: Database
|
||||
port: 54320
|
||||
visibility: private
|
||||
onOpen: ignore
|
||||
|
||||
- name: Mailserver
|
||||
port: 2500
|
||||
visibility: private
|
||||
onOpen: ignore
|
||||
|
||||
- name: Database Studio
|
||||
port: 5555
|
||||
visibility: public
|
||||
|
||||
- port: 1100
|
||||
visibility: private
|
||||
onOpen: ignore
|
||||
|
||||
github:
|
||||
prebuilds:
|
||||
master: true
|
||||
pullRequests: true
|
||||
pullRequestsFromForks: true
|
||||
addCheck: true
|
||||
addComment: true
|
||||
addBadge: true
|
||||
|
||||
vscode:
|
||||
extensions:
|
||||
- esbenp.prettier-vscode
|
||||
- bradlc.vscode-tailwindcss
|
||||
- Prisma.prisma
|
||||
+1
-1
@@ -12,7 +12,7 @@ If you plan to contribute to Documenso, please take a moment to feel awesome ✨
|
||||
|
||||
- The development branch is <code>main</code>. All pull request should be made against this branch.
|
||||
- If you need help getting started, [join us on Slack](https://documen.so/slack).
|
||||
- Use [Convential Commits](https://www.conventionalcommits.org/) to keep everything nice and clean.
|
||||
- Use [Conventional Commits](https://www.conventionalcommits.org/) to keep everything nice and clean.
|
||||
- Choose your branch name using the issue you are working on and a coventional commit type.
|
||||
|
||||
1. [Fork](https://help.github.com/articles/fork-a-repo/) this repository to your
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
<a href="https://documenso.com"><strong>Learn more »</strong></a>
|
||||
<br />
|
||||
<br />
|
||||
<a href="https://documen.so/slack">Slack</a>
|
||||
<a href="https://documen.so/discord">Discord</a>
|
||||
·
|
||||
<a href="https://documenso.com">Website</a>
|
||||
·
|
||||
@@ -20,7 +20,7 @@
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<a href="https://documen.so/slack"><img src="https://img.shields.io/badge/Slack-documenso.slack.com-%234A154B" alt="Join Documenso on Slack"></a>
|
||||
<a href="https://documen.so/discord"><img src="https://img.shields.io/badge/Discord-documen.so/discord-%235865F2" alt="Join Documenso on Discord"></a>
|
||||
<a href="https://github.com/documenso/documenso/stargazers"><img src="https://img.shields.io/github/stars/documenso/documenso" alt="Github Stars"></a>
|
||||
<a href="https://github.com/documenso/documenso/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-AGPLv3-purple" alt="License"></a>
|
||||
<a href="https://github.com/documenso/documenso/pulse"><img src="https://img.shields.io/github/commit-activity/m/documenso/documenso" alt="Commits-per-month"></a>
|
||||
@@ -135,6 +135,8 @@ Your database will also be available on port `54320`. You can connect to it usin
|
||||
|
||||
## Developer Setup
|
||||
|
||||
### Manual Setup
|
||||
|
||||
Follow these steps to setup documenso on you local machine:
|
||||
|
||||
- [Clone the repository](https://help.github.com/articles/cloning-a-repository/) it to your local device.
|
||||
@@ -165,6 +167,12 @@ Follow these steps to setup documenso on you local machine:
|
||||
- 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)**.
|
||||
|
||||
### Run in Gitpod
|
||||
|
||||
- Click below to launch a ready-to-use Gitpod workspace in your browser.
|
||||
|
||||
[](https://gitpod.io/#https://github.com/documenso/documenso)
|
||||
|
||||
## Updating
|
||||
|
||||
- If you pull the newest version from main, using `git pull`, it may be necessary to regenerate your database client
|
||||
@@ -204,10 +212,13 @@ Want to create a production ready docker image? Follow these steps:
|
||||
- Run `./docker/build.sh` in the root directory.
|
||||
- Publish the image to your docker registry of choice.
|
||||
|
||||
# Deploying - Coming Soon™
|
||||
# Deployment
|
||||
|
||||
- Docker support
|
||||
- One-Click-Deploy on Render.com
|
||||
We support a variety of deployment methods, and are actively working on adding more. Stay tuned for updates!
|
||||
|
||||
## Railway
|
||||
|
||||
[](https://railway.app/template/DjrRRX)
|
||||
|
||||
# Troubleshooting
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@ export const BillingPlans = () => {
|
||||
</p>
|
||||
|
||||
<p className="mt-4 text-center text-sm text-gray-500">
|
||||
All you need for easy signing. <br></br>Includes everthing we build this year.
|
||||
All you need for easy signing. <br></br>Includes everything we build this year.
|
||||
</p>
|
||||
<div className="mt-4">
|
||||
<Button
|
||||
|
||||
@@ -30,7 +30,7 @@ export default function PDFEditor(props: any) {
|
||||
movedField.positionY = position.y.toFixed(0);
|
||||
createOrUpdateField(props.document, movedField);
|
||||
|
||||
// no instant redraw neccessary, position information for saving or later rerender is enough
|
||||
// no instant redraw necessary, position information for saving or later rerender is enough
|
||||
// setFields(newFields);
|
||||
}
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ export default function SignatureDialog(props: any) {
|
||||
const [typedSignature, setTypedSignature] = useState("");
|
||||
const [signatureEmpty, setSignatureEmpty] = useState(true);
|
||||
// This is a workaround to prevent the canvas from being rendered when the dialog is closed
|
||||
// we also need the debounce to avoid rendering while transitions are occuring.
|
||||
// we also need the debounce to avoid rendering while transitions are occurring.
|
||||
const showCanvas = useDebouncedValue<boolean>(props.open, 1);
|
||||
let signCanvasRef: any | undefined;
|
||||
|
||||
|
||||
@@ -61,9 +61,9 @@ async function postHandler(req: NextApiRequest, res: NextApiResponse) {
|
||||
return res.status(200).send(recipients.length);
|
||||
}
|
||||
|
||||
return res.status(502).end("Coud not send request for signing.");
|
||||
return res.status(502).end("Could not send request for signing.");
|
||||
} catch (err) {
|
||||
return res.status(502).end("Coud not send request for signing.");
|
||||
return res.status(502).end("Could not send request for signing.");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ async function postHandler(req: NextApiRequest, res: NextApiResponse) {
|
||||
for (const signature of signaturesFromBody) {
|
||||
if (!signature.signatureImage && !signature.typedSignature) {
|
||||
documentWithInserts = document.document;
|
||||
throw new Error("Cant't save invalid signature.");
|
||||
throw new Error("Can't save invalid signature.");
|
||||
}
|
||||
|
||||
await saveSignature(signature);
|
||||
|
||||
@@ -1,7 +1,14 @@
|
||||
ARG NEXT_PUBLIC_WEBAPP_URL=http://localhost:3000
|
||||
ARG NEXT_PUBLIC_ALLOW_SIGNUP=true
|
||||
ARG NEXT_PUBLIC_ALLOW_SUBSCRIPTIONS=false
|
||||
ARG NEXT_PUBLIC_STRIPE_COMMUNITY_PLAN_MONTHLY_PRICE_ID
|
||||
ARG NEXT_PUBLIC_STRIPE_COMMUNITY_PLAN_YEARLY_PRICE_ID
|
||||
|
||||
FROM node:18-alpine AS base
|
||||
|
||||
# Install dependencies only when needed
|
||||
FROM base AS production_deps
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Check https://github.com/nodejs/docker-node/tree/b4117f9333da4138b03a546ec926ef50a31506c3#nodealpine to understand why libc6-compat might be needed.
|
||||
@@ -14,6 +21,13 @@ RUN npm ci --production
|
||||
|
||||
# Install dependencies only when needed
|
||||
FROM base AS builder
|
||||
|
||||
ARG NEXT_PUBLIC_WEBAPP_URL
|
||||
ARG NEXT_PUBLIC_ALLOW_SIGNUP
|
||||
ARG NEXT_PUBLIC_ALLOW_SUBSCRIPTIONS
|
||||
ARG NEXT_PUBLIC_STRIPE_COMMUNITY_PLAN_MONTHLY_PRICE_ID
|
||||
ARG NEXT_PUBLIC_STRIPE_COMMUNITY_PLAN_YEARLY_PRICE_ID
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Check https://github.com/nodejs/docker-node/tree/b4117f9333da4138b03a546ec926ef50a31506c3#nodealpine to understand why libc6-compat might be needed.
|
||||
@@ -28,6 +42,7 @@ RUN npm run build --workspaces
|
||||
|
||||
# Production image, copy all the files and run next
|
||||
FROM base AS runner
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
ENV NODE_ENV production
|
||||
|
||||
@@ -31,7 +31,7 @@ export function getServerErrorFromUnknown(cause: unknown): HttpError {
|
||||
return new Error(cause, { cause });
|
||||
}
|
||||
|
||||
// Catch-All if none of the above triggered and something (even more) unexpected happend
|
||||
// Catch-All if none of the above triggered and something (even more) unexpected happened
|
||||
return new HttpError({
|
||||
statusCode: 500,
|
||||
message: `Unhandled error of type '${typeof cause}'. Please reach out for our customer support.`,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import fs from "fs";
|
||||
import { PDFDocument, PDFHexString, PDFName, PDFNumber, PDFString } from "pdf-lib";
|
||||
|
||||
// Local copy of Node SignPDF because https://github.com/vbuch/node-signpdf/pull/187 was not published in NPM yet. Can be switched to npm packge.
|
||||
// Local copy of Node SignPDF because https://github.com/vbuch/node-signpdf/pull/187 was not published in NPM yet. Can be switched to npm package.
|
||||
const signer = require("./node-signpdf/dist/signpdf");
|
||||
|
||||
export const addDigitalSignature = async (documentAsBase64: string): Promise<string> => {
|
||||
|
||||
Reference in New Issue
Block a user