Docs / Overview▾

Parkezy docs

How Parkezy works

Parkezy is a parking marketplace: drivers find and book a spot, hosts earn from driveways and garages, and the gate opens with a QR code or a PIN. These pages explain the system behind it, section by section, with the real code, diagrams and the numbers from our tests.

89

API routes in one stateless FastAPI service

282

automated backend tests on real Postgres + Redis

69,424

load-test requests, 0 wrong answers, 0 server errors

1 of 100

drivers wins when 100 book the same slot at once

The big picture#

Every phone and browser talks to one API over HTTPS. The API keeps no state of its own: anything that must survive goes to PostgreSQL (the source of truth), anything short-lived goes to Redis, and photos go straight from the phone to object storage. Work that can happen later, such as emails, push notifications, expiring unpaid holds and checking payments, runs in a background worker that reads from a transactional outbox.

Parkezy architectureCLIENTSMobile appExpo · React Native · Android / iOSLanding siteNext.js on VercelGoogle sign-inClerk (OIDC tokens)EDGERender edge · HTTPS · request size cap · security headersAPI (STATELESS)FastAPI · 89 routes · Pydantic validation · rate limitsAuthSearchBookingsPaymentsAccessHostAdmindomain rules · pricing · booking state machine · ledger · outbox writerDATAPostgreSQL + PostGISNeon · source of truthRediscache · limits · one-time tokens · queueObject storageBackblaze B2 (S3 API)WORKERS & PROVIDERSCelery worker + beatoutbox · expiries · reconcileRazorpaypaymentsResendemailExpo Pushnotificationspresignphotos go straight from the phone to storage (presigned PUT)claims eventswebhooks

Swipe sideways to see the whole figure.

Clients reach a single stateless API. Postgres is the source of truth; Redis holds caches, rate-limit counters, one-time tokens and the job queue; workers deliver everything asynchronous.

Design principles#

The database enforces the rules that matter

Double booking and unbalanced money are impossible at the Postgres level, not just checked in Python.

Every retry is safe

Bookings take an Idempotency-Key, webhooks are de-duplicated, and every background handler can run twice without harm.

The server decides prices

The app shows what the API quotes; amounts are recomputed server-side with Decimal arithmetic, never trusted from the client.

Fail fast, degrade gracefully

Short timeouts return a clear 503 instead of hanging; if Redis is down, logins and bookings still work.

Read by section#