Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,5 @@ yarn-error.log*
.yarn/install-state.gz
apps/engagement-app/tsconfig.tsbuildinfo
.vscode/settings.json
e2e.log

docs
46 changes: 46 additions & 0 deletions apps/demo-identity-app/README-streaming.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Streaming SDK Test UI Guide

This guide explains how to use the interactive test page for the Superfluid Streaming SDK within the `demo-identity-app`.

## 📍 Location
The test page is implemented as a standalone component:
`src/components/StreamingTestPage.tsx`

## 🚀 How to Run
From the repository root, run the **fast-path** command (recommended):
```bash
yarn turbo dev --filter=demo-identity-app...
```
*Note: This builds the app and SDKs. When you see **"Found 0 errors. Watching for file changes"** in the terminal, the system is ready!*

### ⚡ Direct URL
Navigate to: **[http://localhost:3000/streaming](http://localhost:3000/streaming)**
### 🕰️ Alternative (Standard)
If you prefer the standard way:
1. `cd apps/demo-identity-app`
2. `yarn dev`

## 🛠️ Features to Test

### 1. Money Streaming (CFA)
- **Create**: enter a receiver address, amount, and time unit (hour/day/month). The SDK calculates the flow rate automatically.
- **Update**: update the amount for a receiver you are already streaming to.
- **Delete**: stop an active stream.

### 2. Distribution Pools (GDA)
- **Connect**: enter a pool address and click "Connect" (requires on-chain transaction).
- **Disconnect**: remove yourself from a pool to stop receiving distributions.
- **Visibility**: view available pools, see your connection status (badge), and current "Units".

### 3. Network & Environment
- **Chain Switcher**: easily toggle between Celo, Base, and their testnets.
- **SDK Env**: switch between `production`, `staging`, and `development` to test against different G$ SuperToken deployments.

### 4. Developer Tools
- **Code Examples**: view copy-pasteable snippets for hooks like `useCreateStream`, `usePoolMemberships`, and `useSupReserves`.
- **Tx History**: view transaction hashes with direct links to Block Explorers (CeloScan/BaseScan).

## 💡 Developer Notes
- **SUP Reserve**: the SUP Reserve Holdings section only displays data when connected to **Base Mainnet**.
- **Transactions**: all write operations (Create, Connect, etc.) will trigger a wallet signature request.
- **Subgraph**: data updates may take a few seconds to appear after a transaction is confirmed due to subgraph indexing latency.
28 changes: 28 additions & 0 deletions apps/demo-identity-app/eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import js from '@eslint/js'
import globals from 'globals'
import reactHooks from 'eslint-plugin-react-hooks'
import reactRefresh from 'eslint-plugin-react-refresh'
import tseslint from 'typescript-eslint'

export default tseslint.config(
{ ignores: ['dist'] },
{
extends: [js.configs.recommended, ...tseslint.configs.recommended],
files: ['**/*.{ts,tsx}'],
languageOptions: {
ecmaVersion: 2020,
globals: globals.browser,
},
plugins: {
'react-hooks': reactHooks,
'react-refresh': reactRefresh,
},
rules: {
...reactHooks.configs.recommended.rules,
'react-refresh/only-export-components': [
'warn',
{ allowConstantExport: true },
],
},
},
)
16 changes: 9 additions & 7 deletions apps/demo-identity-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,19 @@
"name": "demo-identity-app",
"version": "1.0.0",
"private": true,
"type": "module",
"scripts": {
"dev": "vite --port 3000",
"build": "vite build",
"startS": "cross-env HTTPS=true SSL_CRT_FILE='./.certs/ssl.crt' SSL_KEY_FILE='./.certs/ssl.key' PORT=1122 vite --port 1122",
"preview": "vite preview",
"lint": "eslint . --ext .ts,.tsx",
"lint": "eslint .",
"format": "prettier --write ."
},
"dependencies": {
"@goodsdks/citizen-sdk": "*",
"@goodsdks/react-hooks": "*",
"@goodsdks/streaming-sdk": "*",
"@reown/appkit": "^1.7.2",
"@reown/appkit-adapter-wagmi": "^1.7.2",
"@reown/appkit-wallet": "^1.7.2",
Expand All @@ -34,22 +36,22 @@
"zod": "^3.24.2"
},
"devDependencies": {
"@eslint/js": "^9.17.0",
"@tamagui/babel-plugin": "^1.125.22",
"@types/react": "^18.3.18",
"@types/react-dom": "^18.3.5",
"@typescript-eslint/eslint-plugin": "^5.62.0",
"@typescript-eslint/parser": "^5.62.0",
"@vitejs/plugin-react": "^4.3.4",
"autoprefixer": "^10.4.20",
"cross-env": "^7.0.3",
"eslint": "^8.57.1",
"eslint-config-prettier": "^8.10.0",
"eslint-plugin-react": "^7.37.4",
"eslint-plugin-react-hooks": "^5.2.0",
"eslint": "^9.17.0",
"eslint-plugin-react-hooks": "^5.0.0",
"eslint-plugin-react-refresh": "^0.4.16",
"globals": "^15.14.0",
"postcss": "^8.5.3",
"prettier": "^3.5.3",
"sass": "^1.85.1",
"typescript": "^5.8.2",
"typescript-eslint": "^8.18.2",
"vite": "6.3.5"
}
}
Loading
Loading