DEV Community

GrimLabs
GrimLabs

Posted on

I built a DocSend competitor in weeks using Claude Code

I Built a DocSend Competitor in Weeks Using Claude Code — Here's the API

I've been working nights and weekends accelerating ideas to production using AI-assisted development. CloakShare is the first one I'm shipping publicly.

The problem I kept running into: I needed to share documents and videos securely — with watermarks, access tracking, and expiry — without paying $50/seat for DocSend or spending weeks building a viewer from scratch.

So I built the API I wished existed.


What CloakShare Does

One API call secures any document or video:

curl -X POST https://api.cloakshare.dev/v1/links \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -F file=@proposal.pdf \
  -F expires_in="72h" \
  -F watermark=true \
  -F require_email=true
Enter fullscreen mode Exit fullscreen mode

You get back a secure URL. Recipients hit an email gate, see a watermarked viewer, and can't download the file. You see exactly who viewed it, which pages they read, and for how long.

That's it. No viewer to build. No infrastructure to manage.


What It Supports

  • PDFs, DOCX, PPTX, XLSX, images — server-side conversion via LibreOffice
  • Video (MP4, MOV, WebM) — transcoded to adaptive HLS with canvas watermark overlay on every frame
  • Dynamic watermarks — viewer's email baked into every page
  • Link expiry — time-based or view-count limits
  • Email gate — restrict by domain
  • Page-level analytics — time per page, completion rate, device, geo
  • Webhooks — real-time notifications on view events
  • Custom domains — serve from docs.your-saas.com
  • Embeddable viewer — iframe with PostMessage API
  • Teams & RBAC

The Embed Option (Free Forever)

If you just need client-side PDF/image viewing with watermarks and email gate — no tracking, no server — there's an npm package:

npm install @cloakshare/embed
Enter fullscreen mode Exit fullscreen mode

No API key needed. MIT licensed.


Why I Built It as an API

Most document security tools are UI-first SaaS for end users. There's almost nothing for developers who want to add this capability to their own product.

If you're building:

  • A proposal tool and want to know when prospects read your docs
  • A training platform that needs to prevent video downloads
  • A due diligence platform where document leakage is a real risk
  • Any SaaS where you're currently just emailing PDFs and hoping for the best

...you shouldn't have to build a secure viewer. That's the solved problem CloakShare handles.


It's Open Source

MIT licensed, self-hostable with Docker:

git clone https://github.com/cloakshare/cloakshare
cd cloak && docker compose up
Enter fullscreen mode Exit fullscreen mode

The cloud version adds CDN delivery, managed transcoding, analytics, webhooks, and custom domains.


The AI-Accelerated Build Story

I used Claude Code heavily throughout this build. The velocity difference is real — features that would have taken days of context-switching were shipped in hours. I'm planning a separate post going deep on that workflow if there's interest.

For now: grab a free API key and let me know what you're building with it. I'm actively adding features based on what early users need.

GitHub: cloakshare/cloakshare


Tags: webdev, api, opensource, javascript, devops

Top comments (0)