Inspiration
Booking a cinema seat still means a chain of forms: pick a cinema, a film, a day, a time, seats, then a checkout on another page. People already know what they want ("something funny this weekend, two seats, not too far back"). I wanted that sentence to be the whole booking, without giving an AI the power to spend money on its own. Who it’s for: moviegoers booking on their phones, often for a group and at the last minute, who would rather say what they want than fill in forms. Also independent cinemas that can’t build their own app and checkout: Seatora gives them a booking assistant, seat maps and PayPal payments in one web app.
What it does
You tell the assistant what you feel like. It searches the real schedule and shows the matching showtimes as time chips. Tap a time, choose how many seats, and a 3D seat picker opens with the best seats already chosen. Or ask the assistant to book: it checks the seats and shows a booking card with a server-calculated total. One click on Confirm holds the seats for 10 minutes. The PayPal button appears on the card; you pay without leaving the chat, and the card turns into your ticket with a QR code. Changed your mind? Ask the assistant to cancel. It shows the refund the policy allows, you confirm, and PayPal refunds it. No account needed: continue as a guest with a name, email and phone, and save it as an account later.
How we built it
AI agent: a tool-calling loop on Google Gemini (function calling), with automatic failover to a second Gemini model and to Groq (gpt-oss) when a model is rate limited or overloaded. The agent has an allowlist of read tools (search movies and showtimes, check seats, quote prices, look up bookings and payments) and two "propose" tools that only create a card. The agent proposes; the customer's click acts. The server checks seats, price and refund again on every click. PayPal (Sandbox): Orders v2 created by the server from the booking's total (the browser and the AI never send an amount), the JS SDK buttons on the chat card and the booking page, server-side capture with status, amount, currency, payee and ownership checks, refunds through the Captures API, and webhooks verified with PayPal's signature-verification API and idempotent against duplicates and late deliveries. Backend: Node.js, Express 5, MongoDB (Atlas) with Mongoose; seat holds with conditional single-document updates instead of transactions, covered by race tests. Web app: React + TypeScript + Vite, a dark cinema design with a CSS 3D hall, served by the same Express app on Vercel. Quality: 270+ automated tests (the assistant against a fake model, PayPal against a fake PayPal), run with a web app build and a secret scan on every push.
Challenges we ran into
Making an LLM safe around money. I kept every money-moving action behind the customer's click and re-checked everything on the server, so even a model that obeys a prompt injection can't book, charge or refund. Models don't always do what they say. Replies claimed showtimes without searching, drew fake "Confirm" buttons, or listed IDs. I added server-side guards: a required search when a reply claims results, replacement of fake cards, and IDs removed from replies; lists and cards come only from tool results. Free-tier limits. Gemini's per-minute limits and Groq's tokens-per-minute budget forced failover, cooling of busy models, and much smaller requests (compact instructions and tool results). Paying inside a chat while keeping PayPal's verification on the server.
Accomplishments that we're proud of
A complete booking loop in one conversation: ask → card → PayPal → ticket → cancel → refund. An AI agent that can't move money on its own, with every rule enforced by the backend. Verified captures, refunds and webhooks, with the edge cases handled (late payments refunded automatically, duplicate webhooks ignored).
What we learned
PayPal Orders v2 and the JavaScript SDK: how an order moves from created to approved to captured. Why the server, not the browser, must create the order and check the capture (status, amount, currency, payee). How to render PayPal Buttons inside a React component that appears and disappears in a chat.
PayPal refunds and webhooks: refunding through the Captures API, and verifying webhook signatures with PayPal's API. I also learned to make webhook handling idempotent, because the same event can arrive twice, or after the booking has changed.
LLM function calling with Google Gemini: declaring tools with JSON schemas, running the tool-calling loop on the server, and forcing a tool call when needed. I learned that a model's text can't be trusted to match what its tools returned.
Groq and OpenAI-style chat APIs: translating a conversation and its tool calls between two providers' formats, so a message can fail over from Gemini to Groq mid-conversation. Working within API rate limits: sorting failures into rate limits, overloads, timeouts and bad keys; reading retry-after; letting a busy model cool down; and keeping requests small enough for token-per-minute budgets.
MongoDB and Mongoose: conditional single-document updates to hold seats safely without transactions, and TTL indexes that expire seat holds, proposals and conversations automatically.
Express 5 security: JWTs in httpOnly, SameSite=Strict cookies, bcrypt, rate limiting with a database-backed store, Helmet security headers, and validating every request against a schema.
Testing and CI: Node's built-in test runner with an in-memory MongoDB and fake PayPal and AI providers; GitHub Actions running the tests, the web build and a gitleaks secret scan on every push.
What's next for Seatora
Payments: Split the bill: a group booking where each friend pays their own share with PayPal, and the seats are held until everyone has paid. Faster checkout for regulars: save the customer's PayPal for one-tap payments (PayPal Vault), and offer Venmo and Pay Later where available. An assistant for staff: answers questions about payments, refunds and disputes from PayPal's own data, with the same "propose, then a person confirms" rule.
Booking: Tickets in the wallet: emailed tickets and Apple/Google Wallet passes, with reminders before the film. Live seat updates: seats taken by others turn grey while you're choosing, instead of when you hold them. Assistant
More languages and voice: Arabic and English first, and booking by voice. Remembers what you like: favourite cinema, usual seats, accessibility needs.
Real cinemas: Connect to real cinema schedules and seat maps, and an admin dashboard for showtimes, prices and sales.
Built With
- express.js
- google-gemini
- groq
- mongodb
- mongoose
- node.js
- paypal
- paypal-js-sdk
- paypal-orders-v2
- paypal-webhooks
- react
- typescript
- vercel
- vite