{"id":30738730,"url":"https://github.com/luisotavio13/protucts-api","last_synced_at":"2026-05-14T23:31:52.932Z","repository":{"id":312275399,"uuid":"1046933035","full_name":"LuisOtavio13/protucts-api","owner":"LuisOtavio13","description":"api restfull in java using JPA sprint boot etc","archived":false,"fork":false,"pushed_at":"2025-08-29T16:18:36.000Z","size":134,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-29T16:35:26.642Z","etag":null,"topics":["api","api-rest","api-restful","api-restfull","jpa","jpa-hibernate","spring-boot"],"latest_commit_sha":null,"homepage":"https://protucts-api-3.onrender.com/#/","language":"JavaScript","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/LuisOtavio13.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-08-29T13:14:14.000Z","updated_at":"2025-08-29T16:19:37.000Z","dependencies_parsed_at":"2025-08-29T16:35:42.464Z","dependency_job_id":"c88395b3-a69a-4c4a-85ad-ac159e334dd4","html_url":"https://github.com/LuisOtavio13/protucts-api","commit_stats":null,"previous_names":["luisotavio13/protucts-api"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/LuisOtavio13/protucts-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LuisOtavio13%2Fprotucts-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LuisOtavio13%2Fprotucts-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LuisOtavio13%2Fprotucts-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LuisOtavio13%2Fprotucts-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LuisOtavio13","download_url":"https://codeload.github.com/LuisOtavio13/protucts-api/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LuisOtavio13%2Fprotucts-api/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273517600,"owners_count":25119801,"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-09-03T02:00:09.631Z","response_time":76,"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","api-rest","api-restful","api-restfull","jpa","jpa-hibernate","spring-boot"],"created_at":"2025-09-03T22:02:52.828Z","updated_at":"2026-05-14T23:31:52.316Z","avatar_url":"https://github.com/LuisOtavio13.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# URL Shortener\n\nThis project is a URL shortener developed in Java using the Spring Boot framework. It allows you to create short URLs that redirect to long URLs, making link sharing and management easier.\n\n## Project Structure\n\n```\nurlShortener/\n├── mvnw*\n├── pom.xml\n├── src/\n│   ├── main/\n│   │   ├── java/com/luis/urlShortener/\n│   │   │   ├── UrlShortenerApplication.java\n│   │   │   ├── controller/Controller.java\n│   │   │   ├── dto/Dto.java\n│   │   │   ├── model/Model.java\n│   │   │   ├── reposiroty/Repository.java\n│   │   │   └── Service/ServiceProduto.java\n│   │   └── resources/\n│   │       ├── application.properties\n│   │       ├── static/\n│   │       └── templates/\n│   └── test/java/com/luis/urlShortener/UrlShortenerApplicationTests.java\n└── target/\n```\n\n## Main Components\n\n- **Controller**: Responsible for receiving HTTP requests and directing them to the appropriate service.\n- **ServiceProduto**: Contains the business logic for shortening URLs and redirecting.\n- **Repository**: Interface for persisting URL data.\n- **Model**: Represents the URL entity in the system.\n- **Dto**: Data transfer object between layers.\n\n## How It Works\n\n1. The user sends a long URL to the system.\n2. The system generates a short URL and stores the mapping in the database.\n3. When accessing the short URL, the system redirects to the original URL.\n\n## UML Diagram (Mermaid)\n\n```mermaid\nclassDiagram\n    class Controller {\n        -Repo repository\n        -ServiceProduto service\n        +findByIdModel(Long id) ResponseEntity\u003cModel\u003e\n        +findAllModel() List\u003cModel\u003e\n        +createModel(Dto model)\n        +deleteById(Long id) ResponseEntity\u003cModel\u003e\n        +modifyModel(Long id, Dto novoModel) ResponseEntity\u003cModel\u003e\n    }\n    \n    class Dto {\n        -int preso\n        -String Produto\n        +toModel() Model\n    }\n    \n    class Model {\n        -Long id\n        -String produto\n        -int preso\n        +Model(int preso, String produto)\n        +getId() Long\n        +setId(Long id)\n        +getPreso() int\n        +setPreso(int preso)\n        +getProduto() String\n        +setProduto(String produto)\n    }\n    \n    class Repo {\n        \u003c\u003cInterface\u003e\u003e\n        +JpaRepository~Model, Long~\n    }\n    \n    class ServiceProduto {\n        -Repo repository\n        +getById(Long id) Model\n        +update(Long id, Dto dto) ResponseEntity\u003cModel\u003e\n    }\n    \n    class UrlShortenerApplication {\n        +main(String[] args)\n    }\n    \n    Controller --\u003e ServiceProduto : uses\n    Controller --\u003e Repo : uses\n    ServiceProduto --\u003e Repo : uses\n    Dto --\u003e Model : converts to\n    Repo ..|\u003e JpaRepository : extends\n    Repo --\u003e Model : manages\n```\n\n## How to Run\n\n1. Make sure you have Java 17+ and Maven installed.\n2. Clone the repository and navigate to the project folder.\n3. Run the command:\n   ```\n   ./mvnw spring-boot:run\n   ```\n4. Access `http://localhost:8080` to use the URL shortener.\n\n## Tests\n\nTests are located at `src/test/java/com/luis/urlShortener/UrlShortenerApplicationTests.java`.\n\nRun:\n```\n./mvnw test\n```\n\n## Configuration\n\nProject settings are in `src/main/resources/application.properties`.\n\n---\n\nDeveloped by Luis.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fluisotavio13%2Fprotucts-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fluisotavio13%2Fprotucts-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fluisotavio13%2Fprotucts-api/lists"}