> We are launching on Product Hunt soon! Sign up to support the launch: >
Product Hunt

Documenso Logo

Open Source Signing Infrastructure

The DocuSign Open Source Alternative.
Learn more »

Slack · Website · Issues · Roadmap

Join Documenso on Slack Github Stars License Commits-per-month

# Documenso 0.9 - Developer Preview
> **Note** > This project is currently under community review and will publish it's first production release soon™. ## About this project Signing documents digitally is fast, easy and should be best practice for every document signed worldwide. This is technically quite easy today, but it also introduces a new party to every signature: The signing tool providers. While this is not a problem in itself, it should make us think about how we want these providers of trust to work. Documenso aims to be the world's most trusted document signing tool. This trust is built by empowering you to self-host Documenso and review how it works under the hood. Join us in creating the next generation of open trust infrastructure. ## Community and Next Steps 🎯 The current project goal is to [release a production ready version](https://github.com/documenso/documenso/milestone/1) for self-hosting as soon as possible. If you want to help making that happen you can: - Check out the first source code release in this repository and test it - Tell us what you think in the current [Discussions](https://github.com/documenso/documenso/discussions) - Join the [Slack Channel](https://join.slack.com/t/documenso/shared_invite/zt-1qwxxsvli-nDyojjt~wakhgBGl9JRl2w) for any questions and getting to know to other community members - ⭐ the repository to help us raise awareness - 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 ## Contributing - 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: - [Typescript](https://www.typescriptlang.org/) - [Javascript (when necessary)](https://developer.mozilla.org/en-US/docs/Web/JavaScript) - [NextJS (JS Fullstack Framework)](https://nextjs.org/) - [Postgres SQL (Database)](https://www.postgresql.org/) - [Prisma (ORM - Object-relational mapping)](https://www.prisma.io/) - [Tailwind CSS (Styling)](https://tailwindcss.com/) - [Node SignPDF (Digital Signature)](https://github.com/vbuch/node-signpdf) - [React-PDF for viewing PDFs](https://github.com/wojtekmaj/react-pdf) - [PDF-Lib for PDF manipulation](https://github.com/Hopding/pdf-lib) - Check out `/package.json` and `/apps/web/package.json` for more - Support for [opensignpdf (requires Java on server)](https://github.com/open-pdf-sign) is currently planned. # Getting Started ## Requirements To run Documenso locally you need - [Node.js (Version: >=18.x)](https://nodejs.org/en/download/) - Node Package Manager NPM - included in Node.js - [PostgreSQL (local or remote)](https://www.postgresql.org/download/) ## Developer Quickstart > **Note**: This is a quickstart for developers. It assumes that you have both [docker](https://docs.docker.com/get-docker/) and [docker-compose](https://docs.docker.com/compose/) installed on your machine. Want to get up and running quickly? Follow these steps: - [Clone the repository](https://help.github.com/articles/cloning-a-repository/) it to your local device. ```sh git clone https://github.com/documenso/documenso ``` - Set up your `.env` file using the recommendations in the `.env.example` file. - Run `npm run dx` in the root directory - 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 npm run d ``` That's it! You should now be able to access the app at http://localhost:3000 Incoming mail will be available at http://localhost:9000 Your database will also be available on port `54320`. You can connect to it using your favorite database client. ## Developer 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. ```sh git clone https://github.com/documenso/documenso ``` - Run npm i in root directory - Rename .env.example to .env - Set DATABASE_URL value in .env file - You can use the provided test database url (may be wiped at any point) - Or setup a local postgres sql instance (recommended) - Create the database scheme by running db-migrate:dev - Setup your mail provider - Set SENDGRID_API_KEY value in .env file - You need a SendGrid account, which you can create [here](https://signup.sendgrid.com/). - Documenso uses [Nodemailer](https://nodemailer.com/about/) so you can easily use your own SMTP server by setting the SMTP\_\* variables in your .env - Run npm run dev root directory to start - Register a new user at http://localhost:3000/signup --- - Optional: Seed the database using npm run db-seed to create a test user and document - Optional: Upload and sign apps/web/ressources/example.pdf manually to test your setup - Optional: Create your own signing certificate - A demo certificate is provided in `/app/web/ressources/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 - If you pull the newest version from main, using git pull, it may be necessary to regenerate your database client - You can do this by running the generate command in `/packages/prisma`: ```sh npx prisma generate ``` - This is not necessary on first clone. # Creating your own signing certificate For the digital signature of your documents you need a signing certificate in .p12 format (public and private key). You can buy one (not recommended for dev) or use the steps to create a self-signed one: 1. Generate a private key using the OpenSSL command. You can run the following command to generate a 2048-bit RSA key:\ openssl genrsa -out private.key 2048 2. Generate a self-signed certificate using the private key. You can run the following command to generate a self-signed certificate:\ openssl req -new -x509 -key private.key -out certificate.crt -days 365 \ This will prompt you to enter some information, such as the Common Name (CN) for the certificate. Make sure you enter the correct information. The -days parameter sets the number of days for which the certificate is valid. 3. Combine the private key and the self-signed certificate to create the p12 certificate. You can run the following command to do this: \ openssl pkcs12 -export -out certificate.p12 -inkey private.key -in certificate.crt 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 /apps/web/ressource/certificate.p12 # Docker > We are still working on the publishing of docker images, in the meantime you can follow the steps below to create a production ready docker image. 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™ - Docker support - One-Click-Deploy on Render.com Deploy