Start

Sign up with your work email. Your email domain becomes your Client ID, so everyone at your organization shares the same workspace with automatic data isolation. No invites needed.

1

Sign up with email

Work email, no card required

2

Auto-assigned to company

Email domain = Client ID

3

Collaborate with team

Same domain = same workspace

Roles

First signup = Founder · everyone else starts as Editor

FounderAdminEditorViewer

grecoandsons

Greco & Sons — Tool Documentation

Click any tool below to expand the full documentation, input format, logic, and output examples.

Architecture Notes

All processing runs client-side in the browser using ExcelJS — no data is uploaded to any server.
Tools are gated by GrecoOnlyGuard — only users belonging to the Greco company ID can access them.
Generated reports are stored in Supabase for audit trails, AI analysis, email notifications, and the Analytics Log.
Docksheet persists workspace state per-day to Supabase (authenticated writes via API route, anon reads via RLS) with localStorage fallback.
Every tool shares a consistent dark glass-panel UI with drag-and-drop upload, real-time console logs, and one-click Excel download.
Column detection is flexible — headers are matched by keyword rather than fixed position (except Loader, which uses WMS-fixed indices).

grecoandsons

Routing

/routing — AI-Assisted Multi-Stop Route Optimization · By: Pepe Rodriguez

Truck route optimization at /routing combining geolocation, interactive mapping, and algorithmic optimization for efficient multi-stop delivery routes. Uses free, open-source services (OpenStreetMap Nominatim, OSRM) — no API keys required.

Stop Management

Add, edit, and remove stops with addresses, time windows, case counts, priority levels, service times, and notes. dnd-kit powered drag-and-drop reordering with keyboard accessibility and touch support.

Geocoding

Batch convert addresses to coordinates via Nominatim. No API key needed.

Interactive Map

Leaflet-powered map with OSRM real driving directions, numbered markers, color-coded polylines, depot icon, and auto-fit bounds.

TSP + VRP Solver

Nearest Neighbor + 2-opt + Or-opt for single routes. Clark-Wright Savings for multi-route splitting.

Save / Load Routes

Persist routes to Supabase. Save, load, and delete routes across sessions so dispatchers never lose work.

Drive Time Stats

Estimated total drive + service time in the stats bar. Red shift-limit warning when a route exceeds 10 hours.

Undo / Redo

Full history stack (up to 30 snapshots) with Ctrl+Z / Ctrl+Shift+Z keyboard shortcuts for every action.

Duplicate Detection

Automatically flags exact-match and nearby stops (within 0.1 mi) after import or add, with one-click removal.

Print Route Sheet

Printer-friendly route summary in a new window with all stops, ETAs, stats, and driver info.

CSV Import/Export

Import stops from CSV with fuzzy column mapping. Export optimized routes with ETAs.

Multi-Route Tabs

Capacity-constrained splitting creates separate tabs per truck with stats and map.

Optimization Engine

Haversine distance matrix with drive time estimation
OSRM real driving directions rendered on the map
Pure TypeScript — zero external solver dependencies
Supabase persistence with RLS-scoped save/load
Undo/redo history stack with keyboard shortcuts
Duplicate / nearby-stop detection with auto-merge

Docksheet

Dock Operations Workspace — daily receiving, check-in, and live tracking

Docksheet is the central daily workspace for the receiving office (formerly known as DockVoo). It manages the entire lifecycle of inbound loads from schedule upload through check-in, dock assignment, capstone breakdown, receiving, and release. The landing page presents a date selector and six cards — one for each sub-tool and a settings page. All state is persisted per-day to Supabase with localStorage fallback. Writes are authenticated through a server-side API route; reads are available to anyone via a public live view at /live/greco.

Start (Schedule Upload)

Drag-and-drop or browse for a .xlsx receiving schedule. Expected columns: Date, Time, Dock, Door, Load Number, PO Number, Carrier, Vendor, Cases, Cubes, Weight, Vendor Pallets, Warehouse Pallets, Duration (Mins), and Lumper Required.

  • Parses the first worksheet and maps headers by keyword (not fixed position).
  • If multiple dates are present, targets the second chronological date (tomorrow's schedule); otherwise uses the only date.
  • Merges rows sharing the same Load Number — sums Cases, Cubes, Weight, and Pallets; concatenates PO numbers.
  • Routes loads to Main, Rana, or Brewster by Dock text; assigns temperature zones (Dry, Cooler, Freezer) from dock prefixes.
  • Aggregates totals by location and zone; buckets loads into hourly time slots.
  • Strips numeric dock prefixes (e.g. "05 - Brewster Dry" becomes "Brewster Dry").
  • Reads Duration (Mins) and Lumper Required per load for use in the Timer and live tracker.

Schedule Workbook Output

Dock_Schedule_{date}.xlsx
Excel Workbook
Summary
Every load for the target date with all parsed columns from the schedule.
Preview
Load #PODockVendorCasesCubesWeight
(Sample data not shown)
Sheet Details
  • •Master list of all loads

Check-in (Live Load Tracker) · By: Cindy Hernandez

A live table showing every appointment for the day. The receiving office records timestamps as trucks arrive, dock, and leave. The tracker also surfaces lateness and fee indicators.

  • Columns: Appt Time, PO#, Dock, Vendor, Carrier, Receiving Status, Time In, Time Docked, Time Out, Total Time, Cancel, Reschedule.
  • One-click buttons to record Time In, Time Docked, and Time Out — each stamps the current time.
  • Once Time In is recorded, Cancel and Reschedule buttons disappear for that row.
  • Receiving status auto-updates from the Receiving grid: "Not started," "In progress," or "Complete."
  • Grid finish times automatically sync back to the tracker's Time Out column.
  • If a truck checks in more than 2 hours late, a red "$300 WORK-IN" badge appears on its row and a warning is logged.
  • Cancelled loads are highlighted black with red text; rescheduled loads are highlighted green with the new date.
  • An Edit button opens a modal for manually adjusting Time In, Time Docked, and Time Out.
  • Full-text search across PO, Vendor, Carrier, and Dock with yellow highlighting on matches.
  • Mobile-responsive: hides non-critical columns on small screens, tighter padding, full-height scrollable table.

Master Export Workbook

DockVoo_Master_Export_{date}.xlsx
Excel Workbook
Summary List
Complete list of every appointment with full timestamps and status.
Preview
Appt TimePODockVendorTime InTime OutTotal Time
(Sample data not shown)

Receiving (Grid) · By: Gio Cañas

A dock-by-hour grid where receivers are assigned to POs and start/finish times are recorded. This is the core real-time view of who is receiving what, and where.

  • 17 dock columns (DOCK 6, #7, #8, #10–13, #14–15, #16–22, #26–28, RANA #1–5, RANA #8–11) by 12 hourly rows (6 AM – 5 PM).
  • Each cell has: a PO input (with datalist autocomplete), a Receiver dropdown, and Start/Finish buttons.
  • The PO dropdown only lists POs from trucks that are checked in but not yet assigned a receiver.
  • An Edit button on each cell opens a modal to manually set Start/Finish times and assign a Helper Receiver with their start time.
  • Helper receiver badges display inline when assigned (purple "+ [Name] @ [time]").
  • Three layout modes: Grid (default), List (flat table sorted by start time), and By Receiver (grouped cards per receiver).

Receiver Rankings Export

Receiver_Rankings_{date}.xlsx
Excel Workbook
Rankings
Leaderboard of receivers by average time per truck.
Preview
RankReceiverTrucksAvg TimeTotal Time
(Sample data not shown)

Capstone (Breakdown Timing)

Tracks the time from when a truck is docked until its capstone (pallet breakdown) is complete. Shows active breakdowns as cards with a running elapsed timer.

  • Automatically lists trucks where Time Docked is set but Capstone Complete is not.
  • Each card shows: elapsed timer, Vendor, PO, Dock, Time Docked, and a Capstone Employee dropdown.
  • Employee presets: Chad, Larry, Benjamin, Johnny, Chris, Hilario, George, Jay, and Other.
  • Clicking "Capstone Complete" stamps the current time and removes the truck from the active list.
  • Two layout modes: Grid (default, card-based) and Timeline (chronological list).
  • Completed breakdowns are listed at the bottom for reference.

Capstone Rankings Export

Capstone_Rankings_{date}.xlsx
Excel Workbook
Rankings
Leaderboard of employees by average capstone breakdown time.
Preview
RankEmployeeBreakdownsAvg Time
(Sample data not shown)

Timer (Detention Countdown)

Displays a live countdown for every truck currently on dock (Time In set, Time Out not set). The countdown defaults to 2 hours or uses the Duration (Mins) value from the uploaded schedule.

  • Cards sorted by least time remaining (most urgent first).
  • Each card shows: countdown timer, progress bar, time allotment, Vendor, PO#, Dock, Appt Time, Time In, Receiver name, and receiving status.
  • Color coding: green (on track), amber (less than 15 min remaining), red with pulsing bar (overtime).
  • Trucks with Lumper Required are flagged with a purple badge.
  • Trucks disappear from this view when Time Out is recorded (via Check-in or the Receiving grid finish time).

Settings

The Settings tab provides two configuration areas: date management and email notifications.

  • Date Dropdown — Clear all dates from the homepage selector without deleting saved session data.

Email Notifications (PO Watchlist)

Type any PO number and receive email alerts when check-in actions happen on it. Notifications are delivered instantly via Resend.

  • Toggle notifications on/off with a master switch and set a delivery email.
  • Choose which events trigger notifications: Time In, Docked, Time Out, Cancelled, Rescheduled.
  • Type a PO# and set scope to Just Me (only you are notified) or Whole Team (all Greco members with enabled notifications receive the email).
  • PO numbers can be added before they appear in the system — when the matching PO is eventually uploaded and a check-in action occurs, the notification fires automatically.
  • The Company Notification Log shows all watched POs across all team members, who set each one, and whether the PO has been found in any saved Docksheet session (with date and vendor details if found).
  • Notifications are suppressed in Test Mode.

Public Live View

A read-only page at /live/greco that anyone can access without logging in. It polls the server every 10 seconds and mirrors the Check-in and Receiving views in a non-editable format.

  • Date selector to switch between workspaces.
  • Check-in tab: same table as the authenticated view but with no action buttons — shows timestamps, statuses, work-in badges, and total times.
  • Receiving tab: same Grid / List / By Receiver layouts, showing PO, Receiver, start/finish times, and helper assignments.
  • No Supabase credentials are exposed; data is served through a server-side API route.

Data Persistence & Security

  • Session data (tracker rows + grid state) is stored per-day in the greco_cindyvue_sessions Supabase table.
  • Row Level Security: anonymous users can only read; writes require an authenticated session belonging to the Greco company ID.
  • Writes go through /api/greco/session which validates the JWT and company membership before writing via the service role.
  • localStorage provides an offline fallback and emergency backup if the backend is unreachable.
  • Auto-save triggers 500ms after any tracker or grid change, with a live sync status indicator.

Shanetree

On-Prem Entrée Bridge & Operator Surface

Shanetrée is Greco's browser-based dock, receiving, will-call, routing, and inventory layer on top of the live Entrée v4 database (Advantage). A local ODBC bridge on the dock PC is the only path to production data; Vercel and /port consume Supabase snapshots instead. The full operator surface (including the rich table browser, search modes, and printable concept map) lives at /entree.

About

The new Entree- faster, smarter, better. Built for 2026 instead of 2003

Full operator guide: /entree Guide modal · /guide · whitepaper v1.1

Architecture

┌─ Vercel (Next.js) ──────────┐       ┌─ Dock PC (Node) ──────────┐       ┌─ Entrée Server ─────────┐
│ app/entree/EntreeClient.tsx │       │ entree-bridge.js          │       │ Advantage Database      │
│    · every modal / grid     │◄────► │    · ODBC handle (r/o)    │◄────► │    \\10.1.1.21:6262    │
│    · every print flow       │ HTTP  │    · silent-print stack   │ ODBC  │    pomast01, potran01,  │
│ /api/entree/query  (proxy)  │       │    · catalogue discovery  │       │    arinvoi, arinvt01…   │
└──────────────┬──────────────┘       └───────────────────────────┘       └─────────────────────────┘
               │
               ▼
     ┌─ Supabase (FileDisplay) ───────┐
     │ shanetree_snapshots             │
     │ shanetree_pull_log              │
     │ greco_cindyvue_sessions         │
     │ return_diffs_snapshots          │
     │ port_ai_summaries · bridge_relay│
     └─────────────────────────────────┘

Five tiers, one rule: Entrée never streams to the internet. Vercel and /port only see Supabase snapshots. The bridge is the sole ODBC gate.

CONNECTED badge: 88 curated / 590 discovered tables on the Advantage server.

Safety

Shanetree runs against the same Advantage database handle Entrée itself uses. Writes are technically available over ODBC. They are deliberately not wired up.
  1. Single source of truth. Entrée is Greco & Sysco's operational ledger. If Shanetree begins writing, every reconciliation question becomes harder — did Entrée do this, or did Shanetree?
  2. Blast radius. A read-only tool cannot corrupt live data. Rollback in the worst case is "don't open the modal today."
  3. Clarity of purpose. Shanetree's charter is reporting, printing, and scheduling. Line-level data ownership belongs in Entrée.

The door is unlocked; we choose not to open it. When the business case for bidirectional integration eventually arrives, the lock will be added explicitly — as a scoped write endpoint with its own audit log — rather than implicitly removed.

Data boundaries · local vs cloud

Shanetrée never opens a live ODBC socket from Vercel or from /port. The Entrée database is reached only from the LAN via entree-bridge.js. Supabase stores point-in-time snapshots and operational sidecar state — not a streaming feed.

Stays on the LAN

  • Entrée Advantage/Btrieve data at \\10.1.1.21:6262 — queried only by the bridge PC over ODBC.
  • Silent print pipeline (headless browser → PDF → SumatraPDF → dock printer).
  • Browse Tables sidebar, keyword/invoice/date search, Item Search, StockVoo, Print, Invoice History, User History, Routing, Low Slots, Crossdocks, Diamond Report, Sales Distribution — these modals never upload their full payload unless you explicitly save or auto-pull runs on the dock PC.
  • Return Diffs BFC xlsx — parsed entirely in the browser; only Save Snapshot writes the diff result to Supabase.

Features

Each screen includes automation and telemetry notes where they apply. Tier: live = /entree + usually /port; entree-only = bridge PC; port-only = /port.

Bridge & diagnostics

CONNECTED badge[header]

bridge GET /health

Bridge version, uptime, table counts, memory — not a landing tile but the fastest outage diagnostic.

  • Shows name, version, host, bind, auth mode, uptime, Node/platform, PID, table counts, RSS memory.
  • Red OFFLINE pill when bridge unreachable — no popover.
  • Refresh re-probes without reloading the page.

Dock & receiving

DockVoo[live]

greco_cindyvue_sessions · pomast01 · potran01

/entree only. Live inbound schedule + silent PO print on Time-In. Session rows live in Supabase; ODBC print hits the bridge.

  • Columns: Time · Dock · Vendor · Carrier · PO · Status · Print.
  • Auto-print listens for printRequestedAt on session rows (Time-In from CindyVue).
  • Per-session dockPrintedPos prevents double prints; multi-PO cells split on ,;|/\s+.
  • /entree and dock CindyVue only — hidden on /port (no snapshot payload).
  • Automation — Time-In prints every PURNO on the appointment: bridge runs GRCLOADSHT headlessly → PDF → SumatraPDF → dock printer with no dialogs.

Receiving[live]

greco_cindyvue_sessions · pomast01 · potran01

PO receiving burn-down for any saved DockVoo day. 30s auto-refresh while open on /entree; snapshot-backed on /port.

  • Date picker lists every saved DockVoo day.
  • Combined progress across all PURNOs on one appointment card.
  • POSTAT O/R/C/V/P/H + header.CANCELLED → status chips; bridge errors → Fetch failed.
  • 30s auto-refresh on /entree; Pull Latest Snapshot on /port.
  • Telemetry — 5-min auto-pull runs only while at least one truck is Time-In without Time-Out; pauses on an idle dock.

Counter & will-call

Will Calls[live]

arinvoi · artrans · arprtlog

Counter-pickup queue with category filters (samples, employee purchases, vendor samples, hotshots). Print All / Print Unprinted uses bridge silent-print + arprtlog history. Snapshotted for /noe and /port.

  • Category cards: SAM%, ZZ100, VENSAM, hotshots, pickup route, etc.
  • Print Unprinted uses arprtlog LABEL_PRINTS === 0.
  • /noe: L.S. button inserts will_call_print_requests; dock /entree kiosk executes silent print.
  • Automation — Print All / Print Unprinted for loadsheets and invoices; bridge print history prevents double-print on repeat clicks.
  • Automation — dedicated counter-pickup screen instead of hunting will-calls inside Entrée Assign Routes.
  • Telemetry — auto-startup chain (willCalls → produceSales) on first /health-green each day.
  • Telemetry — 5-min willCalls heartbeat in the browser and in entree-bridge.js (POST /api/internal/shanetree-autopull) keeps /noe and /port snapshots fresh even if Chrome discards the tab.

Routing & vendor

Routes[live]

pod_invhdr · pod_invdtl · pod_drivers · arinvt01

Dispatcher day view: zone KPIs, driver roll-up, expandable stops. Unzoned = total − (dry+cooler+freezer).

  • KPIs: routes, stops, invoices, $, cases, zone %, produce % of cooler+freezer.
  • Expandable stops merge consecutive same-company rows.
  • Print uses routes-print-roomy ~9pt layout.
  • Telemetry — auto-daily snapshot on the dock PC.

Routing[entree-only]

pod_invhdr · unrouted stops

Unrouted stops for a delivery day; Send to /routing handoff saves routingDay snapshot.

  • 14-day look-ahead strip; auto-jumps to soonest unrouted day.
  • Send to /routing pre-loads RouteStops on the map planner.
  • /entree only — live ODBC.

Vendor Pickups[live]

arinvoi · pomast01 · poymast

VENPIC schedule with back-to-back and combined print packets. Greco PO extractor (^6\d{5}$).

  • Sortable grid: Pickup # · Vendor · PO · Pallets · Cases · Cost.
  • Print L.S.+POs (back-to-back) or Print Combined (one page per pickup).
  • extractGrecoPOs() pulls ^6\d{5}$ out of noisy PONUM text.
  • Telemetry — auto-daily snapshot on the dock PC.

Sales & production

Diamond Report · Sales Distribution[entree-only]

aggregates margin · routes · low slots · returns

~8 PM one-pager: Inbound + Outbound + General. Dakota split for pick vs true shorts.

  • Diamond: Inbound (POs received today) + Outbound (tomorrow margin/routes) + General.
  • Sales Distribution: 24-hour order/$ histogram for any picked day.

Margin Report[live]

artrans · arytran · arinvt01

Same shape as Sales but every rollup carries cost, profit, and margin %. Exportable multi-sheet xlsx. Snapshotted (auto-daily on dock PC).

  • Every breakdown adds cost, profit, margin % alongside revenue.
  • Multi-sheet xlsx export with styled banners.
  • In AUTO_PULL_DAILY_HEARTBEAT_CHAIN with salesReport and returns.
  • Telemetry — in AUTO_PULL_DAILY_HEARTBEAT_CHAIN with sales and returns.

Picker Production[live]

bridge /picker-report

Crystal-parity picker productivity by shift, zone, and class. Delivery-date keyed.

  • Preserves NONE picker bucket + Grand Total for Crystal parity.
  • By Picker · By Zone · By Class · Top Customers tables.
  • Telemetry — auto-daily snapshot on the dock PC.

Sales Distribution[entree-only]

arinvoi

Hour-by-hour order count and dollars for one day. Printable + xlsx.

Sales Report + Produce Sales[live]

artrans · arytran · arinvt01

Daily revenue snapshot with zone/class/salesman breakdowns and top-100 rankings. Scope toggle opens Produce Sales sub-view (/produce-sales).

  • Header $ (ITOTAL) vs line $ — footer explains the mismatch.
  • Produce toggle swaps to sub-modal with By Sub-Class and By Brand.
  • Wide date ranges can take 30+ seconds on Refresh.
  • Telemetry — auto-daily snapshot (at most once per calendar day per modal on the dock PC).

Returns & reconciliation

Return Diffs[live]

BFC xlsx (client) · bridge /return-diffs · return_diffs_snapshots

Weekly BFC xlsx vs Entrée credit memos. Separate snapshot table (not shanetree_snapshots). Sign-off snapshots optional per run.

  • Tabs: Summary · Matched · Only BFC · Only Entrée · Credit Memos.
  • Match on (ORIG_INVNO, item) with (custNo, item) fallback.
  • Save Snapshot = weekly sign-off; separate from shanetree_snapshots.
  • Automation — drag the weekly BFC returns xlsx in; bridge /return-diffs supplies Entrée credit memos; client diffs Matched / Only BFC / Only Entrée on (ORIG_INVNO, item) with (custNo, item) fallback.
  • Automation — Save Snapshot to return_diffs_snapshots is the weekly sign-off without writing back to Entrée.

Returns[live]

artrans · arytran · arretcd

Entrée-side returns (QTYSHP < 0) with reason-code translations and trend chart.

  • KPIs, daily trend ($ or rate %), breakdowns by reason/class/zone/salesman.
  • Top customers + top items ($ or qty toggle).
  • All Return Lines capped at 2,000; excluded from print.
  • Telemetry — auto-daily snapshot on the dock PC.

Inventory & planning

Crossdocks[entree-only]

artrans · arytran · arcusto

Inter-branch GRECO demand for tomorrow, grouped by house. xlsx + print.

  • Grouped by house: B / D / COOLER / MEAT COOLER / FREEZER / PRODUCE.
  • Companion to Low Slots (inverse filter on customer company).

Low Slots + PICK list[entree-only]

arslot · artrans · arytran

Night-shift restock triage vs tomorrow's demand. Optional Dakota xlsx merge. Snapshots: lowSlots + lowSlotsPickList.

  • Defaults to tomorrow; Only demand / Only short filters.
  • Dakota xlsx drag-in splits Pick vs True shorts on Diamond + here.
  • Save Snapshot + separate lowSlotsPickList snapshot when exporting PICK tier.

StockVoo[entree-only]

arinvt01 · arpromo · artrans/arytran · arcusto

Smart menu over full active inventory — culinary sub-classes, menu stations, promos, popular items, substitute carousel, and per-customer history. Live ODBC; /entree only.

  • One /stockvoo round-trip: full active arinvt01 + active arpromo + trailing-window top sellers (default 30 days, ?days=N).
  • Client-side smart layer: regex sub-classes from DESCRIP/PACKDESC; menu-station pivot (Center of Plate, Pizza Essentials, etc.).
  • Substitute carousel on low/out rows — same CLASS + TEMP_ZONE, ranked by overstock and recent velocity.
  • Customer tab: CUSTNO → /stockvoo-customer for order stats, top items, and history-seeded recommendations.
  • On Sale · Popular Now side panels; filters: brand, supplier, zone, class, stock state, last recv/sale, kitchen search.
  • /entree only (hidden on /port) — read-only live ODBC; not on auto-pull (optional stockVoo snapshot key if Save is added later).

Print & audit trails

Invoice History[entree-only]

arinvoi · arprtlog · aryprlog

Single-invoice lifecycle timeline: entry, revisions, every print event.

  • Automation — Invoice History and User History: one searchable timeline (arinvoi + arprtlog + aryprlog) replaces per-invoice Change Invoice drill-down.

Print · Invoice History · User History[entree-only]

bridge /po-doc · /print-doc

One bar: 6 digits → PO sheet, 7 digits → L.S. + invoice. Silent print to dock printer.

  • Print: 6-digit PO vs 7-digit invoice classification in one bar.
  • Invoice History: full edit + print timeline for one INVNO.
  • User History: SECID roster + created/print filters for shift-change audits.
  • All three are live-ODBC — hidden on /port.
  • Automation — Invoice History and User History: one searchable timeline (arinvoi + arprtlog + aryprlog) replaces per-invoice Change Invoice drill-down.

User History[entree-only]

arinvoi · arprtlog · aryprlog

Per-SECID audit: invoices entered and documents printed in a date window.

  • Automation — Invoice History and User History: one searchable timeline (arinvoi + arprtlog + aryprlog) replaces per-invoice Change Invoice drill-down.

Remote, snapshots & reference

/port · Bridge Port[port-only]

shanetree_snapshots · port_ai_summaries · bridge_relay · bridge_relay_queue

Bridge Port — snapshot mirror of /entree for devices without ODBC.

  • Same EntreeClient component with portMode: no bridge probe, no catalogue sidebar, no live-only tiles (DockVoo, Routing, Low Slots, Crossdocks, Print, histories, Item Search, StockVoo, Guide).
  • Header: Pull Latest (hydrate every snapshotted modal from newest shanetree_snapshots row) and Pull All (refresh snapshot lists only). Bridge Relay toggles as the default full-page workspace.
  • Per-modal Refresh becomes Pull Latest Snapshot; Save Snapshot UI is read-only on /port so operators cannot delete briefing dependencies.
  • Summary tile: PortAISummaryModal with Regenerate only (no Pull All + Generate — bridge unreachable).
  • Related public routes: /noe (willCalls kiosk + print relay), /adrian (routes + vendor pickups kiosk) — both read /api/public/shanetree-latest, never ODBC.

Bridge Relay[port-only]

bridge_relay_queue

/port default workspace. Remote operator queues ODBC pulls on the dock PC; results land as snapshots.

Browse Tables[entree-only]

system.tables (590+)

Sidebar catalogue on /entree: keyword / invoice / date search + raw table browser.

Item Search · Backend · Guide[entree-only]

arinvt01 · arprice · itemwhselocs · arbarcd

Parallel fan-out SKU lookup. No snapshot (live ODBC only).

  • Item Search: Promise.allSettled on four tables; partial failure OK.
  • Backend (Guide tab): Concept Map + Bullet Points printables for 590 tables.
  • Purchase Orders tile was removed — open POs live inside Receiving/DockVoo flows.

Pull Log[live]

shanetree_pull_log

Unified audit feed: every pull + snapshot save (auto or manual). Live on /entree, /port, and /noe.

  • Telemetry — every pull and snapshot (auto-startup, auto-interval, auto-daily, manual, bridge-server) emits paired rows in shanetree_pull_log sharing a cycle_id.

Shanetree Guide[entree-only]

(static)

This whitepaper + Pricing Logic + Backend tabs. Printable popup.

Summary · Pull Log · Bridge Relay[live]

shanetree_snapshots · port_ai_summaries · port_summary_memory

Gemini-generated operations rollup across every snapshotted modal. On /entree: optional Pull All + Generate runs live ODBC pulls first. On /port: Regenerate only — re-summarizes snapshots already in Supabase.

  • Summary: per-modal AI bullets + rollup + deletable memory column.
  • Pull Log: filter by modal, trigger (auto-startup/interval/daily/manual), status.
  • Bridge Relay: /port queues pull jobs executed on warehouse PC; Pick List default.
  • Telemetry — every pull and snapshot (auto-startup, auto-interval, auto-daily, manual, bridge-server) emits paired rows in shanetree_pull_log sharing a cycle_id.
  • Telemetry — hourly /api/cron/port-ai-summary reads latest snapshots + port_summary_memory for the /port AI briefing; Regenerate-now for off-cycle refresh.

Shanetree code footprint

Tracked Shanetrée modules (EntreeClient, extracted panels, bridge, CindyVue, whitepaper libs, and supporting API routes). Totals refresh from scripts/refresh-whitepaper-footprint.mjs.

63,533

Total LOC

~3.4 MB

Source size

23

Files tracked

35,566

EntreeClient.tsx

FileLOCSizeRole
app/entree/EntreeClient.tsx35,5662120.3 KBThe whole UI. Every modal, every table grid, every print flow. Hosts browser-side auto-pull effects and the Pull Log launcher.
entree-bridge.js10,227450.3 KBLocal Node HTTP server on the dock PC. ODBC handle + silent-print + bridge-server willCalls heartbeat → /api/internal/shanetree-autopull.
app/tools/greco/CindyVueClient.tsx5,369339.8 KBDockVoo / CindyVue live dock-tracker client (shared with Shanetrée).
app/entree/DiamondReportPanel.tsx2,504106.2 KBDiamond Report nightly one-pager modal (extracted from EntreeClient).
app/entree/BridgeRelayPanel.tsx1,74582.8 KB/port Bridge Relay queue UI — submit ODBC jobs to the dock PC.
app/entree/StockVooPanel.tsx1,56977.8 KBStockVoo smart menu — inventory sub-classes, menu stations, substitutes, customer view.
app/tools/greco/lib/schedule-engine.ts1,18648.7 KBCindyVue xlsx → tracker-row engine + timing maths.
app/entree/PortAISummaryPanel.tsx91638.6 KBSummary (AI briefing) modal — /entree Pull All + Generate vs /port Regenerate.
app/entree/autoPullEngine.ts81629.8 KBSequential pull → snapshot → publish chain; startup/daily chains and runAutoPullForModal.
app/entree/PullLogPanel.tsx71830.3 KBFull-screen Pull Log modal with live polling and per-modal tabs.
app/tools/greco/lib/excel-exports.ts53921.8 KBPrintable xlsx / PDF exports for Greco reports.
app/api/entree/query/route.ts41919.6 KBNext.js → bridge proxy. Auth shim + report routing.
lib/shanetree/shanetree-whitepaper.ts35337.9 KBWhitepaper content, stats, and print HTML builder (Guide modal + /guide + PDF).
app/entree/useShanetreeSnapshot.ts29410.3 KBReact hook for modal read/write/save-snapshot; emits Pull Log rows on manual refresh.
app/api/internal/shanetree-autopull/route.ts2879.1 KBBearer-auth bridge write-through to shanetree_snapshots + shanetree_pull_log.
lib/supabase/shanetree-pull-log.ts28410.3 KBSupabase helpers for Pull Log insert/query.
components/ShanetreeWhitepaperSections.tsx23710.8 KBShared React whitepaper body (§1–§6) for /entree Guide and /guide.
lib/shanetree/whitepaper-unified.ts2108.4 KBUnified Features list (modal catalog + deep-dive + /port).
lib/shanetree/shanetree-whitepaper-guide-embed.ts1286.8 KBPrintable /guide HTML + longform §5 extractor.
app/api/greco/session/route.ts1073.3 KBDockVoo session persistence (Supabase upsert).
app/port/page.tsx301.0 KB/port route — EntreeClient with portMode.
app/entree/page.tsx160.3 KB/entree route shell + server-side bridge probe.
components/ShanetreeWhitepaperGuideSections.tsx130.4 KB/guide interactive whitepaper wrapper.
Total tracked63,533~3.4 MBShanetree + supporting modules

Also includes extracted panels (Diamond, Bridge Relay, Port AI Summary, StockVoo), lib/shanetree/*, and pull-log helpers — not only EntreeClient.

Glossary

POSTAT — PO status code: O = Open, R = Released, C = Closed, V = Void, H = Hold.

Greco PO — A PURNO matching ^6\d{5}$ — six digits starting with 6. Anything else on the dock schedule is a crossdock.

DockTrackerLite — The lightweight appointment row shape (id, time, door, vendor, po, timeIn, timeDocked, timeOut) persisted per day in Supabase.

/po-doc — Bridge endpoint that merges pomast01 header + potran01 lines (with a poymast/poytran YTD fallback) into one payload.

/return-diffs — Bridge endpoint that returns Entrée credit memos (artrans/arytran where QTYSHP<0) grouped by invoice, with ORIG_INVNO parsed out of each memo's PONUM/REFNO header text so the client can diff against BFC-side claims.

ORIG_INVNO — The 7-digit original invoice number parsed out of a credit memo's PONUM/REFNO field. Entrée operators key it in free-text in a handful of shapes (e.g. '148/RMR 6045110 / CR. MEMO', '187/6047960 / CR. MEMO', bare '6046123'); the bridge scans for 6-8 digit runs and picks the most-likely-invoice candidate so diffs can match a credit to the original sale.

BFC returns xlsx — Weekly spreadsheet BFC mails listing every returned line (item, qty, driver, customer, original invoice #). Dragged directly into the Return Diffs modal and parsed client-side — no /truck-errors round-trip required.

return_diffs_snapshots — Supabase table that stores a full diff run — date range, all three buckets, totals, and notes — so operators can sign off on a weekly diff and revisit it later without re-querying the bridge.

Silent print — Chrome/Edge headless → PDF → SumatraPDF → dock printer. The user never sees a print dialog.

Auto-pull engine — The sequential pull → snapshot → publish chain in app/entree/autoPullEngine.ts. Every reportable modal goes through the same code path whether the trigger is auto-startup, auto-interval, auto-daily, or a manual click — Pull Log entries are uniform regardless of who fired the run.

auto-startup — Trigger fired exactly once on the bridge PC's first /health-green of the day. Runs the AUTO_PULL_STARTUP_CHAIN (willCalls + produceSales) so /port is populated the moment the dock PC boots.

auto-interval — Trigger fired by the 5-minute willCalls and receiving heartbeats. Wall-clock-aligned (HH:00, HH:05, HH:10…) so all client tabs and the bridge process tick on the same boundaries.

auto-daily — Trigger fired by the once-per-24h scheduler driving the slow report modals (sales, returns, vendor pickups, routes, picker production). Each modal is gated by an independent localStorage day-key so the snapshot is taken at most once per calendar day no matter how many ticks pass.

cycle_id — RFC4122 UUID minted at the start of every auto-pull or manual run. The matching pull row and snapshot row share the same cycle_id so the Pull Log modal can collapse them into one operator-facing entry.

shanetree_pull_log — Supabase audit table (migration 118) — one row per pull and one per snapshot, tagged with company_id, user_id, modal_key, event_type, trigger, status, duration_ms, summary, and cycle_id. Powers the Pull Log modal.

shanetree_snapshots — Supabase snapshot table (migration 116). One row per saved auto-pull or manual save: company_id, user_id, modal_key, payload (the full bridge response), summary (headline numbers), and the request params used. /noe and /port read from this table; they never hit the bridge directly.

Bridge-server heartbeat — The willCalls 5-minute auto-pull running inside entree-bridge.js itself, independent of any browser tab. Fires on the bridge PC's Node event loop, hits the live ODBC, and POSTs to /api/internal/shanetree-autopull so the snapshot keeps landing in Supabase even if every Chrome tab on the dock PC has been discarded by the OS.

/api/internal/shanetree-autopull — Bearer-authenticated Vercel route the bridge posts to. Validates INTERNAL_API_SECRET, then uses the service-role Supabase client to write the snapshot + two pull-log rows for the bridge's heartbeat. Lets the dock PC participate in the pipeline without ever holding a Supabase secret.

/port AI briefing — The hourly Gemini-generated operations rollup tile on /port. Reads the latest Shanetree snapshots, layers in any persistent operator notes from port_summary_memory, and produces a tight scannable digest. The cron at /api/cron/port-ai-summary regenerates it on the hour; the Summary tile also exposes a Regenerate-now button.

portMode — EntreeClient flag used by /port (and implied by /adrian, /noe). Skips bridge probe, hides live-ODBC tiles, swaps Refresh for Pull Latest Snapshot, and never opens a socket to Entrée from the browser.

Bridge Relay — Supabase-backed queue on /port. A remote operator requests a report pull; the dock PC's /entree tab (or bridge) executes ODBC and writes the result as a shanetree_snapshots row the requester can load.

routingDay — Shanetree snapshot modal_key for the unrouted-stops payload captured from the Routing modal — powers Send to /routing on the map planner.

lowSlotsPickList — Companion snapshot to lowSlots — canonical PICK-tier rows at export time; used by /shorts Low Slots Comparison.

/noe — Public willCalls-only kiosk. Polls latest willCalls snapshot; L.S. print requests queue to the dock PC via will_call_print_requests.

/adrian — Public routes + vendor pickups kiosk. Auto-hydrates both modals from newest snapshots via /api/public/shanetree-latest.

API & Webhooks

Public REST API with 37+ endpoints under /api/v1/* for submitting reports, managing webhooks, running anomaly detection, semantic search, the AI agent, custom tools, schedules, bulk exports, and batch operations. Endpoint shapes are maintained in /api/v1/openapi.json.

1

Generate Key

Standard or AI Bundle key from the Developer page.

2

Configure Webhooks

Subscribe to report, anomaly, and agent events.

3

Make Calls

Submit data, fetch results, kick off AI runs.

REST API

  • · Submit CSV / XLSX / JSON, auto-detected tool
  • · Multi-file submissions for complex tools
  • · Idempotency keys, retries, activity audit trail
  • · Per-key rate limits + tiered quotas

Webhooks

  • · Report completed / failed
  • · Anomaly detected (with severity)
  • · Agent run lifecycle events
  • · HMAC-signed payloads, exponential-backoff retries

Endpoint Families

ReportsWebhooksAnomaliesSemantic SearchAI AgentCustom ToolsSchedulesBulk ExportsBatch OpsActivity LogKnowledge BaseFiles
Developer DashboardOpenAPI Spec
Δ

File Display AI

The AI layer complements (it does not replace) deterministic processing — data transformation stays algorithmic and verifiable, while AI provides interpretation, summaries, RAG retrieval, anomaly detection, and an agent loop. All AI calls route through the Vercel AI Gateway with a platform allowlist of frontier models.

AI Assistant

AI Chat

  • · Conversational questions about operations & data
  • · Greco-only Analytics tab — inline chat over the full statistical engine
  • · Greco-only Vibe tab — embedded tool builder inside the chat
  • · Session history with team sharing, private mode, collaborative sessions

AI-Enhanced Reporting

Every tool can auto-summarize its output and email the summary to a configurable recipient list. Each tool has its own AI filter prompt — choose whether AI focuses on errors, top performers, trends, anomalies, etc.

  • · Per-tool email recipient lists
  • · Per-tool AI filter prompt (Editor+ to modify)
  • · Critical issues / top & bottom performers / trends
  • · One-click email with summary attached

RAG Semantic Search (pgvector)

Ask natural-language questions over your full report history — vector embeddings rank by meaning, not just keywords. AI analyses automatically pull in relevant past reports for comparison (“15% above last month”).

  • · Searches across all historical reports
  • · Returns context, summaries, similarity scores
  • · Auto-injected as context for new AI analyses

Anomaly Detection (Rolling Baselines)

When a report is processed, File Display compares each employee's metrics (moves/hr, scan %, etc.) against their personal 30-day rolling baseline & standard deviation. Significant deviations are flagged, stored for review, and optionally email-alerted.

Critical

> 3σ / 50%

High

> 2.5σ / 35%

Medium

> 2σ / 20%

Low

flagged for review

AI Agent System

A tool-using agent loop (Greco-only) that can run analytics functions, query the knowledge base, kick off RAG searches, and call dozens of typed tools (forklift analysis, return classification, DockVoo funnel analysis, anomaly detection, etc.).

  • · Multi-step tool calling with run history
  • · Streamed responses & partial results
  • · Per-run audit trail in Supabase

Company Knowledge Base (Snowball)

Per-company memory the AI can read from and write to — facts, preferences, named entities, recurring patterns. Snowball grows as users work and gets pulled into every relevant chat / summary.

  • · Categories: people, places, processes, terms, rules
  • · Editable by Editors+; auditable

Caching (Redis)

Upstash Redis caches profiles, API-key validation (~10× faster), rate limits, permission lookups. Auto-invalidated on updates; graceful degradation if Redis is unavailable.

Job Queue (QStash)

Serverless job queue for email delivery, webhook delivery, AI analysis, anomaly detection. Exponential-backoff retries, dead-letter queue, dedupe, status tracking.

Sentry

Error tracking + performance monitoring across all API routes and AI tool calls. Slow-query alerts and per-route latency dashboards.

Build Your Own Tools

Anyone on your team can spin up a custom tool from the Build editor — describe it in plain English and let AI generate the code, or write HTML/CSS/JS yourself with live preview. Toggle Data Persistence to give a tool a cloud backend (ToolAPI → company-scoped Supabase JSONB), choose private or shared, and every save creates a new version you can switch between.

AI Code Generator

Describe what you need in natural language. AI writes the full HTML/CSS/JS and can wire up cloud storage automatically.

Live Preview + Sandbox

Dark editor with a sandboxed iframe preview. Tools cannot reach app data, auth tokens, or external APIs.

Version History

Every save = new version. Switch versions, load any into the editor, mark a default, or delete old ones.

Private or Shared

Default to private. One toggle shares a tool with the whole team; only the creator can edit.

ToolAPI — Cloud Data Persistence

Custom tools that need to remember state (trackers, todos, inventories) talk to a company-scoped Supabase table via postMessage — sandbox is preserved.

Save

await ToolAPI.save({ items: [...] });
await ToolAPI.save(data, 'settings');

Load

const data = await ToolAPI.load();
const all = await ToolAPI.loadAll();
• Company-scoped RLS• JSONB (1 MB / key)• Multiple named keys• Inline data viewer on tool card

AI Tool Builder — Generate from Spreadsheet

Drop an .xlsx/.csv and AI profiles the columns, plans the processing logic, writes the tool, and self-reviews the code — matches the dark terminal UI used by the built-in warehouse tools.

Profile columnsPlan logicGenerate codeSelf-reviewPreview & save

Logic Fingerprinting & Test Mode

All processing is deterministic and version-controlled — same input always yields the same output, with a hashable fingerprint. Every tool also has a Test Mode toggle: reports flagged as test are excluded from analytics, leaderboards, and business metrics.

ReproducibleAuditableVersionedSafe experimentation

Build → Developer: If you can describe your tool in a sentence or two and it works as a standalone page (calculator, tracker, form), Build handles it. For server-side logic, third-party integrations, multi-page workflows, or tight platform integration, submit a project request in the Developer tab.

Team Collaboration

Every page is multiplayer-aware. Supabase Realtime powers live presence, typing indicators, and collaborative editing across the whole app — chat, documents, AI sessions, calendar, and tool pages. Everything is company-scoped with full RLS isolation between organizations.

Team Chat

Full company groupchat auto-created. DMs, custom groups, real-time delivery, per-room notifications.

Calendar

Personal + company calendars at /calendar. Grid + list views, event types, participants, all-day or timed.

@Mentions

Tag anyone in any chat. Mentions land in a dedicated inbox with unread counts and per-mention read state.

Member Profiles

Click any teammate to open a profile modal: start DM, start AI chat, start a shared doc, or view their activity.

Documents

Real-time collaborative documents. Sharing modes: Private, DM-style (just two people), Company, or View-only.

Support

Built-in support channel for admin questions. Threaded conversations with read receipts.

Real-Time Presence

  • · Company-wide presence channel tracks who's online and which page they're on
  • · Avatar stacks on every collaborative page (docs, chat, design studio, tools)
  • · Debounced typing indicators in chat and document editors
  • · Postgres Changes pushes DB updates without polling

Notifications

10 configurable categories per user. Security alerts are always-on.

ReportsChatMentionsProjectsSupportAI SummariesDocumentsWeekly DigestSecurityMarketing

Multiplayer-Enabled Pages

DashboardTeam ChatDocumentsAI ChatCalendarDocksheetPickerForkliftReturnsShortsReplenLoaderTruck ErrorsReturns IntelSkipsShanetrée

Security & Permissions

Security is foundational to File Display. Every database table enforces Row Level Security policies that automatically filter data by company. Users never see data from other organizations, and this isolation is enforced at the database level, not the application level.

1

Authentication

JWT-based secure login

2

Row Level Security

Database-enforced isolation

3

Company Boundaries

Automatic data partitioning

4

Role Permissions

Granular access control

Role Permissions

FounderFull access, assign admin role, company settings
AdminFull access except assigning admin, manage members
EditorGenerate reports, create documents, use chat
ViewerRead-only access to all content

Multi-Tenancy Architecture

File Display uses a shared-database, company-isolated architecture. Every table includes a company_id foreign key, and Row Level Security policies ensure users can only access rows belonging to their company. This provides the isolation benefits of separate databases with the operational simplicity of a single schema.

Company assignment

By email domain

Data filtering

Database-enforced

Zero trust

RLS on every query

Permawrite License

File Display is licensed under the Permawrite License, a proprietary framework issued by The Parent Holding Company that anchors permanent, verifiable ownership to the Arweave blockchain — a decentralized, immutable storage network where records persist indefinitely and cannot be altered or removed by any party.

◆

Permanence

Ownership records cannot be erased, overwritten, or lost.

◈

Verifiability

Every license is on-chain and independently verifiable.

◇

Attribution

Required by the license and backed by the on-chain ledger.

Key Provisions

•

All rights reserved by the original author with permanent, on-chain proof of ownership.

•

AI-assisted work is owned by the human author who directed the output — AI is a tool, not a co-author.

•

Any use must prominently credit the original author and reference the Arweave licensing transaction.

•

No forking, redistribution, or derivative works without explicit written permission from the author.

View Full License

Platform Statistics

Live snapshot of the full platform. TypeScript-first codebase with 110 Supabase tables across 139 migrations, 59 Next.js pages, 140 API routes (37 in the public v1 sub-API). Includes the complete Greco operations suite (15+ data-processing tools + Docksheet), Shanetrée (63,533 LOC across the tracked operator surface on the 590+ table Entrée ODBC bridge with silent PO printing), AI analytics layer (14 tools, 47+ visualization types via Recharts/Nivo), and 101 shared library modules. (219,099 real lines across 561 tracked source files)

0

Lines of Code

0

Source Files

0

Git Commits

0

Next.js Pages

0

Supabase Tables

0

SQL Migrations

0

API Routes

0+

Public v1 Endpoints

0

Greco Data Tools

0

AI Analytics Tools

0+

Visualization Types

0+

Entrée Tables (Read-Only)

0

Shanetree LOC (tracked)

0

Shanetree Files (tracked)

Codebase Breakdown

TypeScript / TSX

0.0k

Lines across 0 files

Frontend Pages

59

React pages with routing

API Routes

140

Server-side endpoints (37 in public v1)

Library Modules

0

Shared utilities & hooks

Database Tables

110

Across 139 SQL migrations

Git Commits

2,008

In the main branch history

npm Dependencies

0

40 prod + 8 dev

Shanetree (tracked)

0.0k

23 files · ~3.4 MB · 590+ Entrée tables

Architecture Map

A single aerial view of the entire File Display platform — every frontend route family, every API route handler, every internal lib/ module, the full Supabase surface, every external SaaS integration, and the on-premises Greco & Sons hardware stack. Components are color-coded to show scope: red text and red-bordered boxes belong to the grecoandsons client ID (Shanetrée, Docksheet, all warehouse workflows, the Entrée bridge and Advantage database, the greco_* Supabase tables, and everything on-prem); black text and slate-bordered boxes are site-wide components shared by every tenant.

The map reads top-down as a request/response cascade: clients hit the Vercel edge, pass through middleware + Supabase Auth, land on a Next.js frontend page, which calls a Next.js API route handler, which imports lib/ modules and talks to Supabase, external APIs, or the Greco on-prem bridge. Labeled arrows call out the transport (HTTPS, fetch / server actions, service-role, ODBC r/o, HTTP :3099, silent print) and direction.

Scroll horizontally if the diagram is wider than your viewport, or click Print Architecture for a single-sheet, landscape copy.

File Display — Full Platform Architecture MapEvery major component of the monorepo and its runtime — frontend pages · API routes · lib modules · Supabase surface · external SaaS · on-prem hardware.COLOR KEYGreco & Sons — client_id = grecoandsonsPlatform / site-wide — every tenantTIER 1 · CLIENTSPublic User Browserany signed-up tenanthome · auth · dashboardAI chat · documents · calendarcustom tools · public toolsagent · ide · buildGreco Dock / Warehouse Browserdock floor · receivers · supervisorsShanetrée · DockVoo · daily-statslive/greco (public read-only)forklift · picker · loader · scanreturns · routing · reconciliationAdmin / Developerops · support · god-view/developer · /api/admin/*monitoring · cron controlagent runs · job workerssupport queue · reply toolsExternal API Consumerbearer-token integrations/api/v1/* (OpenAPI surface)tool builds · report exportswebhook deliveries (outbound)desktop app · MFD downloadTIER 2 · VERCEL EDGE — CDN · CI/CD · CRON · WEB ANALYTICSVercel Edge Network / CDNCI/CD — auto-deploy from GitHub FileDisplayVercel Cron triggers → /api/cron/*TIER 3 · MIDDLEWARE + AUTH (EVERY REQUEST PASSES THROUGH)middleware.ts / RLS-scoped Supabase clientevery request attaches auth cookie and company_id filterSupabase AuthOAuth · magic-link · password · session JWTTIER 4 · NEXT.JS APP ROUTER — FRONTEND PAGESPlatform Pagespublic · auth · marketing/ · /login · /signup · /account/reset-password · /confirmation/our-story · /support · /phl · /t/dashboard · /docsCOLLABORATION/chat · /team-chat/documents · /calendar · /membersTOOLS & AI/custom-tools · /public-tools/tools · /build · /projects/agent · /ide · /vibeCOMMERCE/quote · /quotes-admin/developerGate: auth only (no tenant filter)Greco & Sons Toolinggrecoandsons client ID onlySHANETRÉE (Entrée browser) /entree — 12 modals · 573+ tablesDOCKVOO / SCHEDULE /tools/greco — DockVoo · CindyVue /live/greco — public live view /daily-stats — Greco analyticsWAREHOUSE WORKFLOWS /drivers · /driver-scan · /scan /loader · /picker · /forklift /skips · /transfers · /cyclecount /shorts · /replen · /negative-slots /damages · /shrink-meetingRETURNS & ROUTING /returns · /returns-intel /reconciliation · /routingGUIDES & INTEL /guide (GrecoOnlyGuard) /returns-intel — BFC reconcileGate: GrecoOnlyGuard + RLS client_idPlatform Internals · Adminoperator + developer surfacesAGENT / IDE / AI LABS /agent — task + memory UI /ide — in-browser dev env /vibe · /buildADMIN / DEVELOPER /developer — admin console /members — team managementCONTENT / MARKETING /our-story · /support · /phl /t — share-link routerAll pages are React client componentsbacked by server actions + routehandlers (Tier 5 below).TIER 5 · NEXT.JS API ROUTE HANDLERS (/API/...)Platform APIpublic + product endpointsPUBLIC v1 (OpenAPI surface — 37+ ep.) /api/v1/tools · /api/v1/reports /api/v1/agent · /api/v1/ai/chat /api/v1/files · /api/v1/calendar /api/v1/webhooks · /api/v1/search /api/v1/openapi.json · /api/v1/batchAI / AGENT / IDE /api/ai/* · /api/ai-analyze /api/ai-summary · /api/embeddings /api/agent/* · /api/ide/* /api/chat · /api/semantic-searchTOOLS & CUSTOM TOOLS /api/custom-tools/* /api/public-tools/* /api/dashboard/custom-cardsEMAIL / NOTIFICATIONS /api/email/send /api/notifications/* /api/telemetry/client-eventGreco APIproxies + Greco-only endpointsENTRÉE BRIDGE (ODBC proxy) /api/entree/query → HTTP to Dock PC :3099 → SELECT-only, TOP NGRECO SESSION / APPOINTMENTS /api/greco/session /api/greco/custom-appointmentsAI ANALYTICS (Greco scope) /api/greco/analytics-chat → 14 AI tools · Recharts/Nivo /api/greco/analytics-logDOCKVOO EMAIL ALERTS /api/dockvoo/notify → Resend transactional fan-out /api/dockvoo/notif-prefsGRECO CRON /api/cron/greco-digest → nightly stats + digest emailInfrastructure · Admin · Workersbackground + ops endpointsCRON (8 scheduled jobs) /api/cron/activity-log-cleanup /api/cron/agent-autonomy /api/cron/ai-usage-rollup /api/cron/job-retries /api/cron/memory-cleanup /api/cron/stale-jobs /api/cron/webhooks /api/cron/greco-digest [red]WORKERS (queue consumers) /api/jobs/workers/agent-task /api/jobs/workers/ai-analysis /api/jobs/workers/anomaly /api/jobs/workers/email /api/jobs/workers/batch-email /api/jobs/workers/webhook /api/jobs/enqueueADMIN & MONITORING /api/admin/* · /api/monitoring/* /api/health/* · /api/cacheWEBHOOKS /api/internal/webhooks/triggerTIER 6 · LIB/ INTERNAL MODULES (18 SUBDIRECTORIES · SHARED RUNTIME)lib/supabaseserver · client · typeslib/agentruntime · memory · policylib/aimodel routing · providerslib/analyticsstats engine · rollupslib/anomalydetection · scoringlib/cacheKV + in-memorylib/custom-toolsuser-defined toolslib/emailResend client + templateslib/embeddingsvectors · searchlib/i18ntranslationslib/jobsqueue · enqueue · retrylib/loggingstructured logslib/notificationsfan-out channelslib/realtimeSupabase channelslib/routingTSP · zone solverlib/tool-builderprompt → tool ASTlib/toolsregistry · runnerlib/apipublic v1 helpersTIER 7 · DATA · EXTERNAL SERVICES · GRECO ON-PREMSupabase — File Displayproject: gyqbxooehqzujygeogyv · 102 tables · 129 migrationsAUTH · STORAGE (documents, exports, xlsx uploads)REALTIME channels (chat, dockvoo, agent events)RLS enforced by company_id / client_idPLATFORM TABLES profiles · companies · memberships · invitations documents · document_comments · folders chat_messages · team_chat · reactions calendar_events · availability custom_tools · tool_runs · tool_versions public_tools · tool_permissions jobs · job_runs · job_retries · cron_state anomalies · monitoring_alerts agent_memory · agent_runs · agent_tasks webhooks · webhook_deliveries · webhook_secrets api_keys · activity_log · ai_usage notifications · embeddings · semantic_search_history support_submissions · admin_repliesgreco_* tables · RLS: client_id = grecoandsonsgreco_cindyvue_sessions greco_daily_statstruck_errors_reports return_diffs_snapshotsgreco_analytics_log greco_analytics_chat_*greco_custom_appointments dockvoo_notif_prefsgreco_tool_runs greco_autoprint_logExternal SaaS APIsthird-party integrationsOPENAI · GPT-4o / GPT-4o-mini · embeddings (text-embedding-3) · used by /api/ai/* & agentANTHROPIC · Claude 3.5 Sonnet / Haiku · used by agent · IDE assistantRESEND · transactional email · DockVoo notify [red] · team invites · support repliesMAPBOX · geocoding · directions · /api/routing/geocode · /routing TSP solverGOOGLE (via Supabase Auth) · OAuth sign-in providerGITHUB · CI/CD source of truth · github.com/shanecloonan/FileDisplayGRECO & SONS ON-PREM (ON-SITE HARDWARE)Dock PC (Windows · Node)entree-bridge.js :3099 · auto-start service· ODBC handle → Advantage (read-only)· silent-print stack (headless Chromium → PDF → lp)· catalogue discovery (88 curated / 590 total)· DockVoo Time-In → autoprint PO loadsheet· scripts/install-bridge-autostart.ps1· scripts/start-entree-bridge-hidden.vbsEntrée ServerAdvantage Database \\10.1.1.21:6262pomast01 · potran01 · arinvoi · artransarinvt01 · arprice · arbarcd · arytranpod_invhdr · pod_invdtl · pod_driversarcust · venpic · bins · … (573+ total)system of record · written only by Entrée itselfDock Printersilent PDF → laser (PO loadsheets, venpic sheets, will-calls)HTTPSHTTPSHTTPSbearerGrecoOnlyGuardfetch · server actionsfetch · server actionsfetch · server actionsimportimportimportservice-role · RLSSDK · HTTPSgreco_* read/writeemail · AIHTTP :3099ODBC (r/o)silent print

Greco — DockVoo → autoprint

/tools/greco uploads the PO schedule → parsed client-side by CindyVue → saved to greco_cindyvue_sessions. When a receiver clicks Time In, the browser hits /api/entree/query, which proxies to the Dock PC bridge; the bridge queries Entrée over ODBC, renders the loadsheet headlessly to PDF, and spools it to the dock printer.

Greco — Return Diffs reconciliation

/returns-intel ingests the weekly BFC truck-errors xlsx → snapshots it into truck_errors_reports. Bridge queries arinvoi / artrans / arytran for the matching credit memos, then a three-way diff buckets every line as matched, only-in-BFC, or only-in-Entrée — saved to return_diffs_snapshots.

Greco — Daily Stats aggregation

/daily-stats reads every Greco tool's run log (greco_analytics_log, greco_daily_stats) and renders a draggable/resizable grid. An AI chat panel calls /api/greco/analytics-chat → 14 AI tools pick from 47+ Recharts/Nivo visualizations. Nightly /api/cron/greco-digest rolls up the day and emails stakeholders.

Platform — Job queue & webhooks

/api/jobs/enqueue pushes work into the jobs table; Vercel Cron fires /api/cron/job-retries and /api/cron/stale-jobs; workers under /api/jobs/workers/* (agent-task, ai-analysis, anomaly, email, batch-email, webhook) consume them. Outbound webhook deliveries are signed with webhook_secrets and logged to webhook_deliveries.

Platform — AI agent & custom tools

/agent and /ide drive the agent runtime in lib/agent; memory lives in agent_memory, task state in agent_tasks. User-defined tools are authored in /custom-tools (via lib/tool-builder), versioned in tool_versions, and runnable through /api/v1/tools/[id]/data.

Platform — Public v1 API

/api/v1/* is a bearer-token OpenAPI surface documented at /api/v1/openapi.json; client telemetry flows back via /api/telemetry/client-event.

Counts are live: 219,099 real source lines across 561 tracked files · 110 Supabase tables across 139 migrations · 59 Next.js pages · 140 API routes (37 in the public v1 sub-API) · 101 lib/ modules · the Shanetrée/Entrée bridge surface (tracked separately at ~64k LOC) exposes 88 curated tables (590+ total) read-only. Supabase Row Level Security filters every query by company_id.