{"id":31818811,"url":"https://github.com/jbwashington/will-pre-launch","last_synced_at":"2026-04-15T05:32:25.846Z","repository":{"id":318708806,"uuid":"1073361865","full_name":"jbwashington/will-pre-launch","owner":"jbwashington","description":"Viral waitlist platform for Will's Exotic Snacks - NYC's hottest exotic snack delivery service. Built with Next.js 15, Supabase, and Claude AI.","archived":false,"fork":false,"pushed_at":"2025-10-11T18:37:32.000Z","size":2111,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-10-17T05:55:09.410Z","etag":null,"topics":["ai-content-generation","bun","claude-ai","exotic-snacks","nextjs","nyc","referral-system","supabase","viral-marketing","waitlist"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jbwashington.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-10-10T02:14:31.000Z","updated_at":"2025-10-11T18:37:36.000Z","dependencies_parsed_at":"2025-10-10T05:03:25.891Z","dependency_job_id":"c51f4f82-4450-465f-b22d-bdee1195ccd8","html_url":"https://github.com/jbwashington/will-pre-launch","commit_stats":null,"previous_names":["jbwashington/will-pre-launch"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jbwashington/will-pre-launch","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jbwashington%2Fwill-pre-launch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jbwashington%2Fwill-pre-launch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jbwashington%2Fwill-pre-launch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jbwashington%2Fwill-pre-launch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jbwashington","download_url":"https://codeload.github.com/jbwashington/will-pre-launch/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jbwashington%2Fwill-pre-launch/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31828531,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-14T18:05:02.291Z","status":"online","status_checked_at":"2026-04-15T02:00:06.175Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai-content-generation","bun","claude-ai","exotic-snacks","nextjs","nyc","referral-system","supabase","viral-marketing","waitlist"],"created_at":"2025-10-11T11:17:58.732Z","updated_at":"2026-04-15T05:32:25.816Z","avatar_url":"https://github.com/jbwashington.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Will the Barber's Exotic Snacks - Pre-Launch Platform\n\n[![Next.js](https://img.shields.io/badge/Next.js-15-black)](https://nextjs.org/)\n[![TypeScript](https://img.shields.io/badge/TypeScript-5-blue)](https://www.typescriptlang.org/)\n[![Cloudflare](https://img.shields.io/badge/Cloudflare-D1-orange)](https://developers.cloudflare.com/d1/)\n[![Claude AI](https://img.shields.io/badge/Claude-3.5_Sonnet-purple)](https://anthropic.com/)\n[![Bun](https://img.shields.io/badge/Bun-1.2-black)](https://bun.sh/)\n\nA comprehensive pre-launch marketing waitlist platform for Will the Barber's Exotic Snacks - a NYC-based exotic snack delivery service. The platform combines viral growth mechanics with AI-powered content generation to build brand recognition and online presence before launch.\n\n**Live Deployment**: https://aab66917.will-exotic-snacks.pages.dev\n\n## Features\n\n### Viral Waitlist System\n- Email-based signup with automatic position tracking\n- Referral code generation for each signup\n- Social sharing via Twitter, Facebook, and WhatsApp\n- Position advancement through referrals\n- Confetti celebration on successful signup\n\n### AI Content Generation Dashboard\n- Platform-specific content for TikTok, YouTube, Instagram, and Commercials\n- Trending keyword integration\n- Multiple tone options (energetic, chill, funny, professional)\n- Content length customization\n- Content history and analytics viewer\n\n### Analytics \u0026 Tracking\n- Event-based analytics system\n- Waitlist growth tracking\n- Content generation metrics\n- User engagement monitoring\n\n## Tech Stack\n\n### Core Framework\n- **Next.js 15** with App Router, Turbopack, and React 19\n- **TypeScript 5** for type safety\n- **Bun 1.2.17** as package manager\n\n### Database \u0026 Deployment\n- **Cloudflare D1** (SQLite) for edge-native database\n- **Cloudflare Pages** for edge deployment\n- **Cloudflare Workers** for edge runtime API routes\n\n### AI \u0026 Content Generation\n- **Anthropic Claude 3.5 Sonnet** for social media content generation\n- **Claude SDK** integrated for automated content creation\n\n### UI \u0026 Styling\n- **Tailwind CSS 4** for styling\n- **Framer Motion** for animations\n- **shadcn/ui** components with Radix UI primitives\n- **Lucide React** for icons\n\n### State Management\n- **Zustand** for client-side state management\n\n## Getting Started\n\n### Prerequisites\n\n- Bun 1.0+ (or Node.js 18+)\n- Cloudflare account with Pages and D1 access\n- Anthropic API key\n- Wrangler CLI (Cloudflare's development tool)\n\n### Installation\n\n1. Clone the repository:\n```bash\ngit clone https://github.com/jbwashington/will-pre-launch.git\ncd will-pre-launch\n```\n\n2. Install dependencies:\n```bash\nbun install\n```\n\n3. Install Wrangler CLI globally:\n```bash\nbun install -g wrangler\n```\n\n4. Set up environment variables:\n```bash\ncp .env.example .env.local\n```\n\nEdit `.env.local` and add your Anthropic API key:\n```env\nANTHROPIC_API_KEY=your_anthropic_api_key\n```\n\n### Cloudflare D1 Database Setup\n\n1. Log in to Cloudflare:\n```bash\nwrangler login\n```\n\n2. Create a D1 database:\n```bash\nwrangler d1 create will-exotic-snacks-db\n```\n\n3. Update `wrangler.toml` with your database ID from the output above.\n\n4. Run the database migrations:\n```bash\nwrangler d1 execute will-exotic-snacks-db --file=./migrations/0001_initial_schema.sql\n```\n\n### Local Development\n\nRun the development server:\n\n```bash\nbun run dev\n```\n\nOpen [http://localhost:3000](http://localhost:3000) to see the app.\n\nTo test with D1 database locally:\n\n```bash\nwrangler pages dev .next\n```\n\n## Deployment\n\n### Deploy to Cloudflare Pages\n\n1. Build the project:\n```bash\nbun run build\n```\n\n2. Remove cache folder (required for Cloudflare file size limits):\n```bash\nrm -rf .next/cache\n```\n\n3. Deploy to Cloudflare Pages:\n```bash\nwrangler pages deploy .next --commit-dirty=true\n```\n\n4. Set environment secrets:\n```bash\nwrangler pages secret put ANTHROPIC_API_KEY\n```\n\n### Automatic Deployments\n\nThe project can be configured for automatic deployments via GitHub integration:\n\n1. Connect your GitHub repository to Cloudflare Pages\n2. Set build command: `bun run build`\n3. Set build output directory: `.next`\n4. Add environment variable: `ANTHROPIC_API_KEY`\n\n## Project Structure\n\n### Core Application Files\n\n- `app/page.tsx` - Main landing page with animated hero and waitlist form\n- `app/dashboard/page.tsx` - Content generation dashboard\n- `app/shop/page.tsx` - Shop page with product listings\n- `app/layout.tsx` - Root layout with metadata and providers\n\n### API Routes (Edge Runtime)\n\n- `app/api/waitlist/route.ts` - Create and fetch waitlist entries\n- `app/api/analytics/route.ts` - Track events and fetch analytics\n- `app/api/generate-content/route.ts` - AI content generation with Claude\n\n### Components\n\n- `components/waitlist-form.tsx` - Waitlist signup form with validation\n- `components/share-dialog.tsx` - Social sharing interface\n- `components/ui/*` - shadcn/ui components\n\n### Library Files\n\n- `lib/claude-agent.ts` - Claude SDK integration and prompt engineering\n- `lib/db/client.ts` - D1 database client utilities\n- `lib/stores/analytics-store.ts` - Zustand analytics store\n\n### Configuration Files\n\n- `wrangler.toml` - Cloudflare configuration with D1 bindings\n- `package.json` - Dependencies and scripts\n- `tsconfig.json` - TypeScript configuration\n- `tailwind.config.ts` - Tailwind CSS configuration\n- `next.config.ts` - Next.js configuration\n\n## Database Schema\n\n### waitlist\n```sql\nCREATE TABLE waitlist (\n  id TEXT PRIMARY KEY,\n  email TEXT NOT NULL UNIQUE,\n  name TEXT,\n  phone TEXT,\n  zip_code TEXT,\n  referral_code TEXT UNIQUE,\n  referred_by TEXT,\n  position INTEGER,\n  created_at TEXT DEFAULT (datetime('now'))\n);\n```\n\n### analytics_events\n```sql\nCREATE TABLE analytics_events (\n  id TEXT PRIMARY KEY,\n  event_type TEXT NOT NULL,\n  event_data TEXT,\n  created_at TEXT DEFAULT (datetime('now'))\n);\n```\n\n### generated_content\n```sql\nCREATE TABLE generated_content (\n  id TEXT PRIMARY KEY,\n  platform TEXT NOT NULL,\n  content TEXT NOT NULL,\n  metadata TEXT,\n  created_at TEXT DEFAULT (datetime('now'))\n);\n```\n\n## API Routes\n\n### POST /api/waitlist\nCreate a new waitlist entry with referral tracking.\n\n**Request Body:**\n```json\n{\n  \"email\": \"user@example.com\",\n  \"name\": \"John Doe\",\n  \"phone\": \"555-0123\",\n  \"zipCode\": \"10001\",\n  \"referredBy\": \"ABC123\"\n}\n```\n\n**Response:**\n```json\n{\n  \"position\": 42,\n  \"referralCode\": \"XYZ789\",\n  \"id\": \"uuid\"\n}\n```\n\n### POST /api/generate-content\nGenerate AI-powered social media content.\n\n**Request Body:**\n```json\n{\n  \"platform\": \"tiktok\",\n  \"trendingKeywords\": \"nyc food, exotic snacks\",\n  \"tone\": \"energetic\",\n  \"length\": \"short\"\n}\n```\n\n**Response:**\n```json\n{\n  \"content\": \"Generated content...\",\n  \"metadata\": {\n    \"hashtags\": [\"#NYCFood\", \"#ExoticSnacks\"],\n    \"suggestedLength\": \"15-30 seconds\"\n  }\n}\n```\n\n### POST /api/analytics\nTrack user events.\n\n**Request Body:**\n```json\n{\n  \"event_type\": \"signup\",\n  \"event_data\": {\n    \"referral_code\": \"ABC123\"\n  }\n}\n```\n\n## Content Generation Dashboard\n\nAccess the dashboard at `/dashboard` to:\n\n- Generate platform-optimized content (TikTok, YouTube, Instagram, Commercials)\n- Integrate trending keywords and topics\n- Choose tone and content length\n- View generated content history\n- Monitor analytics and waitlist metrics\n\nThe AI generates content optimized for:\n- NYC local market and cultural references\n- Platform-specific best practices and formats\n- Current trending topics and keywords\n- Authentic brand voice for Will the Barber\n\n## Edge Runtime Architecture\n\nAll API routes run on Cloudflare Workers Edge runtime for optimal performance:\n\n**Benefits:**\n- Global distribution across 275+ cities\n- Sub-10ms response times\n- Automatic scaling\n- Zero cold starts\n- Direct D1 database access on the edge\n\n**Implementation Pattern:**\n```typescript\nexport const runtime = 'edge'\n\ninterface Env {\n  DB: D1Database\n}\n\nexport async function POST(request: NextRequest) {\n  const env = (request as any).env as Env\n  const db = env.DB\n  // Database operations\n}\n```\n\n## Performance\n\n- **Cold Start**: 0ms (D1 auto-bound to Workers)\n- **Query Latency**: Sub-10ms (edge-local SQLite)\n- **Global Response Time**: Under 50ms worldwide\n- **Build Time**: Optimized with Turbopack (5x faster than Webpack)\n\n## Environment Variables\n\n### Required\n\n- `ANTHROPIC_API_KEY` - Your Anthropic API key for Claude AI\n\n### Database\n\nDatabase credentials are automatically bound via `wrangler.toml` configuration. No manual environment variables needed for D1.\n\n## Scripts\n\n```bash\n# Development\nbun run dev              # Start Next.js dev server\nbun run build            # Build for production\nbun run start            # Start production server locally\n\n# Database\nwrangler d1 execute DB --file=migrations/schema.sql  # Run migrations\nwrangler d1 execute DB --command=\"SELECT * FROM waitlist\"  # Query database\n\n# Deployment\nwrangler pages deploy .next  # Deploy to Cloudflare Pages\nwrangler pages deployment tail  # View deployment logs\n```\n\n## Migration from Supabase to Cloudflare D1\n\nThis project was originally built with Supabase PostgreSQL and migrated to Cloudflare D1 for better edge integration. See `CLOUDFLARE_D1_MIGRATION.md` for complete migration details.\n\n**Key improvements:**\n- 10x faster cold starts\n- Simplified configuration (1 variable vs 4)\n- Edge-native database access\n- 5GB free tier with unlimited reads\n- Better integration with Cloudflare Pages\n\n## Contributing\n\nContributions are welcome! Please follow these guidelines:\n\n1. Fork the repository\n2. Create a feature branch (`git checkout -b feature/amazing-feature`)\n3. Commit your changes (`git commit -m 'Add amazing feature'`)\n4. Push to the branch (`git push origin feature/amazing-feature`)\n5. Open a Pull Request\n\n## License\n\nMIT License - See LICENSE file for details.\n\n## Resources\n\n- [Next.js Documentation](https://nextjs.org/docs)\n- [Cloudflare D1 Documentation](https://developers.cloudflare.com/d1/)\n- [Cloudflare Pages Documentation](https://developers.cloudflare.com/pages/)\n- [Claude API Documentation](https://docs.anthropic.com/)\n- [Wrangler CLI Documentation](https://developers.cloudflare.com/workers/wrangler/)\n\n## Acknowledgments\n\nBuilt with Next.js 15, Cloudflare D1, and Claude AI. Deployed on Cloudflare Pages Edge Network.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjbwashington%2Fwill-pre-launch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjbwashington%2Fwill-pre-launch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjbwashington%2Fwill-pre-launch/lists"}