Inspiration

Small and medium businesses in India often rely on spreadsheets or fragmented tools to manage inventory, orders, and suppliers. We wanted to build a unified, intelligent platform that brings real-time data visibility and AI-generated business strategy to any SMB — without needing a dedicated data analyst.

What it does

AnalyzeUp is a multi-tenant inventory management and business intelligence dashboard. It lets businesses:

  • Track products, stock levels, categories, and SKUs in real time
  • Manage suppliers and raise purchase orders
  • Record and visualize sales and purchase transactions via dynamic charts
  • Get AI-powered low-stock alerts — AI analyzes average daily sales and supplier lead time to predict stockout risk and recommend reorder quantities
  • Generate a full AI business strategy — summarized recommendations, risk factors, and expected outcomes based on live sales and product data
  • Export reports and visualize data with an interactive data visualizer

How we built it

  • Frontend: Next.js 15 (App Router, Turbopack), React 18, TypeScript, Tailwind CSS, shadcn/ui (Radix UI primitives), Recharts for data visualization, Framer Motion for animations
  • AI Layer: OpenAI — two server-side AI flows: AI StockAdvisorFlow for per-product reorder intelligence and Business StrategyFlow for holistic growth strategy generation. All AI I/O is validated with Zod schemas.
  • Backend / Database: Firebase Firestore (real-time NoSQL), Firebase Authentication, multi-tenant architecture with tenantId scoping across all collections
  • Forms & Validation: React Hook Form + Zod for type-safe, validated forms throughout the app
  • PDF Export: jsPDF + html2canvas for report generation
  • CSV Parsing: PapaParse for data import flows

Challenges we ran into

  • Building a robust multi-tenant data architecture in Firestore — every entity (Product, Supplier, Order, Transaction) is scoped by tenantId, ensuring complete data isolation between businesses
  • Structuring Genkit AI flows with strict Zod input/output schemas so Gemini always returns structured, parseable JSON rather than free-form text
  • Managing real-time Firestore listeners efficiently in React without stale data or memory leaks, using custom hooks (use-collection, use-doc)
  • Handling Firebase initialization safely in Next.js SSR/client boundaries using a ClientOnly wrapper and provider pattern

Accomplishments that we're proud of

  • Two fully functional, production-ready AI flows using Google Genkit and Gemini 1.5 Flash with Zod-validated structured output
  • A complete multi-tenant SaaS architecture on Firebase — sign up, and your data is fully isolated from other tenants
  • End-to-end type safety from Firestore documents → Zod schemas → React components → AI prompts
  • A polished, responsive dashboard UI with dark mode support, animated hero section, and smooth UX built with shadcn/ui + Framer Motion

What we learned

  • How to architect Genkit AI flows with structured prompts and Zod schema enforcement for reliable AI output in production
  • Deep understanding of multi-tenant Firestore design patterns — collection scoping, security rules considerations, and tenant-aware queries
  • How to integrate Next.js 15 App Router server actions with Genkit flows ('use server' AI functions called from client components)
  • Managing complex real-time state across a large dashboard without global state libraries by using React Context + custom Firebase hooks

What's next for AnalyzeUp

  • Role-based access control (admin, staff, viewer) within each tenant
  • Demand forecasting with historical transaction data using more advanced Gemini prompts
  • WhatsApp / email alerts for low-stock notifications
  • Integration with Indian GST billing and invoice generation
  • Mobile app via React Native with the same Firebase backend

Built With

  • date-fns
  • firebase-(firestore-+-authentication)
  • framer-motion
  • gemini-1.5-flash
  • google-genkit
  • html2canvas
  • jspdf
  • lucide
  • next.js-15
  • openai
  • papaparse
  • radix-ui
  • react-18
  • react-hook-form
  • recharts
  • shadcn/ui
  • tailwind-css
  • typescript
  • zod
Share this project:

Updates