LOOP is an AI-powered customer feedback intelligence workspace for product, CX, and support teams. It ingests feedback, classifies sentiment and themes, visualizes trends, and helps teams answer real product questions from their own customer data.
LOOP helps teams turn raw customer feedback into signals they can act on:
- Ingest feedback from CSV or direct workspace flows
- Run AI classification for sentiment, themes, and issue summaries
- Manage feedback in a searchable inbox with RBAC
- View dashboard metrics and trend charts by channel and theme
- Generate saved reports for a time range and export them as PDF-friendly pages
- Ask plain-English questions grounded in the workspace evidence
The seed script creates demo users in a single workspace.
- Admin: admin@loop-demo.com
- Analyst: analyst@loop-demo.com
- Viewer: viewer@loop-demo.com
- Shared password: demo1234
- Next.js 16 App Router
- React 19
- Prisma ORM with PostgreSQL
- NextAuth credentials auth
- Anthropic Claude for structured classification
- Recharts for dashboard visualizations
- Tailwind CSS for styling
The application is organized around the Next.js app router:
app/— route handlers, pages, and UI componentslib/— shared domain logic, auth helpers, report generation, and Prisma wiringprisma/— schema and seed datapublic/— static assets
The core data model is centered around workspaces, users, feedback, themes, and saved reports:
Workspacegroups users and all feedback assetsUserhas a role:ADMIN,ANALYST, orVIEWERFeedbackstores the original customer message, channel, status, and sentiment metadataThemestores cluster labels for the workspaceFeedbackThemelinks feedback to clusters and confidence scoresReportstores a generated summary with JSON content for later viewing/export
The AI classification pipeline is intentionally layered:
- Feedback is entered through the inbox, import flow, or seed data.
- The app calls Claude with a workspace-specific theme list.
- Claude returns structured sentiment, theme names, and a short summary.
persistClassification()updates the feedback record and re-creates theme links.- Dashboard and trends views read the computed PostgreSQL data instead of generating synthetic metrics.
Security is enforced at both the UI and API layers:
- Authentication is handled by NextAuth credentials auth.
- Session data includes workspace and role metadata.
- Every protected API route calls
requireAuth()orrequireRole(). - Workspace-scoped Prisma queries enforce the tenant boundary.
- Node.js 20+
- PostgreSQL database
- Anthropic API key
npm installCopy the example file and fill in your values:
cp .env.example .envRequired variables:
DATABASE_URL="postgresql://user:password@host:5432/dbname"
NEXTAUTH_SECRET="your-secret-key"
NEXTAUTH_URL="http://localhost:3000"
AUTH_URL="http://localhost:3000"
ANTHROPIC_API_KEY="your-claude-api-key"npx prisma generatenpx prisma migrate dev --name initnpm run seednpm run devThen open:
The seed script creates a realistic demo workspace and example customer feedback records. It is designed to surface meaningful mixes of:
- negative support issues
- feature requests and product feedback
- positive adoption stories
- pricing and onboarding pain points
- trend and channel-level signal diversity
The seed is defined in:
prisma/seed.tslib/feedback-data.ts
It also creates demo users and workspace themes so the dashboard, filters, and RBAC flows are immediately usable.
npm run devnpm run buildnpm run startnpm run lintThe app includes a modern dark dashboard with product intelligence workflows. Example captures from the running app:
This app is ready to deploy to Vercel with the standard Next.js flow:
- Push the repository to GitHub.
- Import the repo in Vercel.
- Configure the environment variables from
.env.example. - Set the project root to the repository root.
- Deploy.
Recommended environment variables for production:
DATABASE_URL="postgresql://..."
NEXTAUTH_SECRET="secure-production-secret"
NEXTAUTH_URL="https://your-domain.com"
AUTH_URL="https://your-domain.com"
ANTHROPIC_API_KEY="..."- Use a managed PostgreSQL provider for the database.
- Keep
NEXTAUTH_SECRETlong and random. - Ensure app URLs match the deployed domain exactly.
- Run database migrations in production before the first user login.
- Sign in with a workspace account
- Review the overview metrics and weekly volume
- Browse feedback and filter by sentiment, channel, or theme
- Import CSV files for bulk ingestion
- Generate saved reports for executive sharing
- Read-only access to the workspace
- Browse feedback and dashboard summaries
- View report pages without editing permissions
This project is licensed under the MIT License. See the LICENSE file for details.



