{"id":31667604,"url":"https://github.com/gokulkrishh/grep.chat","last_synced_at":"2026-05-08T03:44:22.165Z","repository":{"id":315523602,"uuid":"1056254146","full_name":"gokulkrishh/grep.chat","owner":"gokulkrishh","description":"Choose your AI. Ask anything. Get answers that matter.","archived":false,"fork":false,"pushed_at":"2025-09-19T04:00:30.000Z","size":280,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-19T05:48:02.516Z","etag":null,"topics":["chat","chat-app","chat-application","chatbot","chatgpt","nextjs","supabase","vercel-ai-sdk"],"latest_commit_sha":null,"homepage":"https://grep.chat","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gokulkrishh.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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},"funding":{"github":["gokulkrishh"]}},"created_at":"2025-09-13T17:44:53.000Z","updated_at":"2025-09-19T04:00:33.000Z","dependencies_parsed_at":"2025-09-19T05:48:04.012Z","dependency_job_id":"6cadfa7d-c351-4811-be7b-b40823e457bc","html_url":"https://github.com/gokulkrishh/grep.chat","commit_stats":null,"previous_names":["gokulkrishh/grep.chat"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/gokulkrishh/grep.chat","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gokulkrishh%2Fgrep.chat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gokulkrishh%2Fgrep.chat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gokulkrishh%2Fgrep.chat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gokulkrishh%2Fgrep.chat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gokulkrishh","download_url":"https://codeload.github.com/gokulkrishh/grep.chat/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gokulkrishh%2Fgrep.chat/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278867296,"owners_count":26059748,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-07T02:00:06.786Z","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":["chat","chat-app","chat-application","chatbot","chatgpt","nextjs","supabase","vercel-ai-sdk"],"created_at":"2025-10-08T00:13:49.895Z","updated_at":"2026-05-08T03:44:22.152Z","avatar_url":"https://github.com/gokulkrishh.png","language":"TypeScript","funding_links":["https://github.com/sponsors/gokulkrishh"],"categories":[],"sub_categories":[],"readme":"# grep.chat\n\nA Next.js 15 app that lets you chat with models via OpenRouter, using Supabase for auth + data, Tailwind for styling, and Radix UI primitives. Redis is used optionally for lightweight caching.\n\n## Tech\n\n- Next.js 15.5.3 (App Router, Turbopack)\n- React 19\n- AI SDK\n- OpenRouter for AI Model keys\n- Tailwind CSS v4\n- Radix UI (Dialog, Select, AlertDialog, etc.)\n- Supabase (Auth, Postgres, RLS)\n- OpenRouter (model access)\n- Redis (optional cache)\n\n## Quick start\n\n```bash\n# 1) Install deps (pick one)\nnpm install\n# or\nyarn\n# or``\npnpm install\n# or\nbun install\n\n# 2) Copy env and fill values\ncp env.example .env.local\n\n# 3) Run dev server\nnpm run dev\n# http://localhost:3000\n```\n\n## Environment variables\n\nCopy `[env.example](./env.example)` to `.env.local` and fill in:\n\n```bash\nNEXT_PUBLIC_SITE_URL=\"http://localhost:3000\"\nNEXT_PUBLIC_SUPABASE_URL=\"\"                 # From Supabase -\u003e Project Settings -\u003e API\nNEXT_PUBLIC_SUPABASE_PUBLISHABLE_KEY=\"\"     # From Supabase -\u003e Project Settings -\u003e API\nSUPABASE_SECRET_KEY=\"\"                      # From Supabase -\u003e Project Settings -\u003e API (server-only)\nOPENROUTER_API_KEY=\"\"                       # From OpenRouter API keys\nREDIS_URL=\"\"                                # Optional, e.g. redis://default:password@host:port\nSUPABASE_PROJECT_ID=\"\"                      # Optional, used by `npm run update-types`\n```\n\nImportant:\n\n- Never expose `SUPABASE_SECRET_KEY` to the client. Set it only in server-side environments (e.g., Vercel Project Settings – Environment Variables).\n- `NEXT_PUBLIC_*` values are safe to be exposed to the client.\n\n## Database schema\n\nSQL files live under `supabase/schemas`:\n\n- `users.sql` (user profile + trigger to insert profile on signup)\n- `chats.sql` (chat records)\n- `messages.sql` (chat messages)\n\nOn a fresh project, run these in the Supabase SQL editor to provision tables and RLS policies.\n\nTypes can be regenerated (optional) once your Supabase project is set up:\n\n```bash\n# Requires SUPABASE_PROJECT_ID and `supabase` CLI available\nnpm run update-types\n```\n\n## Running\n\n```bash\n# Development\nnpm run dev\n\n# Lint\nnpm run lint\n\n# Format\nnpm run format\n\n# Production build\nnpm run build\nnpm start\n```\n\nImplementation references:\n\n- `app/api/chat/route.ts` – builds the `streamText` call with OpenRouter provider and optional reasoning/web search.\n- `hooks/use-chat.ts` – client state for `model`, `reasoning`, and `webSearch` that are posted to the API.\n\n## Account deletion\n\nA Delete Account control lives in Settings → Account. This calls:\n\n- `DELETE /api/account` → implemented in `app/api/account/route.ts`.\n- It verifies the current session and deletes the user using the Supabase Admin API (requires `SUPABASE_SECRET_KEY`).\n- Deleting a user cascades to related rows based on the schema and foreign key constraints.\n\nMake sure `SUPABASE_SECRET_KEY` is configured on the server (e.g., Vercel), not exposed to the client.\n\n## Project layout (high level)\n\n```\napp/\n  api/\n    chat/route.ts        # Chat streaming endpoint (OpenRouter)\n    account/route.ts     # Delete account endpoint (Supabase Admin)\ncomponents/\n  settings/\n    settings-dialog.tsx  # Settings (General, Account)\n  sidebar/               # Sidebar UI\n  ui/                    # Radix-wrapped UI components\nlib/\n  supabase/              # Supabase clients (server/client)\n  redis/                 # Redis client + cache helpers (optional)\nsupabase/\n  schemas/               # SQL schema \u0026 RLS\n```\n\n## Deployment\n\n- Recommended: Vercel\n- Set all env vars in the project settings (including `SUPABASE_SECRET_KEY`).\n- Add your site URL to `NEXT_PUBLIC_SITE_URL` accordingly.\n- Build with `npm run build` and run `npm start` (handled by Vercel automatically).\n\n---\n\nFeel free to open issues/PRs to improve DX or docs.\n\n### MIT LICENSED\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgokulkrishh%2Fgrep.chat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgokulkrishh%2Fgrep.chat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgokulkrishh%2Fgrep.chat/lists"}