Papermark is the open-source DocSend alternative and secure data rooms with built-in analytics and custom domains.
docs: update readme and env variables
Marc Seitzc73891245481
diff --git a/.env.example b/.env.exampleindex 1dc94dd4..ad09c237 100644--- a/.env.example+++ b/.env.example@@ -38,4 +38,24 @@ NEXT_PUBLIC_HANKO_TENANT_ID=add-your-hanko-tenent-id# TriggerTRIGGER_API_KEY=TRIGGER_API_URL=https://api.trigger.dev-NEXT_PUBLIC_TRIGGER_PUBLIC_API_KEY=\ No newline at end of file+NEXT_PUBLIC_TRIGGER_PUBLIC_API_KEY=++# [[STORAGE]]+# Defines the storage transport to use. Available options: vercel (default) | s3+NEXT_PUBLIC_UPLOAD_TRANSPORT="vercel"+# OPTIONAL: Defines the endpoint to use for the S3 storage transport. Relevant when using third-party S3-compatible providers.+NEXT_PRIVATE_UPLOAD_ENDPOINT=""+# Defines the region to use for the S3 storage transport. Defaults to us-east-1.+NEXT_PRIVATE_UPLOAD_REGION="us-east-1"+# REQUIRED: Defines the bucket to use for the S3 storage transport.+NEXT_PRIVATE_UPLOAD_BUCKET="YOUR_BUCKET_NAME"+# REQUIRED: Defines the access key ID to use for the S3 storage transport.+NEXT_PRIVATE_UPLOAD_ACCESS_KEY_ID=""+# REQUIRED: Defines the secret access key to use for the S3 storage transport.+NEXT_PRIVATE_UPLOAD_SECRET_ACCESS_KEY=""+# Defines the Cloudfront distribution domain to use for the S3 storage transport. Relevant when using Cloudfront.+NEXT_PRIVATE_UPLOAD_DISTRIBUTION_DOMAIN=""+# Defines the public key ID to sign Cloudfront URLs. Relevant when using Cloudfront.+NEXT_PRIVATE_UPLOAD_DISTRIBUTION_KEY_ID=""+# Defines the private key contents to sign Cloudfront URLs. Relevant when using Cloudfront. Should be a PEM-encoded RSA 2048 private key.+NEXT_PRIVATE_UPLOAD_DISTRIBUTION_KEY_CONTENTS=\ No newline at end of filediff --git a/README.md b/README.mdindex 001a8069..461d2e48 100644--- a/README.md+++ b/README.md@@ -2,7 +2,8 @@<h1 align="center">Papermark</h1><h3>The open-source DocSend alternative.</h3>- <a target="_blank" href="https://www.producthunt.com/posts/papermark-3?utm_source=badge-top-post-badge&utm_medium=badge&utm_souce=badge-papermark"><img src="https://api.producthunt.com/widgets/embed-image/v1/top-post-badge.svg?post_id=411605&theme=light&period=daily" alt="Papermark - The open-source DocSend alternative | Product Hunt" style="width:250px;height:40px"></a>+<a target="_blank" href="https://www.producthunt.com/posts/papermark-3?utm_source=badge-top-post-badge&utm_medium=badge&utm_souce=badge-papermark"><img src="https://api.producthunt.com/widgets/embed-image/v1/top-post-badge.svg?post_id=411605&theme=light&period=daily" alt="Papermark - The open-source DocSend alternative | Product Hunt" style="width:250px;height:40px"></a>+</div><div align="center">@@ -13,37 +14,38 @@<div align="center"><a href="https://github.com/mfts/papermark/stargazers"><img alt="GitHub Repo stars" src="https://img.shields.io/github/stars/mfts/papermark"></a>- <a href="https://twitter.com/mfts0"><img alt="Twitter Follow" src="https://img.shields.io/twitter/follow/mfts0"></a>+ <a href="https://twitter.com/papermarkio"><img alt="Twitter Follow" src="https://img.shields.io/twitter/follow/papermarkio"></a><a href="https://github.com/mfts/papermark/blob/main/LICENSE"><img alt="License" src="https://img.shields.io/badge/license-AGPLv3-purple"></a></div><br/>-Papermark is an open-source document sharing alternative to DocSend with built-in analytics. Built with [Vercel Storage](http://vercel.com/storage) and [Vercel Edge Functions](http://vercel.com/edge).+Papermark is the open-source document sharing alternative to DocSend with built-in analytics and custom domains.## Features- **Shareable Links:** Share your document securely by sending a custom link+- **Custom Branding:** Add a custom domain and your own branding- **Analytics:** Get insights via document tracking and soon page-by-page analytics- **Self-hosted, open-source:** Host it yourself and hack on it+## Demo-## Demo-## Tech Stack-- [Next.js](https://nextjs.org/) – framework-- [Typescript](https://www.typescriptlang.org/) – language-- [Tailwind](https://tailwindcss.com/) – styling-- [Prisma](https://prisma.io) - orm-- [Vercel Blob](https://vercel.com/storage/blob) - blob storage-- [Vercel Postgres](https://vercel.com/storage/postgres) - database-- [NextAuth.js](https://next-auth.js.org/) – auth-- [Resend](https://resend.com) – email-- [Vercel](https://vercel.com/) – hosting-+- [Next.js](https://nextjs.org/) – Framework+- [Typescript](https://www.typescriptlang.org/) – Language+- [Tailwind](https://tailwindcss.com/) – CSS+- [shadcn/ui](https://ui.shadcn.com) - UI Components+- [Prisma](https://prisma.io) - ORM+- PostgreSQL - Database+- [NextAuth.js](https://next-auth.js.org/) – Authentication+- [Tinybird](https://tinybird.co) – Analytics+- [Resend](https://resend.com) – Email+- [Stripe](https://stripe.com) – Payments+- [Vercel](https://vercel.com/) – Hosting## Getting Started@@ -52,9 +54,8 @@ Papermark is an open-source document sharing alternative to DocSend with built-iHere's what you need to be able to run Papermark:- Node.js (version >= 18)-- PostgreSQL (I use [Vercel Postgres](https://vercel.com/storage/postgres))-- Blob storage (I use [Vercel Blob](https://vercel.com/storage/blob))-- [Google OAuth Client](https://console.cloud.google.com/apis/credentials) (for authentication)+- PostgreSQL Database+- Blob storage (currently [AWS S3](https://aws.amazon.com/s3/) or [Vercel Blob](https://vercel.com/storage/blob))- [Resend](https://resend.com) (for sending emails)### 1. Clone the repository@@ -70,41 +71,26 @@ cd papermarknpm install```-### 3. Copy the environment variables to `.env`+### 3. Copy the environment variables to `.env` and change the values```shellcp .env.example .env```-### 4. Configure the variables in `.env`--| Variable | Value |-|---|---|-| NEXTAUTH_SECRET | a random string |-| NEXTAUTH_URL | < Your base domain or localhost:3000 > |-| POSTGRES_PRISMA_URL | < Vercel Postgres Pooling URL > |-| POSTGRES_URL_NON_POOLING | < Vercel Postgres Non-Pooling URL > |-| BLOB_READ_WRITE_TOKEN | < Vercel Blob Token > |-| GOOGLE_CLIENT_ID | < Google Client ID > |-| GOOGLE_CLIENT_SECRET | < Google Client Secret > |-| RESEND_API_KEY | < Resend API KEY > |-| NEXT_PUBLIC_BASE_URL | < Your base domain or localhost:3000 > |---### 5. Initialize the database+### 4. Initialize the database```shellnpx prisma generate-npx prisma db push+npx prisma db deploy```-### 6. Run the dev server+### 5. Run the dev server```shellnpm run dev```-### 7. Open the app in your browser+### 6. Open the app in your browserVisit [http://localhost:3000](http://localhost:3000) in your browser.@@ -113,22 +99,21 @@ Visit [http://localhost:3000](http://localhost:3000) in your browser.To prepare the Tinybird database, follow these steps:0. We use `pipenv` to manage my Python dependencies. If you don't have it installed, you can install it using the following command:- ```sh- pkgx pipenv- ```+ ```sh+ pkgx pipenv+ ```1. Download the Tinybird CLI from [here](https://www.tinybird.co/docs/cli.html) and install it on your system.2. After authenticating with the Tinybird CLI, navigate to the `lib/tinybird` directory:- ```sh- cd lib/tinybird- ```+ ```sh+ cd lib/tinybird+ ```3. Push the necessary datasources using the following command:- ```sh- tb push datasources/*- tb push endpoints/get_*- ```+ ```sh+ tb push datasources/*+ tb push endpoints/get_*+ ```4. Don't forget to set the `TINYBIRD_TOKEN` with the appropriate rights in your `.env` file.-#### Updating Tinybird```sh@@ -140,13 +125,6 @@ cd papermarkpipenv update tinybird-cli```-## Deploy your own--All you need is a Vercel account and access to Vercel Storage (_Blob_ and _Postgres_). Click the-button below to clone and deploy:--[](https://vercel.com/new/clone?repository-url=https://github.com/mfts/papermark&env=NEXTAUTH_SECRET,NEXTAUTH_URL,POSTGRES_PRISMA_URL,POSTGRES_PRISMA_URL_NON_POOLING,BLOB_READ_WRITE_TOKEN,GOOGLE_CLIENT_ID,GOOGLE_CLIENT_SECRET,NEXT_PUBLIC_BASE_URL&envDescription=Here%27s%20an%20example%20.env%20for%20all%20variables%20required&envLink=https://github.com/mfts/papermark/blob/main/.env.example&project-name=my-awesome-papermark&repository-name=my-awesome-papermark&demo-title=Papermark&demo-description=Papermark%20is%20an%20open-source%20document%20sharing%20alternative%20to%20DocSend%20with%20built-in%20analytics.&demo-url=https://www.papermark.io&demo-image=https://www.papermark.io/_static/papermark.png)-## ContributingPapermark is an open-source project and we welcome contributions from the community.@@ -158,10 +136,3 @@ If you'd like to contribute, please fork the repository and make changes as you'<a href="https://github.com/mfts/papermark/graphs/contributors"><img src="https://contrib.rocks/image?repo=mfts/papermark" /></a>---## Inspiration--...and friends--- [Dub](https://github.com/steven-tey/dub) - An open-source link shortener SaaS with built-in analytics + free custom domains