{"id":23395615,"url":"https://github.com/danielcaze/rocketseat-ignite-nodejs-challenge-02","last_synced_at":"2026-04-20T13:03:00.708Z","repository":{"id":268913395,"uuid":"905379429","full_name":"danielcaze/rocketseat-ignite-nodejs-challenge-02","owner":"danielcaze","description":null,"archived":false,"fork":false,"pushed_at":"2025-01-03T03:18:41.000Z","size":98,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-04T14:25:08.469Z","etag":null,"topics":["fastify","knex","zod"],"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/danielcaze.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-12-18T17:49:24.000Z","updated_at":"2025-01-03T03:18:44.000Z","dependencies_parsed_at":"2025-07-04T14:08:59.295Z","dependency_job_id":"0fd8a6dd-f664-4df3-9b70-cf83a2af59e3","html_url":"https://github.com/danielcaze/rocketseat-ignite-nodejs-challenge-02","commit_stats":null,"previous_names":["danielcaze/rocketseat-ignite-nodejs-challenge-02"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/danielcaze/rocketseat-ignite-nodejs-challenge-02","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielcaze%2Frocketseat-ignite-nodejs-challenge-02","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielcaze%2Frocketseat-ignite-nodejs-challenge-02/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielcaze%2Frocketseat-ignite-nodejs-challenge-02/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielcaze%2Frocketseat-ignite-nodejs-challenge-02/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/danielcaze","download_url":"https://codeload.github.com/danielcaze/rocketseat-ignite-nodejs-challenge-02/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielcaze%2Frocketseat-ignite-nodejs-challenge-02/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32048445,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-20T11:35:06.609Z","status":"ssl_error","status_checked_at":"2026-04-20T11:34:48.899Z","response_time":94,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6: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":["fastify","knex","zod"],"created_at":"2024-12-22T07:16:32.439Z","updated_at":"2026-04-20T13:03:00.690Z","avatar_url":"https://github.com/danielcaze.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Daily Diet — Ignite Node.js Challenge 02\n\nThis application is a **meal tracking** system where users can sign up, log in, and register their meals. It was built as part of Rocketseat's Ignite Node.js Challenge #2.\n\n## Features\n\n- **User registration**\n- **User login** (with Session-based auth)\n- **Meal registration** (track whether each meal is within the diet or not)\n- **Meal management** (CRUD)\n- **Metrics** (e.g., total meals, best streak within diet, etc.)\n\n## Getting Started\n\n### 1. Clone this repository\n\n```bash\ngit clone https://github.com/danielcaze/rocketseat-ignite-nodejs-challenge-02.git\ncd rocketseat-ignite-nodejs-challenge-02\n```\n\n### 2. Install dependencies\n\n```bash\nnpm install\n# or yarn\n```\n\n### 3. Run MySQL in Docker (Optional)\n\nIf you want to run MySQL in a local Docker container, use the command below:\n\n```bash\ndocker run --name daily_diet_mysql \\\n  -e MYSQL_ROOT_PASSWORD=123123 \\\n  -e MYSQL_DATABASE=rocketseat_ignite_nodejs_challenge_02 \\\n  -p 3306:3306 \\\n  -d mysql:latest\n```\n\n\u003e Make sure the database name matches what you expect in your `.env` file.\n\n### 4. Environment variables\n\nCreate a `.env` file at the root of the project (if you haven't already) and set:\n\n```\nDATABASE_URL=mysql2://root:123123@localhost:3306/rocketseat_ignite_nodejs_challenge_02\nNODE_ENV=development\nEMAIL_SENDER_USER=your_email@gmail.com\nEMAIL_SENDER_PASSWORD=some_password\n```\n\n\u003e Adjust values according to your local/production environment.\n\n### 5. Migrations\n\nRun the Knex migrations to create your tables:\n\n```bash\nnpx knex migrate:latest --knexfile knexfile.ts\n```\n\n### 6. Seeds (Optional)\n\nIf you have seeds:\n\n```bash\nnpx knex seed:run --knexfile knexfile.ts\n```\n\n### 7. Start the server\n\n```bash\nnpm run start\n```\n\nThis will run the application in **development** mode (watch mode using `tsx`). By default, the server should be listening on `http://localhost:3333`.\n\n---\n\n## Endpoints\n\nYour application provides endpoints for:\n\n- **User Registration**\n- **User Login**\n- **Meals** (create, read, update, delete)\n- **Metrics** (e.g., total meals, best streak in diet, etc.)\n\n---\n\n## Scripts in `package.json`\n\n- **`npm run start`** — Starts the application in development mode (with `cross-env NODE_ENV=development npx tsx watch`).\n- **`npm run lint`** — Runs the Biome linter to check and fix code style issues in `./src/**/*.ts`.\n\n---\n\n## Contributing\n\n1. Fork the repository\n2. Create your feature branch: `git checkout -b my-feature`\n3. Commit your changes: `git commit -m 'feat: My new feature'`\n4. Push to the branch: `git push origin my-feature`\n5. Open a Pull Request\n\n---\n\n**Enjoy building your Daily Diet app!** If you have any questions or issues, feel free to open an issue or submit a pull request.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanielcaze%2Frocketseat-ignite-nodejs-challenge-02","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdanielcaze%2Frocketseat-ignite-nodejs-challenge-02","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanielcaze%2Frocketseat-ignite-nodejs-challenge-02/lists"}