FileDisplay
Tools
Sign In
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. Greco warehouse tools are organized into four dashboard folders (Inventory, Scheduling, Transportation, Operations). Founders and admins configure per-member visibility — dashboard cards, Greco tools, Window modals, roles, and more — from the /controls command center.
Sign up with email
Work email, no card required
Auto-assigned to company
Email domain = Client ID
Collaborate with team
Same domain = same workspace
Roles
First signup = Founder · everyone else starts as Editor
Dashboard
Multi-tenant home — reports, tools, members, activity
Greco Tools
29 warehouse tools in 4 folders
DockSheet
Daily receiving workspace — schedule through timer
Window
27 modals on live Entrée ODBC bridge
Bridge Port
Remote snapshot mirror + Bridge Relay queue
Public Kiosks
7 no-login routes for floor phones & tablets
Build + Agent
Custom tools, AI agent, IDE assistant
Controls
Admin hub — cards, tools, modals, roles, appearance
Developer API
37 public v1 endpoints + webhooks
Activity Ledger
Unified team + DockSheet + Window logs
Docs
This page — operator guide + architecture map
grecoandsons
Greco & Sons — Tool Documentation
31 warehouse tools registered in lib/greco/greco-tools.ts — grouped on the dashboard into Inventory, Scheduling, Transportation, Operations. Click any tool below to expand the full documentation, input format, logic, and output examples.
Inventory
Slots, counts, damages & replen
7 tools
Scheduling
Outlook, print schedule, daily items, window & chat
6 tools
Transportation
Routing, drivers, returns & incentives
9 tools
Operations
Forklifts, pickers, shorts & throughput
9 tools
Architecture Notes
/api/entree/query to the dock bridge.grecoandsons
Routing
/routing — AI-Assisted Multi-Stop Route Optimization
Truck route optimization at /routing combining geolocation, interactive mapping, and algorithmic optimization for efficient multi-stop delivery routes. The Window Routing modal can hand off unrouted stops via a routingDay snapshot. 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
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, item verification, dock assignment, pallet breakdown, receiving, and release. The landing page presents a date selector and a card per sub-tool — Start, Check-in, Items, Receiving, Breakdown, Timer — plus 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
| Load # | PO | Dock | Vendor | Cases | Cubes | Weight |
|---|---|---|---|---|---|---|
| (Sample data not shown) | ||||||
- •Master list of all loads
Check-in (Live Load Tracker)
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
| Appt Time | PO | Dock | Vendor | Time In | Time Out | Total Time |
|---|---|---|---|---|---|---|
| (Sample data not shown) | ||||||
Items (PO Item Numbers)
Sits between Check-in and Receiving. Lists every item number on every PO scheduled for the day so the office can verify exactly what is on each inbound truck before it is worked — and cross-check it against the Window Subs / OOS report. Item lines are pulled live from the Entrée bridge's PO# receiving report (the same document that prints on Time In) via the public /api/public/po-doc route, which works on-LAN directly and off-LAN through the Supabase relay queue.
- Auto-loads when opened and whenever the day's PO set changes; a manual Refresh re-pulls on demand.
- One card per PO showing vendor, appointment, dock, a live
POSTATstatus badge (Open / Receiving / Complete / Void), and the item count. - Each card has a scrollable item table: Item #, Description (with Brand / Size), UOM, Qty Ordered, and Qty Received.
- Search filters across item number, description, PO, and vendor; a totals strip tallies POs, item lines, loading, and errors.
- Bounded fetching (per-PO timeout + batched fan-out) so a slow or unreachable PO can never wedge the page.
- Item numbers are pulled straight from
potran01per PO — the authoritative source for which items are on each truck.
PO Items Export Workbook
| PO # | Vendor | Item # | Description | UOM | Qty Ordered | Qty Received |
|---|---|---|---|---|---|---|
| (Sample data not shown) | ||||||
- •Frozen header + autofilter
Receiving (Grid)
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
| Rank | Receiver | Trucks | Avg Time | Total Time |
|---|---|---|---|---|
| (Sample data not shown) | ||||
Breakdown Timing
Measures how long each truck sits docked before a receiver starts on it — automatically, from Time Docked to the receiving start time. No manual entry and no crew names.
- Trucks with Time Docked set but no receiver yet show as active cards with a running "Awaiting receiver" timer.
- As soon as a receiver is assigned (or Start is marked on the Receiving grid), the breakdown time locks in and the truck moves to the Received section.
- The Received section shows Time Docked, Receiving Start, the receiver, and the breakdown duration in minutes.
- Two layout modes: Grid (default, card-based) and Timeline (chronological list).
Breakdown Times Export
| PO | Vendor | Dock | Receiver | Time Docked | Receiving Started | Breakdown (min) |
|---|---|---|---|---|---|---|
| (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_sessionsSupabase 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/sessionwhich 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.
Public Kiosks
No-login routes for the warehouse floor, drivers, sales, and customers
These pages deliberately skip GrecoOnlyGuard and never open a live ODBC socket from the browser. They are company-pinned at the API layer via NEXT_PUBLIC_GRECO_COMPANY_ID and read from Supabase snapshots, DockSheet session rows, or narrow public relay endpoints. When live Entrée data is needed, the Vercel server proxies to the dock bridge — the kiosk device never holds ODBC credentials.
DockSheet Live
/live/grecoRead-only mirror of Check-in + Receiving. Polls every 10s — no edit buttons.
Data: greco_cindyvue_sessions via /api/greco/session
Will Calls
/noeSnapshot-backed will-call queue. L.S. button queues silent print to the dock printer.
Data: shanetree_snapshots (willCalls) via /api/public/shanetree-latest
Print: will_call_print_requests → bridge autoprint window
Routes + Vendor Pickups
/adrianDispatcher kiosk for today's routes and vendor pickup schedule.
Data: shanetree_snapshots (routes, vendorPickups)
Hotshots + Samples
/salesSales-team day-of triage — hotshots, samples, and pickup routes. Mobile card layout, 3-min auto-refresh.
Data: willCalls snapshot filtered to hotshots/samples/pickupRoutes
Print: Same L.S. relay queue as /noe
Truck Progress
/timerDrivers search a PO# and see live receiving progress without logging in.
Data: DockSheet session list + per-PO /api/public/po-doc relay
Item Availability
/inboundSales floor kiosk: on-hand counts + inbound PO trucks with dock status cross-reference.
Data: /api/public/inbound-relay + scheduleOutlook snapshot + DockSheet session
Will-Call Scheduler
/windowCustomers request a will-call appointment slot — no login required.
Data: POST /api/public/window-appointments → will_call_appointments
Print relay pipeline (shared by /noe and /sales)
- Kiosk taps L.S. → POST
/api/public/will-call-print-requestinserts a row inwill_call_print_requests. - The dock PC's always-on Window autoprint Chrome tab (from
start-shanetree-autoprint.bat) polls the queue. - Bridge fetches Loading Sheet HTML locally, renders to PDF, and spools to
\\ILPRINT01\HPJL4345-LOADSHEET— identical to DockSheet Time-In autoprint.
Staff review will-call appointment requests on the authenticated companion page /windowadmin (documented under Greco Tools → Will-Call Windows).
Kiosk Promo Flyers
/flyerZero-auth printable one-pagers promoting /sales and /timer for the warehouse floor. Each section has its own print button for a clean letter page.
Controls
Greco admin command center at /controls
GrecoOnlyGuard restricts this page to the Greco organization. Founders and admins use it as the single place to configure what each team member sees. The permission model is opt-out: everyone sees everything by default until a manager removes a card, tool, or modal for that user. Founders and admins always have full access (shown locked in the matrix). RLS enforces all denials server-side regardless of the UI.
Dashboard Cards
Show or hide each overview card (Projects, Tools, Reports, etc.) per member.
Greco Tools
29 tool cards × members matrix — same registry as the dashboard Tools tab.
Window Access
27 Window modals at /entree — per-member show/hide.
Team Roles
Assign viewer, editor, or admin. Founders promote admins; admins cannot promote other admins.
Appearance
Dashboard title and background color for the whole Greco workspace.
Tab Visibility
Per-role visibility for dashboard tabs (Overview, Tools, Workspace, Reports).
Member Permissions
Founder-only granular legacy tool/setting rights matrix.
Implementation
- Source:
app/controls/ControlsClient.tsxwith seven section components underapp/controls/sections/. - Tool keys are stable
routevalues fromlib/greco/greco-tools.ts— adding a tool there auto-surfaces it in Controls. - Modal keys mirror the Window whitepaper tier list in
lib/shanetree/shanetree-whitepaper.ts. - Denials persist in Supabase permission tables; the dashboard and /entree read the same denied sets on every load.
Window
On-Prem Entrée Bridge & Operator Surface (legacy code: Shanetrée)
Window 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, /port, /noe, and /adrian consume Supabase snapshots instead. The full operator surface — 27 modals, auto-pull engine, Bridge Relay, Port AI briefing, StockVoo, and the 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 · whitepaper v1.1
Architecture
┌─ Vercel (Next.js) ──────────┐ ┌─ Dock PC (Node) ──────────┐ ┌─ Entrée Server ─────────┐
│ app/entree/EntreeClient.tsx │ │ entree-bridge.js │ │ Advantage Database │
│ · 27 modals / grids │◄────► │ · ODBC handle (r/o) │◄────► │ \\10.1.1.21:6262 │
│ · every print flow │ HTTP │ · silent-print stack │ ODBC │ pomast01, potran01, │
│ /api/entree/query (proxy) │ │ · autopull heartbeat │ │ arinvoi, arinvt01… │
└──────────────┬──────────────┘ └───────────────────────────┘ └─────────────────────────┘
│
▼
┌─ Supabase (FileDisplay) ───────┐
│ shanetree_snapshots │
│ shanetree_pull_log │
│ port_ai_summaries · port_summary_memory
│ greco_cindyvue_sessions │
│ return_diffs_snapshots │
│ bridge_relay_queue · will_call_print_requests
└─────────────────────────────────┘Five tiers, one rule: Entrée never streams to the internet. Vercel, /port, /noe, and /adrian only see Supabase snapshots. The bridge is the sole ODBC gate; hourly /api/cron/port-ai-summary regenerates the Port AI briefing from those snapshots.
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.
- 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?
- Blast radius. A read-only tool cannot corrupt live data. Rollback in the worst case is "don't open the modal today."
- 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
Window 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
Receiving[live]
greco_cindyvue_sessions · pomast01 · potran01
PO receiving burn-down for any saved DockSheet day. 30s auto-refresh while open on /entree; snapshot-backed on /port.
- Date picker lists every saved DockSheet 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).
Subs[entree-only]
arinvt01 · artrans/arytran · arinvt2.SUB1 · greco_cindyvue_sessions · pomast01/potran01
OOS items (ONHAND<=0) that still have demand for the chosen date (default tomorrow), each paired with its designated substitute(s) from arinvt2 (Misc 1-4). Cross-dock + customer/salesman/class filtered, ranked by demand. The multi-sheet xlsx export now includes a DockSheet subsheet that cross-references the prior day's DockSheet PO receipts (via bridge /po-doc QTYREC) to show which OOS items were received, how many, and whether that covers the next day's demand.
- OOS pool: STKCODE='Y', INACTIVE<>'Y', ONHAND<=0, intersected with artrans/arytran demand for the date (default tomorrow), ranked by demand desc.
- Each OOS item is paired with its designated substitute(s) from arinvt2 (Misc 1/2/3/4); cross-dock, customer-keyword, salesman TD/TB, and excluded-class filters apply.
- Export workbook: Summary · Subs (side-by-side OOS↔Sub) · Invoices · All · DockSheet · Invoices by OOS Item · Notes · per-reason exclusion sheets · Legend.
- DockSheet subsheet: pulls the prior day's DockSheet session POs and each PO's live /po-doc lines, totals QTYREC per OOS item, and flags whether receipts cover the next day's demand (bounded fetch so the export never hangs).
- /entree only — live ODBC.
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 (DockSheet, 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.
DockSheet[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 DockSheet).
- Per-session dockPrintedPos prevents double prints; multi-PO cells split on ,;|/\s+.
- /entree and dock DockSheet only — hidden on /port (no snapshot payload).
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/DockSheet 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.
Window code footprint
Tracked Window modules (EntreeClient, extracted panels, bridge, DockSheet, whitepaper libs, and supporting API routes). Totals refresh from scripts/refresh-whitepaper-footprint.mjs and scripts/refresh-platform-stats.mjs.
63,533
Total LOC
~3.4 MB
Source size
23
Files tracked
35,566
EntreeClient.tsx
| File | LOC | Size | Role |
|---|---|---|---|
| app/entree/EntreeClient.tsx | 35,566 | 2120.3 KB | The whole UI. Every modal, every table grid, every print flow. Hosts browser-side auto-pull effects and the Pull Log launcher. |
| entree-bridge.js | 10,227 | 450.3 KB | Local Node HTTP server on the dock PC. ODBC handle + silent-print + bridge-server willCalls heartbeat → /api/internal/shanetree-autopull. |
| app/tools/greco/CindyVueClient.tsx | 5,369 | 339.8 KB | DockSheet live dock-tracker client (shared with Window). |
| app/entree/DiamondReportPanel.tsx | 2,504 | 106.2 KB | Diamond Report nightly one-pager modal (extracted from EntreeClient). |
| app/entree/BridgeRelayPanel.tsx | 1,745 | 82.8 KB | /port Bridge Relay queue UI — submit ODBC jobs to the dock PC. |
| app/entree/StockVooPanel.tsx | 1,569 | 77.8 KB | StockVoo smart menu — inventory sub-classes, menu stations, substitutes, customer view. |
| app/tools/greco/lib/schedule-engine.ts | 1,186 | 48.7 KB | DockSheet xlsx → tracker-row engine + timing maths. |
| app/entree/PortAISummaryPanel.tsx | 916 | 38.6 KB | Summary (AI briefing) modal — /entree Pull All + Generate vs /port Regenerate. |
| app/entree/autoPullEngine.ts | 816 | 29.8 KB | Sequential pull → snapshot → publish chain; startup/daily chains and runAutoPullForModal. |
| app/entree/PullLogPanel.tsx | 718 | 30.3 KB | Full-screen Pull Log modal with live polling and per-modal tabs. |
| app/tools/greco/lib/excel-exports.ts | 539 | 21.8 KB | Printable xlsx / PDF exports for Greco reports. |
| app/api/entree/query/route.ts | 419 | 19.6 KB | Next.js → bridge proxy. Auth shim + report routing. |
| lib/shanetree/shanetree-whitepaper.ts | 353 | 37.9 KB | Whitepaper content, stats, and print HTML builder (Guide modal + /guide + PDF). |
| app/entree/useShanetreeSnapshot.ts | 294 | 10.3 KB | React hook for modal read/write/save-snapshot; emits Pull Log rows on manual refresh. |
| app/api/internal/shanetree-autopull/route.ts | 287 | 9.1 KB | Bearer-auth bridge write-through to shanetree_snapshots + shanetree_pull_log. |
| lib/supabase/shanetree-pull-log.ts | 284 | 10.3 KB | Supabase helpers for Pull Log insert/query. |
| components/ShanetreeWhitepaperSections.tsx | 237 | 10.8 KB | Shared React whitepaper body (§1–§6) for /entree Guide and /guide. |
| lib/shanetree/whitepaper-unified.ts | 210 | 8.4 KB | Unified Features list (modal catalog + deep-dive + /port). |
| lib/shanetree/shanetree-whitepaper-guide-embed.ts | 128 | 6.8 KB | Printable /guide HTML + longform §5 extractor. |
| app/api/greco/session/route.ts | 107 | 3.3 KB | DockSheet session persistence (Supabase upsert). |
| app/port/page.tsx | 30 | 1.0 KB | /port route — EntreeClient with portMode. |
| app/entree/page.tsx | 16 | 0.3 KB | /entree route shell + server-side bridge probe. |
| components/ShanetreeWhitepaperGuideSections.tsx | 13 | 0.4 KB | /guide interactive whitepaper wrapper. |
| Total tracked | 63,533 | ~3.4 MB | Window + 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 bearer-token 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. Unauthenticated public relays under /api/public/* serve snapshot kiosks (will-calls, routes, PO docs, driver chat, inbound relay). 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
Developer page (/developer)
Authenticated UI for API key and webhook management. Two tabs — API Keys and Webhooks — with tier badges (free, starter, pro, enterprise), usage meters, and per-key permissions (reports read/write, webhook manage). Keys come in Standard and AI Bundle types.
- Create, revoke, and inspect API keys with prefix + last-used timestamps
- Webhook CRUD with event filters, tool filters, and delivery log
- Test webhook button fires a signed sample payload
- Tier quotas: rate limits per minute/day, monthly usage, retention days
- Feature gates: webhooks, AI analysis, batch uploads, semantic search
- Deep link:
/developer?tab=webhooks
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 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, DockSheet 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();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.
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.
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.
Driver Chat
Public /timer lets drivers message the dock; /inbox is the Greco responder with live PO progress and optional AI auto-replies.
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.
Controls
Founders/admins configure per-member dashboard cards, Greco tools, Window modals, roles, appearance, and tab visibility at /controls.
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, 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.
Multiplayer-Enabled Pages
Activity Ledger
Unified history at /history
One chronological ledger for every action across the platform. lib/supabase/unified-history.ts merges four sources into a single newest-first stream rendered by HistoryLedger — no more stranded modal-specific timelines.
Team Activity
team_activity_log — reports, logins, chat, docs, and general platform events.
DockSheet Events
greco_cindyvue_sessions.history_log — per-day check-in and receiving actions (Greco only).
Window Print Log
shanetree_print_log — every PO, invoice, and loading-sheet print job.
Window Pull Log
shanetree_pull_log — ODBC pulls, snapshot saves, /port loads, and AI summaries.
Progressive loading
Starts with the latest 10 entries for a fast first paint, then load 100, 1,000, or all on demand. Deep links with ?highlight=<id> fetch everything up-front so the target row can scroll into view.
Filters: member, date range, and activity type. Query params ?member=, ?type=, and ?highlight= pre-populate the UI.
Excel export
Export the currently loaded (and filtered) ledger to .xlsx via lib/history/history-excel-export.ts. The embeddable <HistoryPanel> component reuses the same unified fetch for in-context timelines.
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.
Authentication
JWT-based secure login
Row Level Security
Database-enforced isolation
Company Boundaries
Automatic data partitioning
Role Permissions
Granular access control
Role Permissions
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
Admin command center
Cards, tools, modals, roles at /controls
Platform Pages
72 App Router pages — categorized inventory from lib/docs/platform-pages.ts
Every page.tsx under app/ is listed below by role. Greco warehouse tools and public kiosks pull from the same registries as the dashboard and this docs page so the inventory cannot drift.
Auth & Onboarding
6 routesSign-up, login, password reset, and post-signup confirmation.
Platform Hub
9 routesAuthenticated home surfaces — dashboard, account, members, and activity.
Greco Warehouse Tools
33 routes31 spreadsheet tools registered in lib/greco/greco-tools.ts.
Window & Bridge
3 routesLive Entrée ODBC bridge, Port mirror, and admin surfaces.
Public Kiosks & Promo
8 routesNo-login routes for floor phones, drivers, sales, and customers.
Collaboration
5 routesReal-time multiplayer surfaces — chat, docs, calendar, support.
Build & Developer
8 routesCustom tools, AI agent, IDE, and public API management.
Admin & Permissions
1 routesGreco-only command center for per-member visibility and roles.
Internal & Reference
1 routesLiving audits and reference pages — informational only.
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.
Platform Statistics
Live snapshot of the full platform (scanned 2026-07-10). TypeScript-first codebase with 120 Supabase tables across 150 migrations,72 Next.js pages, 146 API routes (37 in the public v1 sub-API). Includes the complete Greco operations suite (29 registered warehouse tools in four dashboard folders + DockSheet), Window (63,533 LOC across 23 tracked files · 27 modals on the 590+ table Entrée ODBC bridge with silent PO printing), AI analytics layer (14 tools, 47+ visualization types via Recharts/Nivo), and 118 shared library modules across 28 top-level lib/ packages. (256,634 real lines across 622 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
Window Modals
0
Window LOC (tracked)
0
Window Files (tracked)
Codebase Breakdown
TypeScript / TSX
0.0k
Lines across 0 files
Frontend Pages
72
React pages with routing
API Routes
146
Server-side endpoints (37 in public v1)
Library Modules
0
28 top-level packages · shared utilities
Database Tables
120
Across 150 SQL migrations
Git Commits
2,629
In the main branch history
npm Dependencies
0
36 prod + 8 dev
Window (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 (Window, 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.
Greco — Public kiosk print relay
/noe or /sales taps L.S. → will_call_print_requests → dock PC autoprint window claims the job → bridge renders Loading Sheet HTML to PDF → silent spool to the loadsheet printer. No ODBC leaves the LAN; the phone only talks to Vercel.
Greco — DockSheet → autoprint
/tools/greco uploads the PO schedule → parsed client-side by DockSheet → 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 responsive 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.
Greco — Port AI briefing
/port reads latest shanetree_snapshots (never live ODBC). The Summary tile calls /api/port/ai-summary; hourly /api/cron/port-ai-summary regenerates Gemini rollups with persistent operator notes from port_summary_memory.
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 (scanned 2026-07-10): 256,634 real source lines across 622 tracked files · 120 Supabase tables across 150 migrations · 72 Next.js pages · 146 API routes (37 in the public v1 sub-API) · 118 lib/ modules across 28 packages · the Window/Entrée bridge surface (tracked separately at ~64k LOC) exposes 88 curated tables (590+ total) read-only via ODBC. Supabase Row Level Security filters every query by company_id.