feat: Cutting-Edge Broker Pipeline — Live Freight Intelligence Dashboard#1
Open
Kedelin261 wants to merge 6 commits intoTrucking.Timefrom
Open
feat: Cutting-Edge Broker Pipeline — Live Freight Intelligence Dashboard#1Kedelin261 wants to merge 6 commits intoTrucking.Timefrom
Kedelin261 wants to merge 6 commits intoTrucking.Timefrom
Conversation
added 2 commits
March 26, 2026 14:37
…, Broker Outreach, Fleet Management, React Dashboard - Intent Layer: IntentType, IntentRequest, IntentResponse, IntentRouter - SMS (Twilio): morning top-20 summaries + new load alerts - Email (SendGrid): detailed load reports + broker outreach templates - Broker Outreach: auto intro, follow-up (3-day cooldown), availability blast - Fleet Management: TruckLocationStore, TruckController CRUD - Extended Models: Load (broker contact), UserPreferences (company info, notifications) - 20 realistic stub loads with broker phone/email for immediate booking - React Frontend: Dashboard, Loads, Trucks, Brokers, Notifications, History, Settings - SPA routing with Spring Boot forward controller - CORS updated for production patterns - GitHub Actions + wrangler.toml for Cloudflare Pages deployment
Root cause: r.filter is not a function — API calls were returning null/objects when the backend is unreachable, and .filter() was called on the raw result. Fixes applied: - api.js: all endpoints now return safe defaults (asArray/asObj helpers), never throw — all errors are caught and logged as warnings - api.js: switched from __API_BASE__ define to import.meta.env.VITE_API_BASE - Dashboard.jsx: null-safe array guards on all state + proper empty states - Brokers.jsx: blast() safely handles non-array response - History.jsx: laneCounts null-safe with proper variable extraction - Loads.jsx: filtered array uses Array.isArray() guard - Trucks.jsx / Brokers.jsx: null-safe on initial load - Notifications.jsx: null-safe prefs loading - App.jsx: catch-all route added (* → /dashboard), localStorage try/catch - App.css: loading spinner + .loading-screen styles added - index.html: inline loading skeleton prevents blank-page flash before React hydrates; MutationObserver hides skeleton once React renders - vite.config.js: cleaned up, keeps __API_BASE__ define as fallback Live: https://trucking-time.pages.dev
Full serverless backend running on same domain as frontend: - functions/api/[[route]].js: single Worker handles all /api/users/* routes - schema.sql: D1 tables for preferences, trucks, brokers, bookings - wrangler.toml: D1 binding (DB) configured for trucking-time-db - api.js: uses same-origin /api/* — no VITE_API_BASE needed - _redirects: /api/* excluded from SPA fallback so Functions intercept D1 database ID: f3ca0b4c-6ede-4226-8bdf-56a973d7bbdd Live API: https://trucking-time.pages.dev/api/users/demo/top20 Endpoints: preferences, trucks, brokers, bookings, intent, dat, top20
…el, equipment cards, score bars, pre-composed email
…ly chart, deep-dive panel, 30s auto-refresh, midnight reset, expandable cards, doc pipeline progress bar
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Live Deployments
Broker Activity Pipeline (LIVE)
Fully operational — 35 loads, $101,584 freight value, 3 active brokers tracked today
Live Feed (30-second auto-refresh)
Three View Modes
Broker Summary Cards
Broker Deep-Dive Panel
Document Pipeline Progress Bar
5-stage visual: Load Tender > Rate Con > BOL > POD > Invoice
Current stage highlighted, previous stages filled
Expandable Activity Cards
Click any card to expand: full 14-field load grid
Backend Engine
Architecture Compliance
All logic via Intent Layer only — no Action Layer changes: