← All work

Yellow Bus operations rebuild

Period 2024.11–2025.08

Role
I built operations screens and API integrations in the new React and TypeScript Admin, coordinating data exceptions with the backend team.
Result
Connected academy dispatch, routes, and boarding work in the new Admin operations screen; the related changes were merged.

Context

At acquisition, student, dispatch, and route work was spread across generations of tools. Internal staff and academies also needed different features and permissions.

Key decisions

  • Connect APIs feature by feature

    After preparing login and basic UI, I defined the endpoints and data shapes needed for each feature and requested them from the backend team. I connected screens as the APIs became available.

  • Handle real student data exceptions

    Some student records had no guardian information or multiple guardians. I aligned the response shape with the backend against the legacy operations screen and defined the UI conditions.

  • Bring trip operations together

    I connected date-based dispatch, a map of multiple routes, boarding status, pickup and drop-off stop changes, and access restrictions in the new operations screen. Monitoring used polling; route and stop management used Kakao Map.

Implementation details

View implementation flow

The operations screen needed academy, date, time, and dispatch selections to stay consistent between the list and map. I separated fetch state from selection state and connected successful changes to a refetch of the relevant trip data.

  • React
  • TypeScript
  • React Context
  • TanStack Query
  • Kakao Map
  • Drag & Drop
FLOW / 04Select a stage
SELECTED STAGE / 01

Choose conditions

Look up dispatches by academy, date, and time

Read every stage
  1. 01
    Choose conditions

    Look up dispatches by academy, date, and time

  2. 02
    Inspect map

    Show multiple routes for the selected dispatch

  3. 03
    Edit trip

    Change boarding status and pickup or drop-off stops

  4. 04
    Refresh data

    Invalidate related query caches

The lookup, selection, and edit flow in the trip information tab.
STATE MODEL

Dependent selection resets

React Context managed selected academy, date, time, dispatch, and map focus. Changing academy reset prior selections; changing date cleared time and route selections. This kept dispatches from prior conditions out of the new selection.

QUERY & MAP

Automatic and manual lookups

The time list used useQuery; dispatches and routes were requested explicitly through useMutation. Route requests were blocked without a selected dispatch or while another lookup was in progress. With one route the map focused on that dispatch; with multiple, it centered on the academy and highlighted the selected route with a Polyline.

INVALIDATION

Dispatch data refresh

After boarding status or stop changes succeeded, I invalidated the query keys for that dispatch’s details, student schedules, and stop list. Related lookups then refreshed from the server result instead of only changing local display values.

INTERACTION RULES

Drag-and-drop rules

When a student’s pickup or drop-off stop was dragged, I checked for the same stop, route direction and departure or arrival constraints, and whether boarding and drop-off order would reverse. Only valid moves reached the change-confirmation dialog.

Verification

Merge and follow-up
The operations screen changes were merged, and I later connected bulk registration of student boarding schedules and locations.
Next projectSWAP Admin V1/V2 transition