{"id":29106607,"url":"https://github.com/jorbush/badge_forge","last_synced_at":"2025-06-29T04:05:34.160Z","repository":{"id":297164630,"uuid":"995838065","full_name":"jorbush/badge_forge","owner":"jorbush","description":"a microservice that updates user level and badges for Jorbites","archived":false,"fork":false,"pushed_at":"2025-06-17T07:01:24.000Z","size":3295,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-06-17T08:19:17.087Z","etag":null,"topics":["axum","microservice","rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/jorbush.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-06-04T04:48:33.000Z","updated_at":"2025-06-17T07:01:28.000Z","dependencies_parsed_at":"2025-06-08T05:04:16.174Z","dependency_job_id":null,"html_url":"https://github.com/jorbush/badge_forge","commit_stats":null,"previous_names":["jorbush/badge_forge"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jorbush/badge_forge","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jorbush%2Fbadge_forge","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jorbush%2Fbadge_forge/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jorbush%2Fbadge_forge/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jorbush%2Fbadge_forge/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jorbush","download_url":"https://codeload.github.com/jorbush/badge_forge/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jorbush%2Fbadge_forge/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262532737,"owners_count":23325131,"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","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":["axum","microservice","rust"],"created_at":"2025-06-29T04:05:33.719Z","updated_at":"2025-06-29T04:05:34.150Z","avatar_url":"https://github.com/jorbush.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Badge Forge 🎖️\n\nBadge Forge is a high-performance microservice that calculates and assigns achievement badges and experience levels to users on the [Jorbites](https://github.com/jorbush/jorbites) platform. It uses an asynchronous queue system to efficiently process badge updates without blocking the main application flow.\n\n![logo](/docs/assets/badge_forge_logo.png)\n\n## 🌟 Features\n\n- **Asynchronous Processing**: Uses a non-blocking queue system to handle badge updates\n- **User Levels**: Automatically calculates user levels based on recipe count and engagement metrics\n- **Achievement Badges**: Assigns badges for various milestones and accomplishments\n- **API Security**: Secured endpoints with API key authentication\n- **Queue Monitoring**: Real-time visibility into the badge update queue\n- **MongoDB Integration**: Seamless integration with MongoDB for data storage\n\n## 🏗️ Architecture\n\nBadge Forge follows a modular microservice architecture:\n\n```\n┌─────────────┐     ┌──────────────┐     ┌─────────────────┐     ┌────────────┐\n│  API Server │────▶│ Queue System │────▶│ Badge Processor │────▶│  MongoDB   │\n└─────────────┘     └──────────────┘     └─────────────────┘     └────────────┘\n```\n\n1. **API Server**: Handles incoming requests and authentication\n2. **Queue System**: Manages and prioritizes badge update requests\n3. **Badge Processor**: Calculates levels and assigns badges based on user activity\n4. **MongoDB**: Stores user data, recipes, and badge information\n\n\n## 📋 Requirements\n\n- Docker or Rust.\n\n## 🚀 Quick Start\n\n### Environment Variables\n\nCreate a `.env` file in the project root with the following:\n\n```\nMONGODB_URI=mongodb://localhost:27017\nDB_NAME=badgeforge\nAPI_KEY=your_secure_key_here\n```\n\n### Using Rust\n\n```bash\nmake run\n```\n\n### Using Docker\n\n```bash\nmake docker\n```\n\n## 🧪 Development\n\n### Testing\n\n```bash\ncargo test\n```\n\n### Formatting and Linting\n\n```bash\n# Format code\ncargo fmt\n\n# Lint code\ncargo clippy\n```\n\n## 🔌 API Endpoints\n\n### Update User Badges\n```\nPOST /update\nHeader: X-API-Key: your_api_key_here\nBody: { \"user_id\": \"5f8d0d55b54764421b7156d3\" }\n```\n\n### Queue Status\n```\nGET /queue/status\n```\n\n### Health Check\n```\nGET /health\n```\n\n### Version Info\n```\nGET /version\n```\n\n\n## 📄 Documentation\n\nComprehensive documentation is available in the [docs](./docs/README.md) directory, including:\n\n- Complete API reference\n- Detailed architecture diagrams\n- Badge calculation algorithms\n- MongoDB schema details\n- Deployment guides\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjorbush%2Fbadge_forge","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjorbush%2Fbadge_forge","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjorbush%2Fbadge_forge/lists"}