[TESTE] Victor Vinicius Tavares - Desenvolvedor Frontend#1
Open
VictorTavaress wants to merge 25 commits intosizebay:mainfrom
Open
[TESTE] Victor Vinicius Tavares - Desenvolvedor Frontend#1VictorTavaress wants to merge 25 commits intosizebay:mainfrom
VictorTavaress wants to merge 25 commits intosizebay:mainfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📝 Descrição
Aplicação desenvolvida em Next.js seguindo o Design Atômico, utilizando React Query para gerenciamento e cache de dados da API do GitHub.
O projeto permite:
query paramssem nova requisição à API🔧 Decisões Técnicas
1. Escolha do React Query
Optei por usar o React Query (TanStack Query) como biblioteca de cache por três motivos principais:
2. Organização Atômica
Seguindo o Atomic Design, a estrutura foi dividida em:
3. Desafios e Soluções
Cache Persistente & Invalidação:
Configuração de Testes:
tsconfig.jsonprincipal e a configuração necessária para Jest.tsconfig.test.jsonseparado apenas para testes, garantindo tipagem correta e sem afetar o build principal.✅ Checklist de Requisitos
🧪 Testes
Total de testes: 17
Componentes testados:
Button(components/atoms/Button)Input(components/atoms/Input)SearchForm(components/molecules/SearchForm)button(components/ui/button.tsx)input(components/ui/input.tsx)RepositoriesTemplate(src/__tests__/templates/RepositoriesTemplate.test.tsx)Hooks testados:
useGithubRepos(hooks/useGithubRepos.ts)Cobertura total:
🚀 Como executar
⚙️ Configuração necessária (.env)
Antes de rodar as APIs do GitHub no projeto, crie um arquivo
.envna raiz com:🔑 Onde conseguir seu
GITHUB_TOKENEntre no GitHub e vá em Settings (Configurações)
Clique em Developer settings
Vá em Personal access tokens > Tokens (classic)
Clique em Generate new token (classic)
Marque as permissões:
Copie o token gerado (ele começa com
ghp_) e cole no.env📌 Por que isso é necessário?
📖 Storybook
O projeto conta com Storybook configurado para exibir alguns componentes isoladamente, permitindo testar e documentar visualmente a UI sem precisar rodar toda a aplicação.
Ele será executado em http://localhost:6006/.
🛠 Yarn vs NPM
O projeto foi configurado usando Yarn, por isso é recomendado continuar usando-o para evitar conflitos no
lockfile.npm install, será criado umpackage-lock.jsonque pode gerar inconsistências nas dependências.yarn install,yarn dev,yarn testetc.Video de uso
Gravacao.de.tela.de.2025-08-11.18-32-32.webm