SecureLink is a full-stack secure file and link sharing platform built with Next.js, Prisma, and Clerk. It lets users generate encrypted, expiring, password-protected links to share files and content with confidence — with fine-grained access controls and zero-knowledge style privacy.
🌐 Live Demo: secure-link-three.vercel.app
SecureLink solves a simple but common problem: sharing sensitive files and links the "normal" way (email attachments, plain cloud-storage links) leaves data exposed indefinitely, with no control over who can view it or for how long. SecureLink gives users a dashboard to generate secure, time-limited links for any file or piece of content, with encryption, access limits, and automatic expiration built in.
It's a solid reference implementation for anyone building a secure file-sharing SaaS, encrypted link generator, or subscription-based Next.js product, showcasing authentication, file uploads, database modeling, and payments working together in one modern App Router codebase.
- 🔒 End-to-end encryption so only authorized recipients can access shared content
- 🗝️ Zero-knowledge privacy — encryption keys never leave the client
- ⏳ Self-destructing links that automatically expire after a chosen duration
- 👁️ Access controls & view limits to restrict who and how many times content is viewed
- 🔑 Password-protected links for an extra layer of security
- 📤 File uploads handled via Uploadcare
- 💳 Subscription billing / paid plans powered by Polar
- 🔐 Authentication & user management via Clerk
- 🎨 Polished marketing site with animated UI (Framer Motion, tsParticles)
| Category | Description |
|---|---|
| Secure Link Generation | Create encrypted, expiring links from the /dashboard/generate-link page |
| File Sharing | Upload and share files securely via Uploadcare |
| Access Controls | Set view limits, expiration times, and password protection on shared links |
| Authentication | Sign up / sign in and route protection via Clerk |
| Billing & Subscriptions | Paid plans and checkout flows powered by Polar (@polar-sh/nextjs, @polar-sh/sdk) |
| Database | Type-safe data access with Prisma ORM, backed by Supabase Postgres |
| Dashboards & Tables | Manage generated links via TanStack Table |
| Forms & Validation | React Hook Form + Zod |
| UI/UX | Accessible components from Radix UI, animations with Framer Motion and tsParticles, command palette via cmdk |
| Marketing Pages | Landing page with features, pricing, FAQ, about, and contact sections |
- Framework: Next.js (App Router, Turbopack dev server)
- Language: TypeScript
- Styling: Tailwind CSS v4,
tw-animate-css,class-variance-authority - UI Primitives: Radix UI (accordion, dialog, dropdown, popover, select, switch, tabs, tooltip, and more)
- Authentication: Clerk (
@clerk/nextjs) - Database / ORM: Prisma 6 + Supabase Postgres
- File Uploads: Uploadcare React Uploader
- Payments: Polar (
@polar-sh/nextjs,@polar-sh/sdk) - Tables: TanStack Table
- Forms: React Hook Form + Zod resolvers
- Animation: Framer Motion, tsParticles
- Utilities: date-fns, cmdk, sonner (toasts), lucide-react (icons)
- Deployment: Vercel
secure-link/
├── app/ # Next.js App Router pages, layouts, and API routes
├── components/ # Reusable UI components (Radix-based design system)
├── hooks/ # Custom React hooks
├── lib/ # Utility functions, Prisma client, shared config
├── prisma/ # Prisma schema and database migrations
├── public/ # Static assets and images
├── middleware.ts # Clerk auth middleware / route protection
├── sample.env # Example environment variable file
└── package.json
- Node.js ≥ 18
- npm, yarn, pnpm, or bun
- A Supabase (or other PostgreSQL) database
- A Clerk account for authentication keys
- An Uploadcare account for file uploads
- A Polar account for billing/subscriptions
git clone https://github.com/sachidumaleesha/secure-link.git
cd secure-linknpm install
# or
yarn install
# or
pnpm installCopy sample.env to .env and fill in your own values:
# App URL
NEXT_PUBLIC_APP_URL=http://localhost:3000
# Clerk
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=
CLERK_SECRET_KEY=
NEXT_PUBLIC_CLERK_SIGN_IN_URL=/sign-in
NEXT_PUBLIC_CLERK_SIGN_UP_URL=/sign-up
NEXT_PUBLIC_CLERK_SIGN_IN_FALLBACK_REDIRECT_URL=/
NEXT_PUBLIC_CLERK_SIGN_UP_FALLBACK_REDIRECT_URL=/
# Supabase / Prisma
DATABASE_URL="" # Connection pooled URL
DIRECT_URL="" # Direct URL, used for migrations
# Uploadcare
NEXT_PUBLIC_UPLOADCARE_PUBLIC_KEY=
# Polar
POLAR_ACCESS_TOKEN=npx prisma generate
npx prisma migrate devnpm run dev
# or
yarn dev
# or
pnpm dev
# or
bun devOpen http://localhost:3000 in your browser to see the app.
| Script | Description |
|---|---|
npm run dev |
Start the local development server (with Turbopack) |
npm run build |
Generate the Prisma client and build the production app |
npm run start |
Start the production server |
npm run lint |
Run ESLint checks |
- Team / organization sharing
- Link analytics (views, locations, devices)
- Custom branded short domains
- Webhook notifications on link access
- Mobile app companion
Have an idea? Open an issue to suggest a feature.
Contributions, issues, and feature requests are welcome!
- Fork the project
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is available under the MIT License. Feel free to use it as a learning reference or starting point for your own project.
Sachidu Maleesha GitHub: @sachidumaleesha
If you find this project useful, consider giving it a ⭐ on GitHub — it helps others discover it too!