{"id":26898666,"url":"https://github.com/singhalsonal/todos-java21-docker","last_synced_at":"2026-04-07T21:31:13.971Z","repository":{"id":283873203,"uuid":"953151290","full_name":"SinghalSonal/todos-java21-docker","owner":"SinghalSonal","description":"Todos crud api with Java 21, Spring 3.4+, Gradle, Mongodb, Redis, and docker","archived":false,"fork":false,"pushed_at":"2025-03-22T20:11:20.000Z","size":66,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-01T05:55:42.394Z","etag":null,"topics":["docker","docker-compose","gradle","java21","mongodb","redis","spring"],"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/SinghalSonal.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-03-22T17:27:18.000Z","updated_at":"2025-03-22T20:11:24.000Z","dependencies_parsed_at":null,"dependency_job_id":"6988843e-d4bb-4402-a273-5f38ac2eb79e","html_url":"https://github.com/SinghalSonal/todos-java21-docker","commit_stats":null,"previous_names":["singhalsonal/todos-java21-docker"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/SinghalSonal/todos-java21-docker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SinghalSonal%2Ftodos-java21-docker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SinghalSonal%2Ftodos-java21-docker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SinghalSonal%2Ftodos-java21-docker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SinghalSonal%2Ftodos-java21-docker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SinghalSonal","download_url":"https://codeload.github.com/SinghalSonal/todos-java21-docker/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SinghalSonal%2Ftodos-java21-docker/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31530640,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-07T16:28:08.000Z","status":"ssl_error","status_checked_at":"2026-04-07T16:28:06.951Z","response_time":105,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":["docker","docker-compose","gradle","java21","mongodb","redis","spring"],"created_at":"2025-04-01T05:55:45.139Z","updated_at":"2026-04-07T21:31:13.944Z","avatar_url":"https://github.com/SinghalSonal.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# todos-java21-docker\n\nTodos crud api built using modern tech stack: \n\n* Java 21\n* Gradle 8+\n* Spring Boot 3.4+\n    * Spring Initializr (vscode extension)\n    * Spring Web   \n    * Spring Data: Spring Data MongoDB and Spring Data Redis are used for data access.\n* Cloud Resources\n    * MongoDB\n    * Redis\n* Docker Container\n    * Dockerfile: The `Dockerfile` in this project defines how to build a Docker image for the application. It specifies the base image, dependencies, and the steps to build and run the application.\n    * Docker Compose: `compose.yaml` defines the services required for the application (MongoDB, Redis, and the application itself). Docker Compose simplifies the process of managing multi-container applications.\n    * Images: The `compose.yaml` file uses the `mongo:latest` and `redis:latest` images. It is recommended to use specific versions in production.\n\n## Local Development Setup\n\nHere's how to set up and run the project locally using Docker and Gradle:\n\n### Prerequisites\n\n*   Docker Desktop installed and running.\n*   Java 21 JDK installed.\n*   Gradle installed (or use the Gradle wrapper).\n\n### Steps\n\n1.  **Build the Application with Gradle:**\n\n    ```bash\n    ./gradlew build\n    ```\n\n    This command builds the application, runs tests, and creates a JAR file in the `build/libs` directory.\n\n3. **Run the application with docker compose**\n    \n    ```bash\n    docker compose up --build\n    ```\n\n    This command will start the application, mongodb and redis in todos network of docker desktop\n\n3. **Stop the services**\n    \n    ```bash\n    docker compose down\n    ```\n    This command will stop the services started by docker compose.\n\n### Additional Gradle Commands\n\n*   **Clean:** `./gradlew clean` - Removes the `build` directory.\n*   **Test:** `./gradlew test` - Runs the unit and integration tests.\n*   **Build Docker Image:** `./gradlew bootBuildImage` - Builds a Docker image of the application.\n\n### Accessing the Application\n\nOnce the application is running, you can access it at `http://localhost:8080`.\nPostman collection and environment files are available at `src/test/resources/postman`.\n\n## Next Phase - libraries / extensions planned\n\n*   **Reactive:**: Spring Web Reactive\n*   **Gateway:** Spring Cloud Gateway\n*   **Rate Limiting:** Resilience4j, Circuit Breaker\n*   **Health/Metrics:** Spring Boot Actuator\n*   **Observability:** Micrometer\n*   **Logging/Security:** Spring Boot Aop, Logback/LogStash\n*   **Security:**: Spring Boot Security, JWT token\n\n## Personal Note\n\nWhile my professional background provided opportunities in .NET and related Azure cloud tech stack, I thoroughly enjoyed learning \u0026 coding in Java \u0026 Go, as well as containerization with Docker and Kubernetes.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsinghalsonal%2Ftodos-java21-docker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsinghalsonal%2Ftodos-java21-docker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsinghalsonal%2Ftodos-java21-docker/lists"}