{"id":28296464,"url":"https://github.com/mgckaled/ignite-nodejs-desafio-dailydiet-api-rest","last_synced_at":"2026-05-08T04:13:16.460Z","repository":{"id":191820888,"uuid":"685456297","full_name":"mgckaled/ignite-nodejs-desafio-dailydiet-api-rest","owner":"mgckaled","description":"Repositório do segundo desafio da trilha Ignite Node.js 2022 proposto pela Rocketseat Education","archived":false,"fork":false,"pushed_at":"2023-08-31T21:58:13.000Z","size":127,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-07-07T06:05:48.700Z","etag":null,"topics":["fastify","knex","nodejs","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mgckaled.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-08-31T09:14:24.000Z","updated_at":"2023-08-31T09:53:50.000Z","dependencies_parsed_at":"2023-08-31T23:48:58.429Z","dependency_job_id":null,"html_url":"https://github.com/mgckaled/ignite-nodejs-desafio-dailydiet-api-rest","commit_stats":null,"previous_names":["mgckaled/ignite-nodejs-desafio-dailydiet-api-rest"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mgckaled/ignite-nodejs-desafio-dailydiet-api-rest","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mgckaled%2Fignite-nodejs-desafio-dailydiet-api-rest","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mgckaled%2Fignite-nodejs-desafio-dailydiet-api-rest/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mgckaled%2Fignite-nodejs-desafio-dailydiet-api-rest/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mgckaled%2Fignite-nodejs-desafio-dailydiet-api-rest/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mgckaled","download_url":"https://codeload.github.com/mgckaled/ignite-nodejs-desafio-dailydiet-api-rest/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mgckaled%2Fignite-nodejs-desafio-dailydiet-api-rest/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32766278,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-08T02:36:36.067Z","status":"ssl_error","status_checked_at":"2026-05-08T02:36:07.210Z","response_time":54,"last_error":"SSL_read: 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":["fastify","knex","nodejs","typescript"],"created_at":"2025-05-22T20:13:52.086Z","updated_at":"2026-05-08T04:13:16.455Z","avatar_url":"https://github.com/mgckaled.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!-- markdownlint-disable MD033 --\u003e\n\n# Ignite Node.js - Desafio `Daily Diet - API REST`\n\n\u003cdiv align=\"center\"\u003e\n   \u003cimg alt=\"Node.js\" src=\".github/assets/nodejs-logo.jpg\" width=\"25%\"/\u003e\n\u003c/div\u003e\n\u003cbr\u003e\n\n\u003cdiv align=\"center\"\u003e\n   \u003ca href=\"https://github.com/mgckaled\"\u003e\n      \u003cimg alt=\"Made by mgckaled\" src=\"https://img.shields.io/badge/made%20by-mgckaled-yellow\"\u003e\n   \u003c/a\u003e\n   \u003cimg alt=\"GitHub Repo Size\" src=\"https://img.shields.io/github/repo-size/mgckaled/ignite-nodejs-desafio-dailydiet-api-rest\"\u003e\n   \u003cimg alt=\"GitHub Language Count\" src=\"https://img.shields.io/github/languages/count/mgckaled/ignite-nodejs-desafio-dailydiet-api-rest\"\u003e\n\u003c/div\u003e\n\u003cbr\u003e\n\n\u003cdiv align=\"center\"\u003e\n\n[**Desafio**](#desafio) \u0026nbsp;\u0026nbsp;**•**\u0026nbsp;\u0026nbsp;\n[**Tecnologias**](#tecnologias) \u0026nbsp;\u0026nbsp;**•**\u0026nbsp;\u0026nbsp;\n[**Licença**](#licença)\n\n\u003c/div\u003e\n\n## Desafio\n\nNesse desafio desenvolveremos uma API para controle de dieta diária, a Daily Diet API.\n\n### Regras da aplicação\n\n- Deve ser possível criar um usuário\n- Deve ser possível identificar o usuário entre as requisições\n- Deve ser possível registrar uma refeição feita, com as seguintes informações:\n  - Nome\n  - Descrição\n  - Data e Hora\n  - Está dentro ou não da dieta\n  - *As refeições devem ser relacionadas a um usuário.*\n- Deve ser possível editar uma refeição, podendo alterar todos os dados acima\n- Deve ser possível apagar uma refeição\n- Deve ser possível listar todas as refeições de um usuário\n- Deve ser possível visualizar uma única refeição\n- Deve ser possível recuperar as métricas de um usuário\n  - Quantidade total de refeições registradas\n  - Quantidade total de refeições dentro da dieta\n  - Quantidade total de refeições fora da dieta\n  - Melhor sequência de refeições dentro da dieta\n- O usuário só pode visualizar, editar e apagar as refeições o qual ele criou\n\n### Comandos utilizados no projeto\n\n```bash\n# iniciar projeto\n$ npm init -y\n\n# criar tsconfig.json\nnpx tsc --init\n\n# rodar migrations\nnpx knex -- migrate:make \u003cmigration-name\u003e\n```\n\n### Código Comentado\n\nAcesse análises e comentários sobre o código [AQUI](./.github/docs/index.md).\n\n## Tecnologias\n\n- [`Node.js`](https://nodejs.org/n/)\n- [`Fastify`](https://fastify.dev/)\n- [`Typescript`](https://www.typescriptlang.org/)\n- [`knex`](https://knexjs.org/)\n- [`node-postgres`](https://www.npmjs.com/package/pg)\n- [`dotenv`](https://www.npmjs.com/package/dotenv)\n- [`zod`](https://www.npmjs.com/package/zod)\n- [`vitest`](https://vitest.dev/)\n- [`tsx`](https://www.npmjs.com/package/tsx)\n- [`tsup`](https://www.npmjs.com/package/tsup)\n- [`supertest`](https://www.npmjs.com/package/supertest)\n- [`sqlite3`](https://www.npmjs.com/package/sqlite3)\n\n## Licença\n\nDistribuído sob a licença ***MIT***. Veja [LICENSE](LICENSE) para mais informações.  \u003cimg alt=\"License\" src=\"https://img.shields.io/static/v1?label=license\u0026message=MIT\u0026color=49AA26\u0026labelColor=000000\"\u003e\n\n---\n\n\u003ch5 align=\"center\"\u003e\n 2023 - \u003ca href=\"https://github.com/mgckaled/\"\u003eMarcel Kaled\u003c/a\u003e\n\u003c/h5\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmgckaled%2Fignite-nodejs-desafio-dailydiet-api-rest","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmgckaled%2Fignite-nodejs-desafio-dailydiet-api-rest","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmgckaled%2Fignite-nodejs-desafio-dailydiet-api-rest/lists"}