{"id":35763371,"url":"https://github.com/mupinnn/chat-db","last_synced_at":"2026-01-07T00:03:27.317Z","repository":{"id":330397582,"uuid":"1121835941","full_name":"mupinnn/chat-db","owner":"mupinnn","description":"Chat DB - A simple app to chat with your database using Gemini","archived":false,"fork":false,"pushed_at":"2025-12-25T06:53:37.000Z","size":521,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-12-26T19:55:10.638Z","etag":null,"topics":["chatbot","flask","gemini-api","react","sqlite"],"latest_commit_sha":null,"homepage":"https://chat-db.13121957.xyz/","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/mupinnn.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-12-23T16:25:43.000Z","updated_at":"2025-12-25T14:39:17.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/mupinnn/chat-db","commit_stats":null,"previous_names":["mupinnn/chat-db"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/mupinnn/chat-db","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mupinnn%2Fchat-db","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mupinnn%2Fchat-db/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mupinnn%2Fchat-db/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mupinnn%2Fchat-db/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mupinnn","download_url":"https://codeload.github.com/mupinnn/chat-db/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mupinnn%2Fchat-db/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28230232,"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":"2026-01-06T02:00:07.049Z","response_time":56,"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":["chatbot","flask","gemini-api","react","sqlite"],"created_at":"2026-01-07T00:01:02.691Z","updated_at":"2026-01-07T00:03:27.311Z","avatar_url":"https://github.com/mupinnn.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Chat DB - A simple app to chat with your database using Gemini\n\nChat with your database in most human way possible and get the human-friendly response about your question\nwithout the need to understand SQL at all. This app can helps stakeholders to get business insights from their data really fast.\n\nI made this for Hacktiv8 Maju Bareng AI - AI for Data Scientist program's final project.\n\n## Stacks\n\n- Flask\n- Gemini 2.5 Flash\n- SQLite\n- React\n- Tanstack Query\n- shadcn/ui + Tailwind CSS\n- Nginx\n- Docker + Docker Compose\n\n## Run locally\n\n### Prepare the Gemini API key and other environment variables\n\n0. Visit https://aistudio.google.com/api-keys and create new API key\n1. Copy the `web/.env.example` to `web/.env.local` and `api/.env.example` to `.env`\n\n```sh\ncp web/.env.example web/.env.local\ncp api/.env.example web/.env\n```\n\n2. Fill the environment variables\n\n```sh\n# web/.env.local\nVITE_API_URL=http://localhost:5000/api\n\n# api/.env\nGOOGLE_API_KEY=\u003cplace your gemini API key here\u003e\nALLOWED_CORS_ORIGIN=http://localhost:5174\nFLASK_ENV=development\nPORT=5000\n```\n\nNext follow each services setup below.\n\n### Frontend (`web`)\n\n0. Make sure you have Bun installed, because the `Dockerfile` and the compose config for the `web` is only for production purpose; at least for right now\n1. Install dependencies\n\n```sh\ncd web \u0026\u0026 bun install\n```\n\n2. Run\n\n```sh\ncd web \u0026\u0026 bun dev\n```\n\n3. You can access the frontend at http://localhost:5174\n\n### Backend (`api`)\n\n0. Make sure you have Docker and `docker-compose` installed\n1. Run\n\n```sh\ndocker compose up -d\n```\n\n2. Seed the data to the database first before accessing the backend\n\n```sh\n# this will seed the `api/data/coffee-sales-datasets.csv` to the SQLite database\ndocker compose exec api python seed.py\n```\n\n3. You can access the backend at http://localhost:5000 and try to access http://localhost:5000/api/health in your browser, `curl`, or any API tools to make sure it works.\n\n## Acknowledgement and resources\n\n- https://github.com/ardyadipta/gemini_chatbot_sql/\n- https://github.com/leodeveloper/google-gemini-chat-with-sqlserver/\n- https://github.com/ardyadipta/gemini_chatbot_qna\n- https://blog.laozhang.ai/api-guides/gemini-api-free-tier/\n- https://photokheecher.medium.com/building-a-smart-text-to-sql-system-with-rag-and-langchain-1958c041d4f4\n\n## Gallery\n\n![main page](./screenshots/dashboard2.png)\n\n![chat sheet opened](./screenshots/chat%20opened2.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmupinnn%2Fchat-db","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmupinnn%2Fchat-db","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmupinnn%2Fchat-db/lists"}