Skip to content

arist0tl3/restaurant-analytics-ai

Repository files navigation

Restaurant Analytics AI

AI-powered analytics platform that generates comprehensive business insights for restaurants by analyzing reviews, menus, and competitive positioning.

🚧 Work in Progress

Currently in active development. Core functionality works, but not yet deployed for public use.

What It Does

Restaurant owners get a full business analytics report by simply providing their restaurant's URL. The system:

  1. Collects Reviews: Scrapes and aggregates customer reviews from multiple platforms
  2. Analyzes Menus: Extracts menu items, pricing, and categorization
  3. Generates Insights: Uses AI to identify trends, sentiment patterns, competitive positioning, and actionable recommendations
  4. Delivers HTML Reports: Clean, printable analytics reports (export to PDF in browser)

Think of it as a DIY version of what consulting firms charge thousands for - automated market research and business intelligence for restaurants.

The Problem

Small restaurant owners don't have access to the kind of data-driven insights that larger chains get from expensive analytics platforms. They're flying blind on customer sentiment, menu optimization, and competitive positioning.

Tech Stack

Architecture:

  • Monorepo with npm workspaces
  • Shared TypeScript types across frontend/backend
  • Clean separation of concerns

Backend:

  • Node.js + Express + TypeScript
  • MongoDB Atlas (data storage)
  • AI integration for analysis (LLM prompts via env config)
  • Stripe webhooks for payment processing
  • State machine for async job processing

Frontend:

  • Astro (fast, modern static site generator)
  • Server-side rendering for reports
  • Clean, printable HTML output

Deployment:

  • Backend: Heroku (single dyno, no extra services)
  • Database: MongoDB Atlas
  • Frontend: Vercel

Architecture Highlights

Status Pipeline:

pending → processing → reviews_collecting → reviews_collected → 
menu_urls_collecting → menu_urls_collected → menus_extracting → 
menus_extracted → data_collection_complete → completed → failed

Key Design Decisions:

  • Reports served as HTML (not stored as files) - generates on demand
  • Idempotent job runner (Stripe webhooks + redirects hit same endpoint)
  • In-process coordinator (no separate job queue service needed)
  • External API keys/prompts configured via env vars only

Current Status

Working:

  • Review collection from multiple sources
  • Menu extraction and analysis
  • AI-powered insight generation
  • Report generation pipeline
  • Payment processing via Stripe

🚧 In Progress:

  • UI polish and error handling
  • Deployment configuration
  • Performance optimization for large datasets

📋 TODO:

  • Public beta launch
  • Additional data sources
  • Competitive analysis features
  • Multi-location support

Local Development

# Ensure MongoDB is running locally or via Atlas
# Copy env templates
cp packages/backend/.env.example packages/backend/.env
cp packages/frontend/.env.example packages/frontend/.env

# Install dependencies
npm install

# Run both frontend and backend
npm run dev

Why I'm Building This

Two reasons:

  1. Problem validation: I love food and have friends who run restaurants. They're consistently surprised by insights hidden in their own review data.

  2. Technical exploration: Wanted to build something real with AI that generates actual business value, not just a chatbot demo. This combines web scraping, data pipeline orchestration, LLM integration, and product design.

What I'm Learning

  • Building robust web scraping that handles rate limits and varied site structures
  • Designing state machines for complex async workflows
  • Prompt engineering for consistent, actionable business insights
  • Balancing AI capabilities with practical product constraints
  • Monorepo architecture for shared type safety

Built by @arist0tl3

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors