{"id":34250089,"url":"https://github.com/veeso/ic-dbms","last_synced_at":"2026-02-27T13:14:50.384Z","repository":{"id":323914525,"uuid":"1095275459","full_name":"veeso/ic-dbms","owner":"veeso","description":"IC DBMS Canister is an Internet Computer framework which provides an easy way to implement a database canister by just providing the database schema.","archived":false,"fork":false,"pushed_at":"2025-12-12T17:45:52.000Z","size":3499,"stargazers_count":2,"open_issues_count":2,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-12-19T18:55:12.231Z","etag":null,"topics":["canister","dfinity","icp","internet-computer"],"latest_commit_sha":null,"homepage":"https://veeso.github.io/ic-dbms/","language":"Rust","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/veeso.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":"veeso","ko_fi":"veeso"}},"created_at":"2025-11-12T20:42:37.000Z","updated_at":"2025-12-15T15:41:21.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/veeso/ic-dbms","commit_stats":null,"previous_names":["veeso/ic-dbms-canister","veeso/ic-dbms"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/veeso/ic-dbms","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/veeso%2Fic-dbms","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/veeso%2Fic-dbms/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/veeso%2Fic-dbms/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/veeso%2Fic-dbms/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/veeso","download_url":"https://codeload.github.com/veeso/ic-dbms/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/veeso%2Fic-dbms/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28005408,"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-12-24T02:00:07.193Z","response_time":83,"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":["canister","dfinity","icp","internet-computer"],"created_at":"2025-12-16T09:11:06.515Z","updated_at":"2026-02-27T13:14:50.368Z","avatar_url":"https://github.com/veeso.png","language":"Rust","funding_links":["https://github.com/sponsors/veeso","https://ko-fi.com/veeso"],"categories":["Storage and Databases"],"sub_categories":["Candid implementations"],"readme":"# IC DBMS Canister\n\n![logo](./assets/images/cargo/logo-128.png)\n\n[![license-mit](https://img.shields.io/crates/l/ic-dbms-canister.svg)](https://opensource.org/licenses/MIT)\n[![repo-stars](https://img.shields.io/github/stars/veeso/ic-dbms?style=flat)](https://github.com/veeso/ic-dbms/stargazers)\n[![downloads](https://img.shields.io/crates/d/ic-dbms-canister.svg)](https://crates.io/crates/ic-dbms-canister)\n[![latest-version](https://img.shields.io/crates/v/ic-dbms-canister.svg)](https://crates.io/crates/ic-dbms-canister)\n[![ko-fi](https://img.shields.io/badge/donate-ko--fi-red)](https://ko-fi.com/veeso)\n[![conventional-commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-%23FE5196?logo=conventionalcommits\u0026logoColor=white)](https://conventionalcommits.org)\n\n[![ci](https://github.com/veeso/ic-dbms/actions/workflows/ci.yml/badge.svg)](https://github.com/veeso/ic-dbms/actions)\n[![coveralls](https://coveralls.io/repos/github/veeso/ic-dbms/badge.svg)](https://coveralls.io/github/veeso/ic-dbms)\n[![docs](https://docs.rs/ic-dbms-canister/badge.svg)](https://docs.rs/ic-dbms-canister)\n\nThis project is in a very early stage of development. The goal is to provide a framework for building database canisters on the Internet Computer.\n\n## Overview\n\nIC DBMS Canister is an Internet Computer framework which provides an easy way to implement a database canister by just providing the database schema.\n\nThe user can just define the data entity by defining the tables:\n\n```rust\nuse candid::CandidType;\nuse ic_dbms_api::prelude::{Text, Uint32};\nuse ic_dbms_canister::prelude::{DbmsCanister, Table};\nuse serde::Deserialize;\n\n#[derive(Debug, Table, CandidType, Deserialize, Clone, PartialEq, Eq)]\n#[table = \"users\"]\npub struct User {\n    #[primary_key]\n    id: Uint64,\n    #[sanitizer(ic_dbms_api::prelude::TrimSanitizer)]\n    #[validate(ic_dbms_api::prelude::MaxStrlenValidator(20))]\n    name: Text,\n    #[validate(ic_dbms_api::prelude::EmailValidator)]\n    email: Text,\n    age: Nullable\u003cUint32\u003e,\n}\n```\n\nYou can also define relationships between tables:\n\n```rust\n#[derive(Debug, Table, CandidType, Deserialize, Clone, PartialEq, Eq)]\n#[table = \"posts\"]\npub struct Post {\n    #[primary_key]\n    id: Uint32,\n    title: Text,\n    content: Text,\n    #[foreign_key(entity = \"User\", table = \"users\", column = \"id\")]\n    author: Uint32,\n}\n```\n\n\u003e [!NOTE]\n\u003e Mind that deriving `CandidType`, `Deserialize` and `Clone` is required for the tables to be used in the canister.\n\nAnd once you have defined all your tables, you can instantiate the database canister by deriving the `DbmsCanister` macro on any struct, providing the table names and their corresponding Rust struct entity:\n\n```rust\n#[derive(DbmsCanister)]\n#[tables(User = \"users\", Post = \"posts\")]\npub struct IcDbmsCanisterGenerator;\n```\n\nAnd you will have a fully functional database canister with all the CRUD operations implemented for you.\n\nThe canister API will be automatically generated based on the defined tables, with the following methods:\n\n```candid\nservice : (IcDbmsCanisterArgs) -\u003e {\n  acl_add_principal : (principal) -\u003e (Result);\n  acl_allowed_principals : () -\u003e (vec principal) query;\n  acl_remove_principal : (principal) -\u003e (Result);\n  begin_transaction : () -\u003e (nat);\n  commit : (nat) -\u003e (Result);\n  delete_posts : (DeleteBehavior, opt Filter_1, opt nat) -\u003e (Result_1);\n  delete_users : (DeleteBehavior, opt Filter_1, opt nat) -\u003e (Result_1);\n  insert_posts : (PostInsertRequest, opt nat) -\u003e (Result);\n  insert_users : (UserInsertRequest, opt nat) -\u003e (Result);\n  rollback : (nat) -\u003e (Result);\n  select_posts : (Query, opt nat) -\u003e (Result_2) query;\n  select_users : (Query_1, opt nat) -\u003e (Result_3) query;\n  update_posts : (PostUpdateRequest, opt nat) -\u003e (Result_1);\n  update_users : (UserUpdateRequest, opt nat) -\u003e (Result_1);\n}\n```\n\n## API Documentation\n\nThe API generated by the `ic-dbms-canister` is the following:\n\n### ACL Management\n\n- `acl_add_principal(principal)`: Adds a principal to the ACL.\n- `acl_allowed_principals()`: Returns the list of principals in the ACL.\n- `acl_remove_principal(principal)`: Removes a principal from the ACL.\n\n### Transaction Management\n\n- `begin_transaction()`: Starts a new transaction and returns its ID.\n- `commit(transaction_id)`: Commits the transaction with the given ID. The user must own the transaction to commit it.\n- `rollback(transaction_id)`: Rolls back the transaction with the given ID. The user must own the transaction to roll it back.\n\n### Data Manipulation\n\nFor each table defined in the schema, the following methods are generated:\n\n- `insert_\u003ctable_name\u003e(records, transaction_id)`: Inserts records into the specified table. Optionally within a transaction.\n- `select_\u003ctable_name\u003e(query, transaction_id)`: Selects records from the specified table based on the query. Optionally within a transaction.\n- `update_\u003ctable_name\u003e(updates, transaction_id)`: Updates records in the specified table. Optionally within a transaction.\n- `delete_\u003ctable_name\u003e(delete_behavior, filter, transaction_id)`: Deletes records from the specified table based on the filter and delete behavior. Optionally within a transaction.\n\n## Getting Started\n\nSee the [Getting Started Guide](https://veeso.github.io/ic-dbms/docs/get-started.html) for more information on how to setup and deploy the DBMS canister.\n\n## Interacting with the Canister\n\nSee the [ic-dbms-client](./ic-dbms-client/README.md) for more information on how to interact with the canister.\n\n## Features\n\n- [x] Define tables with common attributes\n- [x] CRUD operations\n- [x] Complex queries with filtering and pagination\n- [x] Relationships between tables with foreign keys\n- [x] Transactions with commit and rollback\n- [x] Access Control Lists (ACL) to restrict access to the database\n- [x] Validation, Sanitizers and constraints on table columns\n- [x] JOIN operations between tables\n- [ ] Indexes for faster queries\n- [ ] Custom data types\n- [ ] Migrations to update the database schema on canister upgrades\n- [ ] SQL query support\n\n## Documentation\n\nRead the documentation at \u003chttps://veeso.github.io/ic-dbms\u003e\n\n## License\n\nThis project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fveeso%2Fic-dbms","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fveeso%2Fic-dbms","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fveeso%2Fic-dbms/lists"}