{"id":48044146,"url":"https://github.com/yashrajdighe/kafka-backend","last_synced_at":"2026-04-04T14:16:37.477Z","repository":{"id":316907472,"uuid":"1061363185","full_name":"yashrajdighe/kafka-backend","owner":"yashrajdighe","description":"This repository contains a fastapi based backend for managing kafka.","archived":false,"fork":false,"pushed_at":"2026-03-08T09:25:45.000Z","size":91,"stargazers_count":0,"open_issues_count":7,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-03-08T13:51:36.467Z","etag":null,"topics":["fastapi","kafka","uvicorn"],"latest_commit_sha":null,"homepage":"","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/yashrajdighe.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-21T18:56:58.000Z","updated_at":"2025-10-11T05:16:47.000Z","dependencies_parsed_at":"2025-09-27T14:43:31.551Z","dependency_job_id":null,"html_url":"https://github.com/yashrajdighe/kafka-backend","commit_stats":null,"previous_names":["yashrajdighe/kafka-backend"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/yashrajdighe/kafka-backend","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yashrajdighe%2Fkafka-backend","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yashrajdighe%2Fkafka-backend/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yashrajdighe%2Fkafka-backend/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yashrajdighe%2Fkafka-backend/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yashrajdighe","download_url":"https://codeload.github.com/yashrajdighe/kafka-backend/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yashrajdighe%2Fkafka-backend/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31402278,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-04T10:20:44.708Z","status":"ssl_error","status_checked_at":"2026-04-04T10:20:06.846Z","response_time":60,"last_error":"SSL_read: 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":["fastapi","kafka","uvicorn"],"created_at":"2026-04-04T14:16:37.402Z","updated_at":"2026-04-04T14:16:37.459Z","avatar_url":"https://github.com/yashrajdighe.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Kafka Backend FastAPI\n\nA FastAPI backend for interacting with Kafka clusters.\n\n## Prerequisites\n\n- Python 3.8+\n- [uv](https://github.com/astral-sh/uv) (for dependency management)\n- Docker \u0026 Docker Compose (for containerized development)\n\n## Monitoring \u0026 Observability\n\n- **Prometheus** is integrated for metrics scraping. FastAPI exposes metrics at [`/metrics`](http://localhost:8000/metrics).\n- **Grafana** is available for dashboarding (default credentials: `admin/admin`).\n- Prometheus and Grafana are started via Docker Compose and pre-configured to monitor the FastAPI backend.\n\n### Prometheus Configuration\n\n- Main Compose: `prometheus/prometheus.yml` (targets FastAPI at `fastapi:8000`)\n- Dev Compose: `dev/prometheus/prometheus.yml` (targets FastAPI at `localhost:8000`)\n\n### Accessing Dashboards\n\n- **Prometheus UI:** [http://localhost:9090](http://localhost:9090)\n- **Grafana UI:** [http://localhost:3000](http://localhost:3000)\n\n## Local Development\n\n### Install dependencies\n\n```sh\nmake install\n```\n\n### Run the app locally\n\n```sh\nmake run-dev\n```\n\nThis uses `uv run main.py` for hot-reload development.\n\n#### Stop dev containers\n\n```sh\nmake stop-dev\n```\n\n### Format and lint\n\n```sh\nmake format\nmake lint\n```\n\n## Docker Development\n\n### Build and start services\n\n```sh\ndocker compose up --build\n```\n\n- Kafka broker will be available at `broker:9092` (internal Docker network).\n- FastAPI backend will be available at `localhost:8000`.\n- Prometheus will be available at `localhost:9090`.\n- Grafana will be available at `localhost:3000`.\n\n#### Metrics endpoint\n\n- FastAPI exposes Prometheus metrics at [`/metrics`](http://localhost:8000/metrics).\n\n#### Prometheus scrape config\n\n- See `prometheus/prometheus.yml` and `dev/prometheus/prometheus.yml` for details.\n\n### Environment Variables\n\n- `KAFKA_BOOTSTRAP_SERVERS` (default: `broker:9092` in Docker, `localhost:9092` locally)\n\n## Useful Makefile Commands\n\n- `make install` — Install dependencies\n- `make run` — Run FastAPI app (production style)\n- `make run-dev` — Run FastAPI app (development/hot-reload)\n- `make stop-dev` — Stop dev Docker Compose services\n- `make format` — Format code with Black\n- `make lint` — Lint code with Flake8\n\n## API Endpoints\n\nSee `main.py` for available endpoints for Kafka cluster, topics, health checks, produce/consume, etc.\n\n### Monitoring endpoints\n\n- `/metrics` — Prometheus metrics for FastAPI (request count, latency, etc.)\n\n## Notes\n\n- Ensure Kafka broker is running before using Kafka endpoints.\n- For local development, you may need to run Kafka separately or use Docker Compose.\n\n- Prometheus and Grafana are now included in both main and dev Docker Compose setups.\n- Prometheus scrapes FastAPI metrics at `/metrics`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyashrajdighe%2Fkafka-backend","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyashrajdighe%2Fkafka-backend","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyashrajdighe%2Fkafka-backend/lists"}