{"id":18274257,"url":"https://github.com/scalamolecule/molecule-admin","last_synced_at":"2025-07-26T17:13:04.794Z","repository":{"id":89466619,"uuid":"100465193","full_name":"scalamolecule/molecule-admin","owner":"scalamolecule","description":"Database administration with molecules","archived":false,"fork":false,"pushed_at":"2021-11-30T00:03:36.000Z","size":15413,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-06T05:15:11.882Z","etag":null,"topics":["data-visualization","database","datomic","scala","scala-js","scalajs"],"latest_commit_sha":null,"homepage":null,"language":"Scala","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/scalamolecule.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":"2017-08-16T08:14:53.000Z","updated_at":"2022-02-27T07:27:18.000Z","dependencies_parsed_at":null,"dependency_job_id":"68aeca18-b84a-4fdc-bcd1-f9e1c9fb6b70","html_url":"https://github.com/scalamolecule/molecule-admin","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/scalamolecule/molecule-admin","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scalamolecule%2Fmolecule-admin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scalamolecule%2Fmolecule-admin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scalamolecule%2Fmolecule-admin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scalamolecule%2Fmolecule-admin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/scalamolecule","download_url":"https://codeload.github.com/scalamolecule/molecule-admin/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scalamolecule%2Fmolecule-admin/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267198709,"owners_count":24051559,"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-07-26T02:00:08.937Z","response_time":62,"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-visualization","database","datomic","scala","scala-js","scalajs"],"created_at":"2024-11-05T12:09:00.445Z","updated_at":"2025-07-26T17:13:04.786Z","avatar_url":"https://github.com/scalamolecule.png","language":"Scala","readme":"\n![](project/resources/Molecule-logo-M.png)\n\n# MoleculeAdmin for Datomic dbs\n\n[![Gitter](https://badges.gitter.im/scalamolecule/Lobby.svg)](https://gitter.im/scalamolecule/Lobby?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge)\n\nAn advanced web app (built with [ScalaJS](http://www.scala-js.org)) to \nadministrate [Datomic](https://www.datomic.com/on-prem.html) databases:\n\n- Create and delete Datomic databases.\n- Build and update Datomic database schemas.\n- Build and run complex queries from a graphical query builder or directly with [molecules](http://www.scalamolecule.org).\n- Sort, filter, group and browse large data sets easily and fast.\n- Add/edit data directly in table cells with easy key-command navigation.\n- Perform custom group edits on any number of entities.\n- Recursively expand entities with simple mouseovers for fast exploration.\n- Watch/undo transaction history.\n- See/edit grouped values.\n- Shows queries as molecules and datalog queries (for easy copy/paste).\n- Automatic query optimization for fast query performance.\n\nMoleculeAdmin uses [molecules](http://www.scalamolecule.org) as a query representation. \nBut it can be used without knowing about/using molecules or Scala for that matter \n(Clojure/Java folks are welcome!).\n\nFor performing Datalog queries, please use the official \n[Datomic Console](https://my.datomic.com/account/create) (requires registration \nor using a Pro version of Datomic).\n\n\n## Download\n\nTo explore MoleculeAdmin with the mBrainz sample database,\n1. Download a Datomic distribution like the [free version](https://my.datomic.com/downloads/free)\n2. Download and untar the [mBrainz](https://github.com/Datomic/mbrainz-sample) sample database\n   ```\n   cd datomic-free-0.9.5703.21\n   wget https://s3.amazonaws.com/mbrainz/datomic-mbrainz-1968-1973-backup-2017-07-20.tar -O mbrainz.tar\n   tar -xvf mbrainz.tar\n   ```\n3. Start the transactor in its own process\n   ```\n   bin/transactor config/samples/free-transactor-template.properties\n   ```\n4. In another process (open new tab/window in your terminal), install the mbrainz database\n   ```\n   bin/datomic restore-db file:mbrainz-1968-1973 datomic:free://localhost:4334/mbrainz-1968-1973\n   ```\n5. Download MoleculeAdmin\n   ```\n   cd ..\n   git clone https://github.com/scalamolecule/molecule-admin.git\n   ```\n\n## Use MoleculeAdmin\n\nHaving downloaded and installed all the necessary parts listed above,\n\n1. Start the Datomic transactor in its own process, something like this (might \nalready be running):\n   ```\n   cd datomic-free-0.9.5703.21\n   bin/transactor -Xmx4g -Xms4g -Ddatomic.txTimeoutMsec=120000 config/samples/free-transactor-template.properties\n   ```\n2. In another process, start the application:\n   ```\n   cd molecule-admin\n   sbt run\n   ```\n3. Wait for the server to have started:\n   ```\n   (Server started, use Enter to stop and go back to the console...)\n   ```\n4. Then open [localhost:9001](http://localhost:9001) - this can take a while the \nfirst time since all dependencies are resolved and the whole project compiled \n(check progress in terminal).\n   \nYou should arrive at a list of current databases, something like this (if you\nhaven't already created other databases):\n\n![](project/resources/StartPage.png)\n\nA few more sample databases were also created that you can freely play \naround with by exploring their `Schema` or perform a `Query`:\n- CoreTest - contains all possible data types. Note how the Schema defines those\nand how the query builder takes each type into consideration and only allow \nvalid settings.\n- Partition/Partition1 - exploring multiple partitions that each contains one or \nmore namespaces.\n- Tree - Used to test building complex hierarchies with the query builder. \n- mBrainz - large real data set that can give a sense of the query builder\ncapabilities and the paging/editing features.\n\nIt's recommended to use MoleculeAdmin in the Google Chrome browser for expected \nlook and behaviour.\n\n\n## Group edits with custom Scala code \n\nAn advanced feature of MoleculeAdmin is to make group edits on a whole column\nof data. In the input cell above the group edit column, you define a Scala\ntransformation lambda that will be applied to each value in turn. The lambda\ncode snippet will be automatically compiled and applied once you hit enter and\ntransform all current values of the column, both visible on the current page and\nsubsequent values. Make sure you have filtered exactly the values that you\nwant to transform!\n\nYour Scala lambda code snippet is compiled by a separately running ScalaFiddle\nserver to javascript code that is then applied to the current values. Both the \nbrowser table and memory and the Datomic database is updated.\n\nIf you want to use this group edit functionality, you'll need to once initially \nclone the adapted ScalaFiddle server for MoleculeAdmin:\n```\ngit clone https://github.com/scalamolecule/scalafiddle-core.git\n```\nFrom here on you only need to start the server and have it running in the \nbackground to allow group edits:\n```\ncd scalafiddle-core\nsbt \"~; router/reStart; compilerServer06x/reStart\"\n```\nMoleculeAdmin can then talk automatically in the background with the \nscalafiddle-core server through `http://localhost:8880/embed`.\n\nSee examples of group edits [here][group-edit-examples].\n\n\n## Enable your own Datomic database\n\nFor MoleculeAdmin to be able to work with a database it needs a path to a\n[schema definition file](http://www.scalamolecule.org/manual/schema/) which is\na `molecule` representation of a Datomic database schema. You don't need to use\nmolecules or Scala to use MoleculeAdmin, as long as you provide a schema \ndefinition file that defines your Datomic database schema. Once you have created \nsuch file you can enter its full path into MoleculeAdmin:\n\n![](project/resources/createDb.png)\n\n\n### Schema development in Scala\n\nMolecule uses the schema definition file as a blueprint for generating Scala\nboilerplate code that you can use to make type safe queries in Scala against \na Datomic database.\n\nIn the first life cycles of a Scala project, you'll likely develop your database schema\nby writing a lot of changes directly to the schema definition file and re-compile\nthe project regularly to have the boilerplate code reflecting your changes.\n\nBut when the schema \nstabilizes and you start to enter real data into the database, you'll want a more\nflexible way to make changes to the schema and at the same time have those\nchanges continuously propagated to your generated boilerplate. This is when\nMoleculeAdmin can \"take over\" the responsibility of keeping your schema definition\nfile in sync with your database. So instead of you writing manually to the schema \ndefinition file, you let MoleculeAdmin write changes directly to it. \n\n### Clojure/Java users\n\nFor Clojure/Java users not using Scala, it would be cool if we could use the newer\nDatomic feature of exporting the schema definition for a database\nin order to automatically generate a schema definition file. Since the free\nversion of Datomic is not up to date and the export feature not available in \nthe current older version, we can't yet automate this process and you'll have to \nmake such [schema definition file](http://www.scalamolecule.org/manual/schema/) \nmanually for now.\n\n\n## Development\n\nIf you have questions or ideas, please feel free to discuss in the gitter channel:\n\n[![Gitter](https://badges.gitter.im/scalamolecule/Lobby.svg)](https://gitter.im/scalamolecule/Lobby?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge)\n\nOr you can submit [issues](https://github.com/scalamolecule/molecule-admin/issues) /\n[pull requests](https://github.com/scalamolecule/molecule-admin/pulls) too.\n\n\n## Test\n\nRun all internal MoleculeAdmin test by platform:\n``` \nsbt\nserver\u003e server/test\nserver\u003e sharedJVM/test\nserver\u003e sharedJS/test\n```\n\n.. or run individual tests:\n```\nsbt\nserver\u003e server/testOnly moleculeadmin.servertest.log.LatestTxs\nserver\u003e sharedJVM/testOnly moleculeadmin.sharedtest.util.DateTransformation\nserver\u003e sharedJS/testOnly moleculeadmin.sharedtest.util.DateTransformation\n```\n\n\n## Compile\n\n```\n\u003e sbt clean compile\n\u003e sbt sharedJS/fastOptJS\n```\n\n## Credits\n\n- Big credits go to Datomic's own [Console](https://my.datomic.com/account/create)\nthat can make all possible queries with Datalog against Datomic databases. \nMoleculeAdmin can make a subset of those queries, but hopefully enough to be \nuseful, also given its capability to edit data and schema.\n- [OpenRefine](https://openrefine.org) (earlier \"GoogleRefine\") - a sophisticated \neditor of tabular data that has served as a great inspiration for MoleculeAdmin!\n\n\n#### Author\nMarc Grue\n\n#### License\nMolecule is licensed under the [Apache License 2.0](http://en.wikipedia.org/wiki/Apache_license)\n\n\n[group-edit-examples]: https://github.com/scalamolecule/molecule-admin/blob/master/client/src/main/scala/moleculeadmin/client/app/logic/query/data/groupEdit/compileTest/Card1.scala","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscalamolecule%2Fmolecule-admin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fscalamolecule%2Fmolecule-admin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscalamolecule%2Fmolecule-admin/lists"}