{"id":51270339,"url":"https://github.com/walujanle/simple-chatbot-app","last_synced_at":"2026-06-29T17:35:51.765Z","repository":{"id":364574059,"uuid":"1268357712","full_name":"walujanle/simple-chatbot-app","owner":"walujanle","description":"Simple Chatbot App, currently the experimental project.","archived":false,"fork":false,"pushed_at":"2026-06-21T04:59:24.000Z","size":176,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-21T05:13:42.545Z","etag":null,"topics":["ai","chatbot","claude","gemini","openai","openai-compatible"],"latest_commit_sha":null,"homepage":"https://simple-chatbot-app-project.leonardwalujan.dpdns.org","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/walujanle.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"docs/security.md","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-06-13T12:41:37.000Z","updated_at":"2026-06-21T04:59:27.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/walujanle/simple-chatbot-app","commit_stats":null,"previous_names":["walujanle/simple-chatbot-app"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/walujanle/simple-chatbot-app","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/walujanle%2Fsimple-chatbot-app","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/walujanle%2Fsimple-chatbot-app/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/walujanle%2Fsimple-chatbot-app/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/walujanle%2Fsimple-chatbot-app/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/walujanle","download_url":"https://codeload.github.com/walujanle/simple-chatbot-app/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/walujanle%2Fsimple-chatbot-app/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34937366,"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-29T02:00:05.398Z","response_time":58,"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","chatbot","claude","gemini","openai","openai-compatible"],"created_at":"2026-06-29T17:35:46.884Z","updated_at":"2026-06-29T17:35:51.757Z","avatar_url":"https://github.com/walujanle.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Simple Chatbot App\n\nA self-hosted, multi-provider AI chatbot built with React and Hono. Users bring their own provider credentials and can stream responses, opt into web research or provider reasoning, preserve long conversations with rolling summaries, and inspect response metadata.\n\n\u003e **Release status:** `v0.2.3` is a public beta. The fully verified backend target is one long-lived Node.js process. Static frontend deployment is supported on hosts that can apply SPA rewrites and security headers. Serverless adapters are not included in this release.\n\n## Highlights\n\n- OpenAI Chat Completions-compatible, native Anthropic Messages, and native Gemini `generateContent` protocols\n- Custom endpoints for gateways that implement one of those wire protocols\n- Per-user provider credentials encrypted at rest with AES-256-GCM\n- Portable bcrypt password hashing with cost factor 12\n- Signed HttpOnly cookie sessions, exact-origin checks, and process-local rate limits\n- In-chat provider setup guidance when no active API credential is configured\n- Web search and reasoning disabled by default for every message\n- Estimated token-aware context selection and rolling AI-generated summaries\n- AI-generated first-message titles with a deterministic local fallback\n- Response receipts containing provider, model, endpoint host, latency, reported usage, context estimates, and candidate web sources\n- Markdown export and a responsive, keyboard-accessible chat interface\n- SQLite by default, or PostgreSQL, MySQL, and MariaDB through Kysely\n- Brave Search API and SearXNG JSON support with a bounded DuckDuckGo/Bing HTML fallback\n- Vendor-neutral static frontend and Node.js backend\n\n## Architecture\n\n```text\nReact SPA -\u003e Hono API -\u003e SQLite / PostgreSQL / MySQL / MariaDB\n                    |-\u003e OpenAI-compatible Chat Completions\n                    |-\u003e Anthropic Messages\n                    |-\u003e Gemini generateContent\n                    |-\u003e public web search and page extraction\n```\n\nThe Hono application in `backend/src/app.ts` is separated from the Node listener in `backend/src/index.ts`. It remains a Node-targeted application because the provider SDKs, database drivers, and streaming lifecycle use Node APIs. See [Architecture](docs/architecture.md) for the request flow, storage model, failure behavior, and runtime boundaries.\n\n## Development\n\nUse Node.js 24 LTS or a newer supported LTS release.\n\n1. Install dependencies:\n\n   ```powershell\n   npm ci\n   npm ci --prefix backend\n   npm ci --prefix frontend\n   ```\n\n2. Copy `backend/.env.example` to `backend/.env`.\n3. Run the following command twice and assign different outputs to `JWT_SECRET` and `CREDENTIAL_ENCRYPTION_KEY`:\n\n   ```powershell\n   node -e \"console.log(require('crypto').randomBytes(32).toString('base64'))\"\n   ```\n\n4. Keep `DATABASE_URL=` empty for local SQLite.\n5. Run `npm run dev` from `backend` and `frontend` in separate terminals.\n6. Open `http://localhost:5173`, register an account, and configure a provider.\n\nThe Vite development server proxies `/api` to `http://localhost:3000`. No frontend env file is needed for this local setup. Copy `frontend/.env.example` only when the browser must call a different backend origin or the static build needs additional CSP origins.\n\n## Provider Compatibility\n\nChoose a provider by wire protocol, not by the model brand exposed by a gateway:\n\n| Setting | Required endpoint behavior |\n| --- | --- |\n| **OpenAI Compatible** | OpenAI-style `POST /chat/completions`, including streaming chat-completion chunks |\n| **Claude** | Native Anthropic Messages API semantics |\n| **Gemini** | Native Gemini `generateContent` and `streamGenerateContent` semantics |\n\nUse **OpenAI Compatible** for a gateway serving Claude or Gemini models through an OpenAI-style interface. OpenAI itself can be configured with `https://api.openai.com/v1`. Custom Claude and Gemini endpoints must implement their selected native protocol; a model name alone does not make an endpoint compatible.\n\nReasoning controls are best-effort and provider/model dependent. The OpenAI-compatible adapter retries without modern reasoning parameters after a `400` or `422`, so a compatible text endpoint can still work while exposing no reasoning text. Provider validation sends a real eight-token completion and may consume provider quota. The first message can trigger a separate title completion, and long conversations can trigger separate summary completions.\n\nProtocol references: [OpenAI Chat Completions](https://developers.openai.com/api/reference/resources/chat/subresources/completions/methods/create), [Anthropic Messages](https://docs.anthropic.com/en/api/messages), and [Gemini content generation](https://ai.google.dev/api/generate-content).\n\n## Deployment\n\n- **Frontend:** publish `frontend/dist` to Netlify, Cloudflare Pages, or another static host. Set `VITE_API_BASE_URL` at build time when the API is on another origin.\n- **Backend:** run the compiled Node.js process. An empty `DATABASE_URL` uses `backend/database/chatbot.db`; a supported database URL selects a remote database.\n- **Serverless:** the app export can be integrated with a Node-compatible adapter, but this repository does not provide or verify one. The platform must support streaming responses, remote database connections, and replacements for process-local coordination when scaling horizontally.\n\nProduction requires `FRONTEND_URL`, `JWT_SECRET`, `CREDENTIAL_ENCRYPTION_KEY`, and the `DATABASE_URL` variable. `DATABASE_URL` must exist even when its value is empty. See [Deployment](docs/deployment.md) before publishing.\n\n## Verification\n\n```powershell\nnpm run verify\n```\n\nThis runs Biome checks, backend unit and SQLite migration integration tests, production builds, and a Node HTTP smoke test. The smoke test covers authentication, exact-origin enforcement, quotas, recent-history loading, credential redaction/deletion, and receipt loading. It does not call real AI/search providers, run browser automation, test every remote database driver, or replace dependency and infrastructure security scans.\n\nUse `npm --prefix backend run test:database` against a disposable or newly provisioned remote database before production traffic. The script creates and deletes its own test user, but it still runs the current migrations against that database.\n\n## Documentation\n\n- [Architecture](docs/architecture.md)\n- [Deployment](docs/deployment.md)\n- [Security model](docs/security.md)\n- [Web search](docs/web-search.md)\n- [Changelog](CHANGELOG.md)\n\n## License\n\nRepository-authored source code, documentation, and assets are licensed under the [MIT License](LICENSE), unless a file states otherwise. Third-party dependencies keep their own licenses.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwalujanle%2Fsimple-chatbot-app","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwalujanle%2Fsimple-chatbot-app","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwalujanle%2Fsimple-chatbot-app/lists"}