{"id":16241685,"url":"https://github.com/getlarge/cat-fostering","last_synced_at":"2026-02-10T03:31:35.798Z","repository":{"id":231603761,"uuid":"780429235","full_name":"getlarge/cat-fostering","owner":"getlarge","description":"Ory demonstration with NestJS","archived":false,"fork":false,"pushed_at":"2024-05-21T19:09:31.000Z","size":1302,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-05-22T19:58:58.766Z","etag":null,"topics":["nestjs","nx","ory-keto","ory-kratos"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/getlarge.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2024-04-01T13:15:57.000Z","updated_at":"2024-05-27T12:25:58.173Z","dependencies_parsed_at":"2024-05-21T20:04:58.087Z","dependency_job_id":null,"html_url":"https://github.com/getlarge/cat-fostering","commit_stats":null,"previous_names":["getlarge/cat-fostering"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/getlarge/cat-fostering","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getlarge%2Fcat-fostering","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getlarge%2Fcat-fostering/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getlarge%2Fcat-fostering/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getlarge%2Fcat-fostering/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/getlarge","download_url":"https://codeload.github.com/getlarge/cat-fostering/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getlarge%2Fcat-fostering/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271268708,"owners_count":24730023,"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-08-20T02:00:09.606Z","response_time":69,"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":["nestjs","nx","ory-keto","ory-kratos"],"created_at":"2024-10-10T14:08:20.093Z","updated_at":"2026-02-10T03:31:35.157Z","avatar_url":"https://github.com/getlarge.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Dev.to](https://img.shields.io/badge/dev.to-0A0A0A?style=for-the-badge\u0026logo=dev.to\u0026logoColor=white)](https://dev.to/getlarge/integrating-ory-in-production-with-nestjs-3nic)\n[![Ory](https://img.shields.io/badge/ory-%230A0A0A.svg?style=for-the-badge\u0026logo=ory\u0026logoColor=white)](https://ory.sh/)\n[![NodeJS](https://img.shields.io/badge/node.js-6DA55F?style=for-the-badge\u0026logo=node.js\u0026logoColor=white)](https://nodejs.org/)\n[![NestJS](https://img.shields.io/badge/nestjs-%23E0234E.svg?style=for-the-badge\u0026logo=nestjs\u0026logoColor=white)](https://nestjs.com/)\n[![Angular](https://img.shields.io/badge/angular-%23E0234E.svg?style=for-the-badge\u0026logo=angular\u0026logoColor=white)](https://angular.dev/)\n[![Jest](https://img.shields.io/badge/jest-%23C21325.svg?style=for-the-badge\u0026logo=jest\u0026logoColor=white)](https://jestjs.io/)\n[![Postgres](https://img.shields.io/badge/postgres-%23316192.svg?style=for-the-badge\u0026logo=postgresql\u0026logoColor=white)](https://www.postgresql.org/)\n[![Nx](https://img.shields.io/badge/nx-143055?style=for-the-badge\u0026logo=nx\u0026logoColor=white)](https://nx.dev/)\n[![Docker](https://img.shields.io/badge/docker-%230db7ed.svg?style=for-the-badge\u0026logo=docker\u0026logoColor=white)](https://www.docker.com/)\n\n[![fork with dotenv-vault](https://badge.dotenv.org/fork.svg?r=1)](https://vault.dotenv.org/project/vlt_a214f90f4b82d8ad4ca0c4b2a458f85f1eb137a0d7ebce91325a339fa48edad1/example)\n\n\u003cimg width=\"1389\" alt=\"CatFostering-min\" src=\"https://github.com/getlarge/cat-fostering/assets/15331923/5911cc7f-e853-47bb-83d6-19ca9341ff2d\"\u003e\n\n# CatFostering\n\nThis demonstration app is a web-based platform (REST API) called `CatFostering`. The CatFoster application is a simplified example that demonstrates the integration of [Ory](https://ory.sh) in a [NestJS](https://nestjs.com) application with the [NestJS Ory Integration libraries](https://github.com/getlarge/nestjs-ory-integration).\n\n\u003e **Note**\n\u003e If this is your first time working with Ory, I recommend reading the [Introduction to Ory](https://dev.to/getlarge/introduction-to-ory-47nh) article to familiarize yourself with the core components and concepts of Ory.\n\n## Key Features\n\n1. **User Authentication and Profile Management:**\n\n   - **Ory Integration:** Utilize Ory's authentication system to handle user registrations, logins, password resets, and profile management.\n   - **User Roles:** There is one static user role, `Admin`, that a super admin can assign to users after registration.\n\n2. **Cat Profiles:**\n\n   - **Listing and Management:** Cat owners can create profiles for their cats, including photos, descriptions, special care instructions, and availability for fostering. Admins can edit and delete cat profiles.\n   - **Search and Filters:** Users looking to foster cats can search for them based on filters.\n\n3. **Fostering Matchmaking:**\n\n   - **Requests and Approvals:** Cat fosters can send fostering requests to cat owners, who can review and approve or deny them based on the foster's profiles.\n   - **Authorization Checks:** Use Ory to manage authorization, ensuring that only cat owners can approve fostering requests and only registered users can send requests.\n\n## Design phase\n\n### Architecture\n\n```mermaid\n---\nconfig:\n  fontFamily: ''\n  theme: base\n  themeVariables:\n    primaryColor: '#5d9fd8'\n    textColor: black\n    secondaryColor: '#f8f8f8'\n    fontSize: \"12px\"\n---\n\nflowchart TD\n    UI(\"fa:fa-laptop Self-service UI -\")\n    OryKratos([\"fa:fa-shield Ory Kratos -\"])\n    OryKeto([\"fa:fa-shield Ory Keto -\"])\n    NestJSApp(\"fa:fa-code NestJS App -\")\n    AngularApp(\"fa:fa-code Angular App -\")\n    Postgres[(\"fa:fa-database Postgres -\")]\n\n    UI -- Register/Login \u003cbr\u003eManage Account --\u003e OryKratos\n    NestJSApp -- Verify cookie \\nor JWT --\u003e OryKratos\n    NestJSApp -- Create relationships \u003cbr\u003e Check permissions --\u003e OryKeto\n    NestJSApp -- CRUD Operations \\n Store User and \\nCat Profiles --\u003e Postgres\n    OryKratos -. Send webhooks .-\u003e NestJSApp\n    AngularApp --\u003e|REST interactions| NestJSApp\n    AngularApp --\u003e|Redirect to authenticate| UI\n\n    style UI fill:#a0c8e8,stroke:#333,stroke-width:2px,stroke-dasharray: 0\n    style OryKratos fill:#ffdd57,stroke:#333,stroke-width:2px\n    style NestJSApp fill:#ff6f61,stroke:#333,stroke-width:2px\n    style AngularApp fill:#ff6f61,stroke:#333,stroke-width:2px\n    style OryKeto fill:#6accbc,stroke:#333,stroke-width:2px\n    style Postgres fill:#5d9fd8,stroke:#333,stroke-width:2px\n```\n\n- **Self-service UI**: This is the frontend where users can log in and manage their accounts. It communicates directly with Ory Kratos for authentication-related tasks.\n- **Ory Kratos**: Handles authentication. It's responsible for user login, account management, and session management. It interacts with the NestJS app via HTTP webhooks to replicate user data on signup.\n- **HTTP Webhooks**: Serve as the communication link between Ory Kratos and the NestJS app, ensuring the user is replicated in the local database upon signup.\n- **NestJS App**: The core of your application is handling business logic, CRUD operations with the Postgres database, authentication checks with Ory Kratos, and authorization with Ory Keto.\n- **Ory Keto**: Manages authorization, determining what authenticated users are allowed to do within the application.\n- **Postgres**: The database where user data (replicated from Ory on signup), cat profiles and fostering requests are stored. The NestJS app interacts with Postgres for all data storage and retrieval operations.\n\nCheck out the complete [Ory Integration guide](https://dev.to/getlarge/integrate-ory-in-a-nestjs-application-4llo) to learn how to integrate [Ory Kratos](https://github.com/ory/kratos) and [Ory Keto](https://github.com/ory/keto) into your NestJS application.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgetlarge%2Fcat-fostering","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgetlarge%2Fcat-fostering","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgetlarge%2Fcat-fostering/lists"}