Skip to content
reaatech

Files · Review Response Automator for Independent Restaurants

83 (1 binary, 581.9 kB total)attempt 1

README.md·3281 B·markdown
markdown
# Review Response Automator for Independent Restaurants
 
> Consistent, on-brand replies to every Yelp/Google/TripAdvisor review without staff effort.
 
A tutorialized reference solution from [reaatech.com](https://reaatech.com), demonstrating how to build production-grade AI systems with the `@reaatech/*` package family.
 
## Running locally
 
```bash
pnpm install
cp .env.example .env
pnpm dev
```
 
## Testing
 
```bash
pnpm typecheck          # TypeScript type checking
pnpm lint               # ESLint linting
pnpm test               # Vitest with coverage
```
 
## Project layout
 
```
app/                  Next.js App Router pages + API routes
src/                  services, lib, adapters
tests/                vitest suite (mirrors src/)
packages/             API references for every dependency (read these first)
DEV_PLAN.md           build plan for this recipe
```
 
## License
 
MIT — see [LICENSE](./LICENSE).
 
## Problem
 
The restaurant manager spends 30 minutes each morning scanning review sites, but replies are rushed, defensive, or forgotten entirely. Inconsistent tone frustrates guests and hurts the restaurant's online reputation. With thin margins and a skeleton crew, there's no dedicated marketing person to handle this. A single bad review left unanswered can snowball into lost reservations.
 
## Architecture
 
This recipe wires 6 REAA packages into a Next.js 16+ App Router application:
 
- **Vercel AI SDK** (`ai` + `@ai-sdk/openai`) — provider-agnostic LLM calls for sentiment analysis, response generation, and key-point extraction
- **`@reaatech/agent-memory`** — long-term memory layer storing restaurant context, customer preferences, and review history
- **`@reaatech/guardrail-chain`** — composable input/output guardrails ensuring brand-voice compliance and content safety
- **`@reaatech/agent-handoff`** — typed escalation to human managers for negative or low-confidence reviews
- **`@reaatech/a2a-reference-core/client/server`** — Agent-to-Agent protocol for agent discovery, task lifecycle, and inter-agent communication
- **Firecrawl** (`@mendable/firecrawl-js`) — review site scraping and structured data extraction
- **Langfuse** — LLM observability, tracing, and monitoring
 
## Prerequisites
 
- Node.js >= 22
- pnpm 10.x
- OpenAI API key (set as `OPENAI_API_KEY`)
- Firecrawl API key (set as `FIRECRAWL_API_KEY`)
- Langfuse account (set `LANGFUSE_PUBLIC_KEY`, `LANGFUSE_SECRET_KEY`, `LANGFUSE_BASE_URL`)
 
## API Reference
 
| Method | Path | Description |
|--------|------|-------------|
| POST | `/api/reviews` | Submit a review for processing |
| GET | `/api/reviews` | List reviews with pagination/filtering |
| GET | `/api/reviews/[id]` | Get a specific review and response status |
| GET | `/api/agent-card` | A2A agent discovery metadata |
| GET | `/api/health` | Health check |
 
## Package Manifest
 
| Package | Version |
|---------|---------|
| `@reaatech/a2a-reference-core` | 0.2.0 |
| `@reaatech/a2a-reference-client` | 0.1.1 |
| `@reaatech/a2a-reference-server` | 0.2.0 |
| `@reaatech/agent-handoff` | 0.1.0 |
| `@reaatech/agent-memory` | 0.1.0 |
| `@reaatech/guardrail-chain` | 0.1.0 |
| `ai` | 6.0.201 |
| `zod` | 4.4.3 |
| `langfuse` | 3.38.20 |
| `@mendable/firecrawl-js` | 4.25.3 |
| `@ai-sdk/openai` | 3.0.69 |