Papermark is an open-source alternative to DocSend that enables users to share documents securely via custom links while tracking engagement with detailed analytics. Built for teams and individuals who need control over their document-sharing infrastructure, Papermark eliminates reliance on proprietary SaaS platforms by offering full self-hosting capabilities. It combines a modern tech stack with enterprise-grade features like custom branding, email notifications, and real-time analytics to provide a transparent, customizable solution for document tracking.
Designed with developers and technical teams in mind, Papermark supports deployment on any infrastructure that can run Node.js and PostgreSQL. Its modular architecture allows for easy integration with existing systems, making it ideal for organizations that prioritize data sovereignty and want to avoid vendor lock-in while maintaining professional document-sharing capabilities.
What You Get
- Shareable Links - Generate secure, trackable links to share PDFs and other documents without requiring recipients to log in. Each link provides unique tracking for views, downloads, and time spent.
- Custom Branding - Replace default branding with your own domain name, logo, and color scheme to maintain professional consistency across all shared documents.
- Analytics Dashboard - View real-time insights on document engagement including page views, duration, geographic location, and device information. Page-by-page analytics are planned for future releases.
- Self-hosted Deployment - Full control over your data and infrastructure with support for AWS S3 or Vercel Blob for storage, PostgreSQL for data, and Next.js for the frontend. No third-party cloud dependency required.
- Email Integration via Resend - Automate document sharing with personalized email notifications using the Resend API, enabling seamless integration into your existing communication workflows.
Common Use Cases
- Building a client-facing document portal - Law firms or financial advisors use Papermark to share contracts and reports with clients via branded links, tracking who opened them and when without exposing internal systems.
- Creating a sales enablement platform - B2B sales teams distribute product decks and proposals with embedded analytics to measure engagement and optimize follow-up timing.
- Problem: Inability to track document engagement → Solution: Papermark - Organizations using untracked PDF emails can’t know if recipients opened documents. Papermark replaces this with trackable links that log every interaction and provide actionable insights.
- Team workflow: DevOps managing external document sharing - Engineering teams deploy Papermark internally to replace DocSend, ensuring compliance with data residency policies while maintaining feature parity for marketing and sales teams.
Under The Hood
Papermark is a document sharing and collaboration platform built with a modern TypeScript stack, emphasizing developer-first integrations and enterprise-grade extensibility. It leverages Next.js for full-stack React development, integrating a range of tools to support authentication, workflow automation, and scalable domain management.
Architecture
This project adopts a monolithic architecture with a strong focus on modular organization and layered structure. It effectively applies design patterns such as dependency injection and strategy patterns to manage component interactions.
- Emphasis on clear separation of concerns with feature-based grouping and layered logic
- Strong use of dependency injection and strategy patterns for external service integration
- Well-defined enterprise edition modules that extend core functionality without tight coupling
Tech Stack
Built with TypeScript and Next.js, Papermark utilizes a rich ecosystem of modern tools and libraries to enable full-stack development and seamless user experiences.
- Relies on Prisma for database operations, Next-Auth for authentication, and Trigger.dev for workflow automation
- Integrates UI libraries like Radix UI, Tremor, and Lucide React for consistent component design
- Employs Tailwind CSS for styling, Prettier and ESLint for code quality, and Vercel for deployment
Code Quality
Code quality is generally solid with consistent TypeScript usage and adherence to modern Next.js patterns, though some areas show signs of technical debt.
- Strong type safety and linting practices improve code consistency and maintainability
- Error handling is present but could be enhanced with more robust logging and user feedback mechanisms
- Modular structure supports clean code organization, though domain and cron job handling need refinement
What Makes It Unique
Papermark stands out through its thoughtful implementation of authentication, domain management, and asynchronous task handling.
- Implements a sophisticated rate-limiting system to prevent TOCTOU race conditions in email verification flows
- Automates domain health checks using cron jobs with Upstash signature verification and status tracking
- Leverages QStash for asynchronous task execution and Resend for email delivery to decouple backend operations
- Offers extensible enterprise features through modular API endpoints and a clear separation between core and EE modules