{"id":13489267,"url":"https://github.com/gahabeen/biota","last_synced_at":"2025-04-13T13:55:26.856Z","repository":{"id":40288998,"uuid":"245215475","full_name":"gahabeen/biota","owner":"gahabeen","description":"A simple database framework for Fauna","archived":false,"fork":false,"pushed_at":"2023-01-05T16:26:45.000Z","size":4220,"stargazers_count":54,"open_issues_count":65,"forks_count":2,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-13T13:55:20.716Z","etag":null,"topics":["client","database","database-framework","driver","fauna","faunadb","framework","javascript","query-builder"],"latest_commit_sha":null,"homepage":"https://gahabeen.github.io/biota","language":"TypeScript","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/gahabeen.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-03-05T16:37:48.000Z","updated_at":"2024-02-25T22:45:34.000Z","dependencies_parsed_at":"2023-02-04T07:01:15.106Z","dependency_job_id":null,"html_url":"https://github.com/gahabeen/biota","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gahabeen%2Fbiota","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gahabeen%2Fbiota/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gahabeen%2Fbiota/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gahabeen%2Fbiota/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gahabeen","download_url":"https://codeload.github.com/gahabeen/biota/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248724589,"owners_count":21151559,"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":["client","database","database-framework","driver","fauna","faunadb","framework","javascript","query-builder"],"created_at":"2024-07-31T19:00:21.518Z","updated_at":"2025-04-13T13:55:26.834Z","avatar_url":"https://github.com/gahabeen.png","language":"TypeScript","funding_links":[],"categories":["Tools"],"sub_categories":["Database frameworks"],"readme":"# Biota has been living for a while in a new dedicated Organization over there: https://github.com/biotajs\n# Developement is on hold before I find some time to make it available to the world :)  \nGabin.\n\n----\n\n\n\u003ch1 align=\"center\"\u003ebiota\u003c/h1\u003e\n\u003cp align=\"center\"\u003eA simple database framework to start your next project in 30s with FaunaDB\u003c/p\u003e\n\n\u003cdiv align=\"center\"\u003e\n\n[![Feature requests](https://img.shields.io/badge/feature-requests-violet?style=flat-square)](https://github.com/gahabeen/biota/issues?q=is%3Aopen+is%3Aissue+label%3A%22Type%3A+Feature%22) [![npm](https://img.shields.io/npm/v/biota?style=flat-square)](https://www.npmjs.com/package/biota) [![npm](https://img.shields.io/npm/dm/biota?style=flat-square)](https://www.npmjs.com/package/biota) ![GitHub](https://img.shields.io/github/license/gahabeen/biota?style=flat-square) ![npm bundle size](https://img.shields.io/bundlephobia/minzip/biota?style=flat-square)\n\n\u003c/div\u003e\n \nFind the *raw* [documentation here](https://gahabeen.github.io/biota).\n\n```js\nimport { Biota } from \"biota\";\n```\n\n```js\n// 4 lines to:\nconst db = new Biota({ secret: \"\u003cyour-secret\u003e\" });\n\n// - scaffold the whole database (inc. users collection for ex)\nawait db.foundation();\n\n// - add todos collection\nawait db.collection(\"todos\").scaffold();\n\n// - add autocomplete-search on name field\nawait db.collection(\"todos\").index({ field: \"name\", ngram: true });\n```\n\n```js\n// 4 lines to:\n// - create a user \u0026 login\nlet asUser = await db.user().register(\"my@email.com\", \"password\", {\n  nickname: \"Georgy\",\n});\n\n// - create a todo\nawait asUser.documents(\"todos\").insert({ name: \"Remember to star this project\" });\n\n// - query a todo with $ngram (autocomplete behavior)\nawait asUser.documents(\"todos\").find({ name: { $ngram: \"star\" } });\n// output: [{ ref, ts, data: { name: \"Remember to star this project\" } }]\n```\n\n## Current status\n\n\u003e Finishing up design and tests of the main API (400+ methods).\n\n\u003e 🙃 You're on preview release. Don't get scared though, the api is pretty stable but tests need to be added to be fool-proof. (Thus, as of yet, Biota isn't production ready)\n\n\u003e ❤️ [Check the features](https://github.com/gahabeen/biota/issues?q=is%3Aopen+is%3Aissue+label%3A%22Type%3A+Feature%22) and [request the ones](https://github.com/gahabeen/biota/issues?q=is%3Aopen+is%3Aissue+label%3A%22Type%3A+Feature%22) you would love to see in **biota**. (They arn't all listed yet!)\n\n\u003e Found some errors? [Let us know!](https://github.com/gahabeen/biota/issues/new)\n\n\n## Getting Started\n\nThese instructions will take you through the few steps to get started playing with your [Fauna](fauna.com/) database.\n\n### Prerequisites\n\nYou'll need to add `biota` either as a global or local (project) dependency.\n\n```js\nyarn add biota // -G for global\n// or\nnpm i biota // -G for global\n```\n\n### Import\n\n```js\nimport { Biota } from \"biota\";\n// or\nconst { Biota } = require(\"biota\");\n```\n\n### Instance\n\nThere are **two ways** to instantiate Biota.\n\n1. You can use a `admin/server key` (or any secret key) as a paremeter.\n\n```js\nconst db = new Biota({ secret: \"\u003cyour-secret\u003e\"})\n// example\nawait db.query( q.Create(...) )\n```\n\n2. You can use the function `.login(id, password)` to log a user.\n\n```js\nconst db = new Biota()\nconst logged = await db.login(\"123\", \"super_password123\")\n// which is a shortcut for\nconst logged = await db.current.user.login(\"123\", \"super_password123\")\n\n// example\nawait logged.query( q.Create(...) )\n```\n\n### Api\n\nEven though you can `query` your database (same as you would do with the same fauna method `query`), the main power of **Biota** lives in its [extended api](#).\n\n\u003e ⏳ **Patience**: It's coming.. :)\n\n### Helpers\n\n```js\nconst { q, factory, Page } = require('biota')\n// q: export the query builder, same as fauna.query\nq.If(..., true, false)\n// factory: export the factory api (helpers that wrap FQL)\nfactory.database(ctx)(name).insert(options)\n```\n\n## Running the tests\n\nIf you want to run the tests, you'll need to provide a `FAUNA_KEY_TEST=\u003cyour-test-key\u003e` in a `.env` file.\n\n\u003e :warning: **Careful**: At the moment tests covering everything yet. PR welcomed 😉\n\n## Built With\n\n- [fauna-db-js](https://github.com/fauna/faunadb-js) - Javascript driver for FaunaDB\n\n## Contributing\n\nPlease read [CONTRIBUTING.md](CONTRIBUTING.md) for details on our code of conduct, and the process for submitting pull requests to us.\n\n## Versioning\n\nWe use [SemVer](http://semver.org/) for versioning.\nFor the versions available, see the [tags on this repository](https://github.com/gahabeen/biota/tags).\n\n## Authors\n\n- **Gabin Desserprit** _instigator_\n\nSee also the list of [contributors](https://github.com/gahabeen/biota/contributors) who participated in this project.\nJoin us :beers:\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details\n\n## Acknowledgments\n\nThis lib wouldn't exist if I had not dug deep into Fauna FQL and got helped through the [Fauna's slack community channel](fauna-community.slack.com). In no order, I'ld like to thank, for their help and support, fauna's team (**Brecht De Rooms**, **Ben Edwards**, **Marrony Neris**, **Leo Regnier**, **Summer**, ,...) as well as other users like **Eigil Sagafos** 🙏\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgahabeen%2Fbiota","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgahabeen%2Fbiota","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgahabeen%2Fbiota/lists"}