An open-source alternative to DocSend for securely sharing documents with tracking and analytics.
- π Secure PDF Sharing - Upload and share PDFs with password protection and expiration dates
- π Multiple Links Per Document - Create different links with different settings for the same document
- π Clone Links - Duplicate existing links with one click to create variations
- π Access Control - Email verification, password protection, and self-hosted signup controls
- π¨ Custom Branding - Add logos, cover letters, and signatures to shared documents
- π± Responsive Viewer - Beautiful slideshow and document modes that work on all devices
- βοΈ E-Signatures - Request and collect legally binding signatures on documents
- π Signature Tracking - Track signature status and audit trails
- ποΈ Multiple Signature Methods - Draw, upload, or type signatures
- βοΈ NDA & Contract Ready - Perfect for NDAs, contracts, and legal agreements
- π Home Dashboard - Aggregated overview of all your documents and activity
- π View Analytics - Track who views your documents, when, and for how long
- β±οΈ Page-Level Tracking - See time spent on each page with engagement insights
- π₯ Contact Management - Organize contacts with groups
- π Engagement Insights - Detailed analytics for each shared link
- π Notifications - Get notified when documents are viewed or signed
- π Timeline Charts - 30-day views history and trends
- βοΈ Email Integration - Send documents via email with magic links (powered by Resend)
- π¬ Slack Integration - Get notifications in Slack when documents are viewed or signed
- π― Personalized Emails - Custom email templates with your branding
- π Privacy First - Row-level security and encrypted passwords
- π’ Self-Hosted Ready - Full control over your data and users
- π« Disable Signups - Control who can create accounts on your instance
- π¦ Open Source - MIT licensed, transparent, and community-driven
git clone https://github.com/alanagoyal/docbase
cd docbaseWe've created an interactive setup wizard to make configuration easy:
npm run setupThe wizard will:
- β Guide you through all required environment variables
- β Provide links to get API keys
- β Validate your inputs
- β
Create your
.envfile automatically - β Show you next steps
Or manually create .env:
If you prefer to configure manually, copy env.example to .env and fill in your values.
npm install- Create a Supabase project
- Link to your project and push migrations:
npx supabase login
npx supabase link
npx supabase db push-
Create storage bucket:
- Go to Supabase Dashboard > Storage
- Create a new public bucket named
cube
-
Important: Apply additional migrations for advanced features:
- See SETUP.md for detailed migration instructions
- Required for: Home dashboard, page-level tracking, and document consolidation
npm run devYour app will be running at http://localhost:3000
- Frontend: Next.js 14 (App Router), TypeScript, Tailwind CSS, shadcn/ui
- Backend: Supabase (PostgreSQL + Auth + Storage)
- Email: Resend
- AI: OpenAI GPT-4o-mini
- Monitoring: Braintrust (optional)
- Integrations: Slack, Google Maps
- Supabase - Database, authentication, and file storage (Sign up)
- PostgreSQL database with Row Level Security
- Authentication with magic links and email/password
- Storage buckets for PDF files
-
Resend - Email sending (Sign up)
- Required for: Document sharing emails, magic link authentication, notifications
- Free tier: 3,000 emails/month
-
OpenAI - AI-powered features (Sign up)
- Required for: Signature block parsing
- Uses GPT-4o-mini (cost-effective)
-
Google Maps - Address autocomplete (Get API key)
- Optional: Enhances contact management with address suggestions
-
Braintrust - Prompt management and logging (Sign up)
- Optional: AI prompt versioning and monitoring
-
Slack - Team notifications (Setup OAuth)
- Optional: Get notified in Slack when documents are viewed or signed
See env.example for a complete list with descriptions. Core variables:
NEXT_PUBLIC_SITE_URL="http://localhost:3000"
NEXT_PUBLIC_SUPABASE_URL="your-supabase-url"
NEXT_PUBLIC_SUPABASE_ANON_KEY="your-anon-key"
SUPABASE_SERVICE_ROLE_KEY="your-service-role-key"For self-hosted instances, you can control access:
# Disable new signups (only allow existing users to sign in)
DISABLE_SIGNUPS="true"This is useful when you want to run Docbase privately and control who has access to your instance.
npm run dev # Start development server
npm run build # Build for production
npm run start # Start production server
npm run lint # Run ESLint
npm run lint:fix # Fix linting issuesDeploy using Vercel:
- Push code to GitHub
- Import repository to Vercel
- Add all environment variables from your
.envfile - Apply database migrations (see SETUP.md)
- Deploy!
- π Share pitch decks with investors and track engagement
- π See which slides investors spend the most time on
- π Protect sensitive financial information with passwords
- βοΈ Get NDAs signed before sharing confidential materials
- π Share proposals and track when prospects view them
- π― Follow up at the right time based on engagement data
- ποΈ Get contracts and agreements signed electronically
- π§ Send personalized documents with custom branding
- βοΈ Send contracts and collect signatures
- π Secure sharing of sensitive documents
- π Track document access and maintain audit trails
- β Ensure compliance with signature timestamps
- π’ Run your own private DocSend alternative
- π« Control who can create accounts (disable public signups)
- πΎ Keep all data on your own infrastructure
- π§ Customize and extend the platform as needed
- β Free & Open Source - No per-document pricing
- β Self-Hosted - Full control over your data
- β E-Signatures Built-In - No need for separate DocuSign/HelloSign
- β Customizable - Extend and modify as needed
- β Modern Stack - Built with Next.js 14 and TypeScript
- β Production Ready - Battle-tested features and security
- β Full Feature Set - Signatures, analytics, notifications, and more
- β Active Development - Regular updates and improvements
- β Great DX - Clean code, TypeScript, comprehensive docs
We love contributions! Whether it's bug fixes, new features, or documentation improvements, all contributions are welcome.
- Fork the repository and create your branch from
main - Make your changes - see CONTRIBUTING.md for detailed guidelines
- Test your changes - ensure the build passes (
npm run build) - Submit a pull request with a clear description of your changes
- Use TypeScript for type safety
- Follow existing code style and patterns
- Write meaningful commit messages
- Keep PRs focused and small when possible
- Update documentation as needed
See CONTRIBUTING.md for detailed contribution guidelines.
- π Documentation - GitHub Repository
- π Bug Reports - Open an Issue
- π‘ Feature Requests - Start a Discussion
- π¬ Questions - GitHub Discussions
- Multiple links per document
- Clone links functionality
- Page-level time tracking
- Home dashboard with aggregated analytics
- Multi-document packages
- Advanced analytics (heatmaps)
- Mobile apps (React Native)
- Video support
- Custom domains for shared links
- Webhook support for integrations
- API for programmatic access
If you find Docbase useful, please consider giving it a star! β
Licensed under the MIT license.
Built with β€οΈ by Outcome Driven Studio