/papermark

Papermark is the open-source DocSend alternative with built-in analytics and custom domains.

Primary LanguageTypeScriptGNU Affero General Public License v3.0AGPL-3.0

Papermark

The open-source DocSend alternative.

Papermark - The open-source DocSend alternative | Product Hunt

papermark.io

GitHub Repo stars Twitter Follow License

Papermark is an open-source document sharing alternative to DocSend with built-in analytics. Built with Vercel Storage and Vercel Edge Functions.

Features

  • Shareable Links: Share your document securely by sending a custom link
  • Analytics: Get insights via document tracking and soon page-by-page analytics
  • Self-hosted, open-source: Host it yourself and hack on it

Demo

Papermark Welcome GIF

Tech Stack

Getting Started

Prerequisites

Here's what you need to be able to run Papermark:

1. Clone the repository

git clone https://github.com/mfts/papermark.git
cd papermark

2. Install npm dependencies

npm install

3. Copy the environment variables to .env

cp .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

npx prisma generate
npx prisma db push

6. Run the dev server

npm run dev

7. Open the app in your browser

Visit http://localhost:3000 in your browser.

Tinybird instructions

To prepare the Tinybird database, follow these steps:

  1. We use pipenv to manage my Python dependencies. If you don't have it installed, you can install it using the following command:
    pkgx pipenv
  2. Download the Tinybird CLI from here and install it on your system.
  3. After authenticating with the Tinybird CLI, navigate to the lib/tinybird directory:
    cd lib/tinybird
  4. Push the necessary datasources using the following command:
    tb push datasources/*
    tb push endpoints/get_*
  5. Don't forget to set the TINYBIRD_TOKEN with the appropriate rights in your .env file.

Updating Tinybird

pipenv shell
## start: pkgx-specific
cd ..
cd papermark
## end: pkgx-specific
pipenv 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:

Deploy with Vercel

Contributing

Papermark is an open-source project and we welcome contributions from the community.

If you'd like to contribute, please fork the repository and make changes as you'd like. Pull requests are warmly welcome.

Our Contributors ✨

Inspiration

...and friends

  • Dub - An open-source link shortener SaaS with built-in analytics + free custom domains