Papermark is an open-source document and data room sharing platform (DocSend alternative) built with Next.js, Prisma, and a modern SaaS stack. It provides secure document sharing with granular access controls (password, email verification, domain allow/deny lists, watermarking, screenshot protection), real-time analytics (page views, video playback, click tracking via Tinybird), and enterprise-grade features like virtual data rooms with folder hierarchies, group permissions, AI-powered document indexing and chat, signing agreements (Documenso integration), workflow automation, and Slack integration. The platform is monetized via Stripe subscriptions with tiered plans and includes a comprehensive billing/cancellation flow. The architecture is a full-stack Next.js application with a mix of Pages Router and App Router, using Prisma for PostgreSQL ORM, Redis for caching/rate limiting/job stores, Trigger.dev for background tasks, Tinybird for analytics pipes, and Vercel Blob/AWS S3 for file storage. Authentication supports NextAuth.js with passkeys, SAML SSO (via BoxyHQ Jackson), and OTP verification. The codebase is organized with a clear separation of enterprise features under an `ee/` directory, reusable UI components (shadcn/ui-based), and extensive SWR hooks for client-side data fetching. The repository demonstrates solid engineering practices with well-structured API routes, RBAC enforcement, and a rich set of utilities. However, it shows signs of technical drift: simultaneous use of Pages Router and App Router creates inconsistency, some API endpoints are large and monolithic, and there is duplication in folder management and export-visits logic. The rapid schema evolution (many Prisma migrations) indicates active development but also potential instability. Overall, it is a production-quality application with strong reusability in its UI components, i18n pattern, and utility libraries.