# PromptScale Blueprint // Typeform & Tally Clone
> Conversational Form & Survey Engine with dynamic JSON schemas, logic branching jumps, and keyboard-first navigation.

---

## ⚡ Quickstart: Run Locally in Under 2 Minutes

### 1. Prerequisites
- **Node.js:** `v18.x` or higher
- **Database:** PostgreSQL (Docker or Supabase)

### 2. Clone & Install
```bash
git clone https://github.com/your-username/typeform-clone-promptscale.git
cd typeform-clone-promptscale

pnpm install
```

### 3. Environment Setup
```bash
cp .env.example .env.local
```
Add your database URL:
```env
DATABASE_URL="postgresql://postgres:password@localhost:5432/forms_db"
NEXT_PUBLIC_APP_URL="http://localhost:3000"
```

### 4. Push Migrations & Seed Demo Form
```bash
pnpm run db:push
pnpm run db:seed
```

### 5. Launch Development Server
```bash
pnpm run dev
```
Open [http://localhost:3000/form/demo-customer-survey](http://localhost:3000/form/demo-customer-survey) to test conversational flow.

---

## 🧪 Testing & Logic Jump Verification

```bash
# Run unit tests on logic branching evaluator
pnpm test

# Run Playwright keyboard-navigation suite
pnpm run test:e2e
```

---

## 🤖 Feeding This Blueprint to Your AI Coding Agent

1. Open **Cursor / Claude Code / Windsurf**.
2. Paste the contents of `typeform-logic-forms.plan.md`.
3. Kickoff prompt:
   > *"I have attached PromptScale's Typeform Clone blueprint. We are in Strict Planning Mode. Verify the JSON schema structure and keyboard state machine, ask up to 3 clarifying questions, and then proceed with Phase 1."*
