{"id":19185823,"url":"https://github.com/phospho-app/phospho-ui-react","last_synced_at":"2025-05-08T01:16:54.630Z","repository":{"id":222393528,"uuid":"757159058","full_name":"phospho-app/phospho-ui-react","owner":"phospho-app","description":"React components to leverage user feedbacks and phospho logging","archived":false,"fork":false,"pushed_at":"2024-03-29T18:06:24.000Z","size":873,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-05-08T01:16:47.956Z","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":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/phospho-app.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","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}},"created_at":"2024-02-13T23:07:51.000Z","updated_at":"2024-03-05T23:28:12.000Z","dependencies_parsed_at":"2024-02-14T00:24:48.590Z","dependency_job_id":"559f2775-a282-4bab-8511-64219b3dc048","html_url":"https://github.com/phospho-app/phospho-ui-react","commit_stats":null,"previous_names":["phospho-app/phospho-react"],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phospho-app%2Fphospho-ui-react","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phospho-app%2Fphospho-ui-react/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phospho-app%2Fphospho-ui-react/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phospho-app%2Fphospho-ui-react/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/phospho-app","download_url":"https://codeload.github.com/phospho-app/phospho-ui-react/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252978811,"owners_count":21834920,"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":[],"created_at":"2024-11-09T11:12:02.701Z","updated_at":"2025-05-08T01:16:54.605Z","avatar_url":"https://github.com/phospho-app.png","language":"TypeScript","readme":"# phospho-ui-react\n\n\u003ca href=\"https://www.npmjs.com/package/phospho-ui-react\"\u003e\u003cimg src=\"https://img.shields.io/npm/v/phospho-ui-react?style=flat-square\u0026label=npm+phospho+ui+react\" alt=\"phospho npm package\"\u003e\u003c/a\u003e\n\nAdd a user feedback component to leverage phospho logging\n\n## Usage\n\n1. Register on [phospho.ai](https://phospho.ai) and note down the project id\n2. Install the npm package and setup phospho logging in your LLM app\n\n```\nnpm add phospho-ui-react\n```\n\n4. Use the task_id linked to the log to also attach user feedback.\n\n```javascript\nimport \"./App.css\";\nimport { FeedbackDrawer, Feedback } from \"phospho-ui-react\";\nimport \"phospho-ui-react/dist/index.css\";\n\nfunction App() {\n  return (\n    \u003cdiv className=\"App\"\u003e\n      \u003cheader className=\"App-header\"\u003e\n        \u003cFeedbackDrawer\n          // Get your project_id on phospho\n          projectId=\"...\"\n          // The task_id logged to phospho\n          taskId=\"...\"\n          // Source will be also logged to phospho\n          source={\"user_feedback\"}\n          // Customize the drawer\n          title=\"Send Feedback\"\n          description=\"Help us improve our product.\"\n          onSubmit={(feedback: Feedback) =\u003e\n            console.log(\"Submitted: \", feedback)\n          }\n          onClose={(feedback: Feedback) =\u003e console.log(\"Closed: \", feedback)}\n        /\u003e\n      \u003c/header\u003e\n    \u003c/div\u003e\n  );\n}\n\nexport default App;\n```\n\nUnder the hood, you can use the `sendUserFeedback` function to register feedbacks to phospho.\n\nLearn more in the [phospho documentation.](https://docs.phospho.ai/guides/user-feedback)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphospho-app%2Fphospho-ui-react","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphospho-app%2Fphospho-ui-react","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphospho-app%2Fphospho-ui-react/lists"}