"Attack the market. Armor the business."
The Playbook is a premium AI-powered positioning intelligence platform that analyzes your business copy from both offensive and defensive perspectives. Think of it as having an elite coaching staff that gives you the plays they don't teach โ and the defense they can't break.
The Playbook analyzes your positioning copy (websites, sales pages, pitch decks, etc.) through 8 specialized AI lenses โ 4 offensive and 4 defensive โ giving you:
- Core belief extraction from your copy
- Offensive analysis to find market attack opportunities
- Defensive analysis to identify vulnerabilities before competitors do
- Phoenix Fortress combined analysis for total market dominance
It's like having a $50,000 strategic consultant available 24/7.
"Rise. Strike. Dominate."
The Unstoppable Force. Finds opportunities others miss and turns your positioning into a weapon.
"Stand. Shield. Survive."
The Immovable Object. Protects your position from every angle of attack.
"Total. Market. Dominance."
When the Unstoppable Force meets the Immovable Object. Complete strategic command.
- โ AI-Powered Belief Extraction โ Distills your copy into 5-7 core positioning beliefs
- โ 8 Strategic Lenses โ 4 offensive + 4 defensive perspectives
- โ Clarity Scoring โ 0-100 score with actionable feedback
- โ Phoenix Fortress Analysis โ Premium combined offense + defense report
- โ Document Management โ Upload, organize, and re-analyze your copy
- โ First-Run Setup Wizard โ Guided initial configuration
- โ Tiered Access Control โ Rookie โ Starter โ MVP
- โ Session-Based Auth โ Secure cookie-based authentication
- โ Usage Tracking โ Analytics for feature usage
- โ Responsive UI โ Works on desktop and mobile
| Lens | Role | Bias |
|---|---|---|
| ๐ฅ The Market Disruptor | Finds blue ocean opportunities | "If you're not zigging while they zag, you're invisible." |
| ๐ฏ The Closer | Identifies conversion killers | "Every word either sells or stalls. There is no neutral." |
| ๐ The Viral Architect | Evaluates shareability & growth | "If they can't explain you in 10 seconds, they won't." |
| ๐ The Premium Positioner | Audits pricing psychology | "Cheap is a strategy. Expensive is a strategy. Confused is a disaster." |
| Lens | Role | Bias |
|---|---|---|
| ๐คจ The Skeptical Prospect | Hunts for trust gaps | "Prove it or lose it. I've been burned before." |
| ๐ต๏ธ The Competitor's Strategist | Finds attack vectors | "I see your flank. Trust me, they see it too." |
| โ ๏ธ The Risk Auditor | Spots compliance & legal risks | "What can go wrong, will go wrong. Let's find it first." |
| ๐ฎ The Churn Prophet | Predicts retention risks | "Winning the deal means nothing if you lose the client in 90 days." |
| Tier | Price | Documents/Mo | Offensive Lenses | Defensive Lenses | Phoenix Fortress |
|---|---|---|---|---|---|
| ๐ฑ Rookie | Free | 3 | 1 (Disruptor) | 1 (Skeptic) | โ |
| โญ Starter | $79/mo | 50 | All 4 | All 4 | โ |
| ๐ MVP | $199/mo | 500 | All 4 | All 4 | โ + Team |
- Runtime: Deno (Val Town)
- Framework: Hono 4.4
- Database: SQLite (libSQL)
- AI: OpenAI GPT-4o
- Frontend: React 18 (CDN + Babel)
- Styling: CSS-in-JS (generated)
/playbook
โโโ index.ts # Main entry point & Hono server
โโโ config.ts # App constants, mascots, tiers, lenses
โโโ types.ts # TypeScript interfaces & type guards
โโโ database.ts # SQLite schema, migrations, CRUD operations
โโโ auth.ts # Authentication service & middleware
โโโ engine.ts # AI analysis engine (OpenAI integration)
โโโ api.ts # REST API route handlers
โโโ setup.ts # First-run setup wizard
โโโ utils.ts # Helper utilities
โโโ ui/
โโโ pages.ts # HTML page generators
โโโ styles.ts # CSS stylesheet generator
- Val Town account (or Deno runtime)
- OpenAI API key (configured in Val Town)
-
Clone/Import the project into Val Town
-
Run the application โ On first run, you'll see the Setup Wizard
-
Complete Setup:
- Enter your admin email
- Optionally add your name and company
- Accept terms and initialize
-
Start Analyzing:
- Upload your first document (website copy, sales page, etc.)
- View extracted positioning beliefs
- Run offensive and defensive analyses
- Get actionable recommendations
The following should be configured in Val Town:
| Variable | Description |
|---|---|
OPENAI_API_KEY | Your OpenAI API key (auto-configured in Val Town) |
Authenticate or create a user by email.
// Request { "email": "coach@company.com", "name": "Coach Johnson" } // Response { "success": true, "message": "Welcome to The Playbook", "user": {...} }
End the current session.
Get the current authenticated user.
List all documents for the authenticated user.
Upload and analyze a new document.
// Request { "title": "Homepage V2", "text": "Your positioning copy here..." } // Response { "success": true, "document": {...}, "beliefs": [...], "score": 75 }
Get a specific document.
Delete a document and all analyses.
Get extracted beliefs for a document.
Get all analyses run on a document.
Run an offensive (Phoenix) analysis.
// Request { "documentId": "doc_xxx", "lensId": "MarketDisruptor" } // Response { "success": true, "lens": { "id": "MarketDisruptor", "name": "The Market Disruptor", ... }, "mascot": { "name": "The Phoenix", ... }, "analysis": { "score": 72, "strengths": [...], "gaps": [...], "plays": [...], "summary": "..." } }
Run a defensive (Fortress) analysis.
// Request { "documentId": "doc_xxx", "lensId": "SkepticalProspect" } // Response { "success": true, "lens": { "id": "SkepticalProspect", ... }, "mascot": { "name": "The Fortress", ... }, "analysis": { "score": 68, "protected": [...], "exposed": [...], "fortifications": [...], "summary": "..." } }
Run a combined Phoenix Fortress analysis (Starter+ only).
// Request { "documentId": "doc_xxx" } // Response { "success": true, "mascot": { "name": "Phoenix Fortress", ... }, "analysis": { "offensiveScore": 74, "defensiveScore": 68, "combinedScore": 71, "executiveSummary": "...", "topPlays": [...], "criticalFortifications": [...], "ultimateStrategy": "The cheat code..." } }
Get available subscription tiers.
Upgrade to a new tier.
// Request { "tier": "tier_starter" } // Response { "success": true, "message": "Welcome to Starter!", "user": {...} }
Get all lenses with access status for the current user.
Get mascot information.
Health check endpoint.
- "Attack the market. Armor the business." โ Primary
- "Every angle. Every outcome. Every advantage." โ Comprehensive
- "The plays they don't teach. The defense they can't break." โ Insider knowledge
- "Win the deal. Survive the scrutiny." โ Outcomes
- "Tribal knowledge, weaponized." โ Expert edge
| Element | Color | Hex |
|---|---|---|
| Phoenix (Offense) | Amber/Orange | #f59e0b |
| Fortress (Defense) | Sky Blue | #0ea5e9 |
| Combined/Legendary | Purple | #a855f7 |
| Success | Emerald | #10b981 |
| Error | Rose | #f43f5e |
- Confident โ We know what we're talking about
- Direct โ No fluff, no filler
- Strategic โ Always thinking three moves ahead
- Empowering โ We're here to help you win
# Install Deno curl -fsSL https://deno.land/install.sh | sh # Run the application deno run --allow-net --allow-env index.ts
If you need to reset the database during development:
import { resetDatabase } from "./database.ts";
await resetDatabase(); // WARNING: Deletes all data
- Add the lens definition to
config.ts:
// In OFFENSIVE_LENSES or DEFENSIVE_LENSES
{
id: "NewLensId",
name: "The New Lens",
emoji: "๐",
squad: "phoenix", // or "fortress"
description: "What this lens does.",
bias: "The lens's perspective quote.",
focus: ["Focus area 1", "Focus area 2", ...],
requiredTier: "tier_starter",
}
- The engine will automatically pick it up โ no other changes needed!
| Table | Purpose |
|---|---|
users | User accounts |
sessions | Authentication sessions |
documents | Uploaded positioning copy |
analyses | Individual lens analyses |
playbook_reports | Combined Phoenix Fortress reports |
system_config | App configuration (setup status, etc.) |
usage_logs | Analytics and usage tracking |
- Users โ Documents (1:many)
- Documents โ Analyses (1:many)
- Users โ Playbook Reports (1:many)
- Session-based auth with HTTP-only cookies
- User-scoped data โ users can only access their own documents
- Input validation with Zod schemas
- SQL injection protection via parameterized queries
- XSS protection via HTML entity escaping
- Add rate limiting
- Implement proper payment processing (Stripe)
- Add email verification
- Enable HTTPS only
- Add audit logging
- Implement backup strategy
- PDF export of analyses
- Document comparison tool
- Analysis history timeline
- Team collaboration features
- Custom lens creation
- Industry-specific lens packs
- API access for integrations
- White-label reporting
- Real-time collaborative editing
- Competitor tracking
- A/B test recommendations
- Automated improvement suggestions
We welcome contributions! Please:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- Use TypeScript strict mode
- Document all functions with JSDoc
- Follow existing naming conventions
- Write meaningful commit messages
MIT License โ see LICENSE for details.
- OpenAI for GPT-4o
- Val Town for the hosting platform
- Hono for the lightweight framework
- The positioning strategists who inspired the lens philosophies
Built with ๐ฅ and ๐ฐ by The Playbook Team
"Attack the market. Armor the business."
Get Started ยท API Docs ยท Report Bug ยท Request Feature