{"id":19235551,"url":"https://github.com/renyuneyun/solid-helper-vue","last_synced_at":"2026-05-16T09:32:31.561Z","repository":{"id":181872679,"uuid":"667605605","full_name":"renyuneyun/solid-helper-vue","owner":"renyuneyun","description":"SoLiD development helper for Vue projects","archived":false,"fork":false,"pushed_at":"2023-12-26T00:24:03.000Z","size":154,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-29T23:14:53.335Z","etag":null,"topics":["solid","vue"],"latest_commit_sha":null,"homepage":"https://me.ryey.icu/solid-helper-vue/","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/renyuneyun.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}},"created_at":"2023-07-17T22:39:58.000Z","updated_at":"2023-11-19T23:58:58.000Z","dependencies_parsed_at":"2024-03-02T05:44:34.275Z","dependency_job_id":null,"html_url":"https://github.com/renyuneyun/solid-helper-vue","commit_stats":null,"previous_names":["renyuneyun/solid-helper-vue"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/renyuneyun/solid-helper-vue","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/renyuneyun%2Fsolid-helper-vue","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/renyuneyun%2Fsolid-helper-vue/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/renyuneyun%2Fsolid-helper-vue/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/renyuneyun%2Fsolid-helper-vue/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/renyuneyun","download_url":"https://codeload.github.com/renyuneyun/solid-helper-vue/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/renyuneyun%2Fsolid-helper-vue/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33096870,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-16T04:41:52.686Z","status":"ssl_error","status_checked_at":"2026-05-16T04:41:52.009Z","response_time":115,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5: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":["solid","vue"],"created_at":"2024-11-09T16:17:18.079Z","updated_at":"2026-05-16T09:32:31.548Z","avatar_url":"https://github.com/renyuneyun.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Solid Helper for Vue\n\nA Vue 3 helper library for developing [SoLiD (Social Linked Data)](https://solidproject.org/) applications with seamless Pinia integration.\n\n## Features\n\n- **Session Management via Pinia Store** (`useSessionStore`)\n  - Reactive session state and authentication status\n  - Login/logout functionality with customizable identity providers\n  - Automatic redirect handling and session restoration\n  - Maintains reactivity using custom store state (unlike direct `Session` object usage)\n\n- **SessionProvider Component**\n  - Vue provider component for dependency injection (similar to React Context)\n  - Automatically handles authentication redirects and silent session restoration on page load\n  - Configurable via `restorePreviousSession` and `redirectUrl` props\n  - Injects `KEYS.SESSION`, `KEYS.SESSION_INFO`, `KEYS.LOGIN`, and `KEYS.LOGOUT`\n\n## Quick Start\n\n### Using Pinia Store\n\n```typescript\nimport { useSessionStore } from 'solid-helper-vue';\n\nconst sessionStore = useSessionStore();\n\n// Login\nawait sessionStore.login(identityProvider, redirectUrl, clientName);\n\n// Handle redirect after login (call on every page load)\n// Passing window.location.href lets the library detect the OAuth callback params.\n// restorePreviousSession: true enables silent re-login on subsequent page loads.\nawait sessionStore.handleRedirectAfterLogin(window.location.href, true);\n\n// Access session info\nif (sessionStore.isLoggedIn) {\n  console.log(sessionStore.webid); // Current user's WebID\n}\n\n// Logout\nawait sessionStore.logout();\n```\n\n### Using Provider Component\n\n```vue\n\u003ctemplate\u003e\n  \u003c!-- restorePreviousSession defaults to true (silent re-login on page load) --\u003e\n  \u003c!-- redirectUrl defaults to window.location.href at mount time --\u003e\n  \u003csession-provider\u003e\n    \u003cyour-app /\u003e\n  \u003c/session-provider\u003e\n\u003c/template\u003e\n\n\u003cscript setup lang=\"ts\"\u003e\nimport { SessionProvider } from 'solid-helper-vue';\n\u003c/script\u003e\n```\n\nTo opt out of silent re-login, or to specify a fixed callback URL:\n\n```vue\n\u003csession-provider :restore-previous-session=\"false\" redirect-url=\"https://myapp.example/callback\"\u003e\n  \u003cyour-app /\u003e\n\u003c/session-provider\u003e\n```\n\nInject session data in child components:\n\n```typescript\nimport { inject } from 'vue';\nimport { KEYS } from 'solid-helper-vue';\n\nconst session = inject(KEYS.SESSION);          // Session object from @inrupt/solid-client-authn-browser\nconst sessionInfo = inject(KEYS.SESSION_INFO); // Reactive session info\nconst login = inject(KEYS.LOGIN);              // Login function\nconst logout = inject(KEYS.LOGOUT);            // Logout function\n```\n\n## Testing\n\nComprehensive test coverage includes:\n\n- **Unit Tests** (`src/__tests__`)\n  - Store actions and state management\n  - Provider component functionality\n  - Utility functions and types\n  - Vue injection keys\n\n- **Integration Tests (through complete apps)** (`integration-projects/vite-vue-spa`)\n  - Full application integration using Playwright\n  - Real-world usage scenarios\n  - Component rendering and key injection verification\n\nRun tests:\n```bash\nnpm run test              # Watch mode\nnpm run test:run         # Single run\nnpm run test:coverage    # Coverage report\nnpm run test:integration # Playwright integration tests\nnpm run test:all         # All tests\n```\n\n## Installation\n\n```bash\nnpm install solid-helper-vue\n```\n\nPeer dependencies: Vue 3 and Pinia\n\n## License\n\nApache-2.0\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frenyuneyun%2Fsolid-helper-vue","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frenyuneyun%2Fsolid-helper-vue","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frenyuneyun%2Fsolid-helper-vue/lists"}