{"id":27302362,"url":"https://github.com/asheswook/tranjs","last_synced_at":"2025-04-12T02:18:08.121Z","repository":{"id":270210940,"uuid":"908859027","full_name":"asheswook/tranjs","owner":"asheswook","description":"Declarative transaction management without ORMs","archived":false,"fork":false,"pushed_at":"2025-03-19T01:43:49.000Z","size":154,"stargazers_count":3,"open_issues_count":3,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-12T02:18:02.446Z","etag":null,"topics":["database","nodejs","transaction","transactional","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-2.1","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/asheswook.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-12-27T06:24:03.000Z","updated_at":"2025-03-26T02:16:25.000Z","dependencies_parsed_at":"2025-01-30T17:38:16.633Z","dependency_job_id":"98c28b46-7541-4662-8027-b71295b8cca5","html_url":"https://github.com/asheswook/tranjs","commit_stats":null,"previous_names":["asheswook/node-transaction","asheswook/tranjs"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asheswook%2Ftranjs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asheswook%2Ftranjs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asheswook%2Ftranjs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asheswook%2Ftranjs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/asheswook","download_url":"https://codeload.github.com/asheswook/tranjs/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248505917,"owners_count":21115354,"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":["database","nodejs","transaction","transactional","typescript"],"created_at":"2025-04-12T02:18:07.582Z","updated_at":"2025-04-12T02:18:08.100Z","avatar_url":"https://github.com/asheswook.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# TranJS\n\n[![Test](https://github.com/asheswook/tranjs/actions/workflows/test.yml/badge.svg)](https://github.com/asheswook/tranjs/actions/workflows/test.yml)\n\nTranJS is a transaction management framework which provides declaretive transaction, without any ORMs. \n\nIt is designed to provide reliable and intuitive transaction management for mission-critical safety applications and general-purpose applications.\n\n## Features\n- ✅ **Declarative Transaction via Decorator**\n- ⚡ **TypeScript Native**\n- 🛠️ **No Dependencies, Lightweight (15KB)**\n- 🔄 **Flexible Transaction Propagation**\n\n## Getting Started\n* API Documentation is available at [here](/docs/api.md).\n* Native supported drivers are available at [here](/docs/drivers.md).\n* The [example](/examples) contains a simple example of how to use the TranJS framework.\n\n## Usage\n\n```typescript\nclass MyService {\n    @Transactional()\n    async transfer(from: string, to: string, amount: number) {\n        await this.withdrawMoney(\"Jaewook\", 100);\n        await this.depositMoney(\"Chansu\", 100);\n    }\n\n    @Transactional(Propagation.MANDATORY)\n    private async depositMoney(userId: string, amount: number) {\n        console.log(\"Execute Query\", userId, amount);\n        await ctx().execute(\"UPDATE user SET balance = balance + ? WHERE id = ?\", [amount, userId]);\n    }\n\n    @Transactional(Propagation.MANDATORY)\n    private async withdrawMoney(userId: string, amount: number) {\n        console.log(\"Execute Query\", userId, amount);\n        await ctx().execute(\"UPDATE user SET balance = balance - ? WHERE id = ?\", [amount, userId]);\n    }\n}\n```\n\n```bash\nStart Transaction (id: ae8wml5i78rt) # Transaction started at transfer()\nExecute Query Jaewook 100\nExecute Query Chansu 100\nCommit Transaction (id: ae8wml5i78rt) # Transaction committed when transfer() finished\n```\n\n## Installation\n\nIt should be set up for the database you want to use. See [here](/docs/drivers.md).\n\n\u003e [!NOTE]\n\u003e If the driver you want to use does not exist, [you can implement it on your own.](/docs/self-implement-guide.md)\n\n## Contribute\n\nTranJS welcomes contributions from the community to enhance its functionality and usability. Here’s how you can contribute:\n\n1. **Report Issues**  \n   If you encounter bugs or have suggestions for improvements, feel free to open an issue in the repository.\n\n2. **Submit Pull Requests**  \n   Fork the repository, create a new branch for your changes, and submit a pull request. Ensure your code adheres to the project's coding standards and includes relevant tests.\n\n3. **Implement Drivers**  \n   If the driver you need is not available, you can implement it yourself using the [self-implement guide](/docs/self-implement-guide.md).\n\n4. **Improve Documentation**  \n   Contributions to the documentation are always appreciated—whether it's fixing typos, adding examples, or clarifying complex concepts.\n\n5. **Collaborate and Review**  \n   Participate in discussions, review pull requests, and provide constructive feedback to other contributors.\n\n## License\n\nThis project is licensed under the LGPL-2.1 License - see the [LICENSE](LICENSE) file for details.\n\n## Acknowledgement\n\n* [Spring JPA](https://github.com/spring-projects/spring-data-jpa)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fasheswook%2Ftranjs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fasheswook%2Ftranjs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fasheswook%2Ftranjs/lists"}