{"id":31157433,"url":"https://github.com/maria-leiliane/quarkus-client-address-api","last_synced_at":"2026-05-02T17:33:54.526Z","repository":{"id":310225953,"uuid":"1038256964","full_name":"Maria-Leiliane/quarkus-client-address-api","owner":"Maria-Leiliane","description":"This project is a REST API built with The solution provides a complete set of endpoints to manage clients and their addresses, following a clean layered architecture, with features like exception handling, validation (CPF/CNPJ), encryption, and pagination.","archived":false,"fork":false,"pushed_at":"2025-08-25T23:32:12.000Z","size":100,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-18T22:47:51.435Z","etag":null,"topics":["api-rest","clean-architecture","docker","docker-compose","java","microservice","quarkus","women-in-tech"],"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/Maria-Leiliane.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-08-14T22:02:49.000Z","updated_at":"2025-08-22T20:05:00.000Z","dependencies_parsed_at":"2025-08-16T17:38:12.008Z","dependency_job_id":null,"html_url":"https://github.com/Maria-Leiliane/quarkus-client-address-api","commit_stats":null,"previous_names":["maria-leiliane/quarkus-client-address-api"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Maria-Leiliane/quarkus-client-address-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Maria-Leiliane%2Fquarkus-client-address-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Maria-Leiliane%2Fquarkus-client-address-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Maria-Leiliane%2Fquarkus-client-address-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Maria-Leiliane%2Fquarkus-client-address-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Maria-Leiliane","download_url":"https://codeload.github.com/Maria-Leiliane/quarkus-client-address-api/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Maria-Leiliane%2Fquarkus-client-address-api/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278411261,"owners_count":25982368,"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-05T02:00:06.059Z","response_time":54,"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":["api-rest","clean-architecture","docker","docker-compose","java","microservice","quarkus","women-in-tech"],"created_at":"2025-09-18T22:04:02.168Z","updated_at":"2025-10-05T05:14:19.249Z","avatar_url":"https://github.com/Maria-Leiliane.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🚀 REST API for Clients and Addresses\n\nThis project is a **REST API** built with **Quarkus**, a Supersonic Subatomic Java Framework.\nThe solution provides a complete set of endpoints to manage **clients** and their **addresses**, following a **clean layered architecture**, with features like **exception handling, validation (CPF/CNPJ), encryption, and pagination**.\n\n---\n\n## 🛠️ Key Technologies\n\n* **Quarkus** → Modern Java framework for cloud-native applications.\n* **JDBI 3** → SQL persistence library with lightweight abstractions.\n* **PostgreSQL** → Relational database for reliable data storage.\n* **Flyway** → Schema version control with migration scripts.\n* **JUnit 5** → Unit and integration testing framework.\n* **Jackson** → JSON serialization/deserialization.\n* **Gradle** → Build automation tool.\n* **Docker** → Containerization for consistent environments.\n\n---\n\n## 📂 Project Structure\n\n* **Controller** → Handles HTTP requests and maps them to services.\n* **Service** → Core business logic, validation, and transaction orchestration.\n* **Repository** → Encapsulates persistence and database interaction.\n* **Entity** → Database schema representation.\n* **DTOs** → Transfer data between layers, isolating domain models.\n* **Exception** → Centralized custom exception handling (consistent error responses).\n* **Flyway Migrations** → `src/main/resources/db/migration` for schema versioning.\n\n---\n\n## 🔒 Features\n\n* ✅ **Custom exception handling** → Unified error responses.\n* ✅ **Password encryption** → Using `BcryptUtil`.\n* ✅ **Validation for CPF and CNPJ** → Ensures domain integrity.\n* ✅ **Pagination \u0026 filtering** → For efficient client listing.\n* ✅ **Main address logic** → Enforces one main address per client.\n\n---\n\n## ⚙️ Setup and Execution\n\n### 1. Clone the repository\n\n```bash\ngit clone git@github.com:Maria-Leiliane/quarkus-client-address-api.git\ncd quarkus-client-address-api\n```\n\nCreate the database local: clientdb\n\n### 2. Configure the Database\n\nEdit `application.properties`:\n\n```properties\nquarkus.datasource.db-kind=postgresql\nquarkus.datasource.username=youruser\nquarkus.datasource.password=yourpassword\nquarkus.datasource.jdbc.url=jdbc:postgresql://localhost:5432/clientdb\nquarkus.flyway.migrate-at-start=true\n```\n\n### 3. Run in Dev Mode (with live coding)\n\n```bash\n./gradlew quarkusDev\n```\n\n\u003e Dev UI: [http://localhost:8080](http://localhost:8080)\n\n\nFor test we have the doc: [http://localhost:8080/q/swagger-ui/](http://localhost:8080/q/swagger-ui/)  \nOther options: Import the `client-address-api.json` file and lets test it.\n\n\n### 5. Run with Docker (In Development)\n\n### 6. Run unit tests  \n\n```bash\n./gradlew test\n```\n\n---\n\n## 📊 API Endpoints\n\n### **Clients**\n\n* `GET /clients` → List clients (pagination + filters).\n* `GET /clients/{id}` → Retrieve client by ID.\n* `POST /clients` → Create new client (with encrypted password).\n* `PATCH /clients/{id}` → Partial update.\n* `DELETE /clients/{id}` → Remove client.\n\n### **Addresses** *(sub-resource of Client)*\n\n* `GET /clients/{id}/addresses` → List client’s addresses.\n* `POST /clients/{id}/addresses` → Add new address.\n* `DELETE /clients/{id}/addresses/{addressId}` → Remove client’s address.\n\n---\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaria-leiliane%2Fquarkus-client-address-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaria-leiliane%2Fquarkus-client-address-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaria-leiliane%2Fquarkus-client-address-api/lists"}