diff --git a/.env.example b/.env.example index fb22bbedf..3dc0985cb 100644 --- a/.env.example +++ b/.env.example @@ -6,7 +6,7 @@ NEXTAUTH_SECRET="secret" NEXT_PRIVATE_GOOGLE_CLIENT_ID="" NEXT_PRIVATE_GOOGLE_CLIENT_SECRET="" -# [[APP]] +# [[URLS]] NEXT_PUBLIC_WEBAPP_URL="http://localhost:3000" NEXT_PUBLIC_MARKETING_URL="http://localhost:3001" diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 9a564b058..74fcb319b 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -9,7 +9,7 @@ updates: labels: - "ci dependencies" - "ci" - open-pull-requests-limit: 10 + open-pull-requests-limit: 2 - package-ecosystem: "npm" directory: "/apps/marketing" @@ -19,7 +19,7 @@ updates: labels: - "npm dependencies" - "frontend" - open-pull-requests-limit: 10 + open-pull-requests-limit: 2 - package-ecosystem: "npm" directory: "/apps/web" @@ -29,4 +29,4 @@ updates: labels: - "npm dependencies" - "frontend" - open-pull-requests-limit: 10 + open-pull-requests-limit: 2 diff --git a/README.md b/README.md index 29ffb0d65..aa00aed54 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@

- Documenso Logo + Documenso Logo

@@ -26,37 +26,30 @@ Commits-per-month

-> **🚧 We're currently working on a large scale refactor which can be found on the [feat/refresh](https://github.com/documenso/documenso/tree/feat/refresh) branch.** +> 🦺 Documenso 1.0 is deployed to our Staging Environment. > -> **[Read more on why 👀](https://documenso.com/blog/why-were-doing-a-rewrite)** +> 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. -# Documenso 0.9 - Developer Preview +# Join us in testing Documenso 1.0 during [MALFUNCTION MANIA](https://documenso.com/blog/malfunction-mania)
+ src="https://github.com/documenso/documenso/assets/1309312/67e08c98-c153-4115-aa2d-77979bb12c94)"> + src="https://github.com/documenso/documenso/assets/1309312/040cfbae-3438-4ca3-87f2-ce52c793dcaf"> + src="https://github.com/documenso/documenso/assets/1309312/72d445be-41e5-4936-bdba-87ef8e70fa09"> + src="https://github.com/documenso/documenso/assets/1309312/d7b86c0f-a755-4476-a022-a608db2c4633"> - - - + src=https://github.com/documenso/documenso/assets/1309312/c0f55116-ab82-433f-a266-f3fc8571d69f">
-> **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. +Signing documents digitally is fast and easy and should be the 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. ## Recognition @@ -65,13 +58,13 @@ Signing documents digitally is fast, easy and should be best practice for every ## 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 - Tell us what you think in the current [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 - ⭐ 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 ## Contributing diff --git a/apps/marketing/content/blog/deploy-with-vercel-supabase-resend.mdx b/apps/marketing/content/blog/deploy-with-vercel-supabase-resend.mdx new file mode 100644 index 000000000..fb00f40bf --- /dev/null +++ b/apps/marketing/content/blog/deploy-with-vercel-supabase-resend.mdx @@ -0,0 +1,198 @@ +--- +title: 'Deploying Documenso with Vercel, Supabase and Resend' +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: 'Ephraim Atta-Duncan' +authorImage: '/blog/blog-author-duncan.jpeg' +authorRole: 'Software Engineer Intern' +date: 2023-09-08 +tags: + - Open Source + - Self Hosting + - Tutorial +--- + +In this article, we'll walk you through how to deploy and self-host Documenso using Vercel, Supabase, and Resend. + +You'll learn: + +- How to set up a Postgres database using Supabase, +- How to install SMTP with Resend, +- How to deploy your project with Vercel. + +If you don't know what [Documenso](https://documenso.com/) is, it's an open-source alternative to DocuSign, with the mission to create an open signing infrastructure while embracing openness, cooperation, and transparency. + +## Prerequisites + +Before we start, make sure you have a [GitHub](https://github.com/signup) account. You also need [Node.js](https://nodejs.org/en) and [npm](https://www.npmjs.com/) installed on your local machine (note: you also have the option to host it on a cloud environment using Gitpod for example; that would be another post). If you need accounts on Vercel, Supabase, and Resend, create them by visiting the [Vercel](https://vercel.com/), [Supabase](https://supabase.com/), and [Resend](https://resend.com/) websites. + +Checklist: + +- [ ] Have a GitHub account +- [ ] Install Node.js +- [ ] Install npm +- [ ] Have a Vercel account +- [ ] Have a Supabase account +- [ ] Have a Resend account + +## Step-by-Step guide to deploying Documenso with Vercel, Supabase, and Resend + +To deploy Documenso, we'll take the following steps: + +1. Fork the Documenso repository +2. Clone the forked repository and install dependencies +3. Create a new project on Supabase +4. Copy the Supabase Postgres database connection URL +5. Create a `.env` file +6. Run the migration on the Supabase Postgres Database +7. Get your SMTP Keys on Resend +8. Create a new project on Vercel +9. Add Environment Variables to your Vercel project + +So, you're ready? Let’s dive in! + +### Step 1: Fork the Documenso repository + +Start by creating a fork of Documenso on GitHub. You can do this by visiting the [Documenso repository](https://github.com/documenso/documenso) and clicking on the 'Fork' button. (Also, star the repo!) + +![Documenso](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wkcujctpf86p56bju3mq.png) + +Choose your GitHub profile as the owner and click on 'Create fork' to create a fork of the repo. + +![Fork the Documenso repository on GitHub](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xf49r2byu9nnd1465niy.png) + +### Step 2: Clone the forked repository and install dependencies + +Clone the forked repository to your local machine in any directory of your choice. Open your terminal and enter the following commands: + +```bash +# Clone the repo using Github CLI +gh repo clone [your_github_username]/documenso + +# Clone the repo using Git +git clone +``` + +You can now navigate into the directory and install the project’s dependencies: + +```bash +cd documenso +npm install +``` + +### Step 3: Create a new project on Supabase + +Now, let's set up the database. + +If you haven't already, create a new project on Supabase. This will automatically create a new Postgres database for you. + +On your Supabase dashboard, click the '**New project**' button and choose your organization. + +On the '**Create a new project**' page, set a database name of **documenso** and a secure password for your database. Choose a region closer to you, a pricing plan, and click on '**Create new project**' to create your project. + +![Create a new project on Supabase](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/w5lqz771iupjyi1ekfdz.png) + +### Step 4: Copy the Supabase Postgres database connection URL + +In your project, click the '**Settings**' icon at the bottom left. + +Under the '**Project Settings**' section, click '**Database**' and scroll down to the '**Connection string**' section. Copy the '**URI**' and update it with the password you chose in the previous step. + +![Copy the Supabase Postgres database connection URL](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/y1ldu3qrg9moednbzjij.png) + +### Step 5: Create a `.env` file + +Create a `.env` file in the root of your project by copying the contents of the `.env.example` file. + +Add the connection string you copied from your Supabase dashboard to the `DATABASE_URL` variable in the `.env` file. + +The `.env` should look like this: + +```bash +DATABASE_URL="postgres://postgres:[YOUR-PASSWORD]@db.[YOUR-PROJECT-REF].supabase.co:5432/postgres" +``` + +### Step 6: Run the migration on the Supabase Postgres Database + +Run the migration on the Supabase Postgres Database using the following command: + +```bash +npx prisma migrate deploy +``` + +### Step 7: Get your SMTP Keys on Resend + +So, you've just cloned Documenso, installed dependencies on your local machine, and set your database using Supabase. Now, SMTP is missing. Emails won't go out! Let's fix it with Resend. + +In the **[Resend](https://resend.com/)** dashboard, click 'Add API Key' to create a key for Resend SMTP. + +![Create a key for Resend SMTP](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/uh2rztgn09mlvecl34i5.png) + +Next, add and verify your domain in the '**Domains**' section on the sidebar. This will allow you to send emails from any address associated with your domain. + +![Verify your domain on Resend](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nxgie0esz530vq5a494o.png) + +You can update your `.env` file with the following: + +```jsx +SMTP_MAIL_HOST = 'smtp.resend.com'; +SMTP_MAIL_PORT = '25'; +SMTP_MAIL_USER = 'resend'; +SMTP_MAIL_PASSWORD = 'YOUR_RESEND_API_KEY'; +MAIL_FROM = 'noreply@[YOUR_DOMAIN]'; +``` + +### Step 8: Create a new project on Vercel + +You set the database with Supabase and are SMTP-ready with Resend. Almost there! The next step is to deploy the project — we'll use Vercel for that. + +On your Vercel dashboard, create a new project using the forked project from your GitHub repositories. Select the project among the options and click '**Import**' to start running Documenso. + +![Create a new project on Vercel](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gdy97tltpnu7vf4fc11f.png) + +### Step 9: Add Environment Variables to your Vercel project + +In the '**Configure Project**' page, adding the required Environmental Variables is essential to ensure the application deploys without any errors. + +Specifically, for the `NEXT_PUBLIC_WEBAPP_URL` and `NEXTAUTH_URL` variables, you must add `.vercel.app` to your Project Name. This will form the deployment URL, which will be in the format: `https://[project_name].vercel.app`. + +For example, in my case, the deployment URL is `https://documenso-supabase-web.vercel.app`. + +![Add Environment Variables to your Vercel project](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/aru33fk1i19h0valffow.png) + +This is a sample `.env` to deploy. Copy and paste it to auto-populate the fields and click ‘**Deploy.’** Now, you only need to wait for your project to deploy. You’re going live — enjoy! + +```bash +DATABASE_URL='postgresql://postgres:typeinastrongpassword@db.njuigobjlbteahssqbtw.supabase.co:5432/postgres' + +NEXT_PUBLIC_WEBAPP_URL='https://documenso-supabase-web.vercel.app' +NEXTAUTH_SECRET='something gibrish to encrypt your jwt tokens' +NEXTAUTH_URL='https://documenso-supabase-web.vercel.app' + +# Get a Sendgrid Api key here: +SENDGRID_API_KEY='' + +# Set SMTP credentials to use SMTP instead of the Sendgrid API. +SMTP_MAIL_HOST='smtp.resend.com' +SMTP_MAIL_PORT='25' +SMTP_MAIL_USER='resend' +SMTP_MAIL_PASSWORD='YOUR_RESEND_API_KEY' +MAIL_FROM='noreply@[YOUR_DOMAIN]' + +NEXT_PUBLIC_ALLOW_SIGNUP=true +``` + +## Wrapping up + +![Deploying Documenso](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/secg29j9j40o4u2oa8o8.png) + +Congratulations! 🎉 You've successfully deployed Documenso using Vercel, Supabase, and Resend. You're now ready to create and sign your own documents with your self-hosted Documenso! + +In this step-by-step guide, you learned how to: + +- set up a Postgres database using Supabase, +- install SMTP with Resend, +- deploy your project with Vercel. + +Over to you! How was the tutorial? If you enjoyed it, [please do share](https://twitter.com/documenso/status/1700141802693480482)! And if you have any questions or comments, please reach out to me on [Twitter / X](https://twitter.com/EphraimDuncan_) (DM open) or [Discord](https://documen.so/discord). + +We're building an open-source alternative to DocuSign and welcome every contribution. Head over to the GitHub repository and [leave us a Star](https://github.com/documenso/documenso)! diff --git a/apps/marketing/content/blog/malfunction-mania.mdx b/apps/marketing/content/blog/malfunction-mania.mdx new file mode 100644 index 000000000..cb21e951a --- /dev/null +++ b/apps/marketing/content/blog/malfunction-mania.mdx @@ -0,0 +1,54 @@ +--- +title: Announcing Malfunction Mania +description: Launch Week Day 2 Y'all! We're getting ready to release Documenso 1.0! Join in on the fun of making sure the open-source alternative to DocuSign is on point. We're calling a 'MALFUNCTION MANIA.' +authorName: 'Timur Ercan' +authorImage: '/blog/blog-author-timur.jpeg' +authorRole: 'Co-Founder' +date: 2023-09-26 +tags: + - Testing + - Rewrite + - Bounties +--- + +
+ + +
+ We're calling a MALFUNCTION MANIA! 🚨 +
+
+ +> TLDR; Documenso 1.0 is in the [staging environment](https://documen.so/staging). Go check it out. + +It's been a minute since Lucas proclaimed, ["We're doing a rewrite"](https://documenso.com/blog/why-were-doing-a-rewrite), and many of you have been asking when the new version will be available. I'm happy to say that the wait has come to an end. The work on Documenso 1.0 has reached a level we feel comfortable going into the next phase with. We had a lot of community feedback, contributions, and moral support to get us this far, which is why we're excited to announce the most extensive community project yet: + +As Documenso 1.0 just hit the staging environment, we're calling a MALFUNCTION MANIA. An enormous, public testing phase, where we invite everyone to try out the new version, hunt down, report, and fix any malfunctions (aka bugs), and give feedback before release. Malfunction Mania will happen alongside our internal testing, and by combining the two, we want to ensure the best possible release we can have for Version 1.0. We know many of you have been eager to contribute; this is your chance (the first of many to come). + +## As part of Malfunction Mania, we're offering special bug bounties + +- We award $25 - $100 per report/ issue/ fix, depending on the severity and if the problem is already known +- Bounties will be awarded for fixing reported or other critical issues via accepted Pull Requests (PR) +- Just reporting issues in a reproducible way can also be awarded +- Smaller but notable contributions like minor issues and documentation will be awarded with exclusive merch as we see fit. + +## What you can do + +- Head over to the [staging environment](https://documen.so/staging), check out the new version and give it a spin; +- Check out the [source code](https://github.com/documenso/documenso) on GitHub and look it over; +- Spin up the new version locally and try it out. + +## How to get the bounties + +- Report bugs by creating an issue here: [documen.so/issues](https://documen.so/issues); +- Fix bugs by creating a Pull Request (PR); +- 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. + +**[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.** diff --git a/apps/marketing/example/cert.p12 b/apps/marketing/example/cert.p12 new file mode 100644 index 000000000..532ee19ab Binary files /dev/null and b/apps/marketing/example/cert.p12 differ diff --git a/apps/marketing/next.config.js b/apps/marketing/next.config.js index 2783e4063..e74f7d545 100644 --- a/apps/marketing/next.config.js +++ b/apps/marketing/next.config.js @@ -2,7 +2,7 @@ const path = require('path'); const { withContentlayer } = require('next-contentlayer'); -const { parsed: env } = require('dotenv').config({ +require('dotenv').config({ path: path.join(__dirname, '../../.env.local'), }); @@ -10,9 +10,13 @@ const { parsed: env } = require('dotenv').config({ const config = { experimental: { serverActions: true, + serverActionsBodySizeLimit: '10mb', }, reactStrictMode: true, transpilePackages: ['@documenso/lib', '@documenso/prisma', '@documenso/trpc', '@documenso/ui'], + env: { + NEXT_PUBLIC_PROJECT: 'marketing', + }, modularizeImports: { 'lucide-react': { transform: 'lucide-react/dist/esm/icons/{{ kebabCase member }}', diff --git a/apps/marketing/package.json b/apps/marketing/package.json index c76c5e631..8ee8d3808 100644 --- a/apps/marketing/package.json +++ b/apps/marketing/package.json @@ -8,6 +8,7 @@ "build": "next build", "start": "next start", "lint": "next lint", + "clean": "rimraf .next && rimraf node_modules", "copy:pdfjs": "node ../../scripts/copy-pdfjs.cjs" }, "dependencies": { @@ -18,14 +19,16 @@ "@hookform/resolvers": "^3.1.0", "contentlayer": "^0.3.4", "framer-motion": "^10.12.8", - "lucide-react": "^0.214.0", + "lucide-react": "^0.279.0", "micro": "^10.0.1", - "next": "13.4.12", + "next": "13.4.19", "next-auth": "4.22.3", "next-contentlayer": "^0.3.4", "next-plausible": "^3.10.1", "perfect-freehand": "^1.2.0", + "posthog-js": "^1.77.3", "react": "18.2.0", + "react-confetti": "^6.1.0", "react-dom": "18.2.0", "react-hook-form": "^7.43.9", "react-icons": "^4.8.0", diff --git a/apps/marketing/public/blog/blog-author-duncan.jpeg b/apps/marketing/public/blog/blog-author-duncan.jpeg new file mode 100644 index 000000000..a4a52711c Binary files /dev/null and b/apps/marketing/public/blog/blog-author-duncan.jpeg differ diff --git a/apps/marketing/public/blog/mm.png b/apps/marketing/public/blog/mm.png new file mode 100644 index 000000000..19477f0f7 Binary files /dev/null and b/apps/marketing/public/blog/mm.png differ diff --git a/apps/marketing/src/app/(marketing)/[content]/page.tsx b/apps/marketing/src/app/(marketing)/[content]/page.tsx index 37d6d1b63..5c846e9f2 100644 --- a/apps/marketing/src/app/(marketing)/[content]/page.tsx +++ b/apps/marketing/src/app/(marketing)/[content]/page.tsx @@ -39,7 +39,7 @@ export default function ContentPage({ params }: { params: { content: string } }) const MDXContent = useMDXComponent(post.body.code); return ( -
+
); diff --git a/apps/marketing/src/app/(marketing)/blog/[post]/page.tsx b/apps/marketing/src/app/(marketing)/blog/[post]/page.tsx index 757eb8882..f1952cc72 100644 --- a/apps/marketing/src/app/(marketing)/blog/[post]/page.tsx +++ b/apps/marketing/src/app/(marketing)/blog/[post]/page.tsx @@ -39,21 +39,21 @@ export default function BlogPostPage({ params }: { params: { post: string } }) { const MDXContent = useMDXComponent(post.body.code); return ( -
+
-