@fayz-ai/portal 0.7.0 → 0.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +34 -0
  2. package/package.json +7 -4
package/README.md ADDED
@@ -0,0 +1,34 @@
1
+ # @fayz-ai/portal
2
+
3
+ > The authenticated member/learner portal scaffold — a "my courses" + player surface for your students.
4
+
5
+ [![npm](https://img.shields.io/npm/v/@fayz-ai/portal.svg)](https://www.npmjs.com/package/@fayz-ai/portal)
6
+ [![license](https://img.shields.io/npm/l/@fayz-ai/portal.svg)](https://github.com/FayaLabs/fayz-sdk/blob/main/LICENSE)
7
+
8
+ **Status:** beta — published to npm and used across Fayz dogfood apps. Pre-1.0: minor APIs may change before 1.0.
9
+
10
+ Every course or membership product needs a second front door: not the admin app the creator uses, but the logged-in space their members live in. `@fayz-ai/portal` is that surface — an opinionated, auth-gated member shell that renders "my courses," a lesson player, and an account page on top of `@fayz-ai/courses` and `@fayz-ai/auth`. Compose it once and your learners get a real portal instead of a hand-wired one.
11
+
12
+ ## What's inside
13
+ - **Member app runtime** — `createMemberApp`, `initMemberRuntime`, and the `MemberShell` layout (header + routed content)
14
+ - **Scaffold** — `defineMember` / `MemberScaffold` to declare the portal as data
15
+ - **Pages** — `MyCoursesPage`, `CoursePlayerPage`, `AccountPage`, and a `MemberHeader`
16
+ - **Session + config** — `useMemberSession`, `MemberConfigProvider` / `useMemberConfig`, and a hash router (`useHashPath`, `Link`, `navigateTo`)
17
+
18
+ ## Install
19
+ ```bash
20
+ npm install @fayz-ai/portal
21
+ ```
22
+ Peer deps: `react`, `react-dom` (^18 or ^19). Runtime deps include `@fayz-ai/core`, `@fayz-ai/auth`, and `@fayz-ai/courses`.
23
+
24
+ ## Usage
25
+ ```tsx
26
+ import { createMemberApp } from '@fayz-ai/portal'
27
+
28
+ export const memberApp = createMemberApp({
29
+ // auth + courses config for the logged-in learner surface
30
+ })
31
+ ```
32
+
33
+ ## Part of the Fayz SDK
34
+ The learner-facing half of the courses stack. Pairs with `@fayz-ai/courses` (the course model + admin) and `@fayz-ai/auth` (who's logged in).
package/package.json CHANGED
@@ -1,6 +1,9 @@
1
1
  {
2
2
  "name": "@fayz-ai/portal",
3
- "version": "0.7.0",
3
+ "fayz": {
4
+ "status": "beta"
5
+ },
6
+ "version": "0.8.0",
4
7
  "description": "Fayz SDK member/learner portal scaffold — authenticated 'my courses' + player surface",
5
8
  "type": "module",
6
9
  "main": "./dist/index.cjs",
@@ -20,9 +23,9 @@
20
23
  ],
21
24
  "dependencies": {
22
25
  "zustand": "^4.5.0",
23
- "@fayz-ai/courses": "^0.7.0",
24
- "@fayz-ai/auth": "^0.7.0",
25
- "@fayz-ai/core": "^0.7.0"
26
+ "@fayz-ai/core": "^0.8.0",
27
+ "@fayz-ai/courses": "^0.8.0",
28
+ "@fayz-ai/auth": "^0.8.0"
26
29
  },
27
30
  "peerDependencies": {
28
31
  "react": "^18.0.0 || ^19.0.0",