Personal project2026 - Present
Phil Yer Pot: One Back Office for a Food Business
Founder & Sole Engineer at Phil Yer Pot
Phil Yer Pot is pizza fired outdoors, a supper table and private dinners in Belfast. It is also my own business, which I run around a freelance day job, so the software had one brief: get the admin small enough that the cooking still gets the evening. Everything runs through one internal app, the hub, over one Postgres database. The public site, the back office, a chat agent in Slack and the content tooling all read and write the same rows. A booking becomes a place on a night, a payment matches itself to it, the run sheet and labels print from it, and the night ends up as a line in the ledger, with each step reading the record the step before it wrote. The business started as microgreens sold to chefs; that side is paused, and its software is switched off but still type-checked rather than deleted.
- Next.js 16
- React 19
- TypeScript
- Supabase Postgres
- Prisma
- Row-Level Security
- Stripe
- Claude
- Slack
- Meta Graph API
- Search Console API
- Cloudflare R2
- Remotion
- Mapbox
- Turborepo
- Vercel

1
Database
The site, the back office and the agent all read and write the same rows. Nothing is synced, so nothing drifts.
1
Person
Built and run alongside a freelance day job, which is the constraint every design decision answers to.
1,100+
Automated tests
On the back office alone, plus scripts that verify the money and scheduling rules against a real Postgres.
The short version
What it does
The software behind my own food business: a public site, a back office and a Slack agent over one Postgres database, running pizza nights, preorder collection, private dining, content and the books with one person.
- One database behind the public site, the back office and the Slack agent, so nothing is a copy of anything else
- Bookings arrive through write-only intakes and are never retyped from an inbox
- Bank transfers matched from the business account feed by reference; a name alone never confirms a payment
- Run sheets and box labels print from the order rows, in collection-slot order
- Per-night profit over a double-entry ledger, marked provisional until every cost is confirmed
- Every background job on a schedule edited in the back office, run by a single per-minute dispatcher
The hard parts
What made it difficult, and what I did about it
The problems
- One person has to run bookings, payments, service, content and the accounts around a day job
- The public site reads the same database as the back office, so anything readable by accident is readable by anyone
- One payment link for every event, so a charge does not say which night it was for
- Bank transfers arrive with whatever reference the customer typed
- The business changed shape, from growing for chefs to cooking for the public, without a rewrite
- A small site mostly measures noise, and noise is tempting to act on
- Scheduled jobs were fixed in a config file, in UTC, and each change needed a deploy
The answers
- One hub app and one database: each step of a night reads the record the step before it wrote
- Row-level security on every table, with public reads going through a published-only policy or a function that returns only public fields
- Payments attributed to a night by when they were paid, with a person's decision locking the row against re-inference
- Transfers matched by a generated reference, with the leftovers on a short review list
- A new kind of evening is a setting on an existing record where it can be, and its own tables only where it works differently
- An evidence floor: analytics are shown, but may not steer what gets written until there is enough traffic to mean something
- A schedule table and a per-minute dispatcher that claims each firing with a conditional update, so an overlapping tick cannot run a job twice
What came of it
- A booking reaches the books without being retyped
- Every night has a profit figure, provisional until its costs are confirmed
- A Monday Slack nudge says what the books need, and says nothing when the answer is nothing
- A receipt photographed into Slack is filed, categorised and attached to the right night
- Photos and video from a night go up once and become journal drafts and social posts, none published without approval
- A new scheduled job, or a new time for an old one, is a form rather than a deploy
Under the bonnet
How it is put together
A Turborepo monorepo with two Next.js apps over one Supabase Postgres database. The public site reads published rows with the anon key under row-level security and writes only through bearer-token intakes on the hub. The hub is the back office: Prisma with a privileged role behind Supabase Auth and an email allowlist. Rules that both apps must agree on, such as collection-slot maths, live in a shared package. Background work runs from a schedule table through one per-minute cron.
- Public site (Next.js): bookings, collection orders, journal, producer map
- Hub back office (Next.js): nights, orders, payments, ledger, content, schedules
- One Supabase Postgres database with RLS on every table
- Write-only intakes between site and hub
- Stripe and bank-feed payment matching
- Double-entry ledger with per-night accounting
- Schedule dispatcher with run history
- Slack agent for receipts, photos and questions
- Content pipeline: media processing, drafting, social publishing
- Analytics drain and Search Console sync behind an evidence floor
Frontend
- Framework
- Next.js 16 with React 19 (App Router)
- State
- Server components and server actions
- Styling
- Tailwind CSS on shared design tokens
- Collection order page with a slot picker running the same slot rules as the back office
- Northern Ireland producer directory on a clustered Mapbox map
- Journal served from the database, with MDX files as a fallback
- Builds with no environment at all: every read degrades to an empty list
Backend
- Framework
- Next.js 16 route handlers and server actions
- Database
- Supabase Postgres with Prisma, hand-written SQL for constraints and RLS
- API
- Bearer-token intakes, HMAC-verified webhooks and drains
- Database-driven schedules in wall-clock London time, with a missed firing recorded rather than run late
- Payment matching from the bank feed and Stripe webhooks, idempotent on the charge id
- Double-entry ledger: invoices, budgets, director's loan, tax and year end
- Findings graph on pgvector that the assistant answers from
- Pure logic unit tested; database behaviour verified by scripts against a real Postgres
Admin
- Framework
- The hub, an internal Next.js app
- Database
- The same Postgres database, through Prisma
- API
- Server actions behind Supabase Auth, with an email allowlist that fails closed
- Run sheet and box labels printed from live orders
- Payments review list for anything that did not match itself
- Per-night money view with confirm and move controls
- Content workspace: drafts, scheduling, and what is working
- Schedules page: pause, run now, edit or add a job, and read what each run returned
Infrastructure
- Hosting
- Vercel, with Cloudflare R2 for media
- Deployment
- Vercel from GitHub, SQL applied before the code that reads it
- Monitoring
- Run history per schedule, Slack alerts, Vercel Analytics drain
- A single Vercel cron drives every scheduled job
- Private and public media in separate buckets, because R2 has no per-object access control
- CI runs unit tests, lint, types and the database verification scripts on every pull request
On screen
More of what it looks like

Pizza nights
A night's capacity, dietaries and collection slots live on the night itself, and the page reads them from the same rows the back office edits.

Producer directory
Northern Ireland farms, farm shops, markets and box schemes on one map, edited in the back office and read by the site under a published-only policy.
My part in it
Founder, cook and sole engineer
Team size: One
- Product decisions, made as the person who also runs the nights
- Data model, security model and all application code
- Payments, accounting rules and the ledger
- AI features: the Slack agent, the hub assistant and content drafting
- Deployment, schedules and operations
Got something like this in mind?
Tell me what you're trying to build. It's a free call, and if I'm not the right person for it I'll say so.
Rather write it down? Send a message instead.
