AI-powered Terms of Service analyzer — know what you're agreeing to before you click accept.
Paste a Terms of Service, upload a PDF, or drop in an email — TermScan flags every risky clause, scores its severity, and drafts a professional pushback email in seconds.
- 3 Input Modes — Paste text, upload a PDF (up to 10 MB), or paste email content
- 12 Risk Categories — Data Selling, Auto-Renewal, Arbitration, Liability Waiver, Privacy, Behavioral Tracking, and more
- Severity Scoring — Each clause scored 1–10 with Mild / Concerning / Dangerous classification
- Negotiation Emails — One-click AI-generated professional emails to challenge specific clauses
- Dark-Theme UI — Custom design system with Space Grotesk, yo-yellow accents, animated transitions
Text version
┌─────────────────────────────────────────────────────────────────┐
│ BROWSER │
│ │
│ ┌─────────┐ ┌───────────┐ ┌──────────┐ ┌─────────┐ │
│ │ Landing │───▶│ Dashboard │───▶│ Results │───▶│Negotiate│ │
│ │ Page │ │ + TosInput│ │ View │ │ Dialog │ │
│ └─────────┘ └─────┬─────┘ └──────────┘ └─────────┘ │
│ │ fetch() │
└────────────────────────┼────────────────────────────────────────┘
│
┌────────────────────────┼────────────────────────────────────────┐
│ SVELTEKIT SERVER (Bun) │
│ │ │
│ ┌────────────────────▼─────────────────────┐ │
│ │ API Routes (+server.ts) │ │
│ │ │ │
│ │ POST /api/tos/analyze ─── text │ │
│ │ POST /api/tos/analyze-pdf ─── pdf │ │
│ │ POST /api/tos/negotiate ─── email │ │
│ │ GET /api/healthz ─── status │ │
│ └──────────────────────┬───────────────────┘ │
│ │ │
│ ▼ │
│ ┌─────────────────────┐ │
│ │ OpenRouter API │ │
│ │ (Llama 3.3 70B) │ │
│ │ │ │
│ │ • Clause detection │ │
│ │ • Severity scoring │ │
│ │ • Email drafting │ │
│ └─────────────────────┘ │
└─────────────────────────────────────────────────────────────────┘
| Layer | Technology |
|---|---|
| Runtime | Bun |
| Framework | SvelteKit (Svelte 5 with runes) |
| Styling | Tailwind CSS v4 + custom design tokens |
| AI | Llama 3.3 70B Instruct via OpenRouter (OpenAI-compatible SDK) |
| PDF Parsing | pdf-parse |
| Icons | lucide-svelte |
| Toasts | svelte-sonner |
src/
├── routes/
│ ├── +layout.svelte # Global layout + toast provider
│ ├── +page.svelte # Landing page (/)
│ ├── dashboard/+page.svelte # Scanner + results (/dashboard)
│ └── api/
│ ├── healthz/+server.ts # Health check
│ └── tos/
│ ├── analyze/+server.ts # Text analysis endpoint
│ ├── analyze-pdf/+server.ts # PDF analysis endpoint
│ └── negotiate/+server.ts # Negotiation email endpoint
├── lib/
│ ├── components/
│ │ ├── Landing.svelte # Full landing page (hero → FAQ)
│ │ ├── Results.svelte # Analysis results display
│ │ ├── forms/TosInput.svelte # 3-tab input form
│ │ ├── dialogs/NegotiationDialog.svelte
│ │ └── layout/
│ │ ├── Navbar.svelte
│ │ └── Footer.svelte
│ ├── server/
│ │ └── openrouter.ts # OpenRouter AI client
│ └── utils.ts # cn() class merge helper
├── app.css # Tailwind theme + custom utilities
└── app.html # HTML shell + meta tags
- Bun >= 1.0
- OpenRouter API key
# Clone and install
git clone <repo-url> termscan
cd termscan
bun install
# Configure environment
cp .env.example .env
# Edit .env with your OPENROUTER_API_KEY
# Start development server
bun run devOpen http://localhost:5173.
bun run build
bun run previewSvelteKit's adapter-auto detects your deployment platform (Vercel, Netlify, Cloudflare, Node, etc.) and configures itself accordingly.
| Variable | Description |
|---|---|
OPENROUTER_API_KEY |
OpenRouter API key for Llama 3.3 70B |
Analyze plain text Terms of Service.
{ "text": "Terms of Service content...", "companyName": "Acme Corp" }Analyze a PDF document. Send as multipart/form-data with file (PDF) and optional companyName.
Generate a negotiation email for a specific clause.
{
"clauseExcerpt": "...",
"clauseCategory": "Data Selling",
"clauseExplanation": "...",
"companyName": "Acme Corp"
}Returns { "status": "ok" }.
MIT
