{"id":50547682,"url":"https://github.com/parthha12/tiktok-to-table","last_synced_at":"2026-06-04T00:03:50.999Z","repository":{"id":354748365,"uuid":"1201906092","full_name":"parthha12/tiktok-to-table","owner":"parthha12","description":null,"archived":false,"fork":false,"pushed_at":"2026-04-05T10:25:24.000Z","size":78,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-29T22:43:10.292Z","etag":null,"topics":[],"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/parthha12.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":"2026-04-05T10:25:20.000Z","updated_at":"2026-04-05T10:25:29.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/parthha12/tiktok-to-table","commit_stats":null,"previous_names":["parthha12/tiktok-to-table"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/parthha12/tiktok-to-table","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parthha12%2Ftiktok-to-table","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parthha12%2Ftiktok-to-table/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parthha12%2Ftiktok-to-table/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parthha12%2Ftiktok-to-table/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/parthha12","download_url":"https://codeload.github.com/parthha12/tiktok-to-table/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parthha12%2Ftiktok-to-table/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33884763,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-03T02:00:06.370Z","response_time":59,"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":[],"created_at":"2026-06-04T00:03:50.140Z","updated_at":"2026-06-04T00:03:50.991Z","avatar_url":"https://github.com/parthha12.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# TikTok-to-Table\n\nPaste a TikTok recipe link → AI extracts the recipe → admin approves → kitchen cooks → customer tracks.\n\n## Flow\n\n```\nCustomer submits TikTok URL\n  → oEmbed fetch + Claude Haiku extraction\n  → Admin reviews \u0026 edits recipe\n  → Admin approves (or rejects)\n  → Kitchen staff starts cooking (with optional notes)\n  → Kitchen marks done\n  → Customer status page updates automatically\n```\n\n## Stack\n\n- **Next.js 15** (App Router, Turbopack), TypeScript, Tailwind CSS v4\n- **PostgreSQL + Prisma 6**\n- **Clerk** for admin/kitchen auth (optional in dev)\n- **Anthropic Claude Haiku** for recipe extraction (optional, graceful fallback)\n- **Zod** for runtime validation\n\n## Prerequisites\n\n- Node.js 20+\n- Docker (for local Postgres)\n\n## Setup\n\n### 1. Environment\n\n```bash\ncp .env.example .env\n```\n\n| Variable | Required | Purpose |\n|----------|----------|---------|\n| `DATABASE_URL` | Yes | PostgreSQL connection string |\n| `ANTHROPIC_API_KEY` | No | AI recipe extraction via Claude Haiku |\n| `NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY` | No | Auth for `/admin` and `/kitchen` |\n| `CLERK_SECRET_KEY` | No | Auth for `/admin` and `/kitchen` |\n\nWithout Clerk keys the app runs in dev-only open mode (no login required, amber banners shown). Set them before deploying to production.\n\nWithout `ANTHROPIC_API_KEY` the app still works — it fetches the TikTok video title via oEmbed and uses it as a placeholder. Admin can always edit the recipe before approving.\n\n### 2. Start Postgres\n\n```bash\ndocker-compose up -d\n```\n\n### 3. Install and migrate\n\n```bash\nnpm install\nnpm run db:push      # create tables from schema\nnpm run db:seed      # load demo orders (optional)\n```\n\n### 4. Run\n\n```bash\nnpm run dev\n```\n\nOpen [http://localhost:3000](http://localhost:3000).\n\n---\n\n## Routes\n\n| Route | Auth | Purpose |\n|-------|------|---------|\n| `/` | Public | Submit a TikTok URL |\n| `/order/[id]` | Public | Customer order status (polls every 8 s) |\n| `/admin` | Required | All orders table |\n| `/admin/orders/[id]` | Required | Edit recipe, approve, or reject |\n| `/kitchen` | Required | Kitchen queue — start cooking, add notes, mark done |\n| `/sign-in` | — | Clerk sign-in |\n\n## API\n\n| Method | Path | Auth | Description |\n|--------|------|------|-------------|\n| `POST` | `/api/orders` | Public | Submit TikTok URL → parse → create order |\n| `GET` | `/api/orders` | Required | List all orders |\n| `GET` | `/api/orders/:id` | Required | Order detail |\n| `PATCH` | `/api/orders/:id` | Required | Edit recipe (title, ingredients, steps) |\n| `POST` | `/api/orders/:id/approve` | Required | Approve order (`parsed` → `approved`) |\n| `POST` | `/api/orders/:id/reject` | Required | Reject order (`parsed`/`approved` → `rejected`) |\n| `POST` | `/api/orders/:id/kitchen` | Required | Start / complete cooking (accepts optional `notes`) |\n| `GET` | `/api/kitchen/orders` | Required | Kitchen queue (approved + cooking) |\n| `GET` | `/api/public/orders/:id` | Public | Customer-facing status |\n\n## Recipe parser\n\n`services/recipeParser.ts` runs in three tiers:\n\n1. **TikTok oEmbed + Claude Haiku** — fetches video title/author, sends to Claude for structured extraction. Requires `ANTHROPIC_API_KEY`.\n2. **TikTok oEmbed only** — uses the video title as recipe name with a placeholder body.\n3. **Fallback** — deterministic placeholder if oEmbed fails (private video, invalid URL, rate-limited).\n\nAdmin can always edit the extracted recipe before approving.\n\n## Scripts\n\n| Script | Description |\n|--------|-------------|\n| `npm run dev` | Next.js dev server (Turbopack) |\n| `npm run build` / `npm start` | Production build \u0026 start |\n| `npm run lint` | ESLint |\n| `npm run db:push` | Push schema changes (local dev) |\n| `npm run db:migrate` | Create versioned migration |\n| `npm run db:seed` | Load demo orders |\n| `npm run db:studio` | Prisma Studio GUI |\n\n## Project layout\n\n```\napp/           # Next.js routes and API handlers\ncomponents/    # Client-side UI components\nlib/           # Prisma singleton, auth, logger, validations\nservices/      # Recipe parser (TikTok oEmbed + Claude)\nprisma/        # schema.prisma + seed\ntypes/         # Shared TypeScript interfaces\n```\n\n## Deployment (Vercel + Supabase)\n\n- Set `DATABASE_URL` to Supabase's Postgres pooler connection string.\n- Set `ANTHROPIC_API_KEY`, Clerk keys in Vercel Environment Variables.\n- Run `prisma migrate deploy` against production DB from CI or locally with the production `DATABASE_URL`.\n\n## License\n\nPrivate — add a license as needed.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fparthha12%2Ftiktok-to-table","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fparthha12%2Ftiktok-to-table","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fparthha12%2Ftiktok-to-table/lists"}