├── .editorconfig ├── README.md └── tarot.json /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | end_of_line = lf 6 | insert_final_newline = true 7 | indent_style = space 8 | indent_size = 4 9 | trim_trailing_whitespace = true 10 | 11 | [Makefile] 12 | indent_style = tab 13 | 14 | [*.md] 15 | trim_trailing_whitespace = false 16 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # front-end-challenge 2 | 3 | > Desafio para os futuros front-end's do [@Personare](https://github.com/Personare) 4 | 5 | ## Introdução 6 | 7 | A nossa Product Owner pensou em um produto fantástico para ser desenvolvido, e um dos desafios é criação de um jogo de Tarot. 8 | 9 |
10 | 11 | **Então, essa é a sua missão!** 12 | 13 | Criar um jogo de Tarot, permitindo o sorteio de uma carta. 14 | 15 | E as especificações são: 16 | 17 | - Tela de apresentação exibindo todas as cartas com seu conteúdo visível, e com um botão para iniciar o jogo. 18 | - Ao clicar no botão, as cartas deverão ser viradas - escondendo o conteúdo - e embaralhadas. 19 | - Permitir que o usuário selecione apenas uma carta, clicando na mesma. 20 | - Apresentar a carta selecionada, o nome da carta e uma descrição. (a descrição pode ser um lorem ipsum) 21 | 22 | OBS: As imagens e nomes das cartas estão listadas no arquivo [`tarot.json`](tarot.json), esse arquivo deve ser consumido via _http request_. A propriedade `image` de cada carta deve ser concatenada com a propriedade `imagesUrl`, para obter o endereço final da imagem. Utilize o valor da propriedade `imageBackCard` para obter a imagem do fundo da carta. 23 | 24 | 25 | ## Instruções 26 | 27 | 1. Efetue o **fork** deste repositório e crie um branch com o seu nome. (ex: caue-alves). 28 | 2. Após finalizar o desafio, crie um **Pull Request**. 29 | 3. Aguarde algum contribuidor realizar o code review. 30 | 31 | 32 | ## Pré-requisitos 33 | 34 | - Aplicação feita em React 35 | - Possuir testes 36 | - Gerar versão de produção 37 | - Criar micro commits ou commits por features 38 | - Detalhar nos comentários dos commits as decisões tomadas. 39 | 40 | 41 | ## Diferenciais 42 | 43 | - Boa documentação 44 | - Testes de componentes isolados 45 | 46 | ## Dúvidas 47 | 48 | Se surgir alguma dúvida, consulte as [perguntas feitas anteriormente](https://github.com/Personare/front-end-challenge/labels/question). 49 | 50 | Caso não encontre a sua resposta, sinta-se à vontade para [abrir uma issue](https://github.com/Personare/front-end-challenge/issues/new) =] 51 | -------------------------------------------------------------------------------- /tarot.json: -------------------------------------------------------------------------------- 1 | { 2 | "imagesUrl": "https://dkw5ssdvaqf8l.cloudfront.net/static/psr/br/framework/yii/images/content/pt-br/product/tarot/marselha/162x341/", 3 | "imageBackCard": "https://dkw5ssdvaqf8l.cloudfront.net/static/psr/br/framework/yii/images/content/pt-br/product/tarot/marselha/back-blue-card.png", 4 | "cards": [ 5 | { 6 | "name": "O MAGO", 7 | "image": "arcano1.jpg" 8 | }, 9 | { 10 | "name": "A SACERDOTISA", 11 | "image": "arcano2.jpg" 12 | }, 13 | { 14 | "name": "A IMPERATRIZ", 15 | "image": "arcano3.jpg" 16 | }, 17 | { 18 | "name": "O IMPERADOR", 19 | "image": "arcano4.jpg" 20 | }, 21 | { 22 | "name": "O PAPA", 23 | "image": "arcano5.jpg" 24 | }, 25 | { 26 | "name": "OS ENAMORADOS", 27 | "image": "arcano6.jpg" 28 | }, 29 | { 30 | "name": "O CARRO", 31 | "image": "arcano7.jpg" 32 | }, 33 | { 34 | "name": "A JUSTIÇA", 35 | "image": "arcano8.jpg" 36 | }, 37 | { 38 | "name": "O EREMITA", 39 | "image": "arcano9.jpg" 40 | }, 41 | { 42 | "name": "A RODA DA FORTUNA", 43 | "image": "arcano10.jpg" 44 | }, 45 | { 46 | "name": "A FORÇA", 47 | "image": "arcano11.jpg" 48 | }, 49 | { 50 | "name": "O HOMEM PENDURADO", 51 | "image": "arcano12.jpg" 52 | }, 53 | { 54 | "name": "A MORTE", 55 | "image": "arcano13.jpg" 56 | }, 57 | { 58 | "name": "A TEMPERANÇA", 59 | "image": "arcano14.jpg" 60 | }, 61 | { 62 | "name": "O DIABO", 63 | "image": "arcano15.jpg" 64 | }, 65 | { 66 | "name": "A TORRE", 67 | "image": "arcano16.jpg" 68 | }, 69 | { 70 | "name": "A ESTRELA", 71 | "image": "arcano17.jpg" 72 | }, 73 | { 74 | "name": "A LUA", 75 | "image": "arcano18.jpg" 76 | }, 77 | { 78 | "name": "O SOL", 79 | "image": "arcano19.jpg" 80 | }, 81 | { 82 | "name": "O JULGAMENTO", 83 | "image": "arcano20.jpg" 84 | }, 85 | { 86 | "name": "O MUNDO", 87 | "image": "arcano21.jpg" 88 | }, 89 | { 90 | "name": "O LOUCO", 91 | "image": "arcano22.jpg" 92 | }, 93 | { 94 | "name": "ÀS DE COPAS", 95 | "image": "arcano23.jpg" 96 | }, 97 | { 98 | "name": "2 DE COPAS", 99 | "image": "arcano24.jpg" 100 | }, 101 | { 102 | "name": "3 DE COPAS", 103 | "image": "arcano25.jpg" 104 | }, 105 | { 106 | "name": "4 DE COPAS", 107 | "image": "arcano26.jpg" 108 | }, 109 | { 110 | "name": "5 DE COPAS", 111 | "image": "arcano27.jpg" 112 | }, 113 | { 114 | "name": "6 DE COPAS", 115 | "image": "arcano28.jpg" 116 | }, 117 | { 118 | "name": "7 DE COPAS", 119 | "image": "arcano29.jpg" 120 | }, 121 | { 122 | "name": "8 DE COPAS", 123 | "image": "arcano30.jpg" 124 | }, 125 | { 126 | "name": "9 DE COPAS", 127 | "image": "arcano31.jpg" 128 | }, 129 | { 130 | "name": "10 DE COPAS", 131 | "image": "arcano32.jpg" 132 | }, 133 | { 134 | "name": "PRINCESA DE COPAS", 135 | "image": "arcano33.jpg" 136 | }, 137 | { 138 | "name": "CAVALEIRO DE COPAS", 139 | "image": "arcano34.jpg" 140 | }, 141 | { 142 | "name": "RAINHA DE COPAS", 143 | "image": "arcano35.jpg" 144 | }, 145 | { 146 | "name": "REI DE COPAS", 147 | "image": "arcano36.jpg" 148 | }, 149 | { 150 | "name": "ÀS DE ESPADAS", 151 | "image": "arcano37.jpg" 152 | }, 153 | { 154 | "name": "2 DE ESPADAS ,", 155 | "image": "arcano38.jpg" 156 | }, 157 | { 158 | "name": "3 DE ESPADAS", 159 | "image": "arcano39.jpg" 160 | }, 161 | { 162 | "name": "4 DE ESPADAS", 163 | "image": "arcano40.jpg" 164 | }, 165 | { 166 | "name": "5 DE ESPADAS", 167 | "image": "arcano41.jpg" 168 | }, 169 | { 170 | "name": "6 DE ESPADAS", 171 | "image": "arcano42.jpg" 172 | }, 173 | { 174 | "name": "7 DE ESPADAS", 175 | "image": "arcano43.jpg" 176 | }, 177 | { 178 | "name": "8 DE ESPADAS", 179 | "image": "arcano44.jpg" 180 | }, 181 | { 182 | "name": "9 DE ESPADAS", 183 | "image": "arcano45.jpg" 184 | }, 185 | { 186 | "name": "10 DE ESPADAS", 187 | "image": "arcano46.jpg" 188 | }, 189 | { 190 | "name": "PRINCESA DE ESPADAS", 191 | "image": "arcano47.jpg" 192 | }, 193 | { 194 | "name": "CAVALEIRO DE ESPADAS", 195 | "image": "arcano48.jpg" 196 | }, 197 | { 198 | "name": "RAINHA DE ESPADAS", 199 | "image": "arcano49.jpg" 200 | }, 201 | { 202 | "name": "REI DE ESPADAS", 203 | "image": "arcano50.jpg" 204 | }, 205 | { 206 | "name": "ÀS DE PAUS", 207 | "image": "arcano51.jpg" 208 | }, 209 | { 210 | "name": "2 DE PAUS", 211 | "image": "arcano52.jpg" 212 | }, 213 | { 214 | "name": "3 DE PAUS", 215 | "image": "arcano53.jpg" 216 | }, 217 | { 218 | "name": "4 DE PAUS", 219 | "image": "arcano54.jpg" 220 | }, 221 | { 222 | "name": "5 DE PAUS", 223 | "image": "arcano55.jpg" 224 | }, 225 | { 226 | "name": "6 DE PAUS", 227 | "image": "arcano56.jpg" 228 | }, 229 | { 230 | "name": "7 DE PAUS", 231 | "image": "arcano57.jpg" 232 | }, 233 | { 234 | "name": "8 DE PAUS", 235 | "image": "arcano58.jpg" 236 | }, 237 | { 238 | "name": "9 DE PAUS", 239 | "image": "arcano59.jpg" 240 | }, 241 | { 242 | "name": "10 DE PAUS", 243 | "image": "arcano60.jpg" 244 | }, 245 | { 246 | "name": "PRINCESA DE PAUS", 247 | "image": "arcano61.jpg" 248 | }, 249 | { 250 | "name": "CAVALEIRO DE PAUS", 251 | "image": "arcano62.jpg" 252 | }, 253 | { 254 | "name": "RAINHA DE PAUS", 255 | "image": "arcano63.jpg" 256 | }, 257 | { 258 | "name": "REI DE PAUS", 259 | "image": "arcano64.jpg" 260 | }, 261 | { 262 | "name": "ÀS DE OUROS", 263 | "image": "arcano65.jpg" 264 | }, 265 | { 266 | "name": "2 DE OUROS", 267 | "image": "arcano66.jpg" 268 | }, 269 | { 270 | "name": "3 DE OUROS", 271 | "image": "arcano67.jpg" 272 | }, 273 | { 274 | "name": "4 DE OUROS", 275 | "image": "arcano68.jpg" 276 | }, 277 | { 278 | "name": "5 DE OUROS", 279 | "image": "arcano69.jpg" 280 | }, 281 | { 282 | "name": "6 DE OUROS", 283 | "image": "arcano70.jpg" 284 | }, 285 | { 286 | "name": "7 DE OUROS", 287 | "image": "arcano71.jpg" 288 | }, 289 | { 290 | "name": "8 DE OUROS", 291 | "image": "arcano72.jpg" 292 | }, 293 | { 294 | "name": "9 DE OUROS", 295 | "image": "arcano73.jpg" 296 | }, 297 | { 298 | "name": "10 DE OUROS", 299 | "image": "arcano74.jpg" 300 | }, 301 | { 302 | "name": "PRINCESA DE OUROS", 303 | "image": "arcano75.jpg" 304 | }, 305 | { 306 | "name": "CAVALEIRO DE OUROS", 307 | "image": "arcano76.jpg" 308 | }, 309 | { 310 | "name": "RAINHA DE OUROS", 311 | "image": "arcano77.jpg" 312 | }, 313 | { 314 | "name": "REI DE OUROS", 315 | "image": "arcano78.jpg" 316 | } 317 | ] 318 | } 319 | --------------------------------------------------------------------------------