{"id":27117917,"url":"https://github.com/thifacco/url-shortener","last_synced_at":"2026-05-06T03:33:34.534Z","repository":{"id":61208662,"uuid":"537047556","full_name":"thifacco/url-shortener","owner":"thifacco","description":"🔗  Encurtador de links desenvolvido com NestJS, Docker e MongoDB","archived":false,"fork":false,"pushed_at":"2025-04-09T12:37:22.000Z","size":2186,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-13T11:19:21.824Z","etag":null,"topics":["docker","docker-compose","mongodb","nestjs","shortener","url"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/thifacco.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}},"created_at":"2022-09-15T13:47:01.000Z","updated_at":"2025-04-09T12:37:25.000Z","dependencies_parsed_at":"2022-10-12T19:16:51.453Z","dependency_job_id":null,"html_url":"https://github.com/thifacco/url-shortener","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/thifacco/url-shortener","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thifacco%2Furl-shortener","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thifacco%2Furl-shortener/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thifacco%2Furl-shortener/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thifacco%2Furl-shortener/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thifacco","download_url":"https://codeload.github.com/thifacco/url-shortener/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thifacco%2Furl-shortener/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32677928,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-06T02:33:58.958Z","status":"ssl_error","status_checked_at":"2026-05-06T02:33:39.611Z","response_time":117,"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","mongodb","nestjs","shortener","url"],"created_at":"2025-04-07T06:38:39.979Z","updated_at":"2026-05-06T03:33:34.516Z","avatar_url":"https://github.com/thifacco.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Logo of the project](https://github.com/thifacco/url-shortener/blob/master/public/assets/url-shortner.png)\n\n\n## URL Shortner API\nEssa aplicação é uma API Rest desenvolvida com Node.js / NestJS para encurtar links de maneira rápida e simples.\n\n\n## Tecnologias \n\nEssas foram as tecnologias usadas nesse projeto:\n\n* Node.js versão 16.0.0\n* NestJS versão 9.0.0\n* MongoDB versão 6.0\n* Docker versão 2\n\n## Serviços\n\n* Node.js\n* Docker\n\n## NPM packages\n\n* Moment\n* Mongoose\n* Nanoid\n* RxJS\n* Valid URL\n\n## Getting started\n\n* Dependências\n  - Node.js\n  - Docker daemon\n\n* Para instalar as dependências do projeto:\n```bash\nnpm install\n```\n  \n* Para iniciar a aplicação:\n```bash\nnpm run start:dev\n```\nEsse comando irá iniciar o Docker e criar a imagem do banco de dados MongoBD automaticamente.\n  \n* Para visualizar a aplicação no navegador: `npm home` ou [http://localhost:3000/api](http://localhost:3000/api)\n\n## Como usar a aplicaçao\n\n### 1 - Quando você acessar a url do projeto, verá a interface do SwaggerUI.\n\n![Homepage image](https://github.com/thifacco/url-shortener/blob/master/public/screenshots/home.png)\n\n### 2 - Você pode navegar pela assinatura do endpoint POST /url e depois clicar no botão \"Try it out\" para testar a criação de um encurtamento de link.\n\n- Adicione o link que pretende encurtar no campo \"originalUrl\" do request body\n\n- Clique no botão \"Execute\"\n\n![post-url](https://github.com/thifacco/url-shortener/blob/master/public/screenshots/post-url.png)\n\n### 3 - Navegue pelo endpoint GET /urls para visualizar a lista de urls encurtadas.\n\n- Clique no botão \"Try it out\" e depois em \"Execute\"\n\n![get-urls](https://github.com/thifacco/url-shortener/blob/master/public/screenshots/get-urls.png)\n\n- Aparecerá a lista de todas urls encurtadas criadas anteriormente.\n\n![get-urls-response](https://github.com/thifacco/url-shortener/blob/master/public/screenshots/get-urls-response.png)\n\n### 4 - Navegue pelo endpoint GET /urls/{hashCode} e busque pelo código hash da url encurtada.\n\n- Clique no botão \"Try it out\", informe o código no campo \"hashCode\" e clique no botão \"Execute\"\n\n![get-urls-hashcode](https://github.com/thifacco/url-shortener/blob/master/public/screenshots/get-urls-hashcode.png)\n\n- Você verá o registro da url encurtada:\n\n![get-urls-hashcode-response](https://github.com/thifacco/url-shortener/blob/master/public/screenshots/get-urls-hashcode-response.png)\n\n### 5 - Navegue pelo endpoint PATCH /urls/disable para desabilitar a url encurtada pelo código.\n\n- Clique no botão \"Try it out\", informe o código no campo \"hashCode\" e clique no botão \"Execute\"\n\n![patch-urls-disable](https://github.com/thifacco/url-shortener/blob/master/public/screenshots/patch-urls-disable.png)\n\n- Se o código informado estiver correto, o response irá retornar a mensagem `{ \"success\": true }`.\n\n![patch-urls-disable-success](https://github.com/thifacco/url-shortener/blob/master/public/screenshots/patch-urls-disable-success.png)\n\n\n## Features\n\nAs principais funcionalidades dessa aplicação são:\n - Encurtar um link\n - Salvar o link encurtado\n - Redirecionar o link curto para o link original\n - Contagem de cliques do link curto\n - Expiração do link curto por data\n\n\n## Links\n  - Repositório: [https://github.com/thifacco/url-shortener](https://github.com/thifacco/url-shortener)\n  - Docker daemon [https://docs.docker.com/get-docker/](https://docs.docker.com/get-docker/)\n\n  ## Versioning\n\n  1.0.0.0\n\n\n  ## Autor\n\n  * **Tiago Luis Facco** \n\n  Siga-me no github e vamos juntos!\n  Obrigado pela visita e bons códigos!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthifacco%2Furl-shortener","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthifacco%2Furl-shortener","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthifacco%2Furl-shortener/lists"}