Current
AI news & practical reference.
For work, creativity, and everyday life.
Current
Development · Documented baseline v1
A practical baseline for a source-backed web app: one typed application, a relational database, and browser checks.
Solo developers and small TypeScript teams.
Application
Keep public pages and server endpoints in one project, with clear server boundaries around credentials.
Alternative: A separate API and frontend when teams need independent releases.Data
Store users, revisions, and work receipts with transactions and ownership constraints.
Alternative: A managed PostgreSQL service if database operations are outside your team’s scope.Model access
Make model selection and spending limits configuration. Validate returned data before it affects public content.
Alternative: A direct model-provider API behind the same interface.Verification
Test domain decisions separately from browser journeys. Exercise errors and unauthorized access before release.
Alternative: Your existing browser test framework if it covers the same critical paths.Setup notes
Configure the tools here, then use the workflow to complete the task.
The worked product is a support-ticket classifier: accept a short message, return a category and rationale, and show an honest failure state when the provider cannot respond. This is narrow enough to test. Do not begin with an open-ended chat interface if the product only needs one classification.
A React interface, a server route, PostgreSQL, and a model gateway are one reasonable setup. They are choices for this exercise, not a performance ranking. Keep the provider credential and all spending controls on the server. The browser submits task input and displays the result; it never chooses a privileged provider key or overrides the spending limit.
| Layer | Example choice | Replace when |
|---|---|---|
| Web UI and server | Next.js with a server route | Your existing framework already handles the user journey; do not migrate only to call an API. |
| Durable request ledger | PostgreSQL with unique idempotency keys | A managed durable store better fits your hosting constraints and supports equivalent concurrency guarantees. |
| Model access | OpenRouter with one pinned model and a supported response schema | Your evaluation shows a direct provider or another model improves the actual task. |
| Execution | Synchronous request with a short deadline | Jobs need reliable continuation, larger inputs, or user-visible progress beyond a request lifetime. |
| Evaluation | Versioned examples and a deterministic provider stub | Add real-provider evaluation when the contract and failure handling already work locally. |
Use the runnable Node example in the linked agent skill before wiring it into a web route. It models request validation, duplicate requests, a bounded call budget, and provider failures. Its in-memory ledger is deliberately limited to one process. A production server needs a durable transaction for reservation and idempotency, especially with multiple replicas.
Create a fixture set containing billing, account-access and bug reports, an ambiguous message, a large input, and an instruction trying to override the classifier. Allowed categories are billing, account, bug, and needs-review. Decide the expected category or rejection before evaluating a model. Save inputs and expected outcomes together; otherwise a fluent answer can become a moving target.
{
"id": "billing-refund-01",
"input": "I was charged twice for the same subscription.",
"expectedCategory": "billing",
"mustNotContain": ["refund issued", "account updated"],
"reason": "Classification does not authorize or perform a refund."
}Once the local example passes, implement the real provider adapter behind the same interface. Check the selected model's current schema support, timeout behavior, and pricing in its documentation. Record model, prompt revision, tokens, elapsed time, and outcome for evaluation runs. Do not treat JSON-shaped output as a guarantee that the underlying classification is correct.
Use ticket T-041 and key triage-T-041-v1. Two simultaneous requests carry the same normalized text. One database transaction claims the account/key pair and reserves the allowed cost; the other reads the existing operation. Dispatch only after the winning transaction commits. Keep the network call outside the transaction.
This is an implementation design to test when replacing the tutorial's process-local Map. It is not a finished PostgreSQL adapter. Implement and test each recovery case below before claiming durability. A unique key in your database cannot establish exactly-once work at a remote provider.
| Stop execution here | Expected durable state | Recovery to verify |
|---|---|---|
| Before reservation commit | No committed operation or allowance | A fresh claim can proceed; no provider request was dispatched. |
| After commit, before dispatch | Reserved pending operation | Reconcile and dispatch only if you can establish it was never sent. |
| After provider acceptance, before storing result | Uncertain completion; reservation retained | Use provider reconciliation if available. Otherwise require a deliberate recovery decision; do not silently retry. |
| After validated result is stored | Completed operation with draft | Replay returns that stored result without another provider call. |
Record the operation ID, injected crash point, provider-call count, stored status and budget before/after for each case. Test two service processes against the same disposable database; two calls to one Map do not exercise this boundary.
Initial documented baseline. No tool replacement or comparative benchmark is claimed.
A single application is easier to operate, but background jobs still need their own process and failure handling.
Hosting, database, and model usage are separate charges. Set project-specific budgets; no fixed total is promised.
This is reference version 1. No independent compatibility test or vendor pricing has been attached. Treat this as a starting baseline, not a ranking or proof of compatibility.
These references support the setup. The exercises are original instructional material; compatibility has not been independently tested.
Application setup and runtime requirements; check against the version you select.
Checked 2026-10-10. Recheck before adopting.
Database constraints help enforce invariants across concurrent requests.
Checked 2026-10-10. Recheck before adopting.
Model support for structured responses varies; application validation remains necessary.
Checked 2026-10-10. Recheck before adopting.
Official relational database tutorial.
Checked 2026-10-03. A fresh review is due.
Official browser testing setup.
Checked 2026-10-03. A fresh review is due.