Site-Snap - Website to PDF Capture & Annotation

Version 1.0.0

Introduction

Support: SakuraLeaf

Site-Snap is a full-featured SaaS application for capturing website snapshots as PDFs, editing them with annotations, and managing projects with subscription billing. Users can enter any URL, generate a high-quality PDF, annotate it with drawing tools, and save and share or download the result.

This documentation covers everything you need to install, configure, and deploy Site-Snap as your own SaaS platform.

Tech Stack

Requirements

  1. Node.js 18+ and npm (or yarn)
  2. A Supabase account (free tier works) for the PostgreSQL database
  3. A Vercel account (for production deployment) or any Node.js hosting

Supabase Database Setup

Site-Snap uses PostgreSQL as its database. Supabase provides a free hosted PostgreSQL instance that works for both local development and production.

Supabase connection string page
Supabase connection string page

Local Installation

Follow these steps to get Site-Snap running on your local machine.

Database Migrations & Prisma

Site-Snap uses Prisma as its ORM. The database schema is defined in prisma/schema.prisma.

Prisma Workflow

The typical workflow when working with Prisma is: Edit schema → Generate client → Run migration.

Common Commands

npx prisma generate — Regenerate the Prisma client after schema changes
npx prisma migrate dev --name <migration_name> — Create and apply a new migration
npx prisma studio — Open a visual database browser at http://localhost:5555

Seed Scripts

The project includes several seed scripts to populate the database with initial data:

npm run seed:admin — Seeds plans (Free + Pro) and creates the admin user
npm run seed:customer — Seeds plans and creates a test customer user
npm run seed:plans — Seeds only the plans (no users)
npm run seed:all — Seeds plans, admin user, and test customer

Admin Settings (App Settings)

Once logged in as an admin, go to Dashboard > App Settings. Most third-party integrations are configured from this page rather than environment variables. This makes it easy to update settings without redeploying.

Configurable Settings

The App Settings page contains the following configuration sections:

Cloudflare Turnstile — Site Key, Secret Key, and option to disable Turnstile for PDF generation
Resend (Email) — API Key and "From" email address for transactional emails
Paddle (Payments) — API Key, Client Token, Webhook Secret, and environment (sandbox/production)
AWS S3 Storage — Bucket name, Region, Access Key ID, Secret Access Key, and storage mode (local/S3)
PDF Settings — Maximum file size for generated PDFs (in MB)
AdSense — Google AdSense Client ID (optional)
Links — Help Center URL and Terms of Service URL
Signup — Enable or disable new user registration
App Settings page

Google Sign-In Setup

To enable Google Sign-In, you need to create OAuth 2.0 credentials in the Google Cloud Console and enter them in the Admin App Settings.

Google Cloud Console credentials

Cloudflare Turnstile Setup

Site-Snap uses Cloudflare Turnstile for bot protection on sign-in, sign-up, and PDF generation forms.

Resend (Email) Setup

Site-Snap uses Resend for transactional emails, including email verification and password reset.

Emails sent by Site-Snap

Email Verification — Sent when a user signs up, containing a link to verify their email address
Password Reset — Sent when a user requests a password reset, containing a time-limited reset link

Emails templates

You can edit the email messages from "lib/email.ts", sendVerificationEmail and sendPasswordResetEmail methods

Paddle (Payments) Setup

Site-Snap integrates with Paddle to handle subscription payments. Paddle acts as a Merchant of Record, handling VAT/sales tax, invoicing, and global payments on your behalf.

Paddle supports sellers in over 200 countries and territories, allowing you to sell globally with no additional country-specific setup. Supported countries

Note! When testing with the sandbox, use the test card numbers listed in the "Testing with Sandbox" section below.

Important Notice: Paddle API Key Expiration!!! --- Please be advised that API keys issued by Paddle are valid for a period of 90 days from the date of creation. To ensure uninterrupted service and avoid any potential disruptions to your integrations, we strongly recommend monitoring your API key expiration dates and generating new keys before they expire.

Prerequisites

Configuration Steps

Webhook Events

Site-Snap automatically handles these Paddle webhook events:

subscription.created — Activates the plan when a subscription starts
subscription.updated — Updates subscription details (e.g. billing period, status changes)
subscription.canceled — Reverts the user to the free plan when the subscription is canceled
transaction.completed — Logs completed transactions

Testing with Sandbox

Note! - A customer account is needed to test Paddle integration. For admin roles, the subscription tab is not shown within the admin dashboard.

You can test payments using your Paddle sandbox account. Open a checkout, then use these card details to test payment by card:

Valid Visa debit card — Card number: 4000 0566 5566 5556, CVC: 100
Valid card without 3DS — Card number: 4242 4242 4242 4242, CVC: 100

Use any expiration date in the future.

Paddle dashboard credentials

AWS S3 Storage Setup

https://aws.amazon.com/console/

Mention - that on serverless local storage does not work

Once you are logged in go to S3 or : https://us-east-1.console.aws.amazon.com/s3/ > Click Create bucket Go to IAM - create user once created click on the user Click - Permissions policies tab Click - Add permisiion Click: Attach policies directly Search "AmazonS3FullAccess" Check "AmazonS3FullAccess" and click save Click Set permissions boundary Search and check "AmazonS3FullAccess" Click Set boundary

Site-Snap can store generated PDFs and project thumbnails on AWS S3. By default, local files are stored locally in the public/uploads/ directory. For production, S3 is recommended.

S3 is used for storing generated PDFs and project thumbnails. Files are stored with the key pattern: pdfs/{projectId}.pdf and thumbnails/{projectId}.jpg.

AWS S3 Storage Setup

https://aws.amazon.com/console/

Note! Serverless local storage does not persist files reliably. Use S3 for production.

Site-Snap can store generated PDFs and project thumbnails on AWS S3. By default, local files are stored in public/uploads/. For production, S3 is recommended.

Files are stored in S3 with the key patterns:

Deploy to Vercel

Site-Snap is optimized for deployment on Vercel. Follow these steps to deploy your instance.

Prerequisites

Vercel deployment
Vercel environment variables

Deploy to VPS

Deploying Site-Snap to your own VPS (for example a DigitalOcean Droplet) is absolutely possible, but it can be more challenging than deploying to Vercel.

A traditional VPS setup usually requires installing and configuring tools such as:

If you prefer a much simpler experience, we highly recommend using Dokploy. It is open-source and provides a deployment experience similar to Vercel, but on your own VPS.

Dokploy handles:

👉 To get started with Dokploy, watch this step-by-step tutorial:
Dokploy Deployment Guide (YouTube)

Prerequisites

Managing Plans (Admin)

Go to Admin > Plans to manage subscription plans. Site-Snap ships with two default plans: Free and Pro.

Plan Configuration

Each plan has the following settings:

Name — Display name of the plan (e.g. "Free", "Pro")
Slug — URL-friendly identifier (e.g. "free", "pro")
Is Free — Whether this is a free plan (no payment required)
Max Projects — Maximum number of projects a user can create
Max Storage (MB) — Maximum total storage for the user's files
Max File Size (MB) — Maximum size per individual PDF file
Monthly Price — Subscription price in cents (e.g. 1900 = $19.00)
Currency — Currency code (e.g. USD)
Paddle Price ID — The Paddle price ID linked to this plan (for paid plans)
Features — A list of feature descriptions displayed on the pricing page
Display Order — The order in which plans appear on the pricing page
Active — Whether the plan is visible and available for selection

To create additional paid plans, create a new price in your Paddle dashboard first, then create the plan in Site-Snap and link the Paddle Price ID.

Plans admin page

Managing Users (Admin)

Go to Admin > Users to manage all registered users.

Features

Using the App (End User Perspective)

This section describes the app from a customer's point of view.

Homepage — Capture a PDF

On the homepage, users enter a website URL and click the capture button. Site-Snap generates a high-quality PDF of the page. No account is required for basic captures, though Turnstile verification is used.

Homepage

Sign Up / Sign In

Users can create an account with email and password, or sign in with Google (if configured). After signing up, users receive a verification email and must verify their address before they can log in.

Dashboard — My Projects

The dashboard shows all saved projects in a grid view with thumbnails. Users can view, edit, or delete their projects from here.

Dashboard

PDF Editor

The editor lets users annotate PDFs using drawing tools powered by Konva.js canvas. Users can add shapes, text, and freehand drawings on top of the PDF, then save or download the annotated version.

PDF Editor

Subscription — Upgrade / Downgrade

Users can view their current plan and upgrade to a paid plan via the Paddle checkout overlay. Downgrading reverts the user to the free plan at the end of the current billing period.

Subscription page

Account Settings

Users can update their profile name, change their password, and delete their account. Deleting an account cancels any active subscription and removes all projects and files.

Internationalization

Site-Snap supports multiple languages out of the box using next-intl.

Supported Languages

Translation Files

Language files are located in the /messages/ directory at the project root. Each language has its own JSON file:

messages/en.json — English translations
messages/fr.json — French translations
messages/ar.json — Arabic translations

Adding a New Language

  1. Create a new JSON file in the /messages/ directory (e.g. messages/de.json for German).
  2. Copy the structure from messages/en.json and translate all values.
  3. Add the new language metadata (locale code, label, direction) to @/messages/languages-meta.
  4. RTL languages are supported.

Editing Translations

Open the corresponding JSON file in /messages/ and edit the translation values. The app will use the updated translations after a rebuild or in development mode immediately.

Environment Variables Reference

Below is a full reference of all environment variables used by Site-Snap.

Required Variables

GOOGLE_CLIENT_ID — Google sign-in client
GOOGLE_CLIENT_SECRET — Google sign-in secret
DATABASE_URL — PostgreSQL connection string (Supabase). Required.
AUTH_SECRET — Secret key for NextAuth.js JWT signing. Generate with openssl rand -base64 32. Required.
AUTH_URL — Base URL of the application (e.g. http://localhost:3000 or https://your-domain.com). Required.
NEXT_PUBLIC_BASE_URL — Public base URL, same as AUTH_URL. Used in client-side code. Required.
SITE_NAME — Application name used in branding and emails. Default: SiteSnap. Required.

Browser & PDF Settings

BROWSER_PROVIDER — Browser backend for PDF generation. Options: playwright (Recommended for Node.js servers or local development environments (non-serverless deployments)) or sparticuz (Vercel serverless). Default: playwright. Optional.
PDF_LOAD_IMAGES_STRATEGY — Image loading strategy for PDF generation. Options: default (fast, may miss lazy images) or full (scrolls page, loads all images). Default: default. Optional.

Branding Keys

NEXT_PUBLIC_PDF_DOWNLOAD_FILENAME — Default filename when downloading edited PDFs. Default: sitesnap-edited.pdf. Optional.
NEXT_PUBLIC_THEME_STORAGE_KEY — LocalStorage key for persisting the user's theme preference. Default: sitesnap-theme. Optional.
NEXT_PUBLIC_CONSENT_COOKIE_KEY — Cookie name for the consent banner state. Default: sitesnap-consent. Optional.

Admin UI Settings (Not env vars)

The following settings are managed via the Admin UI at Dashboard > App Settings, not through environment variables:

Cloudflare Turnstile (Site Key + Secret Key)
Resend Email (API Key + From Address)
AWS S3 (Bucket, Region, Access Key, Secret Key, Storage Mode)
Paddle Payments (API Key, Client Token, Webhook Secret, Environment)
PDF Max File Size
AdSense Client ID
Help Center URL, Terms URL
Signup enabled/disabled

Changelog

Version 1.0.0