---
title: "Take your first real matter"
url: https://services.dev/docs/examples/legal/launch
captured: [legal-launch.txt]
---
# Take your first real matter

URL: https://services.dev/docs/examples/legal/launch

> Everything outside the legal folder a real matter depends on, the filing offices, the courier, the verifier, the referral route, the docketing system, coverage, live keys, payouts, clocks and firms, each with the contract a real one meets.

*legal's words: matter is a job, asset is a subject, review is a task, signer is a member, network is a pool, outcome is a end (examples/legal/brand.ts).*

The legal folder runs whole on localhost because every outside system it names is a sandbox at `example.test`. A real matter needs a real one behind each. These are all of them, as the folder points at them:

```bash
grep -rnoE "https://[a-z.-]+[.]example[.]test/[a-z/.-]*" --include=*.ts --include=*.json --exclude-dir=node_modules . | sort
```

```txt title="magic values: none"
./pools/attorneys.ts:22:https://verify.example.test/credentials
./rules.ts:44:https://referrals.example.test/litigation
./services/demand-letter.ts:30:https://delivery.example.test/certified
./services/demand-letter.ts:31:https://delivery.example.test/courier
./services/formation.ts:22:https://filings.example.test/secretary-of-state
./services/provisional-patent.ts:26:https://filings.example.test/patent-office
./services/trademark-response.ts:22:https://filings.example.test/trademark-office
./services/trademark-response.ts:25:https://filings.example.test/fees
```

## The contract each must meet

Each row is read from the Service file that calls it:

| Dependency | In the sandbox | The contract a real one meets |
|---|---|---|
| Provisional Patent Application: its `file` step, to USPTO | `https://filings.example.test/patent-office` | takes the job's signed output; answers a receipt that fills `application_number`; rejections any code → draft; it waits up to 2d for the answer |
| Demand Letter: its `send` step, to the recipient | `https://delivery.example.test/certified` | takes the job's signed output; answers a receipt that fills `delivery`; rejections none routed: a rejection stops the step; silence runs `courier` |
| Demand Letter: its `courier` step, to a courier | `https://delivery.example.test/courier` | takes the job's signed output; answers a receipt that fills `delivery`; rejections none routed: a rejection stops the step |
| Company Formation: its `form_entity` step, to the state | `https://filings.example.test/secretary-of-state` | takes the job's signed output; answers a receipt that fills `file_number`; rejections `name_unavailable` → rename |
| Trademark Office Action Response: its `file` step, to USPTO | `https://filings.example.test/trademark-office` | takes the job's signed output; answers a receipt that fills `receipt`; rejections `missing_specimen` → evidence, `fee_deficiency` → fee, any other code → draft |
| Trademark Office Action Response: its `fee` step, to USPTO | `https://filings.example.test/fees` | takes the job's signed output; answers a receipt that fills `receipt`; rejections none routed: a rejection stops the step |
| The attorneys Pool's verifier | `https://verify.example.test/credentials` | receives `signer.applied` with every answer; writes back only what it checked through `POST /attorneys/signers/:id/verify` with its `vt_` token: `facts.credentials`, and `facts.coverage` when it checks one |
| The route a refused act sends its caller to | `https://referrals.example.test/litigation` | named in `act_refused`'s `cure.route`: the brand hands its caller there, and never performs the act |
| Coverage | — | a policy that covers an attorney's act at $1,000,000, where the Pool carries it, at the cost per act its `coverage.usd` names |
| Live keys | — | `sk_live_` keys, which take real orders and charge real money |
| Payouts | — | an account each attorney is paid into, on the Pool's schedule |
| The docketing system | — | posts `office_action.issued` to `POST /events` with the family's `matter`; the docket watch offers the response at its own price, keyed to the event |
| An asset's clocks | — | the dates that outlive a matter, kept on its asset: the company's registered agent and franchise tax, every year. A provisional's 12 months to convert, and an office action's response date |
| Firms | — | a firm that enrolls its own attorneys and is paid for them |

A submit step's system takes the job's signed output and answers with a receipt: accepted, accepted with alerts, or rejected with a code the step routes to its repair. Silence past the wait runs the fallback. [Wire a real outside system](https://services.dev/docs/service/submit.md) shows the function you write for one, and what it returns.

## Before the first matter

Swap each `example.test` URL for the real system's, or for a function that calls it. Run `check`, then the brand's own suite, then [api.lawyer's](https://services.dev/docs/examples/legal/port.md), and order one matter on a test key end to end. Then take live keys, connect payouts, and enroll firms. [Deploy](https://services.dev/docs/operate/deploy.md) takes the folder live, and [Operate](https://services.dev/docs/operate.md) is what running it looks like.

---

- Up: [The legal example](https://services.dev/docs/examples/legal.md)
- Previous: [Porting api.lawyer](https://services.dev/docs/examples/legal/port.md)
- Next: [The tax example](https://services.dev/docs/examples/tax.md)
