{"id":23868348,"url":"https://github.com/uchamod/springboot_quiz_application_with-_microservices","last_synced_at":"2025-08-29T06:23:28.485Z","repository":{"id":240268020,"uuid":"802158668","full_name":"uchamod/springboot_quiz_application_with-_microservices","owner":"uchamod","description":"This Spring Boot quiz application leverages microservices (Quiz \u0026 Question) for modularity and scalability. Eureka server enables service discovery, while MySQL stores data persistently. An optional API Gateway provides a single entry point for clients, simplifying interaction with the microservices architecture. This approach fosters maintainabili","archived":false,"fork":false,"pushed_at":"2024-11-14T09:48:57.000Z","size":56,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-01T17:48:22.778Z","etag":null,"topics":["annotations","api-gateway","java","object-oriented-programming","rest-api","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/uchamod.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-05-17T16:22:38.000Z","updated_at":"2024-11-14T09:49:01.000Z","dependencies_parsed_at":"2024-05-17T17:46:07.426Z","dependency_job_id":"ee5d2ad1-369d-4881-9481-30cd89b35ce2","html_url":"https://github.com/uchamod/springboot_quiz_application_with-_microservices","commit_stats":null,"previous_names":["uchamod/springboot_quiz_application_with-_microservices"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/uchamod/springboot_quiz_application_with-_microservices","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uchamod%2Fspringboot_quiz_application_with-_microservices","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uchamod%2Fspringboot_quiz_application_with-_microservices/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uchamod%2Fspringboot_quiz_application_with-_microservices/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uchamod%2Fspringboot_quiz_application_with-_microservices/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/uchamod","download_url":"https://codeload.github.com/uchamod/springboot_quiz_application_with-_microservices/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uchamod%2Fspringboot_quiz_application_with-_microservices/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272641242,"owners_count":24968802,"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-29T02:00:10.610Z","response_time":87,"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":["annotations","api-gateway","java","object-oriented-programming","rest-api","spring-boot"],"created_at":"2025-01-03T11:19:33.450Z","updated_at":"2025-08-29T06:23:28.456Z","avatar_url":"https://github.com/uchamod.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Microservices-Based Quiz Application\n\nA scalable quiz application built using Spring Boot microservices architecture, featuring service discovery with Eureka Server and persistent storage with MySQL.\n\n## Architecture Overview\n\nThe application is composed of the following microservices:\n\n- **Quiz Service**: Manages quiz creation, retrieval, and lifecycle\n- **Question Service**: Handles question bank operations and quiz question management\n- **Eureka Server**: Enables service discovery and registration\n- **API Gateway** (Optional): Provides a unified entry point for client applications\n\n```\n┌─────────────┐     ┌──────────────┐\n│             │     │              │\n│ API Gateway │─────┤ Eureka Server│\n│             │     │              │\n└─────────────┘     └──────────────┘\n       │                   │\n       │            ┌──────┴───────┐\n       │            │              │\n       ├────────────┤ Quiz Service │\n       │            │              │\n       │            └──────────────┘\n       │            ┌──────────────┐\n       │            │   Question   │\n       └────────────┤   Service    │\n                    │              │\n                    └──────────────┘\n```\n\n## Technology Stack\n\n- **Framework**: Spring Boot 3.x\n- **Build Tool**: Maven\n- **Database**: MySQL 8.x\n- **Service Discovery**: Netflix Eureka\n- **API Gateway**: Spring Cloud Gateway\n- **Java Version**: 17 or higher\n\n## Prerequisites\n\n- JDK 17+\n- Maven 3.6+\n- MySQL 8.x\n- Docker (optional, for containerization)\n\n## Getting Started\n\n### 1. Clone the Repository\n\n```bash\ngit clone https://github.com/uchamod/springboot_quiz_application_with-_microservices.git\ncd quiz-application\n```\n\n### 2. Database Setup\n\n```sql\nCREATE DATABASE quiz_service;\nCREATE DATABASE question_service;\n```\n\n### 3. Configure Application Properties\n\nEach service has its own `application.properties` file. Update database credentials and other configurations as needed.\n\nExample for Quiz Service:\n```properties\nspring.application.name=quiz-service\nserver.port=8081\nspring.datasource.url=jdbc:mysql://localhost:3306/quiz_service\nspring.datasource.username=your_username\nspring.datasource.password=your_password\n```\n\n### 4. Start Services\n\nStart the services in the following order:\n\n1. Eureka Server\n```bash\ncd eureka-server\nmvn spring-boot:run\n```\n\n2. Question Service\n```bash\ncd question-service\nmvn spring-boot:run\n```\n\n3. Quiz Service\n```bash\ncd quiz-service\nmvn spring-boot:run\n```\n\n4. API Gateway (Optional)\n```bash\ncd api-gateway\nmvn spring-boot:run\n```\n\n## API Documentation\n\n### Quiz Service Endpoints\n\n```\nGET /api/quizzes - List all quizzes\nPOST /api/quizzes - Create a new quiz\nGET /api/quizzes/{id} - Get quiz by ID\nPUT /api/quizzes/{id} - Update quiz\nDELETE /api/quizzes/{id} - Delete quiz\n```\n\n### Question Service Endpoints\n\n```\nGET /api/questions - List all questions\nPOST /api/questions - Add new question\nGET /api/questions/{id} - Get question by ID\nPUT /api/questions/{id} - Update question\nDELETE /api/questions/{id} - Delete question\n```\n\n## Docker Support\n\nBuild and run services using Docker:\n\n```bash\n# Build Docker images\ndocker-compose build\n\n# Run services\ndocker-compose up\n```\n\n## Testing\n\nRun unit tests:\n```bash\nmvn test\n```\n\nRun integration tests:\n```bash\nmvn verify\n```\n\n## Monitoring\n\nAccess service health and metrics:\n\n- Eureka Dashboard: http://localhost:8761\n- Quiz Service Actuator: http://localhost:8081/actuator\n- Question Service Actuator: http://localhost:8082/actuator\n\n## Contributing\n\n1. Fork the repository\n2. Create a feature branch\n3. Commit changes\n4. Push to the branch\n5. Create a Pull Request\n\n## Project Structure\n\n```\nquiz-application/\n├── eureka-server/\n├── quiz-service/\n│   ├── src/\n│   ├── Dockerfile\n│   └── pom.xml\n├── question-service/\n│   ├── src/\n│   ├── Dockerfile\n│   └── pom.xml\n├── api-gateway/\n│   ├── src/\n│   ├── Dockerfile\n│   └── pom.xml\n├── docker-compose.yml\n└── README.md\n```\n\n## Troubleshooting\n\nCommon issues and solutions:\n\n1. **Service Registration Failed**\n   - Verify Eureka Server is running\n   - Check service configuration properties\n   - Ensure correct network connectivity\n\n2. **Database Connection Issues**\n   - Verify MySQL is running\n   - Check database credentials\n   - Confirm database exists and is accessible\n\n## License\n\nThis project is licensed under the MIT License - see the LICENSE file for details.\n\n## Acknowledgments\n\n- Spring Boot and Spring Cloud teams\n- Netflix Eureka\n- MySQL community\n\nFor more information or support, please open an issue in the repository.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fuchamod%2Fspringboot_quiz_application_with-_microservices","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fuchamod%2Fspringboot_quiz_application_with-_microservices","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fuchamod%2Fspringboot_quiz_application_with-_microservices/lists"}