-
Notifications
You must be signed in to change notification settings - Fork 2
Feature/api migration and personal mode #53
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
Merged
f7f376a1fcd0d0e11a10ed1b6577c9
merged 10 commits into
main
from
feature/api-migration-and-personal-mode
Jul 3, 2025
Merged
Feature/api migration and personal mode #53
f7f376a1fcd0d0e11a10ed1b6577c9
merged 10 commits into
main
from
feature/api-migration-and-personal-mode
Jul 3, 2025
Conversation
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
- Update API endpoints to match new unified backend structure - Add relay owner management API endpoints for only-me mode - Implement nip19 encoding/decoding for proper NPUB format handling - Update types to support new mode structure and permissions - Replace old read/write NPUB management with unified user system - Add proper validation and error handling for mode transitions
- Change endpoint URLs from /api/allowed-users to /api/allowed/users - Use proper REST methods: POST for add, DELETE for remove - Maintain NPUB format for backend compatibility - Add comprehensive logging for debugging backend communication - Ready for backend team to implement missing endpoints
- Detect wallet service unavailable errors and show clear user message - Explain Bitcoin payment requirement and wallet service dependency - Automatically revert to previous mode when subscription mode fails - Prevent UI from getting stuck in inconsistent state - Increase error message duration for better readability
- Implement wallet health check API integration with /panel-health endpoint - Add real-time wallet status indicators with proper theming - Fix transaction size calculation spamming by optimizing useEffect dependencies - Add request deduplication to prevent multiple simultaneous API calls - Remove wallet lock requirement (healthy + synced = ready to transact) - Improve authentication retry logic for both health checks and transaction calculations - Add proper error handling and user feedback for wallet connectivity issues
- Replace unescaped quotes with " entities in error message text - Resolves react/no-unescaped-entities warning
- Fix TiersConfig radio button alignment and syntax error - Update Alert component styling for consistent dark theme - Add ForcedSelectWrapper for better disabled state styling - Improve radio group layout with proper click handling - Fix card positioning and interaction in tier selection
Prevents saving "only-me" mode when no relay owner is set by: - Adding owner existence check before mode save - Showing clear error messages to guide users - Blocking invalid saves to maintain system integrity
- Remove redundant nested card wrapper in PermissionsConfig - Remove unnecessary permission type explanations - Fix active tier colors using CSS variables for dark theme compatibility - Replace hardcoded colors with theme-aware variables
- Fix payment notifications read-all endpoint by sending {} instead of undefined
- Remove unused AddKindForm component and related props
- Clean up KindsSection interfaces and component structure
- Update layout components to remove onAddKind prop references
- Add .eslintignore to exclude build/, node_modules/, and generated files - Update lint script to only target src/ directory instead of all files - Resolves 555+ false lint errors from scanning compiled/minified code
f7f376a1fcd0d0e11a10ed1b6577c9
approved these changes
Jul 3, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Backend API Migration and Personal Mode Implementation
Summary
This PR implements a complete migration to the new unified backend API structure and adds full support for public, only-me, and
invite-only relay modes. The changes provide a robust foundation for the new access control system with proper NPUB handling and
mode-specific UI flows.
Key Features Implemented
✅ Public Mode
✅ Only-Me Mode
✅ Invite-Only Mode
Technical Changes
API Migration
Type System Updates
'only-me' | 'invite-only' | 'public' | 'subscription''all_users' | 'paid_users' | 'allowed_users' | 'only_me'AllowedUserinterface replacing separate read/write modelsUI Components
Backend Integration Status
/api/admin/ownerendpoints/api/allowed/addand/api/allowed/removeFiles Changed
Core API
src/api/allowedUsers.api.ts- Complete rewrite for new backend structuresrc/types/allowedUsers.types.ts- Updated types and mode configurationsComponents
src/components/allowed-users/components/ModeSelector/- Updated mode names and descriptionssrc/components/allowed-users/components/PermissionsConfig/- Mode-based permission enforcementsrc/components/allowed-users/components/NPubManagement/- Unified user managementsrc/components/allowed-users/components/RelayOwnerConfig/- New - Owner management for only-me modesrc/components/allowed-users/layouts/AllowedUsersLayout.tsx- Conditional UI renderingState Management
src/hooks/useAllowedUsers.ts- Updated hooks for new API structuresrc/store/slices/allowedUsersSlice.ts- State management updatesTesting Notes
What Works Now
What Needs Backend Support
Migration Notes
Breaking Changes
personal/exclusive/free/paidtoonly-me/invite-only/public/subscription