Compare commits

...

14 Commits

Author SHA1 Message Date
Ephraim Atta-Duncan 652951ed7f Fix prisma studio opening twice 2023-08-11 20:48:42 +00:00
Ephraim Atta-Duncan 40db5baa17 Add gitpod button to readme 2023-08-11 20:44:09 +00:00
Ephraim Atta-Duncan 4cdfa2d1f0 Add gitpod config files 2023-08-11 20:38:41 +00:00
Mythie ba82b1fca8 chore: update dockerfile 2023-08-10 13:51:22 +10:00
Lucas Smith e5a80a701f Merge pull request #242 from documenso/docs/railway-one-click-deploy
docs: add railway one click deploy
2023-08-09 16:23:40 +10:00
Lucas Smith f8aebbc484 Merge branch 'main' into docs/railway-one-click-deploy 2023-08-09 16:22:56 +10:00
Lucas Smith 4e60d4ac09 Merge pull request #247 from criadoperez/fix/criadoperez
Fixed typos
2023-08-04 12:36:49 +10:00
Alejandro Criado-Pérez b5328eebde Corrected ts and tsx files 2023-08-04 02:14:04 +02:00
Lucas Smith e87c57c97c Merge branch 'main' into docs/railway-one-click-deploy 2023-08-03 10:51:49 +10:00
Timur Ercan cef5c8e33f Merge pull request #245 from documenso/fix-comunity-link
Update link to community (Discord)
2023-08-02 15:13:48 +02:00
flō b03dd1553f Update link to community (Discord) 2023-08-02 15:12:31 +02:00
Ephraim Atta-Duncan f6d1b8c8a1 add hint that more deployment methods are coming 2023-08-01 14:12:33 +00:00
Ephraim Atta-Duncan cb29ffef37 docs: add railway one click deploy 2023-08-01 13:47:50 +00:00
Lucas Smith f7d0bb9823 Merge pull request #227 from documenso/docs-coventional-commits
docs: conventional commits
2023-07-31 13:00:55 +10:00
12 changed files with 129 additions and 14 deletions
+29
View File
@@ -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
View File
@@ -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
View File
@@ -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
+16 -5
View File
@@ -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.
[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](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
[![Deploy on Railway](https://railway.app/button.svg)](https://railway.app/template/DjrRRX)
# Troubleshooting
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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;
+2 -2
View File
@@ -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.");
}
}
+1 -1
View File
@@ -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);
+15
View File
@@ -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 -1
View File
@@ -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> => {