-
Notifications
You must be signed in to change notification settings - Fork 0
feat(plugins): add plugin architecture #207
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
paolomolo
wants to merge
289
commits into
develop
Choose a base branch
from
feat/feed-plugin-architecture
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
289 commits
Select commit
Hold shift + click to select a range
0357e36
style(feed): add subtle hover/active effects to poll options
paolomolo 87c2f87
feat(feed): live update poll stats after vote/retract and show pendin…
paolomolo 0943dd9
fix(feed): show pending state only on the voted option
paolomolo 59e88d2
feat(feed): show pending spinner on mobile and label on desktop
paolomolo 62c1ec9
style(feed): align pending order to Spinner → text → 'Your vote'
paolomolo f6fc2df
fix(feed): support switching poll vote from one option to another
paolomolo aae89b9
fix(feed): optimistic update myVote on option change and retract
paolomolo 79f6fe2
fix(feed): avoid stale myVote override; notify backend and delay refresh
paolomolo 9a08052
feat(feed): optimistic percentage updates on vote/retract
paolomolo 82dedd4
fix(feed): lock optimistic myVote for short window to prevent bounce
paolomolo 33965f9
fix(feed): only update selection/percentages after tx submit
paolomolo 6119e01
feat(social): add poll detail view integrated with plugin
paolomolo ae18465
fix(social): preserve feed scroll on poll navigation and scroll to to…
paolomolo dc395b7
feat(social): open poll detail on card click while preserving interac…
paolomolo ac50adb
fix(social): make poll card non-clickable on poll detail view
paolomolo dbf8efe
feat(social): show on-chain badge on poll detail like feed
paolomolo c2f8304
feat(social): include poll description in feed and detail views
paolomolo 9331904
feat(social): add share button to poll card and align footer layout
paolomolo e9eaafd
chore(social): adjust poll card footer layout per UX
paolomolo 8d43db4
feat(social): label on-chain popover as 'Poll' for poll items
paolomolo 4767e05
fix(social): use MDW tx timestamp in on-chain popover
paolomolo 6e69733
feat(social): align poll meta timestamp with post pattern
paolomolo fd45aeb
chore(social): match poll meta font size to timestamp
paolomolo dc47b0b
chore(social): increase spacing between poll meta row and title
paolomolo 8279b54
chore(social): remove underline/hover from Retract vote button
paolomolo b71417e
chore(social): adjust Retract vote hover to underline only (no glow)
paolomolo ce967f0
fix(social): remove residual glow from Retract vote hover
paolomolo de0a36f
feat(plugins): introduce external plugin SDK and composer actions
paolomolo df7f11b
feat(sdk): add composer attachment API
paolomolo 81f380e
chore(sdk): refine ensureWallet return type for attachments
paolomolo 337cd5e
feat(composer): add attachments toolbar and panel mount in PostForm
paolomolo f821d85
feat(poll): implement composer Poll attachment panel and async creation
paolomolo fa645c9
feat(feed): render inline poll placeholder/card inside post items
paolomolo 5a15935
docs(plugin): add comprehensive plugin SDK guide with attachments
paolomolo ebf4084
chore(feature-flag): gate composer attachments behind UNFINISHED_FEAT…
paolomolo d80fd23
docs(plugin): consolidate docs into plugin-sdk.md and remove outdated…
paolomolo 88bb3a3
chore(flags): enable composer-attachments feature by default
paolomolo 0af6823
feat(composer): position poll attachment panel below textarea and abo…
paolomolo a25f443
feat(composer): UX tweaks for poll mode
paolomolo 46e3f3f
feat(composer): make Poll toolbar button toggle to 'Remove poll' and …
paolomolo 40e1bec
refactor(composer): remove left 'Start poll' button and keep main CTA…
paolomolo ca57551
feat(composer): move Poll button to the right of GIF button
paolomolo df1ea48
Merge remote-tracking branch 'origin/develop' into feat/feed-plugin-a…
paolomolo c5a8662
feat(poll): switch from close-height input to duration pickers
paolomolo c867846
feat(poll): add labels for Days/Hours/Minutes in duration pickers
paolomolo 710ba2c
feat(poll): float labels inside duration inputs (Days/Hours/Minutes)
paolomolo 94fc54d
feat(poll): use native dropdowns for duration (Days/Hours/Minutes) wi…
paolomolo bbc1687
feat(poll): style native dropdown arrows to be larger and white
paolomolo 8e98204
feat(poll): show formatted close time with block height
paolomolo d1e7923
fix(poll): adjust close text formatting and ensure block height visible
paolomolo d681c1b
style(poll): format block height with hash and commas
paolomolo a0ae9fd
style(poll): use Lucide ChevronDown icons for dropdowns
paolomolo f0975f5
feat(poll): add plus button to add new option fields
paolomolo 00edada
style(poll): remove hover effect from plus button
paolomolo 6703715
fix(poll): prevent button active states and tap highlights
paolomolo c562e2a
fix(poll): replace button with div for plus icon
paolomolo 4e41eaa
feat(poll): update placeholder and validate form submission
paolomolo 57c8023
style(composer): update toolbar icons
paolomolo 9a2221f
feat(poll): clear GIFs when poll attachment is activated
paolomolo 0e7f77d
style(composer): replace GIF icon with SquarePlay
paolomolo ca75b86
style(composer): set GIF icon to same size as emoji
paolomolo 82b294e
style(composer): reduce gap between icons and text
paolomolo f64844e
style(poll): hide icon when showing 'Remove poll' text
paolomolo 017f32d
fix(poll): correct validation to allow posting with valid poll
paolomolo b90c86b
style(poll): remove 'Options' label
paolomolo 4d7c046
fix(poll): use correct method to access poll options in validation
paolomolo a20fa21
feat(poll): submit on-chain poll when attachment active
paolomolo 9a0ca4a
feat(poll): push pending feed entry after wallet confirmation and per…
paolomolo 2823824
fix(poll): align contract calls with /voting create
paolomolo eafbf89
feat(poll): show on-chain progress 1/2 → 2/2 on Post button
paolomolo 5e4029e
feat(poll): add mobile poll toggle next to GIF
paolomolo d981e14
style(poll): remove icon from mobile poll button
paolomolo cd19db0
style(poll): remove background from poll wrapper; no bg/border/paddin…
paolomolo 681882a
feat(poll): mobile remove control below close line; hide header poll …
paolomolo 9a83106
style(poll): refine mobile 'Remove poll' button
paolomolo 7bef958
feat(poll): keep textarea single-row on mobile when poll active
paolomolo e2185ab
fix(poll): force single-row min height on mobile when poll active
paolomolo e07b4a2
fix(poll): apply single-row height immediately on mobile when togglin…
paolomolo 60296df
feat(feed): inject poll-created entries into global and profile feeds…
paolomolo 7ff6e08
fix(feed): update correct query keys on inject so home list prepends …
paolomolo 5479a45
style(feed): add px-2 on mobile for poll created card
paolomolo a011da0
style(feed): add px-2 to inner poll card sections on mobile
paolomolo 179e4c7
style(feed): reduce inner content padding on mobile to px-2 for feed …
paolomolo 7b983e6
style(feed): force content padding to 8px on mobile for plugin cards
paolomolo 2caa43b
style(feed): mobile padding = 20px top/bottom, 8px left/right for plu…
paolomolo 7a84c7c
style(feed): set mobile horizontal padding to 0 for plugin card content
paolomolo 2905bd3
style(feed): set mobile horizontal padding to 0 for poll card inner c…
paolomolo 88b8ce9
feat(poll): include author address in injected entries for profile fe…
paolomolo 9ac1364
fix(feed): inject into correct profile cache key using entry.data.author
paolomolo 4b5b9c5
feat(plugins): add menu capability and navRegistry
paolomolo 980892c
feat(plugins): add local plugin loader and wire in App
paolomolo 22ffbef
refactor(feed): convert built-in feed plugins to SDK modules
paolomolo a376821
feat(extensions): add AeSdk contract loader helper
paolomolo 5501f4d
fix(plugins): ensure plugin wrappers compile as TSX
paolomolo de6a150
feat(nft-marketplace): scaffold extension with route and menu
paolomolo 58fd586
feat(nft-marketplace): add minimal backend client
paolomolo 3aba06b
docs(extensions): add comprehensive guides and tutorials
paolomolo 415b87f
build(extensions): add scaffold and validation scripts
paolomolo 32b949e
ci(extensions): run ext:check on pull requests
paolomolo 2489869
fix(plugins): de-duplicate routes and menu entries during registration
paolomolo 74a669a
fix(plugins): prevent double plugin bootstrap on re-render
paolomolo 411ee28
fix(plugins): eliminate duplicate registrations at source
paolomolo 78c19b3
chore(nft): stop auto-registering tutorial NFT plugin
paolomolo 162d5cf
fix(polls): wire vote/revoke handlers in plugin renderer
paolomolo 2878d0e
fix(poll): display 'Closed' for expired polls instead of '1s left'
paolomolo 401ae66
fix(poll): prevent voting on closed polls
paolomolo 7105b92
fix(poll): remove hover effects from closed poll options
paolomolo 2e23bf5
feat(poll): show time since closure for closed polls
paolomolo fc05b9f
feat(poll): fetch all polls sorted by creation time
paolomolo 402a3ab
fix(poll): remove duplicate poll attachment registration
paolomolo 1dd53c5
fix(routing): make plugin routes dynamically loaded
paolomolo 13bcb4f
fix(plugins): add deduplication logic to loadLocalPlugins
paolomolo a31005a
fix(poll): add composer capability and poll attachment to plugin
paolomolo 47afcab
docs(polls): add comprehensive Superhero App Extension tutorial (poll…
paolomolo b0876a6
docs(extensions): rewrite to cover all capabilities and loading modes
paolomolo ff68a04
docs(extensions): clean up tutorial steps
paolomolo feb61e3
fix(routing): memoize routes in DynamicRouter to prevent recreation
paolomolo b9981c7
fix(routing): remove useMemo with mutable dependency in DynamicRouter
paolomolo 03782b8
docs(polls): add contribution flow (fork + PR) to tutorial
paolomolo 5ab7ece
fix(plugins): prevent plugin reload on navigation changes
paolomolo 9abe4bb
docs(extensions): add info box linking to polls tutorial
paolomolo 0fa120b
fix(plugins): ensure both local and external plugins load before render
paolomolo 7844d30
docs: convert tutorial references to relative links
paolomolo d525576
docs(extensions): use GitHub note callout for tutorial link
paolomolo 060269c
fix(plugins): remove unused localSuccess variable
paolomolo abc9516
Merge pull request #248 from superhero-com/feat/plugin-refactor
paolomolo 47c94b6
docs(tutorial): add overview for AI-assisted Superhero extensions
paolomolo ca1f594
docs(tutorial): add environment setup for Cursor/Sophia dev
paolomolo 9028110
docs(tutorial): add project scaffold with TypeScript, Vitest and SDK
paolomolo 5be8e52
docs(tutorial): add Sophia basics for builders
paolomolo 569aa69
docs(tutorial): add compiler and build guide
paolomolo ce32430
docs(tutorial): add poll contract walkthrough
paolomolo 8d73e45
docs(tutorial): add testing with Vitest and AeSdk
paolomolo b9684ab
docs(tutorial): add deploy to devnet/testnet guide
paolomolo feb59c3
docs(tutorial): add integration into Superhero extension
paolomolo 3ee8329
docs(tutorial): add AI workflows in Cursor
paolomolo c457604
docs(tutorial): add troubleshooting and FAQ
paolomolo f2bce6b
docs(tutorial): add security checklist for polls
paolomolo 2c853c7
docs(tutorial): add references and glossary
paolomolo 018d00d
docs(tutorial): use relative links across hackathon tutorial pages
paolomolo ba9c361
docs(tutorial): update table of contents
paolomolo 90451fa
docs(tutorial): welcome hackathon builders and generalize scope
paolomolo 3e916ca
docs(tutorial): add 00a Quickstart fast-track
paolomolo bdd499e
docs(tutorial): add Superhero Wallet onboarding
paolomolo b3737bb
docs(tutorial): add middleware and data access guidance
paolomolo f4d3c5d
docs(tutorial): add Plugin SDK deep dive
paolomolo 03bb810
docs(tutorial): improve integration page and reference Plugin SDK
paolomolo 088e41d
docs(tutorial): add checklist and deploy/submit page
paolomolo f879c36
docs(tutorial): add GitBook-ready README and SUMMARY
paolomolo 29a6fb6
docs: archive outdated docs to docs/_archive
paolomolo 3eb75c7
chore(docs): add mkdocs.yml with Material theme and nav
paolomolo 986fcd6
build(docs): add requirements-docs.txt
paolomolo 5d1f7bb
ci(docs): add GitHub Pages workflow for MkDocs
paolomolo 2b4be78
docs: add local MkDocs serve instructions
paolomolo 598a5f1
build(docs): move requirements to docs/requirements.txt
paolomolo 60f3a36
chore(docs): add docs/netlify.toml for Netlify scoped builds
paolomolo 14102d7
chore(docs): fix Netlify docs build to use python -m mkdocs
paolomolo b730c1b
chore(docs): remove github-admonitions plugin from MkDocs
paolomolo f8356a1
chore(docs): write MkDocs output to docs/site to match Netlify publis…
paolomolo 7e077b7
chore(docs): fix MkDocs nav paths (remove docs/ prefix)
paolomolo 5c6e804
chore(docs): build MkDocs to ../site and publish ../site (base=docs)
paolomolo 3b00b85
chore(docs): add docs/mkdocs.yml to anchor build in docs base
paolomolo 714ac59
chore(docs): use docs/mkdocs.yml with site output to docs/site
paolomolo 90bdea3
chore(docs): set docs_dir=. in docs/mkdocs.yml and dedupe search plugin
paolomolo 87e69ff
chore(docs): remove docs/mkdocs.yml (keep root mkdocs.yml)
paolomolo f71a525
chore(docs): remove docs/netlify.toml (use UI config with base=root)
paolomolo 8951580
chore(docs): add docs/netlify.toml and mkdocs-docs.yml for docs site
paolomolo 0870790
chore(netlify): add conditional docs build to root netlify.toml
paolomolo 92e06d2
chore(netlify): remove default publish from root netlify.toml
paolomolo 7046b75
chore(netlify): improve conditional build check and add debug echos
paolomolo addf2b3
docs(mkdocs): convert GitHub-style callouts to Material admonitions
paolomolo 8859c42
docs(mkdocs): improve navigation and page titles
paolomolo 6b3e88c
fix(mkdocs): update site_url to match Netlify domain
paolomolo ceb0ae5
fix(mkdocs): use relative URLs for domain flexibility
paolomolo 3f156f9
fix(mkdocs): add proper index.md for home page
paolomolo 138c45f
feat(mkdocs): move navigation to sidebar instead of tabs
paolomolo d24b2ff
docs(links): convert plain URLs to markdown links
paolomolo 284c6bf
docs(tutorial): restructure hackathon guide into 8 concise pages
paolomolo c6173c0
chore(docs): ignore local venvs and MkDocs build outputs
paolomolo e34f8d7
docs(tutorial): prefer aeproject as default dev workflow
paolomolo e74e452
docs(nav): remove (aeproject) from sidenav labels
paolomolo b2cbacf
docs(tutorial): clarify separate contracts repo vs Superhero UI repo
paolomolo c893c73
docs(setup): add direct link to æternity testnet faucet
paolomolo 3195bb4
docs(tests): fix code block rendering in SDK + Vitest example
paolomolo 6736dd2
docs(markdown): fix bullet list rendering after paragraphs/code fences
paolomolo 2084ebf
docs(integrate): specify exact file paths and registration for plugin…
paolomolo 3412067
docs(quickstart): add AI-assisted Cursor bootstrap prompt for full setup
paolomolo 3c57a99
Merge remote-tracking branch 'origin/develop' into feat/feed-plugin-a…
paolomolo 250c6b0
chore(merge): merge develop into feat/feed-plugin-architecture
paolomolo 1572bc5
feat(i18n): update plugin structure to use multi-lang files
paolomolo 7a7c51c
feat(plugin-sdk): add plugin translation support
paolomolo 0c3339a
feat(plugins): register plugin translations automatically
paolomolo f8e50e0
feat(plugin): add translations to poll-created plugin
paolomolo b910c6d
docs(plugins): add plugin translation documentation
paolomolo 8d0b462
fix(plugin): deduplicate polls when combining open and closed lists
paolomolo c6a043b
chore(merge): merge feat/feed-plugin-architecture into feat/hackathon…
paolomolo 0b018f1
docs(tutorial): add plugin translations section to hackathon tutorial
paolomolo 24246cb
docs(tutorial): update hackathon tutorial
paolomolo 1a6c00c
fix(netlify): prevent edge function from processing MkDocs pages
paolomolo 01d19b9
Merge pull request #251 from superhero-com/feat/hackathon-tutorial
paolomolo 4f7c29e
fix(poll): correct progress bar width when poll has no votes
paolomolo aa134fd
fix(plugins): use 'menu' capability instead of 'routes' for menu regi…
paolomolo 9e6d7bd
fix(ext-check): exclude locale files from plugin index checks
paolomolo 67623ea
fix(ext-check): refine locale file exclusion in plugin index checks
paolomolo ec39a55
refactor(MobileAppHeader): replace dynamic navigation item retrieval …
paolomolo 198d572
refactor(MobileAppHeader): optimize navigation items retrieval with u…
paolomolo 7ccd9c1
refactor(plugin): remove unused template plugin files
paolomolo aeeff81
refactor(PostForm): update currentBlockHeight handling and dependencies
paolomolo 4c754d9
fix(plugin-sdk): add currentBlockHeight to ComposerAttachmentCtx type
paolomolo e567d17
refactor(governance): remove unused setActiveTab prop from Governance…
paolomolo 86a77bd
fix(ssr): update routes import to use getRoutes() function
paolomolo 44c7ae2
perf(header): memoize navigationItems in WebAppHeader
paolomolo 83627ae
Merge branch 'origin/develop' into feat/feed-plugin-architecture
paolomolo 3f8a62c
refactor(PostForm): simplify focus type definition and clean up imports
paolomolo 39099d9
refactor(PostForm): enhance component structure and improve type hand…
paolomolo c175bae
feat(governance): update poll plugin to use new governance endpoints
paolomolo 01d3b5a
feat(governance): migrate all components to use new governance endpoints
paolomolo 83fc3cb
refactor(governance): remove unused standalone governance pages
paolomolo 94fa791
fix(poll): fix rebuildFromOverview reference in PollDetail
paolomolo 1d9885f
feat(poll): trigger connect wallet modal when voting without wallet
paolomolo bb84258
feat(feed): add poll items support to popular feed
paolomolo 310f89f
fix(feed): remove duplicate useAeSdk import
paolomolo b345f4a
fix(social): add null checks for poll content parsing
paolomolo 7f1de3d
Merge pull request #372 from superhero-com/feature/add-polls-to-popul…
paolomolo 5a6bd2e
chore(ci): remove redundant GitHub Pages workflow for docs
paolomolo 9d00e5d
docs: replace MkDocs with Mintlify
paolomolo 772d041
docs: fix Mintlify logo, page titles, and convert MkDocs admonitions
paolomolo 1626f86
docs: remove number prefixes from markdown filenames
paolomolo 7cdf587
docs: fix duplicate titles and update Mintlify theme colors
paolomolo cf0706e
docs: add comprehensive plugin architecture documentation
paolomolo b36a271
docs: improve references page and clean up index
paolomolo c782fd7
docs: separate contract and plugin development in navigation
paolomolo 1cbdacb
docs: improve resources section and update terminology
paolomolo 1b82190
docs: split setup into multiple pages and add MCP configuration
paolomolo 5498aa6
docs: fix broken links, improve cross-linking, and add MCP tip
paolomolo 52eb1c7
docs: improve Configure Cursor page and add MCP documentation access …
paolomolo c0e2faa
docs: improve quickstart page with MCP emphasis and better accuracy
paolomolo 77a50d1
docs: improve quickstart prompt and add backend setup documentation
paolomolo f5079ca
docs: improve backend API description in quickstart prompt
paolomolo 33cd8ae
docs: configure GitHub Pages deployment and fix links
paolomolo d095f9d
fix: resolve port conflicts between services
paolomolo 837dcad
docs: rename LOCAL_SETUP.md to README.md and improve content
paolomolo aa2bddc
docs: remove overview.md and link to index instead
paolomolo 3c29076
fix: remove npm cache from docs deployment workflow
paolomolo 97a7519
Merge pull request #374 from superhero-com/feat/replace-mkdocs-with-m…
paolomolo ccb8e32
feat(AeEthBridge): update labels to use translation keys for improved…
paolomolo 3df75ee
fix(merge): resolve conflicts with develop branch
paolomolo fa1ed31
merge(develop): merge develop branch into feat/feed-plugin-architecture
paolomolo 840b705
fix(gitignore): add Mintlify build artifacts to ignore patterns
paolomolo 2751729
fix(merge): remove remaining conflict markers from ReplyToFeedItem
paolomolo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,57 @@ | ||
| name: Deploy Documentation to GitHub Pages | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - main | ||
| paths: | ||
| - 'docs/**' | ||
| - '.github/workflows/deploy-docs.yaml' | ||
| workflow_dispatch: | ||
|
|
||
| permissions: | ||
| contents: read | ||
| pages: write | ||
| id-token: write | ||
|
|
||
| concurrency: | ||
| group: "pages" | ||
| cancel-in-progress: false | ||
|
|
||
| jobs: | ||
| build-and-deploy: | ||
| environment: | ||
| name: github-pages | ||
| url: ${{ steps.deployment.outputs.page_url }} | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Setup Node.js | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: '20' | ||
|
|
||
| - name: Install Mintlify CLI | ||
| run: npm install -g mintlify@latest | ||
|
|
||
| - name: Build documentation | ||
| run: | | ||
| cd docs | ||
| mintlify build | ||
| # Ensure .nojekyll is present for GitHub Pages | ||
| touch .mintlify/dist/.nojekyll | ||
|
|
||
| - name: Setup Pages | ||
| uses: actions/configure-pages@v4 | ||
|
|
||
| - name: Upload artifact | ||
| uses: actions/upload-pages-artifact@v3 | ||
| with: | ||
| path: './docs/.mintlify/dist' | ||
|
|
||
| - name: Deploy to GitHub Pages | ||
| id: deployment | ||
| uses: actions/deploy-pages@v4 | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| name: Extensions Check | ||
|
|
||
| on: | ||
| pull_request: | ||
| branches: [ "*" ] | ||
|
|
||
| jobs: | ||
| ext-check: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: 18 | ||
| - run: npm ci | ||
| - run: npm run ext:check | ||
|
|
||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,73 @@ | ||
| # Superhero Documentation | ||
|
|
||
| **Live Documentation**: [docs.superhero.com](https://docs.superhero.com) | ||
|
|
||
| This directory contains the source files for the Superhero plugin development documentation, built with [Mintlify](https://mintlify.com). | ||
|
|
||
| ## Run Documentation Locally | ||
|
|
||
| To preview the documentation locally during development: | ||
|
|
||
| ```bash | ||
| # Install Mintlify CLI globally (requires Node.js v19+) | ||
| npm i -g mintlify | ||
|
|
||
| # Start local development server | ||
| cd docs | ||
| mintlify dev --port 3002 | ||
| ``` | ||
|
|
||
| The documentation will be available at `http://localhost:3002`. | ||
|
|
||
| ### Build Static Files | ||
|
|
||
| To build the documentation for production: | ||
|
|
||
| ```bash | ||
| cd docs | ||
| mintlify build | ||
| ``` | ||
|
|
||
| The static files will be generated in `docs/.mintlify/dist/`. | ||
|
|
||
| ## Deployment | ||
|
|
||
| The documentation is automatically deployed to GitHub Pages at `docs.superhero.com` when changes are pushed to the `main` branch. | ||
|
|
||
| ### Automatic Deployment | ||
|
|
||
| The GitHub Actions workflow (`.github/workflows/deploy-docs.yaml`) automatically: | ||
| - Builds the documentation using Mintlify | ||
| - Deploys to GitHub Pages on pushes to `main` that affect the `docs/` directory | ||
| - Supports manual deployment via Actions → "Deploy Documentation to GitHub Pages" → Run workflow | ||
|
|
||
| ### GitHub Pages Setup | ||
|
|
||
| To enable GitHub Pages deployment: | ||
|
|
||
| 1. **Enable GitHub Pages** in repository settings: | ||
| - Go to Settings → Pages | ||
| - Source: GitHub Actions | ||
| - Custom domain: `docs.superhero.com` (optional) | ||
|
|
||
| 2. **Configure Custom Domain** (if using `docs.superhero.com`): | ||
| - Add a CNAME record pointing `docs.superhero.com` to `your-org.github.io` | ||
| - Or add an A record pointing to GitHub Pages IP addresses | ||
| - Enable "Enforce HTTPS" in GitHub Pages settings | ||
|
|
||
| ## Documentation Structure | ||
|
|
||
| - `mint.json` - Mintlify configuration (navigation, branding, etc.) | ||
| - `tutorials/hackathon/` - Plugin development tutorials and guides | ||
| - `plugin-sdk.md` - Plugin SDK API reference | ||
| - `index.md` - Main documentation landing page | ||
|
|
||
| ## Contributing | ||
|
|
||
| When contributing to the documentation: | ||
|
|
||
| 1. Edit the Markdown files in this directory | ||
| 2. Test locally using `mintlify dev --port 3002` | ||
| 3. Commit changes to `main` branch to trigger automatic deployment | ||
| 4. Verify deployment at `docs.superhero.com` | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,79 @@ | ||
| # Superhero App Extensions | ||
|
|
||
| > [!NOTE] | ||
| > For a step-by-step walkthrough, see [How to build a Superhero App Extension (Polls example)](./tutorials/build-governance-poll-extension.md). | ||
|
|
||
| Extensions are first-class modules that can add routes, menu items, feed entries, composer actions, item actions, modals, and composer attachments. They are authored with the existing plugin SDK and loaded at runtime. | ||
|
|
||
| ## Capabilities | ||
| - routes: add pages (mounted dynamically via routeRegistry) | ||
| - menu: add header navigation items (merged via navRegistry) | ||
| - feed: contribute feed entries and renderers | ||
| - composer: add composer actions and attachments | ||
| - item-actions: add per-feed-item actions | ||
| - modals: register modal components | ||
|
|
||
| ## Authoring an extension | ||
| Minimal example: | ||
| ```tsx | ||
| import React from 'react'; | ||
| import { definePlugin } from '@/plugin-sdk'; | ||
| import MyApp from './ui/MyApp'; | ||
|
|
||
| export default definePlugin({ | ||
| meta: { | ||
| id: 'my-ext', | ||
| name: 'My Extension', | ||
| version: '0.1.0', | ||
| apiVersion: '1.x', | ||
| capabilities: ['routes', 'menu', 'composer'], | ||
| }, | ||
| setup({ register }) { | ||
| register({ | ||
| routes: [{ path: '/my-ext', element: <MyApp /> }], | ||
| menu: [{ id: 'my-ext', label: 'My Ext', path: '/my-ext', icon: '🧩' }], | ||
| // attachments: () => [myAttachmentSpec], | ||
| }); | ||
| }, | ||
| }); | ||
| ``` | ||
|
|
||
| ## Loading modes | ||
| - Local (first‑party): register in `src/plugins/local.ts` for development. Not enabled by default in production. | ||
| - External (remote URLs): `CONFIG.PLUGINS` can point to remote modules. The loader enforces the `capabilities` allowlist. | ||
|
|
||
| ## Capability allowlist | ||
| - Use `CONFIG.PLUGIN_CAPABILITIES_ALLOWLIST` to restrict what plugins may register, e.g. `['routes','feed','composer']`. | ||
|
|
||
| ## Registries lifecycle | ||
| - Registries live in `features/social/plugins/registries.ts`. | ||
| - In development, local loader resets registries on hot reload to avoid duplicates. | ||
| - Plugin bootstrap is guarded to run once per app lifecycle. | ||
|
|
||
| ## Contracts | ||
| Use `createContractLoader(sdk)` from `src/extensions/contract.ts` to load ACI-based contract instances. | ||
|
|
||
| ## Backend integration | ||
| Point your extension to backend services. For Social Superhero governance backend, see: | ||
| - repo: https://github.com/superhero-com/superhero-api | ||
| - flow: index chain data → expose REST/WebSocket → consume from extension client | ||
|
|
||
| ## Environment & config | ||
| - `public/superconfig.json` (or `window.__SUPERCONFIG__`) provides runtime keys like `NODE_URL`, `MIDDLEWARE_URL`, `GOVERNANCE_API_URL`, `PLUGINS`, `PLUGIN_CAPABILITIES_ALLOWLIST`. | ||
|
|
||
| ## CI | ||
| - `npm run ext:check` validates extension modules. The CI workflow runs it on pull requests. | ||
|
|
||
| ## Security & UX notes | ||
| - Keep capabilities minimal; prefer read-only routes for untrusted plugins. | ||
| - Gating composer/actions behind the allowlist reduces risk. | ||
| - Validate inputs and handle network failures gracefully. | ||
|
|
||
| ## Troubleshooting | ||
| - Duplicate nav or routes: ensure bootstrap runs once; in dev registries are reset before loading local plugins. | ||
| - Wallet not connected: ensure wallet connect flow completes before signing. | ||
| - ACI mismatch: recompile and update contract address. | ||
|
|
||
| ## Full tutorial (Polls example) | ||
| See the detailed guide: | ||
| `docs/tutorials/build-governance-poll-extension.md` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| # Backend Integration for App Extensions | ||
|
|
||
| This guide explains how to integrate an extension with a backend service. For Social Superhero, we reference the `superhero-api` repository. | ||
|
|
||
| ## When to use a backend | ||
| - Indexing historical data and building feeds | ||
| - Search and rich queries | ||
| - WebSocket push updates | ||
| - Off-chain validation | ||
|
|
||
| ## Setup superhero-api | ||
| - Repo: https://github.com/superhero-com/superhero-api | ||
| - Quick start (Docker): see repository README | ||
| - Configure ENV in frontend: `VITE_EXT_<YOUR_EXT>_API_URL` | ||
|
|
||
| ## Client in extension | ||
| Create a small client under `src/plugins/<id>/client/backend.ts` and read the base URL from `VITE_EXT_<ID>_API_URL` or runtime `__SUPERCONFIG__`. | ||
|
|
||
| ## Patterns | ||
| - Pagination tokens instead of page numbers | ||
| - Idempotent POSTs, signed requests where needed | ||
| - WebSocket channels for live updates | ||
|
|
||
| ## Error handling | ||
| - Map HTTP errors to user-friendly messages | ||
| - Retry with backoff |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.