No description
Find a file
Timur Gordon 8c57d743e1 feat: add Mycelium Network Dashboard with marketplace and pricing UI
Phase 1 - Login & Wallet Connection:
- Add TFChain wallet integration with Polkadot.js extension
- Add login page with wallet detection and account selection
- Add session management for authenticated users

Phase 2 - Node Pricing Configuration:
- Add per-resource pricing form (CPU, memory, SSD, HDD, GPU)
- Add live revenue calculator
- Add market listing toggle for nodes

Phase 3 - CloudSlice Marketplace:
- Add marketplace.oschema with Listing, Order, and service definitions
- Add marketplace service methods (browse, create listing, create order, etc.)
- Add marketplace UI with browse listings, filters, my orders, my sales
- Add order flow with resource allocation and rental periods

Also:
- Migrate from TFTX schemas to Mycelium domain schemas
- Add mycelium.rs service implementation
- Add mock data population script
- Update README with project documentation

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-07 17:43:05 +01:00
_archive debug now works 2026-01-04 21:12:04 +01:00
backend feat: add Mycelium Network Dashboard with marketplace and pricing UI 2026-01-07 17:43:05 +01:00
devops feat: add rebuild target and improve dev workflow documentation 2026-01-05 00:09:48 -05:00
setup dioxus archive 2026-01-05 17:59:53 +01:00
webcomponent feat: add Mycelium Network Dashboard with marketplace and pricing UI 2026-01-07 17:43:05 +01:00
webcomponent_dioxus_not_working feat: add Mycelium Network Dashboard with marketplace and pricing UI 2026-01-07 17:43:05 +01:00
.gitignore Initial commit: browser-only web component 2026-01-04 18:34:40 +01:00
LICENSE Initial commit: browser-only web component 2026-01-04 18:34:40 +01:00
myenv.sh dioxus archive 2026-01-05 17:59:53 +01:00
README.md feat: add Mycelium Network Dashboard with marketplace and pricing UI 2026-01-07 17:43:05 +01:00
run.sh feat: add Mycelium Network Dashboard with marketplace and pricing UI 2026-01-07 17:43:05 +01:00
start_all.sh dioxus archive 2026-01-05 17:59:53 +01:00

Mycelium Network Dashboard

A web-based dashboard for managing nodes, tokens, and rewards on the Mycelium Network. Built with Rust, Axum, and Alpine.js.

Features

  • Wallet Connection: Connect via Polkadot.js browser extension
  • Node Management: View and manage your TFGrid nodes
  • Token Migration: Migrate TFT tokens to Spore on Mycelium
  • Farming Rewards: Track and claim farming rewards
  • Fold Management: Manage cryptographic key containers (identities)

Architecture

hero_web_template/
├── backend/           # Rust library with OSIS schemas and services
│   ├── src/
│   │   ├── domains/   # OSchema definitions
│   │   │   └── mycelium/
│   │   │       ├── fold.oschema    # Identity/wallet management
│   │   │       ├── node.oschema    # Node and pricing
│   │   │       ├── token.oschema   # Token migration
│   │   │       └── rewards.oschema # Farming rewards
│   │   └── services/  # Business logic
│   └── Cargo.toml
├── webcomponent/      # Axum web server + UI
│   ├── src/
│   │   └── main.rs    # Routes and handlers
│   ├── templates/     # Askama HTML templates
│   │   ├── base.html  # Base layout
│   │   ├── login.html # Wallet connection
│   │   └── index.html # Dashboard
│   └── Cargo.toml
└── README.md

Tech Stack

Layer Technology
Backend Rust 1.92.0
Web Framework Axum 0.8
Templates Askama
Frontend Alpine.js 3.14
UI Framework Bootstrap 5.3 (dark theme)
Database OSIS (OSchema)
Blockchain TFChain (Substrate)

Getting Started

Prerequisites

Building

# Build backend library
cd backend
cargo build --release

# Build webcomponent
cd ../webcomponent
cargo build --release

Running

# From webcomponent directory
./target/release/node-dashboard

# Or with custom options
./target/release/node-dashboard --bind 0.0.0.0:8080 --db-path ./mydata

Populating Mock Data

For development/testing:

cd backend
cargo run --release --bin populate-mock-data

API Endpoints

Authentication

Endpoint Method Description
/login GET Login page
/api/auth/challenge POST Generate signing challenge
/api/auth/verify-signature POST Verify signature, create session
/api/auth/session GET Get session info
/api/auth/wallet-logout POST Invalidate session

Dashboard

Endpoint Method Description
/api/dashboard GET All dashboard data
/api/nodes GET List nodes
/api/nodes/summary GET Node statistics
/api/tokens/balance GET Token balances
/api/rewards GET Reward history
/api/folds GET List folds

Actions

Endpoint Method Description
/api/nodes/shared POST Toggle node sharing
/api/tokens/migrations/start POST Start token migration
/api/rewards/claim-all POST Claim all rewards
/api/folds/active POST Set active fold

Authentication Flow

  1. User clicks "Connect Wallet" on dashboard
  2. Redirected to /login page
  3. Polkadot.js extension detected
  4. User selects account from extension
  5. Server generates random challenge
  6. User signs challenge with extension
  7. Server verifies signature, creates session
  8. User redirected to dashboard with session cookie

Development

Project Structure

  • OSIS Schemas (backend/src/domains/): Define data models using OSchema language
  • Services (backend/src/services/): Business logic and TFChain integration
  • Templates (webcomponent/templates/): Askama HTML templates with Alpine.js
  • Routes (webcomponent/src/main.rs): Axum HTTP handlers

Adding New Features

  1. Define schema in backend/src/domains/mycelium/*.oschema
  2. Rebuild backend to generate code
  3. Add service methods in backend/src/services/mycelium.rs
  4. Add API endpoints in webcomponent/src/main.rs
  5. Update UI in webcomponent/templates/index.html

License

Apache-2.0