BiteBuddy

Technology

How it is built.

A quick tour of the modern, secure stack behind BiteBuddy, for the technically curious.

The app and the API

The web app is React 18, TypeScript, Vite, React Router, TanStack Query, and Tailwind. In production the API can serve that built app from the same origin. This marketing site is a separate static site and does not replace that app.

The API is Node 22, TypeScript, and Express. Postgres, with PostGIS for geographic search, is the database. Prisma is the application’s view of it. Geographic and full-text search are built into the database for fast, accurate results.

Fast by design

Caching, presence and background work such as email, media checks, webhook delivery and scheduled maintenance run close to the API, so pages and orders stay quick.

Accounts

Passwords are hashed with Argon2id. Access tokens are short-lived. Refresh tokens rotate, and presenting a refresh token that was already used revokes that session family. A suspension is read from the database on the next authenticated request, so it does not wait for a token to age out.

Restaurant permissions are membership on that restaurant: staff, then manager, then owner. The check looks up the membership. It does not trust an id sent in the body.

Media

The API does not buffer upload bytes. The browser receives a signed URL, uploads, and then calls a completion route. The declared type is checked, and the file’s real type is checked afterwards. A file that fails is marked failed, removed, and not served.

Orders and the till

Prices are computed on the server from the menu and offers. The order stores a snapshot. The desktop till sends operations. Replaying an operation id returns the first result instead of applying it twice. Offline tickets keep the price the guest saw.

Realtime

Socket.IO runs on the same HTTP server. A connection requires a signed-in session. It carries chat, typing, and presence, and the dashboard refreshes when the till changes an order.

This website

The marketing site is Astro, rendered to static HTML, with the journal in Markdown and images served as AVIF and WebP. Motion is a small dependency-free script that respects reduced-motion settings. The contact and walkthrough forms post to a small server route that emails the note; nothing is stored. Analytics and Search Console tags render only when the operator sets the public ids.