{"id":20407201,"url":"https://github.com/lissone/node-fastify-knex","last_synced_at":"2026-04-09T17:47:55.404Z","repository":{"id":235595697,"uuid":"790980535","full_name":"Lissone/node-fastify-knex","owner":"Lissone","description":"Simple Node Fastify API using Knex with SQLite and tests.","archived":false,"fork":false,"pushed_at":"2024-08-21T00:40:36.000Z","size":148,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-15T21:21:41.001Z","etag":null,"topics":["eslint","fastify","knex","nodejs","sqlite3","supertest","typescript","vitest","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/Lissone.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}},"created_at":"2024-04-23T21:54:30.000Z","updated_at":"2024-08-21T00:40:39.000Z","dependencies_parsed_at":"2024-11-15T05:33:29.359Z","dependency_job_id":null,"html_url":"https://github.com/Lissone/node-fastify-knex","commit_stats":null,"previous_names":["lissone/node-fastify-knex"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Lissone/node-fastify-knex","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lissone%2Fnode-fastify-knex","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lissone%2Fnode-fastify-knex/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lissone%2Fnode-fastify-knex/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lissone%2Fnode-fastify-knex/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Lissone","download_url":"https://codeload.github.com/Lissone/node-fastify-knex/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lissone%2Fnode-fastify-knex/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267875633,"owners_count":24158781,"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-07-30T02:00:09.044Z","response_time":70,"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":["eslint","fastify","knex","nodejs","sqlite3","supertest","typescript","vitest","zod"],"created_at":"2024-11-15T05:22:06.363Z","updated_at":"2025-12-30T21:54:59.028Z","avatar_url":"https://github.com/Lissone.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003e\n  Simple Node Fastify API using Knex\n\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"#description\"\u003eDescription\u003c/a\u003e\u0026nbsp;\u0026nbsp;\u0026nbsp;|\u0026nbsp;\u0026nbsp;\u0026nbsp;\n  \u003ca href=\"#requirements\"\u003eRequirements\u003c/a\u003e\u0026nbsp;\u0026nbsp;\u0026nbsp;|\u0026nbsp;\u0026nbsp;\u0026nbsp;\n  \u003ca href=\"#technologies\"\u003eTechnologies\u003c/a\u003e\u0026nbsp;\u0026nbsp;\u0026nbsp;|\u0026nbsp;\u0026nbsp;\u0026nbsp;\n  \u003ca href=\"#usage\"\u003eUsage\u003c/a\u003e\n\u003c/p\u003e\n\u003cbr /\u003e\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://img.shields.io/static/v1?label=license\u0026message=MIT\" alt=\"License\"\u003e\n  \u003cimg src=\"https://img.shields.io/github/repo-size/Lissone/node-fastify-knex\" alt=\"Repo size\" /\u003e\n  \u003cimg src=\"https://img.shields.io/github/languages/top/Lissone/node-fastify-knex\" alt=\"Top lang\" /\u003e\n  \u003cimg src=\"https://img.shields.io/github/stars/Lissone/node-fastify-knex\" alt=\"Stars repo\" /\u003e\n  \u003cimg src=\"https://img.shields.io/github/forks/Lissone/node-fastify-knex\" alt=\"Forks repo\" /\u003e\n  \u003cimg src=\"https://img.shields.io/github/issues-pr/Lissone/node-fastify-knex\" alt=\"Pull requests\" \u003e\n  \u003cimg src=\"https://img.shields.io/github/last-commit/Lissone/node-fastify-knex\" alt=\"Last commit\" /\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/Lissone/node-fastify-knex/issues\"\u003eReport bug\u003c/a\u003e\n  ·\n  \u003ca href=\"https://github.com/Lissone/node-fastify-knex/issues\"\u003eRequest feature\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cbr /\u003e\n\n## Description\n\nThis project was developed with the goal of exploring and learning how to use the Fastify library for creating APIs with Node.js, as well as getting familiar with Knex as a query builder to interact with databases. I also took the opportunity to practice and solidify my knowledge in testing.\n\n### Functional Requirements\n\n- [x] The user must be able to create a new transaction;\n- [x] The user must be able to get a summary of their account;\n- [x] The user must be able to list all transactions that have occurred;\n- [x] The user must be able to view a single transaction.\n\n###  Business Rules\n\n- [x] The transaction can be of the credit type, which will add to the total amount, or debit, which will subtract;\n- [x] It must be possible to identify the user among the requests;\n- [x] The user can only view transactions they have created.\n\n### About Tests\n\n- Unit: unit of your application;\n- Integration: communication between two or more units;\n- E2E: simulate a user operating in our application.\n\nTest pyramid: E2E does not depend on any technology, nor on architecture.\n\n## Requirements\n\n- [Npm](https://www.npmjs.com/)\n- [Yarn](https://yarnpkg.com/)\n- [Nodejs](https://nodejs.org/en/)\n\n## Technologies\n\n- Nodejs\n- Typescript\n- Fastify\n- Knex\n- Sqlite3\n- Zod\n- Vitest\n- Supertest\n- Eslint\n  - @rockeseat/eslint-config\n- Prettier\n\n## Usage\n\nYou can clone it on your pc using the command:\n\n```bash\ngit clone https://github.com/Lissone/node-fastify-knex.git\ncd node-fastify-knex\n```\n\n### Run migrations\n\nYou need to run a knex script command to run all current migrations:\n\n```bash\nnpm run knex -- migrate:latest\n```\n\nAbout more knex commands:\n\n```bash\n# List knex help\nnpm run knex -- -help\n# Create a migration\nnpm run knex -- migrate:make \u003cname_migration\u003e\n```\n\n### Add environment variables\n\n```bash\n# .\\.env\n\nNODE_ENV=development\nDATABASE_URL=\"./db/app.db\"\n```\n\n### Install dependencies\n\n```bash\nyarn\n#or\nnpm install\n```\n\n### Run project\n\n```bash\nyarn start:dev\n#or\nnpm run start:dev\n```\n\n## License\n\nDistributed under the MIT License. See `LICENSE` for more information.\n\n\u003chr /\u003e","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flissone%2Fnode-fastify-knex","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flissone%2Fnode-fastify-knex","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flissone%2Fnode-fastify-knex/lists"}