Skip to content

upneja/grip

Repository files navigation

GRIP — Guest Review Intelligence Platform

AI-powered review management for hotels. GRIP ingests guest reviews, runs multi-dimensional sentiment analysis via Claude, auto-generates on-brand management responses, and surfaces cross-property operational insights — replacing manual review workflows with a structured, auditable pipeline.

Live demo: grip-blush.vercel.app

Try the demo

Log in at grip-blush.vercel.app with the seeded admin account:

Email Password
demo@grip.ai demo1234

The demo organization comes pre-seeded with multiple properties, analyzed reviews, brand voice profiles, and root cause insights.


Features

Area What it does
AI Analysis Sentiment scoring (-1→1), aspect extraction (cleanliness, service, F&B, etc.), entity recognition, urgency triage (IMMEDIATE / MONITOR / INFORMATIONAL), multilingual detection
AI Response Generation Personalized management responses using Claude Sonnet, shaped by configurable brand voice profiles
Brand Voice Profiles Per-property tone, personality, greeting/closing styles, do/don't phrase lists, example responses, and contextual property highlights
Bulk Approve Review and approve multiple AI-drafted responses in one pass from the property page
Tone Override Per-response tone dropdown to override the default brand voice at review time
Root Cause Analysis Cross-review pattern detection that groups recurring issues, estimates frequency and revenue impact, and tracks resolution status
Portfolio Dashboard Sentiment trends, response rate metrics, aspect radar charts, and review timelines across all properties
Multi-tenant RBAC Organization-scoped data with four roles: Admin, Portfolio Manager, Property Manager, Responder
Audit Log Every action (generate, approve, publish, edit) is recorded per user

Tech Stack

Layer Technology
Framework Next.js 14 (App Router, Server Components)
Language TypeScript 5 (strict)
Database Turso (libsql) in production · SQLite locally
ORM Prisma 7
AI Claude Sonnet 4 via @anthropic-ai/sdk
Auth NextAuth.js v4 (credentials + session)
UI Radix UI primitives + Tailwind CSS
Charts Recharts
Testing Jest + Testing Library — 317 tests across 13 suites
Deployment Vercel

Architecture

Review ingestion
    │
    ▼
AI Analysis (Claude)         ← sentiment · aspects · entities · urgency
    │
    ▼
AI Response Draft (Claude)   ← brand voice profile resolved per property → org → fallback
    │
    ▼
Staff review + approve       ← bulk approve, tone override, edit distance tracked
    │
    ▼
Publish                      ← audit logged, response metrics updated
    │
    ▼
Root Cause Analysis (Claude) ← cross-review patterns, severity, revenue impact estimate

Project layout

src/
├── app/
│   ├── (auth)/login/            # Login page
│   ├── (dashboard)/             # Main application
│   │   ├── page.tsx             # Portfolio dashboard: metrics + timeline
│   │   ├── reviews/             # Review list + detail pages
│   │   ├── properties/          # Property pages with bulk approve
│   │   ├── intelligence/        # Sentiment trends, aspects, root causes
│   │   └── settings/            # Brand voice, users, properties
│   └── api/                     # REST API routes
│       ├── analytics/           # Portfolio summary, sentiment trends, aspects
│       ├── reviews/             # Review CRUD · analyze · generate · approve
│       ├── properties/          # Property CRUD · batch-generate · bulk-approve
│       ├── insights/            # Root cause analysis
│       └── voice-profiles/      # Brand voice CRUD
├── components/
│   ├── ui/                      # Radix-based primitives
│   ├── dashboard/               # MetricCard, PropertyCard, TimelineChart
│   ├── reviews/                 # ReviewCard, ResponseEditor, SentimentBadge
│   ├── intelligence/            # AspectRadar, SentimentChart, TrendLine
│   └── settings/                # BrandVoiceEditor, PropertyForm
├── lib/
│   ├── ai/                      # Claude integration (analyze, generate, root-cause)
│   ├── prisma.ts                # Database client (Turso prod / SQLite local)
│   ├── auth.ts                  # NextAuth config
│   ├── constants.ts             # Aspect categories, entity types, model IDs
│   └── voice-profile-resolver.ts
└── __tests__/                   # Jest tests (API, AI modules, components)

prisma/
├── schema.prisma                # Full data model
└── seed.ts                      # Demo data seeder

Running locally

Prerequisites

Setup

# 1. Install dependencies
npm install

# 2. Configure environment
cp .env.example .env
# Set ANTHROPIC_API_KEY and NEXTAUTH_SECRET in .env

# 3. Generate Prisma client
npm run db:generate

# 4. Seed demo data (properties, reviews, users, brand voices)
npm run db:seed

# 5. Start the dev server
npm run dev

Open http://localhost:3000 and log in with the seeded credentials.

Environment variables

Variable Required Description
DATABASE_URL Yes (local) SQLite path — file:./prisma/dev.db
TURSO_DATABASE_URL Yes (prod) Turso database URL
TURSO_AUTH_TOKEN Yes (prod) Turso auth token
NEXTAUTH_SECRET Yes Random secret for session encryption
NEXTAUTH_URL Yes App URL — http://localhost:3000 locally
ANTHROPIC_API_KEY Yes Claude API key for all AI features

Scripts

npm run dev               # Development server
npm run build             # Production build
npm test                  # Run all tests
npm run test:coverage     # Tests with coverage report
npm run db:seed           # Seed demo data
npm run db:studio         # Open Prisma Studio
npm run db:migrate        # Run database migrations

Deployment

Deployed on Vercel with Turso as the production database. Set the production environment variables in your Vercel project settings, then:

vercel --prod

About

GRIP — Guest Review Intelligence Platform

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors