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