{"id":20068061,"url":"https://github.com/malanski/node-api","last_synced_at":"2026-04-12T13:01:36.633Z","repository":{"id":191775722,"uuid":"685370071","full_name":"malanski/node-api","owner":"malanski","description":"A back end project using fastify, knex to create an API","archived":false,"fork":false,"pushed_at":"2023-08-31T04:47:36.000Z","size":113,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-12T23:29:58.272Z","etag":null,"topics":["dotenv","fastify","knex","nodejs","typescript","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/malanski.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}},"created_at":"2023-08-31T04:42:02.000Z","updated_at":"2023-08-31T04:49:32.000Z","dependencies_parsed_at":"2023-08-31T17:26:53.165Z","dependency_job_id":null,"html_url":"https://github.com/malanski/node-api","commit_stats":null,"previous_names":["malanski/node-api"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/malanski%2Fnode-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/malanski%2Fnode-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/malanski%2Fnode-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/malanski%2Fnode-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/malanski","download_url":"https://codeload.github.com/malanski/node-api/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241494442,"owners_count":19971917,"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","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":["dotenv","fastify","knex","nodejs","typescript","zod"],"created_at":"2024-11-13T14:05:12.112Z","updated_at":"2025-12-31T01:06:30.825Z","avatar_url":"https://github.com/malanski.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Transaction Management Backend\n\nThis is a backend project built using Fastify and Knex to provide API endpoints for managing transactions. It allows users to create new transactions, obtain a summary of their account, list all transactions, and view a single transaction.\n\n## Functional Requirements\n\n- Users can create new transactions.\n- Users can obtain a summary of their account.\n- Users can list all transactions that have taken place.\n- Users can view a single transaction.\n\n## Business Rules\n\n- Transactions can be of two types: credit or debit.\n- A credit transaction adds to the total amount, while a debit transaction subtracts from it.\n- User identification is required for requests.\n- Users can only view transactions they have created.\n\n## Features\n\n- Create a new transaction.\n- Retrieve an account summary.\n- List all transactions.\n- View a single transaction.\n\n## Getting Started\n\n1. Clone the repository.\n2. Install the project dependencies using `npm install`.\n3. Configure your database connection in `knexfile.js`.\n4. Run database migrations using `npm run knex migrate:latest`.\n5. Start the server with `npm start`.\n6. The server will be running at `http://localhost:3000`.\n\n## API Endpoints\n\n- `POST /transactions`: Create a new transaction.\n- `GET /account-summary`: Obtain a summary of the user's account.\n- `GET /transactions`: List all transactions.\n- `GET /transactions/:id`: View a single transaction.\n\n## Technologies Used\n\n- Fastify: A fast and low overhead web framework for Node.js.\n- Knex: A SQL query builder for Node.js.\n- PostgreSQL (or your preferred database): Used for data storage.\n\n## Folder Structure\n\n  - `src/`: Contains the source code for the backend application.\n  - `controllers/`: Contains the route controllers.\n  - `db/`: Contains database related configuration and migrations.\n  - `models/`: Contains database models.\n  - `routes/`: Contains the route definitions.\n  - `index.js`: Entry point of the application.\n\n## Contributing\n\nContributions are welcome! Please create a pull request with your changes.\n\n## License\n\nThis project is licensed under the [MIT License](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmalanski%2Fnode-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmalanski%2Fnode-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmalanski%2Fnode-api/lists"}