Open source · BUSL 1.1

Read the prompts that draft your petition.

Every prompt, tool call, and petition template behind an O-1A, EB-1A, or NIW draft is published. Audit it, fork it, or self-host with your own Anthropic key.

One repo — Two licenses — Zero telemetry when self-hosted

The licence
Source available.

BUSL 1.1 → Apache 2.0 after four years.

The key
Bring your own.

Your case never touches our servers.

The output
Filing-ready petitions.

O-1A · EB-1A · NIW.

Why open source

The prompts are the product, so we published them.

An AI that drafts a legal filing has to earn trust, and you can't earn it behind a curtain. Read the system prompt, the tool schemas, and the LaTeX skeleton — then decide.

BYOK by default

Self-host with your own Anthropic key. Your prompts and case data go straight to Anthropic — we're not in the loop.

Prompts published

Agent turns, tools, petition templates, exhibit review, letters — all in the tree. Fork, tune, or audit.

Trust you can test

No black box for the part that matters. If a section drafts badly, you can see exactly why and fix it.

Open core

What's in the repo. What isn't.

Everything that drafts a petition is open. Everything that runs the hosted business — Stripe, referrals, the lawyer network, email — lives in a /ee folder under a proprietary licence. Self-hosters get working stubs.

Open · BUSL 1.1

The drafting workspace

  • Agent turn loop + full tool schemas
  • O-1A / EB-1A / NIW petition templates
  • Exhibit ingestion, OCR, review prompts
  • Recommendation-letter drafting
  • LaTeX pipeline (SwiftLaTeX WASM, in-browser)
  • BYOK Anthropic client + AES-GCM key storage
  • Supabase schema for projects, sections, exhibits, chat
Enterprise · proprietary

What pays for the hosted service

  • Managed Anthropic billing (per-case Stripe checkout)
  • Referral engine + credits + payouts
  • Partner law-firm directory + discounted review-and-file intros
  • Lifecycle + transactional email
  • Admin console
  • Analytics wiring

The boundary is enforced by CI. Delete /ee and the app still builds and still drafts petitions — it just doesn't send emails or charge cards.

Self-host

Your own copy in ten minutes.

Supabase for storage. Bun for the dev server. Your own Anthropic key. That's the whole stack.

  • Deploy anywhere that runs a Cloudflare Worker or Node process.
  • Two-way sync with GitHub — edit locally, ship from Actions, or both.
  • BUSL 1.1 converts to Apache 2.0 after four years. No lock-in.
Terminal
# clone
git clone https://github.com/Job-Protocol/visaworker.git
cd visaworker

# install
bun install

# wire Supabase (local or hosted)
supabase link --project-ref $YOUR_REF
supabase db push

# drop your Anthropic key in .env
BYOK_ENCRYPTION_KEY=$(openssl rand -hex 32)

# go
bun run dev
Skip the reading

Let your coding agent do the setup.

Paste this into Cursor, Claude Code, Codex, or any shell-capable agent. It installs, wires Supabase, asks for your keys, and boots the dev server.

  • Stops for your API key — nothing is auto-committed.
  • Leaves you with a running dev server, ready to draft.
Agent prompt
Self-host VisaWorker for me. It's a TanStack Start app on Cloudflare Workers, Supabase for data, BYOK Anthropic key.

1. Clone https://github.com/Job-Protocol/visaworker and cd into it.
2. Run `bun install` (or `npm install` if bun is missing).
3. Create .env from .env.example. Ask me for:
   - Supabase URL, publishable key, service-role key, and project ref
   - Anthropic API key
   Then generate BYOK_ENCRYPTION_KEY with `openssl rand -hex 32` and write it to .env.
4. Run `supabase link --project-ref <ref>` and `supabase db push`. Show the migration list first.
5. Run `bun run dev` and report the preview URL.

Rules:
- Never commit secrets. Confirm .env is in .gitignore before any git add.
- /ee is proprietary and stubbed in the open build. `ee_required` errors are expected; note and continue.
- Ask before installing anything outside the lockfile.
Paste into Cursor, Claude Code, Codex, Windsurf, or your terminal-based agent of choice.
Two ways to use it

Run it yourself, or let us.

Same codebase either way. The hosted version funds the open one.

Self-hosted · free

You run it

$0 + your Anthropic bill

Everything in the open repo. Your infra, your key, your data. Community support.

  • Full drafting workspace
  • Bring your own Anthropic API key
  • All prompts and templates included
  • No telemetry, no lifecycle email
  • Community support via GitHub Issues
Hosted · $249 / case

We run it

Flat, per petition

Managed billing, human support, and a free strategy call before you start.

  • No key, no infra, no setup
  • Free strategy call to pick your route
  • Human support during your filing
  • Partner attorney review at a discounted rate
  • Same open codebase underneath
Data & security

Your case belongs to you.

Self-hosted, your prompts hit Anthropic directly with your key — nothing routes through us. Hosted, BYOK keys are encrypted at rest with AES-256-GCM before they touch the database, and the source is public so you can verify it.