{"id":31585325,"url":"https://github.com/randiranirman/productapi","last_synced_at":"2025-10-25T07:51:38.516Z","repository":{"id":308865012,"uuid":"1034370448","full_name":"randiranirman/productAPI","owner":"randiranirman","description":"This is a production level api using microservices and keycloack for authentication and spring security ","archived":false,"fork":false,"pushed_at":"2025-08-19T05:08:56.000Z","size":6167,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-10-06T01:47:33.453Z","etag":null,"topics":["keyclock","microservices","spring-boot"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/randiranirman.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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-08-08T09:27:20.000Z","updated_at":"2025-08-19T06:30:30.000Z","dependencies_parsed_at":"2025-10-06T01:57:30.663Z","dependency_job_id":null,"html_url":"https://github.com/randiranirman/productAPI","commit_stats":null,"previous_names":["randiranirman/productapi"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/randiranirman/productAPI","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/randiranirman%2FproductAPI","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/randiranirman%2FproductAPI/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/randiranirman%2FproductAPI/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/randiranirman%2FproductAPI/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/randiranirman","download_url":"https://codeload.github.com/randiranirman/productAPI/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/randiranirman%2FproductAPI/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280923472,"owners_count":26414234,"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-10-25T02:00:06.499Z","response_time":81,"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":["keyclock","microservices","spring-boot"],"created_at":"2025-10-06T01:47:11.943Z","updated_at":"2025-10-25T07:51:38.511Z","avatar_url":"https://github.com/randiranirman.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Spring Boot Microservices Project\n\nThis project contains a collection of Spring Boot microservices that work together to provide a complete e-commerce solution with product management, inventory tracking, and order processing capabilities.\n\n## Architecture Overview\n\nThe project consists of three main microservices:\n\n- **ProductAPI** - Product catalog management service (MongoDB)\n- **InventoryService** - Inventory management service (MySQL)\n- **OrderService** - Order processing service (MySQL)\n\n## Services\n\n| Service | Port | Database | Description |\n|---------|------|----------|-------------|\n| ProductAPI | 8080 | MongoDB (27017) | Manages product catalog and information |\n| InventoryService | 8082 | MySQL (3316) | Tracks product inventory and stock levels |\n| OrderService | 8083 | MySQL (3306) | Handles order creation and management |\n\n## Prerequisites\n\n- Java 21\n- Maven 3.6+\n- Docker \u0026 Docker Compose\n- MongoDB\n- MySQL\n\n## Quick Start\n\n1. **Clone the repository**\n   ```bash\n   git clone \u003crepository-url\u003e\n   cd Project\n   ```\n\n2. **Start the databases using Docker Compose**\n   ```bash\n   # Start MongoDB for ProductAPI\n   cd productAPI \u0026\u0026 docker-compose up -d\n   \n   # Start MySQL for InventoryService\n   cd ../InventoryService \u0026\u0026 docker-compose up -d\n   \n   # Start MySQL for OrderService\n   cd ../orderService \u0026\u0026 docker-compose up -d\n   ```\n\n3. **Build and run each service**\n   ```bash\n   # Build all services\n   mvn clean install -f productAPI/pom.xml\n   mvn clean install -f InventoryService/pom.xml\n   mvn clean install -f orderService/pom.xml\n   \n   # Run services (in separate terminals)\n   cd productAPI \u0026\u0026 mvn spring-boot:run\n   cd InventoryService \u0026\u0026 mvn spring-boot:run\n   cd orderService \u0026\u0026 mvn spring-boot:run\n   ```\n\n## API Documentation\n\nEach service provides Swagger UI documentation:\n\n- **ProductAPI**: http://localhost:8080/swagger.html\n- **InventoryService**: http://localhost:8082/swagger.html\n- **OrderService**: http://localhost:8083/swagger.html\n\n## Service Communication\n\n- **OrderService** communicates with **InventoryService** via OpenFeign client\n- Services are designed to be loosely coupled and independently deployable\n\n## Technology Stack\n\n- **Spring Boot 3.4.x/3.5.x**\n- **Spring Data JPA** (for MySQL services)\n- **Spring Data MongoDB** (for ProductAPI)\n- **Spring Cloud OpenFeign** (for inter-service communication)\n- **Flyway** (for database migrations)\n- **Lombok** (for reducing boilerplate code)\n- **SpringDoc OpenAPI** (for API documentation)\n- **Testcontainers** (for integration testing)\n- **Docker** (for containerization)\n\n## Development\n\n### Code Style\n- Uses Lombok for reducing boilerplate code\n- Follows standard Spring Boot project structure\n- Uses OpenAPI 3 for API documentation\n\n### Testing\n- Unit tests with JUnit 5\n- Integration tests with Testcontainers\n- Each service has its own test suite\n\n## License\n\nThis project is licensed under the terms specified in the LICENSE file.\n\n## Contributing\n\n1. Fork the repository\n2. Create your feature branch (`git checkout -b feature/amazing-feature`)\n3. Commit your changes (`git commit -m 'Add some amazing feature'`)\n4. Push to the branch (`git push origin feature/amazing-feature`)\n5. Open a Pull Request\n\n## Troubleshooting\n\n### Common Issues\n\n1. **Port conflicts**: Ensure ports 8080, 8082, 8083, 3306, 3316, and 27017 are available\n2. **Database connection**: Verify Docker containers are running and accessible\n3. **Build issues**: Run `mvn clean install` to resolve dependency issues\n\n### Useful Commands\n\n```bash\n# Check running Docker containers\ndocker ps\n\n# View application logs\ndocker-compose logs\n\n# Stop all services\ndocker-compose down\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frandiranirman%2Fproductapi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frandiranirman%2Fproductapi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frandiranirman%2Fproductapi/lists"}