{"id":28424157,"url":"https://github.com/scrawler-labs/arca-orm","last_synced_at":"2025-06-24T21:31:22.665Z","repository":{"id":37024080,"uuid":"495727539","full_name":"scrawler-labs/arca-orm","owner":"scrawler-labs","description":" Low code , Zero Configuration ORM that creates models, config, database and tables on the fly.","archived":false,"fork":false,"pushed_at":"2025-04-14T14:43:20.000Z","size":8800,"stargazers_count":34,"open_issues_count":6,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-05T09:43:40.932Z","etag":null,"topics":["amphp","database","doctrine","doctrine-dbal","eloquent-orm","mysql","orm","php","sql","swoole"],"latest_commit_sha":null,"homepage":"https://component.scrawlerlabs.com/arca-orm/","language":"PHP","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/scrawler-labs.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,"zenodo":null}},"created_at":"2022-05-24T08:07:19.000Z","updated_at":"2025-04-14T14:42:07.000Z","dependencies_parsed_at":"2023-09-23T16:44:05.313Z","dependency_job_id":"5c586998-14ee-4cb0-92ac-4d986efcbbbc","html_url":"https://github.com/scrawler-labs/arca-orm","commit_stats":{"total_commits":54,"total_committers":2,"mean_commits":27.0,"dds":"0.20370370370370372","last_synced_commit":"e45c875a43a24d84076db7c5b3680cd9001ba63b"},"previous_names":[],"tags_count":21,"template":false,"template_full_name":null,"purl":"pkg:github/scrawler-labs/arca-orm","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scrawler-labs%2Farca-orm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scrawler-labs%2Farca-orm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scrawler-labs%2Farca-orm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scrawler-labs%2Farca-orm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/scrawler-labs","download_url":"https://codeload.github.com/scrawler-labs/arca-orm/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scrawler-labs%2Farca-orm/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261759094,"owners_count":23205494,"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":["amphp","database","doctrine","doctrine-dbal","eloquent-orm","mysql","orm","php","sql","swoole"],"created_at":"2025-06-05T09:36:42.031Z","updated_at":"2025-06-24T21:31:22.656Z","avatar_url":"https://github.com/scrawler-labs.png","language":"PHP","readme":"\u003cdiv align=\"center\"\u003e\n\u003ch1\u003e 🚀 ARCA ORM\u003c/h1\u003e\n\u003ca href=\"https://github.com/scrawler-labs/arca-orm/actions/workflows/main.yml\"\u003e\u003cimg alt=\"GitHub Workflow Status\" src=\"https://img.shields.io/github/actions/workflow/status/scrawler-labs/arca-orm/main.yml?style=flat-square\"\u003e\u003c/a\u003e\u0026nbsp;\n\u003ca href=\"https://app.codecov.io/gh/scrawler-labs/arca-orm\"\u003e\u003cimg alt=\"Codecov\" src=\"https://img.shields.io/codecov/c/github/scrawler-labs/arca-orm?style=flat-square\"\u003e\u003c/a\u003e\u0026nbsp;\n\u003ca href=\"https://scrutinizer-ci.com/g/scrawler-labs/arca-orm/\"\u003e\u003cimg alt=\"Scrutinizer code quality (GitHub/Bitbucket)\" src=\"https://img.shields.io/scrutinizer/quality/g/scrawler-labs/arca-orm?style=flat-square\"\u003e\u003c/a\u003e\u0026nbsp;\n\u003ca href=\"https://github.com/scrawler-labs/arca-orm/actions/workflows/main.yml\"\u003e\u003cimg src=\"https://img.shields.io/badge/PHPStan-enabled-brightgreen.svg?style=flat-square\" alt=\"PHPStan Enabled\"\u003e\u003c/a\u003e\n\u003cimg alt=\"Packagist Version (including pre-releases)\" src=\"https://img.shields.io/packagist/v/scrawler/arca?include_prereleases\u0026style=flat-square\"\u003e\u0026nbsp;\n\u003cimg alt=\"GitHub License\" src=\"https://img.shields.io/github/license/scrawler-labs/arca-orm?color=blue\u0026style=flat-square\"\u003e\n\u003cbr\u003e\u003cbr\u003e\n🔥 Low code , Zero Configuration ORM that creates models, config, database and tables on the fly. 🔥\u003cbr\u003e\n 🇮🇳 Made in India 🇮🇳\n\u003cbr\u003e\u003cbr\u003e\n   \n![arca-orm](https://user-images.githubusercontent.com/7591484/170266248-62e23e46-241c-4063-93b8-772eb0de51b0.gif)\n \n Complete documentation can be found [here](http://component.scrawlerlabs.com/arca-orm)\n\u003c/div\u003e\n\u003cbr\u003e\u003cbr\u003e\n\n## 🤔 Why use Arca Orm ?\n- Automatically creates tables and columns as you go\n- No configuration, just fire and forget\n- Save loads of time while working on database\n- Built upon stable foundation of Doctrine Dbal and extensively tested\n- Thanks to [loophp](https://github.com/loophp/collection) Arca comes with Lazy collection and tons of helper collection functions\n- Supports lots database platforms , you can see the complete list [here](https://component.scrawlerlabs.com/arca-orm/database/)\n- Supports concurrent queries and connection pooling with swoole and async with amphp. Check out integration docs [here](https://component.scrawlerlabs.com/arca-orm/swoole/)\n\u003cbr\u003e\u003cbr\u003e\n\n## ❗Requirements\n- PHP 8.1 or greater\n- PHP PDO or other supported database adapter\n- Mysql, MariaDB, Sqlite or any other supported database. check the list [here](https://component.scrawlerlabs.com/arca-orm/database/)\n\u003cbr\u003e\u003cbr\u003e\n## 💻 Installation\nYou can install Arca ORM via Composer. If you don't have composer installed , you can download composer from [here](https://getcomposer.org/download/)\n\n```\ncomposer require scrawler/arca\n```\n\u003cbr\u003e\n\n## 🏁  QuickStart\n\n### ✨ Setup\n```php\n   \u003c?php\n    include './vendor/autoload.php'\n    \n    $connectionParams = array(\n        'dbname' =\u003e 'YOUR_DB_NAME',\n        'user' =\u003e 'YOUR_DB_USER',\n        'password' =\u003e 'YOUR_DB_PASSWORD',\n        'host' =\u003e 'YOUR_DB_HOST',\n        'driver' =\u003e 'pdo_mysql', //You can use other supported driver this is the most basic mysql driver\n    );\n\n    \n    $db = \\Scrawler\\Arca\\Facade\\Database::connect($connectionParams);\n\n   //If you dont want to use facade , directly build from factory\n   $factory =  \\Scrawler\\Arca\\Factory\\DatabaseFactory()\n   $db = $factory-\u003ebuild($connectionParams)\n    \n```\nFor complete list of driver check [here](https://component.scrawlerlabs.com/arca-orm/database/)\n    \n### ✏️ CRUD\n```php\n\n    // Create new record\n    // The below code will automatically create user table and store the record\n\n    $user = $db-\u003ecreate('user');\n    $user-\u003ename = \"Pranja Pandey\";\n    $user-\u003eage = 24\n    $user-\u003egender = \"male\"\n    $user-\u003esave()\n    \n    // Get record with id 1\n    \n    $user = $db-\u003egetOne('user',1);\n    \n    //Get all records\n    \n    $users = $db-\u003eget('user');\n    \n    // Update a record\n     $user = $db-\u003egetOne('user',1);\n     $user-\u003ename = \"Mr Pranjal\";\n     $user-\u003esave();\n     \n    // Delete a record\n     $user = $db-\u003egetOne('user',1);\n     $user-\u003edelete();\n\n```\nFor complete CRUD documentaion visit [here](https://component.scrawlerlabs.com/arca-orm/crud/)\n\n### 🔎 Finding data with query\n```php\n\n  // Using where clause\n  $users = $db-\u003efind('user')\n              -\u003ewhere('name = \"Pranjal Pandey\"')\n              -\u003eget();\n // If where input in unsafe or user defined\n $name = \"Pranjal\"\n $users = $db-\u003efind('user')\n              -\u003ewhere('name = ?')\n              -\u003esetParameter(0,$name)\n              -\u003eget();\n              \n  foreach ($users as $user){\n  // Some logic here \n  }\n  \n  // Get only single record\n  $users = $db-\u003efind('user')\n             -\u003ewhere('name = \"Pranjal Pandey\"')\n             -\u003efirst();  \n\n  // Using limit in query\n  $users = $db-\u003efind('user')\n              -\u003esetFirstResult(10)\n              -\u003esetMaxResults(20);\n              -\u003eget()\n\n```\nFor complete Query documentaion visit [here](https://component.scrawlerlabs.com/arca-orm/finding/)\n\n\u003cbr\u003e\u003cbr\u003e\n## 👏 Supporters\nIf you have reached here consider giving a star to help this project ❤️ \n[![Stargazers repo roster for @scrawler-labs/arca-orm](https://reporoster.com/stars/dark/notext/scrawler-labs/arca-orm)](https://github.com/scrawler-labs/arca-orm/stargazers)\n\u003cbr\u003e\u003cbr\u003e\n\n## ✅ Roadmap\nHere is list of few things that i would like to add in upcoming release\n- [ ] Models should be extendible with custom models\n- [ ] Validations for custom models\n- [ ] Automatically create migrations when table is updated or created\n- [X] Support eager loading for relations\n- [X] Better documentaions\n\u003cbr\u003e\u003cbr\u003e\n\n## 👍 Similar projects and inspiration\n- [Eloquent ORM](https://laravel.com/docs/5.0/eloquent)\n- [Redbean PHP](https://redbeanphp.com/index.php)\n- [Doctrine ORM](https://www.doctrine-project.org/projects/doctrine-orm/en/2.11/index.html)\n\u003cbr\u003e\u003cbr\u003e\n\n## 📄 License\nArca ORM is created by [Pranjal Pandey](https://www.github.com/ipranjal) and released under the [Apache 2.0 License](https://github.com/scrawler-labs/arca-orm/blob/main/LICENSE).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscrawler-labs%2Farca-orm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fscrawler-labs%2Farca-orm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscrawler-labs%2Farca-orm/lists"}