Hooked is an API-first lab for spinning up ultra-high performing hooks for TikTok, Reels, Shorts, and YouTube long form. The MVP ships a dark, neon-tinged dashboard plus REST endpoints Idolforge (or any other app) can call directly.
- Next.js 14 App Router + TypeScript
- Tailwind CSS for the cyber/creator UI
- Prisma + SQLite (easily portable to Postgres)
- NextAuth Credentials flow with bcrypt hashing
- OpenAI GPT-4o-mini integration (swap for any provider inside
lib/services/aiClient.ts) - SQLite doesn’t support native enums/JSON, so arrays/enums are stored as JSON strings in Prisma models and hydrated via helper utilities.
- Email/password auth (
/signup,/login) - Dashboard showing avatars + latest hooks
- Avatar builder with presets, tag inputs, and multi-platform focus selection
- Hook Lab that generates 10-hook stacks per platform, saves results, and exposes them via API
- Trend service abstraction with mocked data + LLM clustering (ready for real APIs)
- External
POST /api/hooks/generatefor Idolforge or other partners (API key based)
- Install deps (requires Node 18+):
npm install
- Copy env template:
cp .env.example .env
- Fill the env vars:
DATABASE_URL– e.g.file:./dev.dbfor local SQLiteNEXTAUTH_SECRET– any long random stringOPENAI_API_KEY– optional. Without it, mocked hooks are returnedHOOKED_API_KEY– secret token for external API access
- Prep the database:
(run
npx prisma migrate dev --name init
npx prisma generatewhenever the schema changes) - Start the dev server:
npm run dev
- Visit
http://localhost:3000/signupto create your first account.
- Internal (requires session cookie)
Responds with hooks persisted in Prisma. Each hook includes
{ "avatarProfileId": "cuid", "platforms": ["TIKTOK", "YOUTUBE_SHORT"], "workingTitle": "", "description": "", "goal": "go viral", "useTrends": true }text,styleTags,predictedScore,trendAlignment,rationale, timestamps, etc. - External (API key mode)
Responds with hook JSON but does not persist to the DB.
{ "apiKey": "HOOKED_API_KEY", "avatarProfile": { "name": "Neon Cherub", "type": "AI_INFLUENCER", "toneOfVoice": "dark, poetic, seductive", "niche": "futuristic afro-club music", "likes": ["latex fashion", "underground raves"], "personalityTraits": ["mysterious", "witty", "rebellious"], "primaryLanguage": "English", "secondaryLanguages": ["French"], "platformFocus": ["YOUTUBE_SHORT", "TIKTOK"] }, "contentIdea": { "platform": "TIKTOK", "workingTitle": "How I built my cyberpunk afro-rave sound", "description": "Breaking down my sound design for a new afro-futurist club track with distorted drums and alien vocals.", "goal": "go viral" }, "useTrends": true }
POST /api/auth/signup– create userGET /api/avatars/POST /api/avatarsGET /api/hooks– latest saved hooks for the authenticated userGET /api/content-ideas– last 20 ideas + avatars
lib/services/trendService.ts– drop in real YouTube/TikTok APIs later; today it mocks trending topics and uses an LLM to map angles.lib/services/hookGenerator.ts– core orchestrator pulling avatar/content/trend context, building the system prompt, parsing JSON, and saving output.lib/services/aiClient.ts– single integration point for swapping out the AI vendor.
- Integrate real trend APIs + georegional filters
- Rate limiting on
/api/hooks/generate - Advanced scoring models + historical performance feedback
- Multi-language hook output toggle
- Avatar collaboration & sharing between teams
This MVP doesn’t ship tests yet. Before production hardening, add e2e coverage (Playwright) plus integration tests for the hook generator mocks, along with ESLint/Prettier in CI.