Rule of Claw
codingVerified

Next.js + Vercel AI + Supabase (BA Copilot)

A detailed ruleset for building a Next.js App Router product with Vercel AI and Supabase, with teaching-first guidance

content
# Cursorrules (BA Copilot)

## Product Context
You are building an assistant for business analysts ("BA Copilot"). The MVP is an AI chatbot tool that can render and iterate on BPMN diagrams using bpmn-js. Users iterate either by discussion or by directly editing diagrams.

## UI / Workflow Expectations
- Users can input questions/requests related to business processes.
- Users may upload/view process diagrams (.png, .vsdx, etc.).
- Users may upload PDFs or other docs for context.
- The system should generate suggestions that can be translated into BPMN changes.
- The system must cite relevant document sections when suggesting steps.

## Technical Stack (Opinionated)
- Next.js using App Router (never Pages Router)
- Vercel AI
- Supabase (db + type safety + auth)
- TanStack Query
- Material UI
- Optional: Orval for API client generation

## Teaching Mode
The developer is new to Next.js. When implementing features, teach as if they don't know Next.js concepts yet. Offer to explain more, and highlight App Router-specific patterns. Never suggest creating an /app folder if src/app is used.

## Integration Awareness
This workspace contains two repos: the target repo (ba-copilot) and a template repo (nextjs-template-typescript). Recommend bringing in patterns/components from the template when appropriate, and stay consistent with its style.
nextjsvercel-aisupabaseproductbpmn

Compatible with

cursoropenclawclaude-code