Closed
Conversation
Add a separate web dashboard for managing a Cashu mint via its gRPC management interface and REST API. Runs as `poetry run mint-admin`. Features: - Dashboard with mint status, keyset overview, system metrics - Settings management (name, description, MOTD, fees, URLs, contacts) - Keyset viewing and rotation with confirmation - Quote lookup and state updates with validation - Live monitoring with auto-refresh (CPU, memory, disk) Security: - HTTP Basic Auth via --admin-password / ADMIN_PASSWORD env var - Security headers (X-Frame-Options DENY, CSP frame-ancestors, nosniff) - gRPC error details logged server-side, never leaked to browser - Quote state and type validation before gRPC calls - Numeric input validation on all form fields - CSRF limitation documented (recommend VPN for production) Technical: - All sync gRPC calls wrapped with asyncio.to_thread() - Proper gRPC channel cleanup on shutdown - python-multipart dependency (required for Form()) - psutil as optional dependency for system monitoring - Template deduplication via Jinja2 includes - Timestamp formatting filter for quote datetimes - Favicon route to prevent browser auth prompts - 40 tests covering auth, pages, validation, errors, and security Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
417c693 to
0c2a8df
Compare
Collaborator
|
We don't really want Admin UIs inside nutshell. You're free to build your own external solution, like Orchard |
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
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.
Summary
Add a web-based Admin UI for managing a Cashu mint. The dashboard communicates with the mint via its gRPC management interface and REST API, providing a visual interface for common administrative tasks.
Features
Security & Reliability
--admin-passwordorADMIN_PASSWORDenv varasyncio.to_thread()to avoid blocking the event loopDependencies
python-multipart(required forForm(...)— crashes without it)psutil(optional, for system monitoring metrics)Screenshots
Dashboard
Settings
Keysets
Quotes
Monitoring
Usage
Start the mint with gRPC management enabled, then start the admin UI:
Test plan
poetry run pytest tests/test_admin.py -v— 31 tests pass