MarketFlow Platform
Full-stack marketplace decision platform helping product teams analyze demand, diagnose cancellations, and simulate operational changes with Gemini AI.
Web Platform & Mobile Interface



Black-Box Metric Drops
Standard dashboards show conversion dropped, but can't explain if rider shortages, kitchen delays, or pricing caused it.
Gemini inspects underlying PostgreSQL transaction records to identify exact root causes.
Fragmented Data Silos
Buyer conversion, restaurant capacity, and rider ETAs live in disconnected systems with no cross-correlation.
Unified overview synchronizing demand, supply, and fulfillment in real time.
Blind Operational Changes
Testing delivery fee tweaks or promotions in production risks margin collapse without prior impact modeling.
What-If Simulator forecasting contribution margin and order volume before rolling changes live.
| Considered Feature | Why We Rejected It (Ifs & Buts) | What We Shipped Instead |
|---|---|---|
Unconstrained Chatbot | Open-ended LLM chats hallucinate numbers and give non-reproducible answers that cannot be trusted in decisions. | Schema-grounded prompts where Gemini queries verified PostgreSQL records directly. |
Static CSV Dumps | Raw spreadsheets detach data from operational context and require manual formulas. | Interactive What-If simulation engine & marketplace equilibrium tree. |
Client-Side Heavy Aggregations | Running complex calculations in the browser causes memory lag and crashes. | Server-side optimized PostgreSQL indexing with Prisma aggregations. |
Aggressive 1-Second Polling | Exhausts database connection limits and wastes serverless compute. | Event-driven revalidation with cached summary views and on-demand AI deep analysis. |
Open-ended LLM chats hallucinate numbers and give non-reproducible answers that cannot be trusted in decisions.
Schema-grounded prompts where Gemini queries verified PostgreSQL records directly.
Raw spreadsheets detach data from operational context and require manual formulas.
Interactive What-If simulation engine & marketplace equilibrium tree.
Running complex calculations in the browser causes memory lag and crashes.
Server-side optimized PostgreSQL indexing with Prisma aggregations.
Exhausts database connection limits and wastes serverless compute.
Event-driven revalidation with cached summary views and on-demand AI deep analysis.
Architectural Trade-offs
Schema-grounded SQL retrieval for Gemini instead of unconstrained LLM chat
Why: Prevents AI hallucinations on critical financial metrics (GMV, cancellation rate) by feeding strictly verified PostgreSQL aggregates into prompt context.
Trade-off: Demanded rigid API route schemas with deterministic Zod validation.
Server-side Prisma aggregations over client-side data crunching
Why: Delivering real-time overview health across 500,000+ orders requires zero-lag database-level indexing to prevent browser memory exhaustion.
Trade-off: Required custom PostgreSQL index tuning on composite order timestamp and city partition columns.