{"id":21465789,"url":"https://github.com/jeffasante/api-gateway","last_synced_at":"2025-09-15T09:24:48.544Z","repository":{"id":260380253,"uuid":"881135460","full_name":"jeffasante/api-gateway","owner":"jeffasante","description":"A Django-based API Gateway service with rate limiting, monitoring, and logging capabilities.","archived":false,"fork":false,"pushed_at":"2024-10-31T01:18:25.000Z","size":12,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-17T05:45:17.808Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/jeffasante.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}},"created_at":"2024-10-31T01:03:57.000Z","updated_at":"2025-01-16T17:00:23.000Z","dependencies_parsed_at":"2024-10-31T02:17:27.437Z","dependency_job_id":null,"html_url":"https://github.com/jeffasante/api-gateway","commit_stats":null,"previous_names":["jeffasante/api-gateway"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jeffasante/api-gateway","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeffasante%2Fapi-gateway","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeffasante%2Fapi-gateway/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeffasante%2Fapi-gateway/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeffasante%2Fapi-gateway/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jeffasante","download_url":"https://codeload.github.com/jeffasante/api-gateway/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeffasante%2Fapi-gateway/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":275234105,"owners_count":25428562,"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-09-15T02:00:09.272Z","response_time":75,"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":[],"created_at":"2024-11-23T08:12:01.453Z","updated_at":"2025-09-15T09:24:48.490Z","avatar_url":"https://github.com/jeffasante.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# API Gateway\n\nA Django-based API Gateway service with rate limiting, monitoring, and logging capabilities.\n\n## Project Overview\n\nThis API Gateway serves as a central point for handling API requests, implementing:\n- Rate limiting with Redis\n- Request/Response logging\n- Health monitoring\n- Prometheus metrics (optional)\n- Custom middleware for request processing\n\n## Project Structure\n```\napi_gateway/\n├── api_gateway/\n│   ├── __init__.py\n│   ├── asgi.py\n│   ├── middleware.py\n│   ├── settings.py\n│   ├── urls.py\n│   └── wsgi.py\n├── api-endpoints.md\n├── manage.py\n├── requirements.txt\n├── Dockerfile\n└── docker-compose.yml\n```\n\n## Prerequisites\n\n- Docker and Docker Compose\n- Python 3.9+\n- Redis (handled by Docker Compose)\n\n## Installation\n\n1. Clone the repository:\n```bash\ngit clone https://github.com/jeffasante/api-gateway.git\ncd api_gateway\n```\n\n2. Build and start the services:\n```bash\ndocker-compose up --build -d\n```\n\n## Available Endpoints\n\nFor detailed endpoint documentation, see [api-endpoints.md](api-endpoints.md)\n\n- Health Check: `GET /health/`\n- Test Endpoint: `GET /test/`\n\n## Configuration\n\n### Environment Variables\n\n- `DJANGO_SETTINGS_MODULE`: Set to `api_gateway.settings`\n- `REDIS_URL`: Redis connection string (default: `redis://redis:6379/1`)\n\n### Rate Limiting\n\nCurrent rate limits:\n- Authenticated users: 100,000 requests/day\n- Anonymous users: 1,000 requests/day\n\nConfigure in `middleware.py`:\n```python\nself.rate_limits = {\n    'authenticated': {'limit': 100000, 'window': 86400},  # 100K/day\n    'anonymous': {'limit': 1000, 'window': 86400},       # 1K/day\n}\n```\n\n## Development\n\n1. Start services in development mode:\n```bash\ndocker-compose up\n```\n\n2. Run tests:\n```bash\ndocker-compose exec api_gateway python manage.py test\n```\n\n3. Check logs:\n```bash\ndocker-compose logs -f api_gateway\n```\n\n## Production Deployment\n\nFor production:\n\n1. Update `settings.py`:\n   - Set `DEBUG = False`\n   - Configure `ALLOWED_HOSTS`\n   - Update `SECRET_KEY`\n\n2. Use proper SSL/TLS termination\n3. Configure proper logging\n4. Set up monitoring\n\n## Monitoring\n\nThe API Gateway includes:\n- Request latency metrics\n- Rate limit tracking\n- Error logging\n- Response time headers\n\n## Contributing\n\n1. Fork the repository\n2. Create your feature branch\n3. Submit a pull request\n\n## License\nMIT License\n\nCopyright (c) 2024 Jeff Asante\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjeffasante%2Fapi-gateway","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjeffasante%2Fapi-gateway","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjeffasante%2Fapi-gateway/lists"}