{"id":14973131,"url":"https://github.com/typeheim/fire-legion","last_synced_at":"2025-10-26T23:30:28.878Z","repository":{"id":38770249,"uuid":"256689537","full_name":"typeheim/fire-legion","owner":"typeheim","description":"DDD framework for Firebase ","archived":false,"fork":false,"pushed_at":"2023-01-06T03:55:26.000Z","size":1864,"stargazers_count":8,"open_issues_count":27,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-01T00:51:06.578Z","etag":null,"topics":["ddd","fire-legion","firebase","firestore","firestore-orm","orm","rxjs"],"latest_commit_sha":null,"homepage":"","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/typeheim.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}},"created_at":"2020-04-18T06:57:07.000Z","updated_at":"2023-01-03T08:14:20.000Z","dependencies_parsed_at":"2023-02-05T06:30:26.220Z","dependency_job_id":null,"html_url":"https://github.com/typeheim/fire-legion","commit_stats":null,"previous_names":[],"tags_count":55,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/typeheim%2Ffire-legion","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/typeheim%2Ffire-legion/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/typeheim%2Ffire-legion/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/typeheim%2Ffire-legion/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/typeheim","download_url":"https://codeload.github.com/typeheim/fire-legion/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238408600,"owners_count":19467132,"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":["ddd","fire-legion","firebase","firestore","firestore-orm","orm","rxjs"],"created_at":"2024-09-24T13:48:10.288Z","updated_at":"2025-10-26T23:30:28.501Z","avatar_url":"https://github.com/typeheim.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n    \u003cimg style=\"max-width: 100%\" width=\"1200\" src=\"https://raw.githubusercontent.com/typeheim/fire-legion/46726290060f4631bb0fb10017bdf7954f7e21d9/packages/fire-legion/docs/fire-legion-logo.svg\"\u003e\n\u003c/p\u003e\n\u003cp\u003e\n    \u003ca href=\"https://www.npmjs.com/package/@typeheim/fire-legion\" target=\"_blank\"\u003e\u003cimg src=\"https://img.shields.io/npm/v/@typeheim/fire-legion.svg\" alt=\"NPM Version\" /\u003e\u003c/a\u003e\n    \u003ca href=\"https://app.buddy.works/typeheim/fire-legion/pipelines/pipeline/300564\" target=\"_blank\"\u003e\u003cimg src=\"https://app.buddy.works/typeheim/fire-legion/pipelines/pipeline/300564/badge.svg?token=aad32357cefae9d70b31d8b440fdf3f3d5d2a244a0412ff42ac294abbfc508f5\" alt=\"Build Status\" /\u003e\u003c/a\u003e\n    \u003ca href=\"https://www.npmjs.com/package/@typeheim/fire-legion\" target=\"_blank\"\u003e\u003cimg src=\"https://img.shields.io/npm/l/@typeheim/fire-legion.svg\" alt=\"Package License\" /\u003e\u003c/a\u003e\n    \u003ca href=\"https://discord.gg/dmMznp9\" target=\"_blank\"\u003e\u003cimg src=\"https://img.shields.io/badge/discord-online-brightgreen.svg\" alt=\"Discord\"/\u003e\u003c/a\u003e\n\u003c/p\u003e\nDDD framework for Firebase applications that includes ORMOnFire and FireAuth libraries.\n\n# Getting Started\n\nInstall root package that adds all of the latest FireLegion packages to dependencies\n\n```shell\nyarn add @typeheim/fire-legion\n//or\nnpm -i @typeheim/fire-legion\n```\n\n# ORMOnFire\n\nORMOnFire is a powerful Firestore ORM.\n\n```typescript\nimport {\n    Agregate,\n    Entity,\n    Collection,\n    CollectionRef,\n    ID,\n    Field\n} from '@typeheim/orm-on-fire'\n\n@Agregate()\nexport class User {\n    @ID() id: string\n\n    @Field() firstName: string\n\n    @Field() lastName: string\n\n    @Field() status: string\n\n    @CollectionRef(UserFile) files: Collection\u003cUserFile\u003e\n}\n\n@Entity({ collection: 'user-files' })\nexport class UserFile {\n    @ID() id: string\n\n    @Field() name: string\n}\n\nexport const UsersCollection = Collection.of(User)\n\n//.......\n\n// with promise-like interface\nlet markus = await UsersCollection.one('markus').get()\n\n// with Rx interface\nUsersCollection.one('tom').get().subscribe((tom: User) =\u003e {\n    tom.files.forEach((file: UserFile) =\u003e {\n        // some cool stuff\n    })\n}) \n```\n[Read more...](https://github.com/typeheim/fire-legion/tree/master/packages/orm-on-fire)\n\n# FireAuth\n\nFireAuth is Firebase auth library based on Rx principles.\n\n```typescript\nimport { FireAuth, FireAuthSession, AuthProvidersList } from '@typeheim/fire-auth'\n\n// through provider\nFireAuth.throughProvider(AuthProvidersList.Google).signInWithPopup()\n\n// using email/password flow\nFireAuth.signIn(new PasswordAuth('email', 'password'))\n\n// getting user object\nFireAuthSession.userStream.subscribe(user =\u003e /*do your magick*/)\n\n// gedding auth status\nFireAuthSession.isLoggedInStream.subscribe(isLoggedIn =\u003e /*do your magick*/)\n\n// gedding access token\nFireAuthSession.accessTokenStream.subscribe(token =\u003e /*do your magick*/)\n```\n[Read more...](https://github.com/typeheim/fire-legion/tree/master/packages/fire-atuh)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftypeheim%2Ffire-legion","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftypeheim%2Ffire-legion","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftypeheim%2Ffire-legion/lists"}