{"id":31851661,"url":"https://github.com/msp95/stream-chat","last_synced_at":"2025-10-12T12:32:13.708Z","repository":{"id":317113297,"uuid":"1065617909","full_name":"MSP95/stream-chat","owner":"MSP95","description":null,"archived":false,"fork":false,"pushed_at":"2025-09-28T22:50:40.000Z","size":88,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-29T00:10:16.550Z","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/MSP95.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-09-28T04:54:19.000Z","updated_at":"2025-09-28T22:50:43.000Z","dependencies_parsed_at":"2025-09-29T00:20:35.678Z","dependency_job_id":null,"html_url":"https://github.com/MSP95/stream-chat","commit_stats":null,"previous_names":["msp95/stream-chat"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/MSP95/stream-chat","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MSP95%2Fstream-chat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MSP95%2Fstream-chat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MSP95%2Fstream-chat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MSP95%2Fstream-chat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MSP95","download_url":"https://codeload.github.com/MSP95/stream-chat/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MSP95%2Fstream-chat/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279011295,"owners_count":26084928,"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-12T02:00:06.719Z","response_time":53,"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":"2025-10-12T12:30:19.696Z","updated_at":"2025-10-12T12:32:13.699Z","avatar_url":"https://github.com/MSP95.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Stream Chat\n\nA real-time streaming chat application powered by Google Gemini API and Cloudflare Workers.\n\n## Features\n\n- Real-time text streaming from Gemini API\n- Clean, responsive web interface\n- Serverless backend using Cloudflare Workers\n- TypeScript support\n\n## Prerequisites\n\n- Node.js (v18 or higher)\n- pnpm (or npm)\n- Cloudflare account\n- Google AI API key\n\n## Setup\n\n### 1. Clone the repository\n\n```bash\ngit clone \u003cyour-repo-url\u003e\ncd stream-chat\n```\n\n### 2. Install dependencies\n\n```bash\npnpm install\n```\n\n### 3. Configure environment variables\n\nCreate a `.env` file in the worker directory:\n\n```bash\n# apps/worker/.env\nGEMINI_API_KEY=your_google_ai_api_key_here\n```\n\n## Local Development\n\n### Option A: Local Development (Recommended for testing)\n\n1. **Start the Cloudflare Worker locally:**\n\n```bash\ncd apps/worker\nnpx wrangler dev\n```\n\nThis will start the worker locally and provide a URL like `http://localhost:8787`\n\n2. **Update the worker URL in the web app:**\n\nIn `apps/web/src/App.tsx`, update the `WORKER_URL` constant:\n\n```typescript\nconst WORKER_URL = 'http://localhost:8787/chat';\n```\n\n3. **Start the web application:**\n\n```bash\ncd apps/web\npnpm dev\n```\n\nThe application will be available at `http://localhost:5173`\n\n### Option B: Production Deployment\n\n1. **Deploy the Cloudflare Worker:**\n\n```bash\ncd apps/worker\nnpx wrangler deploy\n```\n\n2. **Update the worker URL:**\n\nIn `apps/web/src/App.tsx`, update the `WORKER_URL` constant with your deployed worker URL:\n\n```typescript\nconst WORKER_URL = 'https://your-worker.your-subdomain.workers.dev/chat';\n```\n\n3. **Build and serve the web application:**\n\n```bash\ncd apps/web\npnpm build\npnpm preview\n```\n\n## Usage\n\n1. Open the web application in your browser\n2. Enter a prompt in the text area\n3. Click \"Send Prompt\" to start streaming\n4. Watch the response appear in real-time as Gemini generates it\n\n## Project Structure\n\n```\nstream-chat/\n├── apps/\n│   ├── web/          # React frontend\n│   └── worker/       # Cloudflare Worker backend\n├── package.json      # Root package.json\n└── README.md\n```\n\n## API\n\nThe worker exposes a single endpoint:\n\n- `POST /chat` - Streams responses from Gemini API\n\nRequest body:\n```json\n{\n  \"contents\": [\n    {\n      \"parts\": [\n        {\n          \"text\": \"Your prompt here\"\n        }\n      ]\n    }\n  ]\n}\n```\n\n## Development\n\n### Quick Start (Local Development)\n\n1. **Terminal 1 - Start the worker:**\n```bash\ncd apps/worker\nnpx wrangler dev\n```\n\n2. **Terminal 2 - Start the web app:**\n```bash\ncd apps/web\npnpm dev\n```\n\n3. **Update the worker URL in the web app** (if needed):\n   - Open `apps/web/src/App.tsx`\n   - Change `WORKER_URL` to `'http://localhost:8787/chat'`\n\n### Environment Variables\n\nFor local development, create a `.env` file in the worker directory:\n\n```bash\n# apps/worker/.env\nGEMINI_API_KEY=your_google_ai_api_key_here\n```\n\n### Building for Production\n\n```bash\n# Build web app\ncd apps/web\npnpm build\n\n# Deploy worker\ncd apps/worker\nnpx wrangler deploy\n```\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmsp95%2Fstream-chat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmsp95%2Fstream-chat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmsp95%2Fstream-chat/lists"}