{"id":50998972,"url":"https://github.com/hebertcisco/remodel-core","last_synced_at":"2026-06-20T12:34:15.078Z","repository":{"id":354042161,"uuid":"1221173987","full_name":"hebertcisco/remodel-core","owner":"hebertcisco","description":"A modern database-modeling toolkit","archived":false,"fork":false,"pushed_at":"2026-04-26T20:41:30.000Z","size":58,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-26T22:23:20.486Z","etag":null,"topics":["data-structures","database","ddl","er-diagram","modeling","parser-implementations","sql"],"latest_commit_sha":null,"homepage":"https://crates.io/crates/remodel-core","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hebertcisco.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":null,"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"lfx_crowdfunding":null,"polar":null,"buy_me_a_coffee":"hebertcisco","thanks_dev":null,"custom":null}},"created_at":"2026-04-25T21:09:52.000Z","updated_at":"2026-04-26T20:41:34.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/hebertcisco/remodel-core","commit_stats":null,"previous_names":["hebertcisco/remodel-core"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/hebertcisco/remodel-core","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hebertcisco%2Fremodel-core","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hebertcisco%2Fremodel-core/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hebertcisco%2Fremodel-core/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hebertcisco%2Fremodel-core/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hebertcisco","download_url":"https://codeload.github.com/hebertcisco/remodel-core/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hebertcisco%2Fremodel-core/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34570538,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-20T02:00:06.407Z","response_time":98,"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":["data-structures","database","ddl","er-diagram","modeling","parser-implementations","sql"],"created_at":"2026-06-20T12:34:14.608Z","updated_at":"2026-06-20T12:34:15.072Z","avatar_url":"https://github.com/hebertcisco.png","language":"Rust","funding_links":["https://buymeacoffee.com/hebertcisco"],"categories":[],"sub_categories":[],"readme":"# remodel-core\n\n[![Crates.io](https://img.shields.io/crates/v/remodel-core.svg)](https://crates.io/crates/remodel-core)\n[![Docs.rs](https://docs.rs/remodel-core/badge.svg)](https://docs.rs/remodel-core)\n[![License: GPL v3+](https://img.shields.io/badge/license-GPLv3%2B-blue.svg)](LICENSE)\n\n`remodel-core` is a Rust library for database modeling. It lets you build\nconceptual ER models, convert them into logical relational schemas, and render\nSQL DDL for supported dialects.\n\nThis crate is a Rust reimplementation of the core modeling engine from\n[brModelo](https://github.com/sis4com/brModelo) by Carlos Henrique Candido and\ncontributors. The port keeps the same GPL-3.0-or-later licensing model.\n\n## What it provides\n\n- Conceptual modeling primitives: entities, attributes, relationships,\n  cardinalities, specializations, unions, and associative entities.\n- Logical modeling primitives: tables, columns, primary keys, unique\n  constraints, and foreign keys.\n- Conceptual-to-logical transformation with configurable strategies for\n  relationships, specializations, and complex attributes.\n- SQL DDL rendering for PostgreSQL, MySQL, and SQLite.\n- Validation diagnostics for structurally invalid diagrams.\n- `serde` support for persistence and interchange formats.\n\n## Installation\n\n```bash\ncargo add remodel-core\n```\n\n## Quick start\n\n```rust\nuse remodel_core::models::conceptual::AttributeOwner;\nuse remodel_core::prelude::*;\n\nfn main() -\u003e Result\u003c()\u003e {\n    let mut model = ConceptualModel::new(\"library\");\n\n    let book = model.add_entity(\"Book\");\n    model.add_primary_attribute(book, \"id\", DataType::Integer)?;\n    model.add_attribute(\n        AttributeOwner::Entity(book),\n        \"title\",\n        DataType::Varchar(255),\n    )?;\n\n    let author = model.add_entity(\"Author\");\n    model.add_primary_attribute(author, \"id\", DataType::Integer)?;\n    model.add_attribute(\n        AttributeOwner::Entity(author),\n        \"name\",\n        DataType::Varchar(120),\n    )?;\n\n    model\n        .relate(\"wrote\", book, Cardinality::ZeroToMany)\n        .with(author, Cardinality::OneToMany)\n        .id();\n\n    let logical = model.to_logical()?;\n    let sql = logical.to_sql(SqlDialect::Postgres);\n\n    println!(\"{sql}\");\n    Ok(())\n}\n```\n\nThis produces a relational model with `Book`, `Author`, and a junction table\nfor `wrote`.\n\n## Modeling pipeline\n\n`remodel-core` follows the usual database-design flow:\n\n1. Build a conceptual model.\n2. Validate and convert it into a logical model.\n3. Render SQL DDL for the target database dialect.\n\nThe main APIs are:\n\n- `ConceptualModel` for ER authoring\n- `ConceptualModel::to_logical()` for default conversion\n- `transform::conceptual_to_logical()` when you need custom `ConvertOptions`\n- `LogicalModel::to_sql()` for final DDL generation\n\n## Supported SQL dialects\n\n- PostgreSQL\n- MySQL / MariaDB\n- SQLite\n\n## Validation\n\nThe library validates conceptual models before conversion. Structural problems\nsuch as missing references or invalid identifiers are reported through\ndiagnostics, and conversion returns `Error::Validation` when errors are present.\n\n## Release\n\nPublishing to crates.io is automated through GitHub Actions:\n\n- Push a tag named `remodel-core-vX.Y.Z`, or\n- Run the `Publish remodel-core` workflow manually.\n\nThe workflow runs the crate tests and then publishes `RemodelCore/` using the\nrepository secret `CARGO_REGISTRY_TOKEN`.\n\n## License\n\nGPL-3.0-or-later.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhebertcisco%2Fremodel-core","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhebertcisco%2Fremodel-core","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhebertcisco%2Fremodel-core/lists"}