-
-
Live AI course match with a server-priced quote: 3 seats × USD 149 = USD 447. Fictional catalogue.
-
Persistent booking records distinguish sandbox paid, quote-only and expired states.
-
An unrelated scuba-diving enquiry returns no suitable course and no checkout.
-
Verified PayPal sandbox payment confirmation. No real money moved or real training seats purchased.
Inspiration
Training enquiries often arrive as a goal: “We want our team to write better emails with AI.” A small training provider still has to identify a suitable course, check level and budget, calculate a group price, and follow payment through to a booking. SeatReady puts those connected steps into one operator-facing desk.
What it does
SeatReady turns an enquiry into a catalogue-constrained AI recommendation, a server-priced seat quote, an operator review, and PayPal sandbox checkout. The assistant can return no suitable course and ask a follow-up question. The operator must review the course, date, seats and total before checkout is enabled.
The prototype uses three fictional courses, prices, dates and capacities. It does not sell real training or accept live payments.
How we built it
The interface uses React and TypeScript. An Express API validates enquiries, filters the catalogue by budget, format and availability, and calls the OpenAI Responses API with gpt-4.1-mini and a structured-output schema limited to eligible course IDs. Prices are calculated in integer cents on the server, outside the model.
PayPal JavaScript SDK v6 handles buyer checkout. The backend uses PayPal sandbox OAuth and Orders v2 to create, inspect and capture orders. Stable request IDs make retries idempotent. SeatReady checks the order, quote identity, completed capture, amount and currency before recording payment in SQLite. Read-only reconciliation checks a remote payment without initiating a new charge.
Codex assisted with the design, implementation, automated tests, browser verification, documentation and demo production. A generated visual concept informed the original layout. The demo uses actual application captures and local AI narration.
Challenges
The central challenge was keeping advice separate from authority: AI may suggest a course, but it cannot invent catalogue facts, change a price, or take payment. Another was handling uncertainty after checkout: a timeout must not create a duplicate charge or a false paid booking. We added idempotent requests, capture validation, and a payment-check action. In-app browsers also needed an explicit within-page checkout fallback when their popup did not appear.
Accomplishments
Live OpenAI matching and a genuine no-match response have been verified in the browser. Fourteen automated tests cover validation, price tampering, eligibility, session scoping, availability, expiry, capture evidence, idempotency and reconciliation. The production build passes. A real PayPal sandbox buyer payment of USD 447 was verified, and two capture retries returned the same capture reference. Cancellation did not mark the booking paid.
What we learned
A booking assistant needs a narrow model contract and explicit payment state. Course suitability, money, inventory and confirmation each need their own checks. A convincing demo also needs evidence of the real flow, including cancellation and no-match outcomes.
What is next
Connect a provider-owned course catalogue, add authenticated administration and customer records, and design refunds, webhooks and reconciliation for production. The current project deliberately stays local with a sample catalogue and sandbox payments.
Built With
- express.js
- node.js
- openai
- paypal
- react
- sqlite
- typescript
- vite
- zod