{"id":35214559,"url":"https://github.com/renatompf/poc_spring_elasticsearch","last_synced_at":"2026-04-13T13:31:36.078Z","repository":{"id":329133208,"uuid":"1118268866","full_name":"renatompf/poc_spring_elasticsearch","owner":"renatompf","description":"This project is a Spring Boot application that demonstrates the integration of PostgreSQL and Elasticsearch for managing and searching product data.","archived":false,"fork":false,"pushed_at":"2025-12-17T14:43:58.000Z","size":26,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-12-21T02:29:24.261Z","etag":null,"topics":["elasticsearch","java","kafka","openapi","postgresql","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/renatompf.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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-12-17T14:01:00.000Z","updated_at":"2025-12-17T14:44:01.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/renatompf/poc_spring_elasticsearch","commit_stats":null,"previous_names":["renatompf/poc_spring_elasticsearch"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/renatompf/poc_spring_elasticsearch","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/renatompf%2Fpoc_spring_elasticsearch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/renatompf%2Fpoc_spring_elasticsearch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/renatompf%2Fpoc_spring_elasticsearch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/renatompf%2Fpoc_spring_elasticsearch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/renatompf","download_url":"https://codeload.github.com/renatompf/poc_spring_elasticsearch/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/renatompf%2Fpoc_spring_elasticsearch/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31754774,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-13T13:27:56.013Z","status":"ssl_error","status_checked_at":"2026-04-13T13:21:23.512Z","response_time":93,"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":["elasticsearch","java","kafka","openapi","postgresql","spring-boot"],"created_at":"2025-12-29T21:20:46.397Z","updated_at":"2026-04-13T13:31:36.066Z","avatar_url":"https://github.com/renatompf.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Spring Elastic POC\n\nThis project is a **Spring Boot** application that demonstrates the integration of **PostgreSQL** and **Elasticsearch** for managing and searching product data. It provides a REST API for CRUD operations and advanced search capabilities.\n\n## Features\n\n- **CR~~U~~D Operations**: Create, read, ~~update~~, and delete products.\n- **Elasticsearch Integration**: Full-text search on product fields like name, description, and tags.\n- **PostgreSQL Integration**: Persistent storage for product data.\n- **Validation**: Input validation using `@Valid` annotations.\n- **OpenAPI Documentation**: API documentation with Swagger UI.\n- **Messaging**: Kafka-based messaging for syncing data between services.\n\n## Technologies Used\n\n- **Java 25**\n- **Spring Boot**\n- **PostgreSQL**\n- **Elasticsearch**\n- **Kafka**\n- **MapStruct** for object mapping\n- **Maven** for dependency management\n\n## Prerequisites\n\n- **Java 25+**\n- **Docker** and **Docker Compose** (for running PostgreSQL, Elasticsearch, and Kafka)\n- **Maven**\n\n## Architecture\n\n```mermaid\ngraph TD\n    %% Client\n    Client[Client / Frontend]\n\n    %% Application\n    subgraph SpringBootApp[\"Spring Boot Application\"]\n        API[REST Controllers]\n        Service[Application Services]\n        JPARepo[JPA Repository]\n        ESRepo[Elasticsearch Repository]\n        Producer[Kafka Producer]\n        Consumer[Kafka Consumer]\n        Mapper[Entity ↔ Document Mapper]\n    end\n\n    %% Datastores\n    Postgres[(PostgreSQL)]\n    Elasticsearch[(Elasticsearch)]\n    Kafka[(Kafka Topic)]\n\n    %% Write flow\n    Client --\u003e|HTTP POST/DELETE| API\n    API --\u003e Service\n    Service --\u003e JPARepo\n    JPARepo --\u003e Postgres\n\n    %% Async sync flow\n    Service --\u003e|ProductCreated / Deleted| Producer\n    Producer --\u003e Kafka\n    Kafka --\u003e Consumer\n    Consumer --\u003e Mapper\n    Mapper --\u003e ESRepo\n    ESRepo --\u003e Elasticsearch\n\n    %% Read flow\n    Client --\u003e|HTTP GET /search| API\n    API --\u003e Service\n    Service --\u003e|Search query| ESRepo\n    ESRepo --\u003e Elasticsearch\n```\n\n## Getting Started\n\n### Clone the Repository\n\n```bash\ngit clone https://github.com/renatompf/poc_spring_elasticsearch.git\ncd poc_spring_elasticsearch\n```\n\n### Build the Project\n\n```bash\nmvn clean install\n```\n\n### Run the Application\n\nBy running the following command, the application will start along with PostgreSQL, Elasticsearch, and Kafka using Docker Compose:\n\n```bash\nmake run\n```\n\n## Documentation\n\nYou can access the API documentation at:\n```\nhttp://localhost:8080/swagger-ui.html\n```\nor \n```\nhttp://localhost:8080/api-docs\n```\n\nYou will also find some pre-created requests in the [http folder](/http).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frenatompf%2Fpoc_spring_elasticsearch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frenatompf%2Fpoc_spring_elasticsearch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frenatompf%2Fpoc_spring_elasticsearch/lists"}