- Add mobile-bridge.ts utility for native app communication
- Add useMobileBridge.ts React hook
- Update AuthContext to detect and use native wallet
- Update PezkuwiContext to connect mobile wallet automatically
- Update WalletContext to sign transactions via native bridge
Mobile app can now seamlessly use web P2P features with native wallet.
- Created useDelegation hook to fetch real delegation data from blockchain
- Queries democracy.voting pallet for all delegations
- Tracks delegate totals, delegator counts, and voting power
- Calculates delegate performance metrics and success rates
- Fetches user's own delegations with conviction levels
- Auto-refreshes every 30 seconds for live updates
- Provides delegateVotes and undelegateVotes transaction builders
- Updated DelegationManager component to use live data
- Replaced mock delegates with real blockchain delegates
- Replaced mock delegations with user's actual delegations
- Added loading states with spinner during data fetch
- Added error handling with user-friendly messages
- Added "Live Blockchain Data" badge for transparency
- Formatted token amounts from blockchain units (12 decimals)
- Show delegate addresses in monospace font
- Display delegator count and conviction levels
- Empty states for no delegates/delegations scenarios
- Enhanced PolkadotContext with isConnected property
- Added isConnected as alias for isApiReady
- Maintains backward compatibility with existing hooks
- Added formatNumber utility to lib/utils
- Formats large numbers with K/M/B suffixes
- Handles decimals and edge cases
- Consistent formatting across all components
All delegation data now comes from live blockchain queries.
- Redesigned ForumOverview with modern, professional UI
- Added admin announcements banner with 4 priority types (info/warning/success/critical)
- Implemented upvote/downvote system with real-time updates
- Added forum statistics dashboard showing discussions, categories, users, replies
- Created category grid with visual icons and discussion counts
- Enhanced discussion cards with pin/lock/trending badges
- Integrated search, filtering, and sorting functionality
- Added comprehensive moderation panel with:
- Reports queue management
- Auto-moderation settings with AI sentiment analysis
- User management with warn/suspend/ban actions
- Moderation stats dashboard
- Created useForum hook with real-time Supabase subscriptions
- All data connected to Supabase with RLS policies for security
This completes the modern forum implementation as requested.
Added:
- useGovernance hook: Fetches live proposals and referenda from blockchain
- useTreasury hook: Fetches live treasury balance and proposals
- TreasuryOverview: Now uses real blockchain data with loading/error states
- Forum database schema: Admin announcements, categories, discussions, replies, reactions
Features:
- Live data badge shows active blockchain connection
- Automatic refresh every 30 seconds for treasury data
- Secure RLS policies for forum access control
- Admin announcements system with priority and expiry
- Forum reactions (upvote/downvote) support
Next: Complete forum UI with admin banner and moderation panel
Restructured the project to support multiple frontend applications:
- Move web app to web/ directory
- Create pezkuwi-sdk-ui/ for Polkadot SDK clone (planned)
- Create mobile/ directory for mobile app development
- Add shared/ directory with common utilities, types, and blockchain code
- Update README.md with comprehensive documentation
- Remove obsolete DKSweb/ directory
This monorepo structure enables better code sharing and organized
development across web, mobile, and SDK UI projects.