{"id":49092803,"url":"https://github.com/databek-uz/ai_hackathon_uz","last_synced_at":"2026-04-20T19:10:56.973Z","repository":{"id":350416625,"uuid":"1206724011","full_name":"databek-uz/ai_hackathon_uz","owner":"databek-uz","description":"Buxoro viloyati ai-hackathon.","archived":false,"fork":false,"pushed_at":"2026-04-10T08:14:10.000Z","size":910,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-10T09:37:21.056Z","etag":null,"topics":["ai-hackathon","hackathon","python"],"latest_commit_sha":null,"homepage":"https://databek.uz","language":null,"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/databek-uz.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-10T07:35:31.000Z","updated_at":"2026-04-10T08:14:14.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/databek-uz/ai_hackathon_uz","commit_stats":null,"previous_names":["databek-uz/ai_hackathon_uz"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/databek-uz/ai_hackathon_uz","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/databek-uz%2Fai_hackathon_uz","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/databek-uz%2Fai_hackathon_uz/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/databek-uz%2Fai_hackathon_uz/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/databek-uz%2Fai_hackathon_uz/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/databek-uz","download_url":"https://codeload.github.com/databek-uz/ai_hackathon_uz/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/databek-uz%2Fai_hackathon_uz/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32061432,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-20T11:35:06.609Z","status":"ssl_error","status_checked_at":"2026-04-20T11:34:48.899Z","response_time":94,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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-hackathon","hackathon","python"],"created_at":"2026-04-20T19:10:56.855Z","updated_at":"2026-04-20T19:10:56.963Z","avatar_url":"https://github.com/databek-uz.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🚀 Databek — AI-Powered ETL Platform\n\n\u003cp align=\"center\"\u003e\n  \u003cstrong\u003eMa'lumotlaringizni AI yordamida avtomatik tahlil qiling va bazaga yuklang\u003c/strong\u003e\n\u003c/p\u003e\n\nDatabek — Excel va CSV fayllarni AI yordamida avtomatik qayta ishlovchi ETL platforma. Gemini AI orqali config va parser generatsiya qiladi, ma'lumotlarni PostgreSQL ga yuklaydi va natural language (o'zbek/rus/ingliz) da savollar berib tahlil qilish imkonini beradi.\n\n---\n\n## 📋 Texnologiyalar\n\n| Tarkib | Texnologiya |\n|--------|------------|\n| **Backend** | FastAPI (Python 3.12) |\n| **Frontend** | Next.js 16 + TypeScript + Tailwind CSS |\n| **Database** | PostgreSQL 16 |\n| **Storage** | MinIO (S3 compatible) |\n| **AI Engine** | Google Gemini 2.5 Flash (Text-to-SQL, Config/Parser generation) |\n| **Charts** | Recharts (10+ chart types) |\n| **Infra** | Docker + Docker Compose |\n\n---\n\n## ⚡ Tez boshlash (Quick Start)\n\n### 1. Repositoryni klonlash\n\n```bash\ngit clone https://github.com/databek-uz/ai_hackathon_uz.git\ncd ai_hackathon_uz\n```\n\n### 2. `.env` faylini sozlash\n\n```env\n# Database (PostgreSQL)\nDATABASE_SERVER=localhost\nDATABASE_NAME=Databek\nDATABASE_USER=postgres\nDATABASE_PASSWORD=postgres\nDB_PORT=5432\n\n# MinIO (S3-compatible storage)\nMINIO_HOST=localhost\nMINIO_PORT=9000\nMINIO_ROOT_USER=admin\nMINIO_ROOT_PASSWORD=admin123\nSTORAGE_CONTAINER_NAME=databek-dev\n\n# Google Gemini API\nGOOGLE_API_KEY=your_gemini_api_key_here\n\n# AI Chat\nCHAT_HISTORY_LIMIT=5\nGEMINI_MAX_STEPS=25\n\n# Logging\nLOG_LEVEL=INFO\n```\n\n\u003e ⚠️ `GOOGLE_API_KEY` ni [Google AI Studio](https://aistudio.google.com/app/apikey) dan oling.\n\n### 3. Docker Compose bilan ishga tushirish\n\n```bash\ndocker compose -f infra/docker-compose.yml --env-file .env up -d\n```\n\n### 4. DB schemani yaratish\n\n```bash\ndocker exec -i ai_postgres psql -U postgres -d Databek \u003c core/config/create_tables.sql\n```\n\n### 5. Backend ishga tushirish\n\n```bash\npip install -r backend/requirements.txt\nuvicorn backend.main:app --host 0.0.0.0 --port 8000 --reload\n```\n\nBackend: http://localhost:8000 | API docs: http://localhost:8000/docs\n\n### 6. Frontend ishga tushirish\n\n```bash\ncd frontend\necho \"NEXT_PUBLIC_API_URL=http://localhost:8000\" \u003e .env.local\nnpm install\nnpm run dev\n```\n\nFrontend: http://localhost:3000\n\n---\n\n## 🏗️ Loyiha tuzilishi\n\n```\nai_hackathon_uz/\n├── backend/                  # FastAPI backend\n│   ├── main.py              # App entry point\n│   ├── routes/\n│   │   ├── auth.py          # Simple auth (demo registration)\n│   │   ├── sources.py       # Manbalar CRUD + fayl yuklash\n│   │   ├── pipelines.py     # Pipeline CRUD, config/parser, run\n│   │   ├── chat.py          # AI Chat + sessiya boshqaruvi\n│   │   └── dashboard.py     # Statistika va tarix\n│   └── schemas.py           # Pydantic modellari\n│\n├── core/                     # Asosiy ETL va AI modullari\n│   ├── analyst/             # AI Analyst (Text-to-SQL)\n│   │   ├── engine.py        # Gemini tool-calling engine\n│   │   ├── tools.py         # SQL toollar (getTables, getSchema, getData)\n│   │   └── history.py       # Chat tarixi (DB persistence)\n│   ├── generators/          # AI Code Generation\n│   │   ├── config_generator.py  # YAML config yaratish\n│   │   └── code_generator.py    # Python parser yaratish\n│   ├── executor/\n│   │   └── runner.py        # Parser ishga tushirish\n│   ├── utils/\n│   │   ├── sql.py           # PostgreSQL helper (sync + async)\n│   │   ├── data_reader.py   # MinIO → fayl o'qish\n│   │   ├── data_writer.py   # DataFrame → PostgreSQL yozish\n│   │   └── logger.py        # Logging\n│   ├── config/\n│   │   ├── settings.py      # Environment sozlamalari\n│   │   ├── database.py      # DB connection\n│   │   └── create_tables.sql# DB schema (8 table)\n│   └── prompts/             # AI promptlar\n│\n├── frontend/                 # Next.js frontend\n│   └── src/\n│       ├── app/\n│       │   ├── page.tsx     # Landing page\n│       │   └── dashboard/   # Dashboard sahifalari\n│       │       ├── layout.tsx    # Auth guard + sidebar\n│       │       ├── page.tsx      # Umumiy statistika\n│       │       ├── pipelines/    # Unified Pipeline Manager\n│       │       ├── history/      # Run tarixi\n│       │       └── chat/         # AI Chat\n│       ├── components/      # Shared UI komponentlari\n│       └── lib/api.ts       # Backend API client\n│\n├── infra/                    # Docker infra\n│   ├── docker-compose.yml\n│   ├── Dockerfile.backend\n│   └── Dockerfile.frontend\n│\n├── document/                 # Hujjatlar\n│   ├── ARCHITECTURE.md\n│   ├── CORE_DESIGN.md\n│   ├── RULES.md\n│   └── TASKS.md\n│\n├── .env                      # Environment o'zgaruvchilari\n└── README.md\n```\n\n---\n\n## 🎯 Asosiy imkoniyatlar\n\n### 📤 Unified Pipeline Manager (ADF-style)\n- **5-bosqichli Wizard:** Manba tanlash → Fayl yuklash → AI Config → AI Parser → Auto-Run\n- Drag-and-drop fayl yuklash (CSV, Excel)\n- Insert mode: **Append**, **Replace**, **Upsert** (kalit ustunlar bilan)\n- Target table uniqueness tekshiruvi\n- Pipeline card-larda: **Run**, **Tarix**, **Config/Parser edit**, **Delete**\n\n### 🤖 AI Pipeline\n- Gemini AI orqali **config.yaml** avtomatik yaratish\n- **parser.py** kodi AI tomonidan generatsiya qilinadi\n- **WizardLoader** — rotating AI messages bilan chiroyli loading\n- Config/Parser ni UI dan **syntax-highlighted editor** bilan tahrirlash\n- Parser regeneratsiya qilish imkoniyati\n\n### 💬 AI Chat (Text-to-SQL)\n- O'zbek, rus, ingliz tillarida savol berish\n- AI bazadan ma'lumot olib javob beradi\n- **10+ chart turi:** Bar, Line, Area, Pie, Donut, Radar, Scatter, Treemap, Funnel, Heatmap\n- Markdown render (jadvallar, ro'yxatlar, kod)\n- Multi-sessiya chat tarixi\n- WizardLoader uslubidagi thinking animatsiya\n\n### 📊 Dashboard\n- 8 ta statistika karta\n- Muvaffaqiyat darajasi bar\n- So'nggi runlar tarixi\n- AI Generatsiya tarixi\n\n### 🔐 Simple Auth\n- Hackathon demo uchun oddiy ro'yxatdan o'tish formasi\n- Ism, familya, telefon, email\n- 48 soat amal qiladigan session token (localStorage)\n- Sidebar da user info va logout\n\n---\n\n## 🔌 API Endpoints\n\n### Auth\n| Method | Endpoint | Tavsif |\n|--------|----------|--------|\n| `POST` | `/api/auth/register` | Demo ro'yxatdan o'tish |\n| `GET` | `/api/auth/me?token=...` | Session tekshirish |\n\n### Sources \u0026 Pipelines\n| Method | Endpoint | Tavsif |\n|--------|----------|--------|\n| `POST` | `/api/sources/upload` | Yangi manba yuklash |\n| `GET` | `/api/pipelines` | Pipeline-lar ro'yxati |\n| `POST` | `/api/pipelines/{id}/generate` | AI config+parser yaratish |\n| `POST` | `/api/pipelines/{id}/run` | Pipeline ishga tushirish |\n| `GET` | `/api/pipelines/{id}/config` | Config o'qish |\n| `PUT` | `/api/pipelines/{id}/config` | Config saqlash |\n| `GET` | `/api/pipelines/{id}/parser` | Parser o'qish |\n| `PUT` | `/api/pipelines/{id}/parser` | Parser saqlash |\n| `POST` | `/api/pipelines/{id}/regenerate-parser` | Parser qayta yaratish |\n| `POST` | `/api/pipelines/{id}/run-with-file` | Yangi fayl bilan run |\n| `GET` | `/api/pipelines/{id}/runs` | Run tarixi |\n| `GET` | `/api/pipelines/{id}/files` | MinIO fayllar |\n| `DELETE` | `/api/pipelines/{id}/drop-table` | Target table o'chirish |\n| `GET` | `/api/pipelines/check-table` | Table uniqueness |\n\n### Chat \u0026 Dashboard\n| Method | Endpoint | Tavsif |\n|--------|----------|--------|\n| `POST` | `/api/chat` | AI Chat savol yuborish |\n| `GET` | `/api/chat/sessions` | Suhbatlar ro'yxati |\n| `GET` | `/api/chat/sessions/{id}/messages` | Suhbat xabarlari |\n| `GET` | `/api/dashboard/stats` | Statistika |\n| `GET` | `/api/dashboard/recent-runs` | So'nggi runlar |\n\nTo'liq API hujjatlari: http://localhost:8000/docs\n\n---\n\n## 🗄️ Database Schema\n\n| Table | Schema | Tavsif |\n|-------|--------|--------|\n| `file_registry` | config | Manbalar va pipeline sozlamalari |\n| `processing_log` | config | Run jurnali |\n| `build_history` | config | AI generatsiya tarixi |\n| `query_log` | config | Text-to-SQL logi |\n| `analyst_chat` | config | Chat xabarlari |\n| `chat_sessions` | config | Chat sessiyalari |\n| `demo_users` | config | Demo foydalanuvchilar (auth) |\n\n---\n\n## 🛠️ Rivojlantirish\n\n### Backend development\n\n```bash\nuvicorn backend.main:app --reload --host 0.0.0.0 --port 8000\n```\n\n### Frontend development\n\n```bash\ncd frontend\nnpm run dev\n```\n\n### Ma'lumotlar bazasiga kirish\n\n```bash\ndocker exec -it ai_postgres psql -U postgres -d Databek\n```\n\n### MinIO admin panel\n\nhttp://localhost:9001 (login: admin / admin123)\n\n---\n\n## 📝 Litsenziya\n\nMIT License\n\n---\n\n\u003cp align=\"center\"\u003e\n  \u003cstrong\u003eDatabek\u003c/strong\u003e — AI bilan ma'lumotlarni boshqaring 🚀\n\u003c/p\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdatabek-uz%2Fai_hackathon_uz","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdatabek-uz%2Fai_hackathon_uz","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdatabek-uz%2Fai_hackathon_uz/lists"}