Skip to content

TMS v2 — feature list ​

What TMS v2 can do today, what is only designed, and what was dropped on purpose. One table per area of the system. Screens and other UI features are left out; the backend side of an admin feature stays in.

Read this first

  • Built = the code exists on main-v2-prototype (commit 3d70475a) and an HTTP endpoint, Kafka consumer or worker reaches it.
  • Partly built = some of it is in the code, but the design asks for more, or the endpoint exists and does nothing yet.
  • Designed = written in a module design, no code yet. "Parked" in the text means the design itself put it on hold.
  • Cut = dropped on purpose; the reason is in the last column.
  • Code paths are relative to /Users/thanosorn/Works/Software/tms/wt-v2-prototype-core/. Design paths are relative to /Users/thanosorn/Works/Software/tms/agent-task/.work/tms-v2-discovery/ and name the section heading to open.
  • DO = delivery order (one customer order to deliver). OMS = BigC's order system, which sends orders over Kafka. Task = one driver's trip with its ordered stops.

Summary ​

areaBuiltPartly builtDesignedCuttotal
Intake / DO449118
Planning449320
Execution0224228
COD0011213
Workforce1115219
Master data527317
Admin / reporting323311
Platform1437428
all31188520154

The short picture: the platform base (jobs, Kafka in and out, history, settings, logs, files) is mostly built. DO intake and planning have a working prototype that does not yet follow the design's states and rules. Execution, COD and workforce are designed only. The driver app for v2 has not been started.

Intake / DO ​

How orders get into TMS and change before delivery.

featurestatuswhat it doeswhere
DO create, read, update over RESTBuiltAdmin or another system creates a DO, lists it, reads it by DO number and updates itsrc/delivery_order/delivery_order.controller.ts
DO lines (items) over RESTBuiltList, read, create, update and delete the lines of a DOsrc/delivery_order_item/delivery_order_item.controller.ts
DO number generationBuiltA new DO gets "DO" plus 8 running digits when no number is sentsrc/delivery_order/delivery_order.service.ts (createDeliveryOrder)
Kafka order intake, each message applied onceBuiltMessages on bigc.lastmiles.do-post create or update a DO; a repeated message id is a no-op; a message that keeps failing is dead-letteredsrc/delivery_order/delivery_order.kafka_consumer.ts, src/kafka/kafka.consumer.ts
Enrich a new DOPartly builtBuilt: copies the source store's name and location onto the DO. Designed: geocode a missing customer location through an address cache, sum weight and volume from the linescode: delivery_order.service.ts (_resolveSourceStore); design: modules/intake/srs.md § "Enrich a new DO once"
History event for every DO changePartly builtBuilt: create and update write one history row in the same transaction. Designed: status, cancel, hold, assign and redeliver rows, because those commands do not exist yetcode: delivery_order.service.ts; design: modules/intake/srs.md § "Record every DO change as an event"
Durable consume with retryPartly builtBuilt: a failed message is retried and a crash redelivers it. Designed: pause the partition and back off 1 s to 60 s while MongoDB is down, alert on lag over 60 scode: src/kafka/kafka.consumer.ts; design: modules/intake/srs.md § "Consume durably and replay without duplicates"
Accept only newer updatesPartly builtBuilt: the same message cannot be applied twice. Designed: an update older than the stored source version is skipped and logged as staledesign: modules/intake/srs.md § "Apply an update only when it is newer"
Route every message to one outcomeDesignedEach message is matched against a fixed rule list (create, update, cancel, redeliver, park) and the first match decidesmodules/intake/srs.md § "Route every order message to one outcome"
Park orders with unknown store or channel, and replayDesignedAn order for a store or channel TMS does not know is kept with its raw payload and a reason, never dropped, and can be replayed. Today such a message fails and is dead-letteredmodules/intake/srs.md § "Park an order whose master data is unknown"
Cancel through one commandDesignedOMS, REST and the admin button cancel through the same checks; once the DO is on a task the cancel is refused and goes to opsmodules/intake/srs.md § "Cancel through one command"
Redelivery from OMS opens a new DODesignedA newer message for a cancelled or failed order creates a new DO linked to the old onemodules/intake/srs.md § "Open the next attempt when OMS redelivers"
Partial re-delivery by the adminDesignedThe admin re-sends missing items of a finished order as a new linked DO, choosing a quantity per itemmodules/intake/srs.md § "Partial re-delivery opened by the admin"
Excel import of DOsDesignedEach Excel row goes through the same create rules as Kafka and records its sourcemodules/intake/srs.md § "Create by hand and by Excel with the same rules"
Kafka-to-DO field mapping as checked dataDesignedThe mapping is declarative rules from a fixed list of transforms, refused on save if invalid; nothing is evaluated as codemodules/intake/srs.md § "Refuse an invalid Kafka mapping on save"
Preview a mapping on a sample payloadDesignedThe admin sees the DO a draft mapping would build from a real stored message before activating itmodules/intake/srs.md § "Preview a mapping against a sample payload"
Mapping versions and rollbackDesignedEvery mapping save is a version; one is active; each DO records the version that built itmodules/intake/srs.md § "Version the mapping, roll it back"
Run the Kafka mapping through eval (v1 way)CutRunning admin-typed code on every message had no check and no history; replaced by the declarative mapping abovemodules/intake/design.md § "Rejected options"

Planning ​

Turning one store's waiting orders into vehicle routes for one day, then into driver tasks.

featurestatuswhat it doeswhere
Create a plan for a store and dateBuiltBuilds the plan's vehicle slots (shifts) from the store's plan template and the store's opening hourssrc/plan/plan.service.ts (createPlan), POST /plan
Route optimisation with GooglePartly builtBuilt: sends the orders and vehicles to Google Route Optimization and saves routes and the unassigned list. Designed: run it as a background job that answers at once and checks the plan revisioncode: src/plan/plan_optimize.service.ts, POST /plan/:code/re_plan; design: modules/planning/srs.md § "Route optimisation runs as a job"
Move, assign and unassign a stop by handBuiltThe admin moves a stop between routes, adds an unassigned order to a route or takes one out; changed routes are recalculated with the new order keptsrc/plan/plan_operation.service.ts, POST /plan/:code/move_stop, assign_stop, unassign_stop
Pinned stopsBuiltA pinned stop keeps its route and round through the next optimisationsrc/plan/plan_optimize.service.ts (_collectPins)
Planning historyBuiltEvery optimise, edit and failure writes one history event with counts; readable per plansrc/plan_history/, GET /plan_history, GET /plan_history/plan/:code
Order selection for a planPartly builtBuilt: picks the store's orders of that date in status PENDING. Designed: only approved orders, not on hold, claimed by no other plan, using the v2 status namescode: plan_optimize.service.ts (_findCandidateOrders); design: modules/planning/srs.md § "Order selection"
Plan statesPartly builtBuilt: three states (pending, planned, generated). Designed: seven states with fixed moves (adds optimising, failed, generating, cancelled)code: src/common/enums/plan.enum.ts; design: modules/planning/srs.md § "Plan states"
Generate tasks from routesPartly builtThe endpoint exists but returns a success message without doing anything. Designed: one task per route with its stops and totals, orders set ASSIGNED, all in one transaction, resumablecode: plan.service.ts (generateTask), POST /plan/:code/generate_task; design: modules/planning/srs.md § "Generate tasks once per route"
Plan variants, one chosen per store and dateDesignedSeveral plans for the same store and date can be compared; the first one generated becomes the chosen onemodules/planning/srs.md § "Plan variants"
Cancel a planDesignedCancels a plan with no route holding a task and releases its orders in the same writemodules/planning/srs.md § "Cancel a plan"
Claim orders at generateDesignedAn order is reserved for a plan only when its task is created, with a write that fails if another plan took it firstmodules/planning/srs.md § "Claim at generate"
Attach drivers to vehicle slotsDesignedA driver goes on a slot only if active, not on approved leave and within working hours; ties go to the driver with fewest booked hoursmodules/planning/srs.md § "Vehicle slots and driver attachment"
Manual routeDesignedThe admin adds a route by picking a slot, a driver and a vehicle, even on a generated planmodules/planning/srs.md § "Manual route"
On-demand insertDesignedAn order that becomes ready late is put into the day's plan automaticallymodules/planning/srs.md § "On-demand insert"
Add an order to a route not yet startedDesignedThe admin adds waiting orders of the same store to a route that has not left, after a previewmodules/planning/srs.md § "Add an order to a route not yet started"
Re-plan a started routeDesignedRe-optimises a route on the road; started and finished stops stay fixedmodules/planning/srs.md § "Re-plan a started route"
Partner assign rulesDesignedA store's ordered rule list (for example by order weight) picks each new order's partner and hand-over typemodules/planning/srs.md § "1.3 Definitions" (assign rules)
Load and load item recordsCutIn v1 a load only wrapped a task (7,089 loads for 7,083 tasks); capacity becomes a planning limit plus totals on the taskmodules/planning/design.md § "Data model"
Legacy pre-built pipeline and load-based task generationCutNot used on PRODmodules/planning/srs.md § "Retired v1 features"
Postal-code zonesCutRetired in the planning design as unused on PROD. A later decision reopened it: zones move into a v2 zoning design that is not written yetmodules/planning/srs.md § "Retired v1 features"

Execution ​

The driver's run from accepting a task to closing it at the store, and ops corrections on the way. Nothing here runs yet: the task record exists but holds only its number.

featurestatuswhat it doeswhere
Task recordPartly builtBuilt: a task collection with a running number (TK + 8 digits), no endpoints. Designed: driver, vehicle, ordered stops, capacity totals, statuscode: src/task/; design: modules/execution/design.md § "Data model"
Reschedule trail per DOPartly builtBuilt: a revision record per DO with a counter, readable per DO or per task, not yet called by anything. Designed: written when a failed DO is rescheduledcode: src/delivery_order_revision/; design: modules/execution/design.md § "Reschedule record, ad-hoc into a task, and who owns a DO"
Every status change is a guarded moveDesignedTask, stop and DO change status only through a fixed table and only if still in the expected statusmodules/execution/srs.md § "Every status change is a guarded transition"
Accept a taskDesignedThe assigned driver accepts a pending taskmodules/execution/srs.md § "Accept a task"
Check in at the pickup storeDesignedRefused when the driver is farther than the store radius (default 300 m)modules/execution/srs.md § "Check in at the pickup store"
Scan goods into the vehicleDesignedParked: stays as v1 for now; the scan count moves to the visit recordmodules/execution/srs.md § "Scan goods into the vehicle"
Depart with a short loadDesignedParked: v1 behaviour kept (staff PIN, short DOs held, their items cancelled)modules/execution/srs.md § "Depart with a short load"
DepartDesignedOne transaction moves the task, its stops and its DOs, with optional staff PIN and load photosmodules/execution/srs.md § "Depart"
Start delivering, open the next stopDesignedOpening a stop moves the task on the road and closes the previous stopmodules/execution/srs.md § "Start delivering and open the next stop"
Arrive at the customerDesignedStores the position and flags an arrival too far from the customermodules/execution/srs.md § "Arrive at the customer"
Proof of deliveryDesignedPhoto or signature upload checked against the DO and stop status, stored once per client upload idmodules/execution/srs.md § "Proof of delivery"
Confirm deliveredDesignedSafe to send twice; for a COD order the cash collection is written in the same transactionmodules/execution/srs.md § "Confirm delivered"
Report and retry a failed attemptDesignedReason, photo, position and call attempts; the attempt counts toward a cap (default 3) when its reason says somodules/execution/srs.md § "Report and retry a failed attempt"
Hold and release a DODesignedOps opens and releases a hold with a reason; each hold is its own recordmodules/execution/srs.md § "Hold and release a DO"
Change a redelivery after close-outDesignedOps changes the date of a failed DO waiting for redelivery, or ends it as failedmodules/execution/srs.md § "Change a redelivery after close-out"
Return to store and close outDesignedThe driver scans back undelivered goods; staff decide redeliver or fail per DOmodules/execution/srs.md § "Return to store and close out"
Stop and task completionDesignedFixed rules for when a stop and a task are finalmodules/execution/srs.md § "Stop and task completion"
Ops changes to a running taskDesignedMove stops between tasks that have not left, or add an order, after a previewmodules/execution/srs.md § "Ops changes to a running task"
Driver task list and ride historyDesignedToday's and upcoming tasks, plus a paged history by status group (backend endpoint)modules/execution/srs.md § "Driver home and ride history"
Driver GPS trailDesignedPositions sampled only during an active task, uploaded in batches, kept 90 daysmodules/execution/srs.md § "Driver GPS trail"
Driven routeDesignedBuilt once from the GPS points when a task closes and kept on the taskmodules/execution/srs.md § "Driven route"
Read lists for stops, proofs, attempts and holdsDesignedOps can read every stop, proof, attempt, hold and GPS trail; none can be edited directlymodules/execution/srs.md § "Reason master and admin read lists"
Auto-cancel tasks never startedDesignedA scheduled job cancels tasks still not started a set number of hours after their date; their orders go back to the poolmodules/execution/srs.md § "Cancel tasks that were never started"
Ops close-out of overdue tasksDesignedA list of tasks left on the road past their date, which ops close outmodules/execution/srs.md § "Ops close-out of an overdue task"
Visit record per task and DODesignedOne record per task and DO keeps each visit as it happened, so a second attempt never overwrites the firstmodules/execution/srs.md § "The visit record keeps each delivery visit"
An order on a task always has its taskDesignedAssigning a DO writes its task and stop in the same transaction; a daily check counts any orphansmodules/execution/srs.md § "An order on a task always has its task"
Generic stop-status rewrite, DO copies inside stops, manual loads, separate time-stamp endpointCutThey let any client set a status outside the rules, go stale, or have no PROD usemodules/execution/srs.md § "Retired v1 features"
Stop proof photos and the old start-unload stepsCutReplaced by proof per DO and the single close-out stepmodules/execution/srs.md § "Retired v1 features"

COD (cash on delivery) ​

Collecting cash at the door and handing it to the store.

featurestatuswhat it doeswhere
Collect COD inside confirm deliveredDesignedThe server copies the amount due; the payment method, collector and time are written with the deliverymodules/cod-payment/srs.md § "Collect COD inside delivery confirmation"
Payment photoDesignedStores the photo and its time on the order only; still required before a COD order is confirmedmodules/cod-payment/srs.md § "Payment photo stores the photo only"
Exact amount onlyDesignedNo amount in the request and no part payment at the door; a customer who does not pay is a failed attemptmodules/cod-payment/srs.md § "The driver collects exactly the amount due"
Payment method stored as sentDesignedAny method value OMS or the app sends is kept as ismodules/cod-payment/srs.md § "Payment method stored as sent"
Driver COD day view and balanceDesignedPer day: orders collected, total, cash in hand and shortfall owedmodules/cod-payment/srs.md § "Driver COD day view and balance"
Cash handover per taskDesignedAfter close-out the cashier enters the cash received; one handover record per task with expected, received and differencemodules/cod-payment/srs.md § "Cash handover per task"
Cashier PIN of the task's own storeDesignedThe handover is refused unless the PIN belongs to staff of that storemodules/cod-payment/srs.md § "The cashier is identified by a PIN"
Short handover needs a reasonDesignedLess than expected needs a reason from the store's list; more than expected is refusedmodules/cod-payment/srs.md § "A short handover needs a reason"
Correct a handover by adjustmentDesignedA store supervisor adds a signed adjustment with a reason; the original staysmodules/cod-payment/srs.md § "Correct a handover by adjustment"
Open-cash list per storeDesignedTasks with cash collected and no handover, and tasks settled shortmodules/cod-payment/srs.md § "Open-cash list per store"
Block dispatch while a driver holds cashDesignedStore setting, off by default: planning refuses a driver who has an unsettled taskmodules/cod-payment/srs.md § "Optional block on dispatch"
Whole-day COD confirm, standalone collect and method edit endpointsCutHandover is per task and collection happens only inside confirm deliveredmodules/cod-payment/srs.md § "Whole-day confirm and unused COD endpoints"
Partner contract and partner billingCut0 rows on PROD and no screen; partner costs may come back as rate cards latermodules/cod-payment/srs.md § "Partner contract and partner billing"

Workforce ​

Drivers, their login and their working day.

featurestatuswhat it doeswhere
Device registration and heartbeatBuiltThe app registers its device for the logged-in user and sends a heartbeat; admin lists devicessrc/device/device.controller.ts
Driver loginPartly builtBuilt: one login for every user type with an optional OTP step. Designed: active drivers by phone or driver number, the code sent by SMScode: src/auth/auth.controller.ts; design: modules/workforce/srs.md § "Driver login"
Forgot passwordDesignedCode by phone, then a new password with a confirmation token; the code never travels in the URLmodules/workforce/srs.md § "Forgot password"
Change own passwordDesignedThe driver changes the password by giving the current onemodules/workforce/srs.md § "Change own password"
Admin password resetDesignedOps sets a temporary password that must be changed at next loginmodules/workforce/srs.md § "Admin password reset"
Driver profileDesignedName, photo, phone, partner, home vehicle and totals; only name and photo editablemodules/workforce/srs.md § "Driver profile"
Minimum app versionDesignedBelow the minimum version the app may make no call except the update screenmodules/workforce/srs.md § "Minimum app version"
Partner portal scopeDesignedA partner user sees and edits only their own drivers, vehicles and bookings; filtered on the servermodules/workforce/srs.md § "Partner portal"
Create bookingDesignedOps books a driver, vehicle, store and time window by form or importmodules/workforce/srs.md § "Create booking"
Clock-inDesignedWith photo and a fresh, accurate position; once per daymodules/workforce/srs.md § "Clock-in"
Clock-outDesignedWith photo and position, only with no task in progressmodules/workforce/srs.md § "Clock-out"
Clock-in historyDesignedThe driver's last 15 days of duty recordsmodules/workforce/srs.md § "Clock-in history"
Hold and unhold a driverDesignedHolding a driver unassigns their not-started tasks for that date in the same stepmodules/workforce/srs.md § "Hold and unhold"
BreakDesignedStart and end a break with a reason from a listmodules/workforce/srs.md § "Break"
LeaveDesignedOps enters and approves leave; only approved leave keeps a driver out of planningmodules/workforce/srs.md § "Leave"
Day closeDesignedEvery 15 minutes, duty days still open 2 hours after their last window end are closed (or marked absent)modules/workforce/srs.md § "Day close"
Driver masterDesignedCreating a driver also creates the login user; phone and driver number unique. Today a driver is only a user with the driver rolemodules/workforce/srs.md § "Driver master"
Cognito and social loginCutNot used on PROD; password login onlyworkscope.md § "Out of scope"
Shift extensionCutHidden in the v1 appworkscope.md § "Out of scope"

Master data ​

Reference records other modules read. Each gets plain create, read, update and list.

featurestatuswhat it doeswhere
StoreBuiltCode, name, opening hours, location, loading bayssrc/store/store.controller.ts
Vehicle typeBuiltDefault capacity and load and unload minutes per typesrc/vehicle_type/vehicle_type.controller.ts
Plan templateBuiltA store's vehicle slots: vehicle type, window, amountsrc/plan_template/plan_template.controller.ts
UserBuiltCreate, list, read users; read and update own profile; roles admin, store operator, driversrc/user/user.controller.ts
API client (application)BuiltApp key and secret for systems that call TMS; create, update, revoke, deletesrc/application/application.controller.ts
VehiclePartly builtBuilt: create, list, read, update by code. Designed: unique plate number, partner, own capacity overriding its type, status modelcode: src/vehicle/; design: modules/workforce/srs.md § "Vehicle master"
Shared base service for master recordsPartly builtBuilt: one base service gives each entity create, read, update, delete and list. Designed: write access only for master records (transactional records change only through their commands); fix of read and write by id ignoring the caller's filtercode: src/common/base/base.service.ts; design: modules/platform/srs.md § "Base CRUD for master and config entities"
ChannelDesignedSales channels by code (31 on PROD); intake parks orders of an unknown channelmodules/intake/design.md § "Data model"
PartnerDesignedCode, type, service scope, zones, supported vehicle types, prioritymodules/workforce/srs.md § "Partner master"
Roles and permissions as dataDesignedRoles become editable records; permission keys are declared in code and collected by the system; a user may hold several roles/Users/thanosorn/Works/Software/tms/_docs/bigc-tms-core-v2/tms-v2-auth.md § 3
Store staff and staff PINDesignedStore staff get a 6-digit PIN, stored only as a keyed hash, used to sign departure and cash handover. Moved out of the first phase to the phase that first needs a signaturemodules/platform/srs.md § "Staff PIN signature"
Failed-attempt reason masterDesignedReason, category, and whether it counts toward the attempt capmodules/execution/srs.md § "Reason master and admin read lists"
Break reason listDesignedReasons a driver can pick when starting a breakmodules/workforce/srs.md § "Break"
Short-handover reason listDesignedReasons a cashier picks when less cash than expected is handed over, kept per storemodules/cod-payment/srs.md § "A short handover needs a reason"
Product, package and unit mastersCutUnused on PROD; DO lines keep the unit text as sentworkscope.md § "Out of scope"
Vehicle brand masterCutUnused on PRODworkscope.md § "Out of scope"
Partner rate cards in place of contractsCutPartner contracts had 0 rows; rate cards only if asked for latermodules/cod-payment/design.md § "Partner contract and billing"

Admin / reporting ​

Backend behaviour behind the admin: reports, export, import, permissions.

featurestatuswhat it doeswhere
Print, email and SMS templatesBuiltTemplates stored per code and rendered with LiquidJS, optionally fed by a sandboxed data scriptsrc/template/template.controller.ts (POST /template/render), src/template_engine/
Field catalogBuiltLists the fields of each entity that templates and exports may usesrc/field_catalog/field_catalog.controller.ts
Export configsBuiltCreate, list, read and update the column setup of an exportsrc/export_config/export_config.controller.ts
Export to Excel as a jobPartly builtBuilt: the export setup, field catalog and batched data script. Designed: running the export as a job with a visible status and the xlsx file kept for the usercode: src/export_config/, src/script_runner/batch_mapper.ts; design: modules/platform/srs.md § "Export runs as a job with a visible status"
Role check per endpointPartly builtBuilt: login check on every endpoint and a role list per endpoint. Designed: a permission key per endpoint and store filtering on the server; any other role gets 403code: src/common/guards/auth.guard.ts; design: modules/admin-reporting/srs.md § "Role check per endpoint"
Reports read live dataDesignedPOD, Order Information and DO Transaction reports read current data, up to 31 days per request, first page in 2 s or lessmodules/admin-reporting/srs.md § "Reports read live data"
Import from ExcelDesignedTwo steps (verify, then execute) with partial commit, only for the configs ops still usemodules/admin-reporting/srs.md § "Import from Excel"
Partner scope and password loginDesignedA partner user logs in with a password and every read or write is limited to their partnermodules/admin-reporting/srs.md § "Partner scope and password login"
Scheduled report refreshCutReports read live data, so v1's scheduled report rebuild is not needed; BigC still has to accept thisworkscope.md § "Rules BigC must confirm"
Disabled v1 report (delivery_order_report)CutAlready switched off in v1modules/admin-reporting/srs.md § "1.2 Scope"
Import/export configs no one usesCutOnly the configs ops name as in use (out of 26 on PROD) are portedmodules/admin-reporting/srs.md § "Import from Excel"

Platform ​

The shared base every module writes through.

featurestatuswhat it doeswhere
Background jobs that are never droppedBuiltA job is saved with its business change; a fast lane (64 partitions, each leased by one pod) and a long lane pick it up and retry; admin can list, retry and skipsrc/jobs/, GET /jobs, POST /jobs/:id/retry, POST /jobs/:id/skip
Lossy laneBuiltJobs that may be lost go straight to a Redis (Bull) queue after commitsrc/jobs/lossy.processor.ts
Schedule engineBuiltCrons declared in code run once per slot across all pods; admin can enable, disable and override a cronsrc/schedules/, GET /schedules, POST /schedules/:code/enable and related
Kafka outbound through an outboxBuiltA DO change saves its event in the same transaction; a worker sends it to lastmiles.oms.do-update or lastmiles.staffapp.do-update by channel, with an event id and versionsrc/kafka/kafka.target.ts, src/delivery_order/delivery_order.service.ts (_enqueueDoUpdate)
Kafka status and connection testBuiltShows each pod's Kafka state and tests a connection before saving itsrc/kafka/kafka.controller.ts
Record history in the business transactionBuiltOne helper writes history rows in the same transaction as the changesrc/activity_log/activity_log.service.ts
Read the history of a recordBuiltNewest-first history of any record by entity and idsrc/activity_log/activity_log.controller.ts, GET /activity_logs/:entity/:entity_id
Typed settings declared in codeBuiltEach module declares its setting keys with type, default and secret flag; admin reads, edits and resets themsrc/settings/, GET/PUT /settings/:code, POST /settings/:code/reset
Log lifecycle and retentionBuiltEach log collection is declared once; the base creates its expiry index and retention is a setting; writes are transactional or bufferedsrc/log/
External call logBuiltOne helper logs outgoing calls (Google, Kafka) with a body size capsrc/common/utils/external_call.ts, src/google/google_log.schema.ts, src/kafka/kafka_log.schema.ts
Trace id end to endBuiltOne trace id per HTTP request, Kafka message, schedule tick and job, added to every log line and outbound Kafka messagesrc/common/context/
File upload straight to S3BuiltThe client gets a presigned upload URL, uploads, then confirms; unconfirmed files are sweptsrc/attachment/, POST /attachment, POST /attachment/:id/confirm
Storage settingBuiltS3 bucket and keys kept as an encrypted settingsrc/storage_setting/
Health check and public map keyBuiltGET /health_check; GET /settings/public gives the Google Maps key to the adminsrc/app.controller.ts, src/google/google_public.controller.ts
Sign in, session and sign outPartly builtBuilt: token login, OTP check, Redis session, revoke. Designed: access plus rotating refresh token, account lockoutcode: src/auth/; design: modules/platform/srs.md § "Sign in, session and sign out"
Fix auth as builtPartly builtStill open in code: tokens live 1 year, revoke accepts any token in the body, passwords use a SHA-256 hash salted with the creation datecode: src/common/constants/auth.constant.ts, src/auth/auth.service.ts; design: modules/platform/srs.md § "Fix v2 auth as built"
Business schedulesPartly builtThe engine runs, but no business cron is declared yet. Designed: booking shift generation daily, on-demand assign every minute, Kafka inbox retry and reconcile, plus the day-close and auto-cancel jobsdesign: modules/platform/srs.md § "Run scheduled jobs once per slot"
Send emailDesignedAn email is a row written with the business change; a worker renders and sends it over SMTP with retriesmodules/platform/srs.md § "Send email"
Search lists by indexed fieldsDesignedOne keyword box with exact or prefix match on indexed fields, separate filtersmodules/platform/srs.md § "Search lists by indexed fields"
Versioned admin configDesignedAdmin-editable config saved as immutable versions with validate, preview and activate; first user is the Kafka mappingmodules/platform/srs.md § "Versioned admin config"
Master-data cacheDesignedMaster records cached so pods stay stateless and fastmodules/platform/design.md § "Master-data cache and stateless pods"
Kafka channel list as configurationDesignedWhich channels go to which outbound topic is configuration. Today the lists are fixed in codemodules/platform/srs.md § "Publish a business event to Kafka"
Grouped exception logDesignedParked until ops confirm New Relic on PROD; if New Relic is on, this is droppedmodules/platform/srs.md § "Exception log, grouped"
Internal MCP for supportDesignedDraft only: read-only tools for support staff to inspect v2 datamodules/platform/design.md § "Internal MCP (draft)"
Kafka direct-produce pathCutRemoved in the foundation simplify review: every outbound event goes through the outbox/Users/thanosorn/Works/Software/tms/_docs/bigc-tms-core-v2/tms-v2-foundation-simplify-cut-list.md
Load, task and driver Kafka topicsCutPROD never had them; their event names are still listed in code but nothing sends themmodules/platform/srs.md § "Publish a business event to Kafka"
Job statistics countersCutNothing read them; removed in the simplify review/Users/thanosorn/Works/Software/tms/_docs/bigc-tms-core-v2/tms-v2-foundation-simplify-cut-list.md
Push notifications to driversCutOut of scope until a real requirement existsworkscope.md § "Out of scope"