{"id":30503705,"url":"https://github.com/panashemuriro/vimbai","last_synced_at":"2025-08-25T13:41:25.126Z","repository":{"id":310337165,"uuid":"1036117349","full_name":"panasheMuriro/Vimbai","owner":"panasheMuriro","description":"Vimbai is a full-stack news aggregation and blogging app focused on Zimbabwean local news. The app scrapes multiple news sources, summarizes articles, categorizes them with AI, and generates Gen Z-style blog posts with emojis and hashtags.","archived":false,"fork":false,"pushed_at":"2025-08-17T11:30:49.000Z","size":1691,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-17T13:16:44.277Z","etag":null,"topics":["ai-agents","automation","gemini-api","news","scrapper","zimbabwe"],"latest_commit_sha":null,"homepage":"https://vimbai.pages.dev/","language":"Python","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/panasheMuriro.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}},"created_at":"2025-08-11T15:26:36.000Z","updated_at":"2025-08-17T11:30:52.000Z","dependencies_parsed_at":"2025-08-17T13:27:26.489Z","dependency_job_id":null,"html_url":"https://github.com/panasheMuriro/Vimbai","commit_stats":null,"previous_names":["panashemuriro/vimbai"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/panasheMuriro/Vimbai","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/panasheMuriro%2FVimbai","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/panasheMuriro%2FVimbai/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/panasheMuriro%2FVimbai/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/panasheMuriro%2FVimbai/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/panasheMuriro","download_url":"https://codeload.github.com/panasheMuriro/Vimbai/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/panasheMuriro%2FVimbai/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272077628,"owners_count":24869287,"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-08-25T02:00:12.092Z","response_time":1107,"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-agents","automation","gemini-api","news","scrapper","zimbabwe"],"created_at":"2025-08-25T13:41:22.576Z","updated_at":"2025-08-25T13:41:25.098Z","avatar_url":"https://github.com/panasheMuriro.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Vimbai – Zimbabwean AI News Blogger\n\nVimbai is a full-stack news aggregation and blogging app focused on Zimbabwean local news. The app scrapes multiple news sources, summarizes articles, categorizes them with AI, and generates Gen Z-style blog posts with emojis and hashtags. The frontend is built with **React + Vite**, and the backend uses **Python, Firebase, and Gemini Flash Lite API**.\n\n\u003cimg width=\"1313\" height=\"484\" alt=\"project_cover\" src=\"https://github.com/user-attachments/assets/28fd1308-8767-4e42-9676-1bfbc885a28b\" /\u003e\n\n\n---\n\n## Table of Contents\n\n1. [Features](#features)\n2. [Frontend](#frontend)\n3. [Backend](#backend)\n4. [Setup](#setup)\n5. [Environment Variables](#environment-variables)\n6. [Running Locally](#running-locally)\n7. [GitHub Actions Automation](#github-actions-automation)\n8. [Folder Structure](#folder-structure)\n9. [License](#license)\n\n---\n\n## Features\n\n![Logo](/frontend/public/flow_diagram.png)\n\n* Scrapes multiple Zimbabwean news sources:\n\n  * Pindula, ZimEye, New Zimbabwe, News Day, News Dze Zimbabwe\n* Summarizes articles to 2-3 sentences\n* Categorizes articles into meaningful groups using **Gemini Flash Lite**\n* Generates fun, Gen Z-style blogs with emojis and hashtags\n* Saves blogs and categorized articles in **Firebase Firestore**\n* Frontend displays blogs in cards with expandable content\n* Responsive, mobile-first UI using TailwindCSS\n\n---\n\n## Frontend\n\n**Tech stack:** React, TypeScript, Vite, TailwindCSS, Firebase Firestore\n\n**Key components:**\n\n* `BlogList.tsx` – Fetches blogs from Firestore and displays them in cards. Supports “See More/Show Less” toggling.\n* `StickyHeader.tsx` – Sticky top navigation.\n* `Avatar.tsx` – Loads profile picture from `/public` folder.\n* `Bio.tsx` – Displays AI author info for Vimbai.\n\n**Firebase setup:**\n\n* Firestore is used to fetch `blogs_test` collection\n* Vite environment variables are stored in `.env` file:\n\n```env\nVITE_FIREBASE_API_KEY=your_api_key\nVITE_FIREBASE_AUTH_DOMAIN=your_project.firebaseapp.com\nVITE_FIREBASE_PROJECT_ID=your_project_id\nVITE_FIREBASE_STORAGE_BUCKET=your_project.appspot.com\nVITE_FIREBASE_MESSAGING_SENDER_ID=your_sender_id\nVITE_FIREBASE_APP_ID=your_app_id\n```\n\n**Start frontend locally:**\n\n```bash\ncd frontend\nnpm install\nnpm run dev\n```\n\n---\n\n## Backend\n\n**Tech stack:** Python 3.11, Firebase Admin SDK, Gemini API, Sumy (text summarization), requests, BeautifulSoup\n\n**Key files:**\n\n* `categorizer.py` – Scrapes news, summarizes, and categorizes articles via Gemini Flash Lite\n* `blogger.py` – Generates Gen Z-style blog posts from categorized articles and saves to Firestore\n* `utils/firebase.py` – Handles Firestore operations (`post_to_firestore`, `get_categories_for_today`)\n* `scrappers/` – Individual scrapers for each news source\n* `requirements.txt` – Python dependencies\n\n**Install backend dependencies:**\n\n```bash\ncd backend\npython -m venv .venv\nsource .venv/bin/activate\npip install -r requirements.txt\n```\n\n**Environment Variables for backend (use GitHub secrets or `.env` for local dev):**\n\n```env\nGEMINI_API_KEY=your_gemini_api_key\nFIREBASE_SERVICE_ACCOUNT_JSON=contents_of_your_service_account.json\n```\n\n---\n\n## Setup\n\n1. Clone the repository:\n\n```bash\ngit clone https://github.com/your-username/vimbai.git\ncd vimbai\n```\n\n2. Install frontend dependencies:\n\n```bash\ncd frontend\nnpm install\n```\n\n3. Install backend dependencies:\n\n```bash\ncd ../\npython -m venv .venv\nsource .venv/bin/activate\npip install -r requirements.txt\n```\n\n4. Add Firebase service account JSON to `utils/firebase-service-account.json` or as a secret in GitHub Actions.\n5. Add Gemini API key as an environment variable or secret.\n\n---\n\n## Running Locally\n\n**Backend:**\n\n```bash\nsource .venv/bin/activate\npython categorizer.py    # Categorize articles\npython blogger.py        # Generate blogs\n```\n\n**Frontend:**\n\n```bash\nnpm run dev\n```\n\nOpen `http://localhost:5173` in your browser.\n\n---\n\n## GitHub Actions Automation\n\n* Workflow runs daily at 6 AM UTC to scrape, categorize, and generate blogs automatically.\n* Workflow steps:\n\n  1. Checkout repository\n  2. Set up Python 3.11\n  3. Install dependencies\n  4. Write Firebase service account JSON from secret\n  5. Run `categorizer.py`\n  6. Run `blogger.py`\n\nExample workflow snippet:\n\n```yaml\nname: Daily Article Categorization \u0026 Blogging\non:\n  schedule:\n    - cron: \"0 6 * * *\"\n  workflow_dispatch:\n\njobs:\n  run_pipeline:\n    runs-on: ubuntu-latest\n    env:\n      GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }}\n      FIREBASE_SERVICE_ACCOUNT_JSON: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_JSON }}\n    steps:\n      - uses: actions/checkout@v3\n      - uses: actions/setup-python@v4\n        with:\n          python-version: 3.11\n      - run: pip install -r requirements.txt\n      - run: echo \"$FIREBASE_SERVICE_ACCOUNT_JSON\" \u003e ./utils/firebase-service-account.json\n      - run: python categorizer.py\n      - run: python blogger.py\n```\n\n---\n\n## Folder Structure\n\n```\n├── backend\n│   ├── categorizer.py\n│   ├── blogger.py\n│   ├── utils\n│   │   ├── firebase.py\n│   │   └── firebase-service-account.json\n│   └── scrappers\n│       ├── pindula.py\n│       ├── zimeye.py\n│       ├── new_zimbabwe.py\n│       ├── news_day.py\n│       └── news_dze_zimbabwe.py\n├── frontend\n│   ├── src\n│   │   ├── components\n│   │   │   ├── BlogList.tsx\n│   │   │   ├── StickyHeader.tsx\n│   │   │   └── Avatar.tsx\n│   │   ├── App.tsx\n│   │   └── firebase.ts\n│   └── public\n│       └── avatar.png\n├── .github/workflows\n│   └── daily_blog.yml\n├── README.md\n└── requirements.txt\n```\n\n---\n\n## License\n\nMIT License – free to use and modify.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpanashemuriro%2Fvimbai","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpanashemuriro%2Fvimbai","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpanashemuriro%2Fvimbai/lists"}