{"id":32382604,"url":"https://github.com/tech-preta/echo-playground","last_synced_at":"2025-10-25T01:49:19.083Z","repository":{"id":307591965,"uuid":"1029997150","full_name":"Tech-Preta/echo-playground","owner":"Tech-Preta","description":"Um playground completo que demonstra todas as funcionalidades do Echo framework.","archived":false,"fork":false,"pushed_at":"2025-10-20T14:08:47.000Z","size":15491,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-10-20T16:13:41.831Z","etag":null,"topics":["echo","go","golang"],"latest_commit_sha":null,"homepage":"https://www.nataliagranato.xyz/","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Tech-Preta.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":"SECURITY.md","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},"funding":{"github":"nataliagranato","ko_fi":"nataliagranato","buy_me_a_coffee":"nataliagranato","pix":"fada126d-7311-495f-bda2-55ec79b0a39b"}},"created_at":"2025-07-31T23:30:18.000Z","updated_at":"2025-10-20T14:08:44.000Z","dependencies_parsed_at":"2025-08-21T23:46:47.432Z","dependency_job_id":"a6d51105-0494-442e-aead-05872785c25c","html_url":"https://github.com/Tech-Preta/echo-playground","commit_stats":null,"previous_names":["nataliagranato/echo","tech-preta/echo","tech-preta/echo-playground"],"tags_count":0,"template":false,"template_full_name":"Tech-Preta/repository-sample","purl":"pkg:github/Tech-Preta/echo-playground","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tech-Preta%2Fecho-playground","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tech-Preta%2Fecho-playground/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tech-Preta%2Fecho-playground/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tech-Preta%2Fecho-playground/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Tech-Preta","download_url":"https://codeload.github.com/Tech-Preta/echo-playground/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tech-Preta%2Fecho-playground/sbom","scorecard":{"id":683524,"data":{"date":"2025-08-21T21:39:07Z","repo":{"name":"github.com/Tech-Preta/echo","commit":"845bfd40a87cdba0d111e07e83aa93cad53fb2b1"},"scorecard":{"version":"v5.2.1","commit":"ab2f6e92482462fe66246d9e32f642855a691dc1"},"score":4.9,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/2 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#code-review"}},{"name":"Security-Policy","score":10,"reason":"security policy file detected","details":["Info: security policy file detected: SECURITY.md:1","Info: Found linked content: SECURITY.md:1","Info: Found disclosure, vulnerability, and/or timelines in security policy: SECURITY.md:1","Info: Found text in security policy: SECURITY.md:1"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#security-policy"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#dangerous-workflow"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#packaging"}},{"name":"Dependency-Update-Tool","score":10,"reason":"update tool detected","details":["Info: detected update tool: Dependabot: .github/dependabot.yml:1"],"documentation":{"short":"Determines if the project uses a dependency update tool.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#dependency-update-tool"}},{"name":"Binary-Artifacts","score":8,"reason":"binaries present in source code","details":["Warn: binary detected: bin/echo:1","Warn: binary detected: bin/echo-playground:1"],"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#binary-artifacts"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/dependabot.yml:1","Info: topLevel 'contents' permission set to 'read': .github/workflows/dependency-review.yml:13","Info: topLevel 'contents' permission set to 'read': .github/workflows/issue.yml:7","Info: topLevel 'contents' permission set to 'read': .github/workflows/osv-scanner.yml:28","Warn: topLevel 'security-events' permission set to 'write': .github/workflows/osv-scanner.yml:26","Info: topLevel permissions set to 'read-all': .github/workflows/scorecard.yml:18","Warn: topLevel 'contents' permission set to 'write': .github/workflows/trivy.yml:9","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#token-permissions"}},{"name":"Maintained","score":0,"reason":"project was created within the last 90 days. Please review its contents carefully","details":["Warn: Repository was created within the last 90 days."],"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#maintained"}},{"name":"Pinned-Dependencies","score":8,"reason":"dependency not pinned by hash detected -- score normalized to 8","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/trivy.yml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/Tech-Preta/echo/trivy.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/trivy.yml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/Tech-Preta/echo/trivy.yml/main?enable=pin","Info:   5 out of   6 GitHub-owned GitHubAction dependencies pinned","Info:   5 out of   6 third-party GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#pinned-dependencies"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: GNU General Public License v3.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#license"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#cii-best-practices"}},{"name":"CI-Tests","score":-1,"reason":"internal error: internal error: Client.Repositories.ListCheckRunsForRef: error during graphqlHandler.setupCheckRuns: Although you appear to have the correct authorization credentials, the `bridgecrewio` organization has an IP allow list enabled, and your IP address is not permitted to access this resource.","details":null,"documentation":{"short":"Determines if the project runs tests before pull requests are merged.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#ci-tests"}},{"name":"SAST","score":-1,"reason":"internal error: internal error: Client.Checks.ListCheckRunsForRef: error during graphqlHandler.setupCheckRuns: Although you appear to have the correct authorization credentials, the `bridgecrewio` organization has an IP allow list enabled, and your IP address is not permitted to access this resource.","details":null,"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":9,"reason":"1 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GO-2025-3553 / GHSA-mh63-6h87-95cp"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#vulnerabilities"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#signed-releases"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#fuzzing"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#branch-protection"}},{"name":"Contributors","score":0,"reason":"project has 0 contributing companies or organizations -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project has a set of contributors from multiple organizations (e.g., companies).","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#contributors"}}]},"last_synced_at":"2025-08-21T23:57:42.927Z","repository_id":307591965,"created_at":"2025-08-21T23:57:42.927Z","updated_at":"2025-08-21T23:57:42.927Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280893644,"owners_count":26409279,"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-24T02:00:06.418Z","response_time":73,"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":["echo","go","golang"],"created_at":"2025-10-25T01:48:28.400Z","updated_at":"2025-10-25T01:49:19.078Z","avatar_url":"https://github.com/Tech-Preta.png","language":"Go","funding_links":["https://github.com/sponsors/nataliagranato","https://ko-fi.com/nataliagranato","https://buymeacoffee.com/nataliagranato","fada126d-7311-495f-bda2-55ec79b0a39b"],"categories":[],"sub_categories":[],"readme":"# 🚀 Echo Playground\n\nUm playground completo que demonstra todas as funcionalidades do **Echo framework** - um framework Go de alta performance, extensível e minimalista, seguindo as melhores práticas de layout de projetos Go.\n\n## ✨ Funcionalidades Demonstradas\n\n### 🔥 **High Performance Router**\n- Router otimizado sem alocação dinâmica de memória\n- Priorização inteligente de rotas\n- Processamento eficiente de requisições HTTP\n\n### 📈 **Scalable REST APIs**\n- Organização de endpoints em grupos lógicos\n- APIs RESTful robustas e escaláveis\n- Gerenciamento simplificado de APIs complexas\n\n### 🔒 **Automatic TLS**\n- Configuração preparada para TLS automático\n- Integração com Let's Encrypt\n- Comunicação segura simplificada\n\n### ⚡ **HTTP/2 Support**\n- Suporte nativo ao protocolo HTTP/2\n- Melhoria na velocidade e responsividade\n- Otimização na transmissão de dados\n\n### 🔧 **Middleware System**\n- Middleware global (Logger, Recover, CORS)\n- Middleware customizado para logging\n- Middleware de autenticação JWT\n- Aplicação flexível em diferentes níveis\n\n### 📊 **Data Binding**\n- Binding automático de JSON, XML e form-data\n- Extração simplificada de dados de requisições\n- Integração perfeita com lógica de aplicação\n\n### 🎨 **Data Rendering**\n- Respostas em múltiplos formatos (JSON, XML, HTML)\n- Upload e download de arquivos\n- Streaming de dados em tempo real\n- Templates HTML dinâmicos\n\n### 🎯 **Template Support**\n- Renderização com qualquer engine de template\n- Templates HTML dinâmicos\n- Design responsivo e moderno\n\n### 🔌 **Extensible Architecture**\n- Tratamento de erros centralizado\n- API facilmente extensível\n- Middleware customizado\n- Integração com funcionalidades de terceiros\n\n### 🏗️ **Arquitetura Modular Go**\n- Estrutura seguindo padrões da comunidade Go\n- Separação clara de responsabilidades\n- Código reutilizável e testável\n- Organização profissional\n\n## 🚀 Início Rápido\n\n### Pré-requisitos\n- Go 1.21 ou superior\n- Git\n\n### Instalação\n\n```bash\n# Clonar o repositório\ngit clone https://github.com/nataliagranato/echo.git\ncd echo\n\n# Instalar dependências\ngo mod tidy\n\n# Executar o servidor\ngo run cmd/echo-playground/main.go\n```\n\nO servidor estará disponível em: `http://localhost:8080`\n\n### Build da Aplicação\n\n```bash\n# Compilar a aplicação\n./scripts/build.sh\n\n# Executar o binário\n./bin/echo-playground\n```\n\n## 📚 Endpoints Principais\n\n### Informações Gerais\n- `GET /api/v1/` - Informações sobre o framework\n\n### Demonstrações\n- `GET /api/v1/hello/:name` - Saudação personalizada\n- `GET /api/v1/html` - Página HTML renderizada\n- `GET /api/v1/xml` - Resposta em XML\n- `GET /api/v1/stream` - Streaming de dados\n\n### Data Binding\n- `POST /api/v1/users` - Criar usuário com binding automático\n- `GET /api/v1/search` - Query parameters\n\n### Upload/Download\n- `POST /api/v1/upload` - Upload de arquivos\n- `GET /api/v1/download/:filename` - Download de arquivos\n\n### Autenticação\n- `GET /api/v1/protected/profile` - Endpoint protegido (requer JWT)\n\n### CRUD Completo\n- `GET /api/v1/products` - Listar produtos\n- `GET /api/v1/products/:id` - Obter produto\n- `POST /api/v1/products` - Criar produto\n- `PUT /api/v1/products/:id` - Atualizar produto\n- `DELETE /api/v1/products/:id` - Deletar produto\n\n## 🏗️ Estrutura do Projeto\n\n```\necho-playground/\n├── cmd/                    # Aplicações principais\n│   └── echo-playground/   # Aplicação principal\n│       └── main.go        # Ponto de entrada\n├── internal/              # Código privado da aplicação\n│   ├── app/              # Lógica da aplicação\n│   │   ├── handlers.go   # Handlers HTTP\n│   │   ├── products.go   # Handlers de produtos\n│   │   ├── template.go   # Renderizador de templates\n│   │   └── error_handler.go # Tratamento de erros\n│   └── pkg/              # Pacotes internos compartilhados\n├── pkg/                   # Código público reutilizável\n│   ├── api/              # Respostas da API\n│   ├── middleware/       # Middlewares customizados\n│   ├── models/           # Modelos de dados\n│   └── utils/            # Utilitários\n├── web/                  # Componentes web\n│   └── templates/        # Templates HTML\n├── configs/              # Arquivos de configuração\n├── scripts/              # Scripts de build e deploy\n├── build/                # Configurações de build\n│   └── ci/              # CI/CD\n├── docs/                 # Documentação\n├── test/                 # Testes e dados de teste\n├── examples/             # Exemplos de uso\n├── assets/               # Recursos estáticos\n└── go.mod               # Dependências do Go\n```\n\n## 🧪 Testando a API\n\n### Exemplos com cURL\n\n```bash\n# Informações gerais\ncurl http://localhost:8080/api/v1/\n\n# Criar usuário\ncurl -X POST -H \"Content-Type: application/json\" \\\n  -d '{\"name\":\"João\",\"email\":\"joao@exemplo.com\",\"age\":30}' \\\n  http://localhost:8080/api/v1/users\n\n# Listar produtos\ncurl http://localhost:8080/api/v1/products\n\n# Endpoint protegido\ncurl -H \"Authorization: Bearer valid-token\" \\\n  http://localhost:8080/api/v1/protected/profile\n\n# Upload de arquivo\ncurl -X POST -F \"file=@test/teste.txt\" \\\n  http://localhost:8080/api/v1/upload\n```\n\n### Script de Teste Automatizado\n\n```bash\n# Executar todos os testes\n./scripts/test_api.sh\n```\n\n## 📖 Documentação Completa\n\nPara documentação detalhada de todos os endpoints e funcionalidades, consulte:\n- [Documentação da API](./docs/API_DOCUMENTATION.md)\n- [Resumo das Funcionalidades](./docs/FEATURES_SUMMARY.md)\n\n## 🔧 Configurações Avançadas\n\n### Configuração do Servidor\nAs configurações do servidor estão em `configs/config.yaml`:\n\n```yaml\nserver:\n  port: 8080\n  host: \"0.0.0.0\"\n  read_timeout: 30s\n  write_timeout: 30s\n  idle_timeout: 120s\n```\n\n### TLS Automático\nPara habilitar TLS automático com Let's Encrypt, modifique o arquivo `cmd/echo-playground/main.go`:\n\n```go\nautoTLS := autocert.Manager{\n    Prompt: autocert.AcceptTOS,\n    HostPolicy: autocert.HostWhitelist(\"seu-dominio.com\"),\n    Cache: autocert.DirCache(\"/var/www/.cache\"),\n}\ne.AutoTLSManager = \u0026autoTLS\n```\n\n### HTTP/2\nPara habilitar HTTP/2, descomente as linhas de configuração TLS no `cmd/echo-playground/main.go`.\n\n## 🎯 Próximos Passos\n\nPara expandir este playground, você pode:\n\n1. **Implementar banco de dados real** (PostgreSQL, MongoDB)\n2. **Adicionar validações avançadas** com `go-playground/validator`\n3. **Implementar WebSocket real** para comunicação em tempo real\n4. **Configurar rate limiting** e outras medidas de segurança\n5. **Adicionar testes unitários** e de integração\n6. **Implementar documentação Swagger/OpenAPI**\n7. **Adicionar monitoramento** e métricas\n8. **Configurar CI/CD** com GitHub Actions ou GitLab CI\n\n## 🤝 Contribuindo\n\nContribuições são bem-vindas! Sinta-se à vontade para:\n\n- Reportar bugs\n- Sugerir novas funcionalidades\n- Melhorar a documentação\n- Adicionar exemplos de uso\n\n## 📄 Licença\n\nEste projeto é um playground educacional para demonstrar as funcionalidades do Echo framework.\n\n## 🔗 Links Úteis\n\n- [Echo Framework](https://echo.labstack.com/)\n- [Documentação Oficial](https://echo.labstack.com/guide/)\n- [GitHub do Echo](https://github.com/labstack/echo)\n- [Go Programming Language](https://golang.org/)\n- [Go Project Layout](https://github.com/golang-standards/project-layout)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftech-preta%2Fecho-playground","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftech-preta%2Fecho-playground","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftech-preta%2Fecho-playground/lists"}