Skip to content
Browse docs / PARADA

Architecture

Monorepo layout, data flow and the realtime contract.

Repository

text
parada/
├── apps/
│   ├── mobile/     # driver app — React Native + Expo + TypeScript
│   └── admin/      # admin console — Next.js + TypeScript + Tailwind
├── services/
│   ├── api/        # backend — Node.js + Express + TypeScript
│   └── vision/     # plate reading — Python + FastAPI + OpenCV + EasyOCR
├── packages/
│   ├── database/   # Prisma schema + embedded PostgreSQL for development
│   ├── types/      # shared TypeScript types
│   └── config/     # shared configuration
└── docs/

npm workspaces and Turborepo tie it together.

Data flow

text
Camera → Vision/OCR → API → Domain → PostgreSQL
Mobile → API → Domain → PostgreSQL
Admin  → Next.js proxy → API → Domain → PostgreSQL
Realtime (SSE) → Admin + Mobile
  • The backend is the only authority on what an observation means. Vision reports what it saw over HTTP and never touches the database.
  • Clients render backend state. Mobile and admin never read the database; the admin reaches the API through a server-side proxy that keeps the JWT in an HttpOnly cookie, and mobile keeps its token in SecureStore.
  • Realtime is delivery only. Server-Sent Events are published after each transaction commits, sequenced, and recovered on reconnect; polling stays as the fallback.

Roles

USER and ADMIN, enforced by the backend. Unregistered plates can be admitted as guests under an audited admin override.