{"id":14978682,"url":"https://github.com/weecraft/nestjs-fauna","last_synced_at":"2026-02-20T00:01:56.016Z","repository":{"id":181382396,"uuid":"666681155","full_name":"weecraft/nestjs-fauna","owner":"weecraft","description":"The ultimate Fauna DB Module for NestJs. Support the main fauna db function and type checking","archived":false,"fork":false,"pushed_at":"2024-11-18T02:16:52.000Z","size":151,"stargazers_count":0,"open_issues_count":5,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-16T01:04:09.110Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/weecraft.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["nyomansunima"],"patreon":null,"open_collective":null,"ko_fi":"nyomansunima","tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"lfx_crowdfunding":null,"custom":null}},"created_at":"2023-07-15T08:06:09.000Z","updated_at":"2024-08-24T03:50:33.000Z","dependencies_parsed_at":"2024-08-24T04:25:11.433Z","dependency_job_id":"068744a6-0087-43db-9bdc-48b2286afb28","html_url":"https://github.com/weecraft/nestjs-fauna","commit_stats":null,"previous_names":["nyomansunima/nestjs-fauna","weecraft/nestjs-fauna"],"tags_count":12,"template":false,"template_full_name":null,"purl":"pkg:github/weecraft/nestjs-fauna","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weecraft%2Fnestjs-fauna","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weecraft%2Fnestjs-fauna/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weecraft%2Fnestjs-fauna/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weecraft%2Fnestjs-fauna/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/weecraft","download_url":"https://codeload.github.com/weecraft/nestjs-fauna/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weecraft%2Fnestjs-fauna/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29637400,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-19T22:32:43.237Z","status":"ssl_error","status_checked_at":"2026-02-19T22:32:38.330Z","response_time":117,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":[],"created_at":"2024-09-24T13:58:11.354Z","updated_at":"2026-02-20T00:01:56.003Z","avatar_url":"https://github.com/weecraft.png","language":"TypeScript","funding_links":["https://github.com/sponsors/nyomansunima","https://ko-fi.com/nyomansunima"],"categories":[],"sub_categories":[],"readme":"# NestJS Fauna\n\nA NestJS package that provides seamless integration with FaunaDB, allowing you to interact with FaunaDB effortlessly within your NestJS applications.\n\n![Nest.Js Fauna](https://github.com/nyomansunima/nestjs-fauna/assets/54091887/fddd548e-d5c3-46ac-8ce0-7ef49a1664e0)\n\n\u003c!-- Shields --\u003e\n\n[![NestJS](https://img.shields.io/badge/nestjs-%23E0234E.svg?style=flat\u0026logo=nestjs\u0026logoColor=white)](https://nestjs.com/)\n[![FaunaDB](https://img.shields.io/badge/fauna%20db-%234AB27B.svg?style=flat\u0026logo=fauna\u0026logoColor=white)](https://fauna.com/)\n![GitHub contributors](https://img.shields.io/github/contributors/nyomansunima/nestjs-fauna)\n![GitHub language count](https://img.shields.io/github/languages/count/nyomansunima/nestjs-fauna)\n![GitHub issues](https://img.shields.io/github/issues/nyomansunima/nestjs-fauna)\n![GitHub](https://img.shields.io/github/license/nyomansunima/nestjs-fauna)\n![GitHub repo size](https://img.shields.io/github/repo-size/nyomansunima/nestjs-fauna)\n[![GitHub Super-Linter](https://github.com/nyomansunima/nestjs-fauna/actions/workflows/linter.yml/badge.svg)](https://github.com/marketplace/actions/super-linter)\n\n## Table of Contents\n\n- [Installation](#installation)\n- [Getting Started](#getting-started)\n- [Usage](#usage)\n- [Features](#features)\n- [Contributing](#contributing)\n- [License](#license)\n\n## 🚀 Installation\n\n```bash\nnpm install nestjs-fauna\n```\n\n## 🤖 Getting Started\n\nBefore you start using this package, you need to have a FaunaDB account and a database set up. If you haven't already done this, head over to the [FaunaDB site](https://fauna.com/) and follow their instructions to get started.\n\nOnce you have your FaunaDB credentials, you can configure the package in your NestJS application.\n\n### Configuration\n\nIn your NestJS application, create a `.env` file in the root directory and add your FaunaDB secret key:\n\n```dotenv\nFAUNADB_SECRET_KEY = your_faunadb_secret_key_here\n```\n\nMake sure to load the `.env` file using a package like `dotenv` in your application's main entry file (e.g., `main.ts`).\n\n### Module Registration\n\nRegister the FaunaDB module in your NestJS application. Import the `FaunaModule` and pass in the configuration options:\n\n```typescript\nimport { Module } from '@nestjs/common'\nimport { FaunaModule } from 'nestjs-fauna'\n\n@Module({\n  imports: [\n    FaunaModule.forRoot({\n      secret: process.env.FAUNADB_SECRET_KEY,\n      // Other options if needed\n    }),\n  ],\n})\nexport class AppModule {}\n```\n\n## 🏀 Usage\n\nWith the FaunaDB module configured, you can now inject the `FaunaService` into your services or controllers to interact with the FaunaDB client.\n\n```typescript\nimport { Injectable } from '@nestjs/common'\nimport { fql } from 'nestjs-fauna'\n\n@Injectable()\nexport class MyService {\n  constructor(private readonly faunaService: FaunaService) {}\n\n  async getDocumentById(id: string): Promise\u003cany\u003e {\n    // ensure you have the collection, or create a new one\n    // then execute it\n    const collectionQuery = fql`Collection.create({name: 'users'})`\n    await this.faunaService.query(collectionQuery)\n\n    // get the document from database\n    const firstDocumentQuery = fql`users.all().first()`\n    return this.faunaService.query(firstDocumentQuery)\n\n    // result will be\n    // something like this\n    {\n      id: \"366172354849538082\",\n      coll: users,\n      ts: Time(\"2023-05-30T17:33:40.220Z\"),\n      // your data\n    }\n  }\n\n  // Add more methods to interact with FaunaDB as needed\n}\n```\n\nIn the example above, we use the `FaunaService.query` method to execute a query against the FaunaDB client. You can leverage FaunaDB's powerful query language to perform various operations on your collections and documents.\n\nFor more information on the available query functions and how to use them, refer to the [FaunaDB documentation](https://docs.fauna.com/fauna/current/start/cloud).\n\n## ✅ Features\n\n- Seamless integration with NestJS applications.\n- Easy-to-use API for interacting with FaunaDB.\n- Utilizes FaunaDB's powerful query language for flexible database operations.\n- Configurable and supports multiple environments using environment variables.\n- Update using new version of FQL (version 10)\n  \u003cbr/\u003e\n\n## 🩷 Contributing\n\nWe welcome contributions from the community to improve this package. If you find any issues or have suggestions for enhancements, please open an issue or submit a pull request.\n\nTo contribute please follow the instruction on [Contributing](CONTRIBUTING.md)\n\nPlease ensure your code follows the established coding standards and includes appropriate unit tests.\n\n## 🪪 License\n\nThis project is licensed under the [MIT License](LICENSE). Feel free to use and modify the code as you see fit.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fweecraft%2Fnestjs-fauna","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fweecraft%2Fnestjs-fauna","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fweecraft%2Fnestjs-fauna/lists"}