Skip to main content

Current implementation layer

The current TIBS API surface is not a single standalone REST service yet. Today it is a mix of:
  • Next.js route handlers in tibs
  • Next.js route handlers in tibs-survey
  • client and server calls into Supabase RPCs
  • a draft external OpenAPI contract in this docs repo

Domain map

Repo ownership

The implementation is currently split like this:
  • tibs: public rider app, incidents, vehicles, feedback, maps
  • tibs-survey: surveyor operations, assignments, document acceptance
  • tibs-learning-center: courses, readiness, learning progress

Read and write split

The existing codebases already show a clear pattern:
  • write through route handlers and RPCs
  • read through pre-shaped feeds and summaries
  • keep internal processing and review tables out of public contracts

Critical rules from the current repos

  • do not expose internal incident clustering tables as public API
  • prefer read-optimized incident and vehicle summaries for public views
  • treat service-area checks and corridor resolution as contract-level behavior
  • keep surveyor and admin review flows restricted
  • treat the OpenAPI spec here as a draft external contract until the app routes are stabilized into a formal public API