Studiomanager runs a community pottery studio. It tracks pieces from greenware to pickup, loads kilns, charges firing fees, keeps the books, and watches supplies and equipment. It is built to help a studio manager, or to stand in for one: an AI assistant can read the studio's data and propose changes over MCP, and staff approve them. The backend is a Spring Boot modular monolith on Java 25 and PostgreSQL. The clients are a React web app and an Expo mobile app.
Status: a dev environment runs on Azure (West US), deployed by CI on every merge to main.
No studio uses it yet. The first-deploy runbook takes an empty
Azure subscription to a running environment. Recent plans cover
glaze chemistry & Glazecalc,
MCP OAuth 2.1,
reading real invoices, and
mobile parity.
- Today. One page with what's in the kilns, who's on duty, and what needs doing.
- Pieces. Each piece moves from greenware through bisque and glaze to pickup, with photos and a hold period for unclaimed work.
- Kilns. Queues with per-member caps, kiln loads, firing log with controller CSV curve import, and one "ready" notice per batch.
- Money. A double-entry ledger: member balances, stored value, firing fees, tax by date, consignment sales, payables to artists and instructors, and a journal export.
- Supplies. Clay and supplies with par levels, last purchase price from confirmed invoices, purchase requests, and sales to members.
- Schedule. Duties, expiring certifications, a bookable calendar and rosters with credited hours.
- Maintenance. Recurring tasks for kilns, equipment and the building, counted in days or firings, with reminders and problem reports from a phone.
- Glaze book. The studio's glaze recipes, offline UMF chemistry & cone-band limit checks, slurry SG helper, studio bucket mix/SG logs, test-tile photos, and Glazecalc import/sync.
- Imports. Members and consignment items from a CSV file.
- Invoices. Upload a supplier invoice and a reader pulls out the lines for review. Three readers are available: Claude (with the studio's own key), Google Document AI and Azure Document Intelligence. "Compare readers" shows their answers side by side.
- Assistant. Personal API tokens (and optional OAuth 2.1 with RFC 9728/7591/8707 metadata) let an assistant connect over MCP. It reads freely, but changes arrive as suggestions that staff approve or reject.
- Webhooks and events. Signed outbound webhooks to a studio's own tools, and an optional Kafka event stream.
- Platform admin. Which studios may use the platform-paid invoice readers, with monthly page caps, and per-studio API call limits with temporary boosts.
- Demo studio. "Demo Clay Co.", seeded with members, kilns, pieces and more, to try the app on.
flowchart LR
subgraph Clients
web["Web<br/>React 19, Vite, TanStack"]
mobile["Mobile<br/>Expo / React Native"]
assistant["AI assistant<br/>(MCP client)"]
end
subgraph Identity
entra["Microsoft Entra<br/>External ID"]
bridge["Auth & MCP OAuth bridge<br/>(auth/, optional)"]
end
subgraph API["API: Spring Boot 4.1, Java 25, Spring Modulith (Azure Container Apps)"]
direction TB
rest["REST, generated from OpenAPI"]
mcp["MCP endpoint<br/>API tokens & OAuth 2.1"]
modules["Modules: studio, access, piece, kiln, schedule,<br/>ledger, supplies, maintenance, glaze, invoice,<br/>proposal, notify, webhook, apitoken, admin, demo"]
outbox["Event publication registry<br/>(transactional outbox)"]
rest --> modules
mcp --> modules
modules --> outbox
end
pg[("PostgreSQL 18<br/>row-level security<br/>+ Hibernate @TenantId")]
blob[("Azure Blob Storage<br/>photos, invoices")]
kafka[["Kafka<br/>(off by default)"]]
subgraph External["External services"]
acs["Azure Communication<br/>Services email"]
hooks["Studio webhooks"]
claude["Claude API"]
gdai["Google Document AI"]
adi["Azure Document<br/>Intelligence"]
appi["Application Insights"]
end
web --> rest
mobile --> rest
assistant --> mcp
web -. sign in .-> entra
mobile -. sign in .-> entra
assistant -. OAuth 2.1 .-> bridge
entra -. GitHub .-> bridge
web -. upload / read by signed URL .-> blob
modules --> pg
outbox --> pg
modules --> blob
outbox --> acs
outbox --> hooks
outbox --> kafka
modules --> claude
modules --> gdai
modules --> adi
API -. OpenTelemetry .-> appi
subgraph Deploy["Deploy path"]
gha["GitHub Actions"]
ghcr["GHCR images"]
tf["Terraform"]
gha --> ghcr
gha -- OIDC, no secrets --> tf
end
tf --> API
ghcr --> API
gha -- migration job, then rollout --> API
gha -- Static Web Apps --> web
- One deployable, many modules. Spring Modulith verifies the module boundaries in a test
(ADR 2). That test also writes Modulith's generated module
diagrams (PlantUML) to
api/build/spring-modulith-docs/. - Tenant isolation in two layers. PostgreSQL row-level security sits under every
studio-owned table. The tenant is bound per transaction from a Java 25
ScopedValue, and the app refuses to start if its database login could bypass RLS (ADR 3). On the write side, Hibernate's@TenantIdfills in and filters the studio too (ADR 21). - OpenAPI first. The server interfaces and the TypeScript client are generated from
studiomanager.yaml. Drift fails the build (ADR 4). - Money is double-entry, and the database refuses unbalanced entries (ADR 9).
- Outbox for side effects. Email, webhooks and the Kafka stream go through Spring Modulith's
event publication registry, so nothing is sent for work that rolled back and nothing is lost
when a send fails (ADR 11,
14, 15;
AsyncAPI 3.0 contract in
studio-events.yaml). - MCP with propose and approve. The MCP endpoint runs on the official MCP Java SDK (ADR 22). Assistants sign in with personal API tokens (ADR 19) or audience-bound MCP OAuth 2.1 tokens (ADR 26). Each caller sees only the tools their live studio permissions and scopes allow, and proposed changes wait as pending actions until a person approves.
- Invoice readers sit behind one interface: Claude on the studio's own key, and the platform's Azure Document Intelligence and Google Document AI, which the admin turns on per studio under page caps. Google is reached keylessly from Azure by workload identity federation once its project is applied (runbook). "Compare readers" runs one invoice through all three and says why any of them didn't run (ADR 18, 24, plan 24).
- Identity comes from Microsoft Entra External ID; the API is a plain OAuth resource server (ADR 7). A small Spring Authorization Server bridge adds GitHub sign-in (ADR 20) and MCP OAuth 2.1 (ADR 26).
- No passwords or service keys. The API reaches Postgres through its managed identity, and studios' own AI keys are stored encrypted under a key Terraform generates. Migrations run as a separate job under a separate identity (ADR 5). GitHub Actions signs in to Azure through OIDC federation and applies Terraform (ADR 6).
- Azure Container Apps run the API and scale to zero. A JVM AOT cache trained in the image build shortens cold starts (ADR 8).
- Error Prone runs on every compile of the main code with its default checks, and
NullAway runs through it in JSpecify mode. Every javac lint and Error Prone warning fails the
build (
-Werror). Test code is compiled without Error Prone. - Spotless with google-java-format; the Gradle build checks it.
- Testcontainers integration tests against real PostgreSQL and Kafka, jqwik property-based tests with shrinking (ledger journal invariants, firing fees, glaze batch math), and Playwright end-to-end smoke and webhook specs.
- CodeQL on pushes, pull requests and weekly; Dependabot for updates; STRIDE threat model and security policy.
- Terraform is checked in CI (fmt, validate,
terraform test, TFLint) and planned on PRs. - ADRs record each decision: docs/adr.
- Web and mobile: CI type-checks, lints, tests and builds them, and fails if the generated client is out of date. The web tests use Vitest, Testing Library and MSW.
| Path | What |
|---|---|
api/ |
Spring Boot 4.1 on Java 25: Spring Modulith, PostgreSQL 18, Flyway, Hibernate |
auth/ |
GitHub OIDC sign-in bridge and MCP OAuth 2.1 authorization server |
packages/api-client/ |
Generated TypeScript client, permission helpers, and TanStack Query options |
packages/glaze-chemistry/ |
Shared offline UMF, cone-band limits, and slurry SG calculator |
web/ |
React 19, Vite, TanStack Router and Query, MSAL |
mobile/ |
Expo and React Native |
infra/ |
Terraform for Azure (and the Google Document AI project) |
.github/workflows/ |
CI, CodeQL, and deploy on merge |
docs/ |
ADRs, plans, runbooks and the pilot kit |
You need JDK 25, Node 24, and Docker for the database and the integration tests. In this repo,
builds and tests run through the scripts in scripts/, from the repo root:
bash scripts/check.sh # everything: API, generated client, packages, web, mobile
bash scripts/api.sh # API build and tests
bash scripts/api.sh bootRun # any Gradle task, e.g. run the API on :8080
bash scripts/js.sh -r run test # API client, glaze chemistry, web and mobile tests
bash scripts/integration.sh test # API with Docker integration tests, inside WSL
bash scripts/web-linux.sh # the CI JS job (packages, web, mobile) in a node:24 container
bash scripts/sync-generated.sh # regenerate OpenAPI client, routeTree and mobile assets in WSL Docker
bash scripts/eval-sources.sh --list # list or sparse-clone public invoice eval datasetsThe scripts find a JDK 25 and run the pinned pnpm. docker compose up -d starts PostgreSQL 18
with the app's database roles. Signing in needs an Entra External ID tenant and two app
registrations; steps 1 to 4 of the first-deploy runbook set them
up, and the free tier is enough. Copy web/.env.example to web/.env.local for the web app.
After changing the API contract, regenerate the client with
bash scripts/js.sh --filter @studiomanager/api-client run generate and commit the result.
Not captured yet. The planned screens and file names are listed in docs/screenshots.
- Architecture decision records
- Plans and research, including the invoice reading plan and mobile parity plan
- Runbooks
Part of an open-source ceramics toolset built alongside Updraft Pottery Studio by Aaron Filson:
- Studio & Pots: Updraft Pottery Studio (repo): live ceramics storefront in Tacoma, WA with static gallery pages and stock-aware Square checkout
- Glaze & Clay Chemistry:
- Glazecalc (repo): free web glaze chemistry calculator (UMF, limits, swaps, firing logs, 57 languages, MCP)
glazecalc-core: pure, stateless glaze and clay-body chemistry library powering Glazecalc and Glaze Vaultglazecalc-catalog: verified oxide, Orton/SK cone, limit formula, density, expansion, and material tablesglaze-vault: encrypted offline desktop and mobile recipe vault built on Glazecalc's chemistry engine- Ceramic Material Assay: estimates oxide compositions and UMF for wild clays, rocks, and wood ash for Glazecalc and Glaze Vault
- Kiln Engineering:
kilndesigner: kiln heat loss, burner and element sizing, masonry arch checks, and buildable 3D/PDF/DXF planskilnscrub: exhaust scrubber designer, CAD/BOM build-packet exporter, and controller for wood, gas, soda, and salt kilns