Product

Architecture

A walkthrough of how the Landon AI tools platform works — from upload to report — and how the access & rules engine enforces fair, secure usage.

Core flow

Upload
2–6 PDFs · ≤20MB each
Validate
Type, size, virus scan
Rules engine
Token / subscription gate
AI workflow
Compare & extract
Report
Saved & versioned

Rules engine

Every comparison request passes through deterministic checks before the AI workflow is invoked.

user.signedIn === true→ continue
files.length BETWEEN 2 AND 6→ continue
files[*].type === 'application/pdf'→ continue
files[*].size ≤ 20MB→ continue
user.subscription === 'pro' OR user.freeTokenUsed === false→ run AI workflow
rate_limit(user.id, '1m') ≤ 3→ proceed
otherwise→ reject with reason

Access matrix

What each role can do.

CapabilityUserAdmin
Run PDF comparison✓—
View own history✓—
Manage own profile✓✓
See all users—✓
Grant tokens—✓
Disable accounts—✓
View inbox—✓

Data model

User
 ├─ id, name, email, role
 ├─ subscription: 'free' | 'pro'
 └─ freeTokenUsed: boolean

Comparison
 ├─ id, userId
 ├─ files[]: { name, label, size }
 ├─ status, createdAt
 └─ summary, report (markdown)

ContactMessage
 ├─ id, userId?, name, email
 ├─ topic, message
 └─ status: 'new' | 'in_review' | 'resolved'

Components

Upload service
Storage
Token ledger
AI workflow
Report renderer
Access control

Each module is independently swappable; the platform is built to host additional tools alongside PDF Comparison.

Token state machine

NewfreeToken=trueUsed freefreeToken=falseSubscribedProRun 1 comparisonUpgradeAdmin grant token

Failure modes & safeguards

Oversized file

Reject before upload completes; surface inline error.

Duplicate submit

Idempotency key per request blocks rapid double-clicks.

Workflow timeout

Auto-retry once, then mark comparison as failed.

Account abuse

Per-IP and per-fingerprint rate limit on signup.

Sensitive data

Files isolated per user; deleted on request.

Unexpected output

Strict schema check on workflow response.