feat: rename 3Nodes to Mycelium Nodes across codebase and documentation
This commit is contained in:
@@ -6,11 +6,11 @@ This document outlines the comprehensive redesign of the Project Mycelium market
|
|||||||
## 🎯 Main Objectives
|
## 🎯 Main Objectives
|
||||||
|
|
||||||
### 1. Rebranding & Terminology Updates
|
### 1. Rebranding & Terminology Updates
|
||||||
- [ ] **3nodes → Mycelium Nodes**
|
- [x] **3nodes → Mycelium Nodes**
|
||||||
- [ ] Update frontend templates (dashboard, marketplace, docs)
|
- [x] Update frontend templates (dashboard, marketplace, docs)
|
||||||
- [ ] Update backend models and services
|
- [x] Update backend models and services
|
||||||
- [ ] Update database/storage references
|
- [x] Update database/storage references
|
||||||
- [ ] Update API responses and documentation
|
- [x] Update API responses and documentation
|
||||||
|
|
||||||
- [ ] **Farmers → Resource Providers**
|
- [ ] **Farmers → Resource Providers**
|
||||||
- [ ] Update user roles and permissions
|
- [ ] Update user roles and permissions
|
||||||
|
@@ -9,7 +9,7 @@ The marketplace is organized into categories that align with the exchange mechan
|
|||||||
| Marketplace | Description | Suppliers | Consumers | TFP Exchange |
|
| Marketplace | Description | Suppliers | Consumers | TFP Exchange |
|
||||||
|-------------|-------------|-----------|-----------|----------------|
|
|-------------|-------------|-----------|-----------|----------------|
|
||||||
| **Compute Resources (Slices)** | Primary marketplace for compute capacity | Farmers providing hardware resources | Users needing compute capacity | TFP transferred based on resource utilization |
|
| **Compute Resources (Slices)** | Primary marketplace for compute capacity | Farmers providing hardware resources | Users needing compute capacity | TFP transferred based on resource utilization |
|
||||||
| **[3Nodes](./3nodes.md)** | Physical computing hardware marketplace | Hardware sellers | Hardware buyers | TFP transferred based on hardware value |
|
| **[Mycelium Nodes](./mycelium_nodes.md)** | Physical computing hardware marketplace | Hardware sellers | Hardware buyers | TFP transferred based on hardware value |
|
||||||
| **Mycelium Gateways** | Internet connectivity services | Gateway providers | Users requiring internet access | TFP paid based on bandwidth consumption |
|
| **Mycelium Gateways** | Internet connectivity services | Gateway providers | Users requiring internet access | TFP paid based on bandwidth consumption |
|
||||||
| **[Bandwidth Providers](./bandwidth_providers.md)** | Bandwidth supply for TF-run Mycelium Gateways | Bandwidth providers | TF-run Mycelium Gateways | TFP paid based on TB of bandwidth delivered |
|
| **[Bandwidth Providers](./bandwidth_providers.md)** | Bandwidth supply for TF-run Mycelium Gateways | Bandwidth providers | TF-run Mycelium Gateways | TFP paid based on TB of bandwidth delivered |
|
||||||
| **Mycelium Names** | Global fair name system | TF COOP (name provider) | Users registering names | TFP paid based on name length (shorter names cost more) |
|
| **Mycelium Names** | Global fair name system | TF COOP (name provider) | Users registering names | TFP paid based on name length (shorter names cost more) |
|
||||||
|
@@ -15,7 +15,7 @@ The TF Marketplace offers various products and services that facilitate the mutu
|
|||||||
- Natively connected to the Mycelium network
|
- Natively connected to the Mycelium network
|
||||||
- Detailed specifications available in [slices.md](./slices.md)
|
- Detailed specifications available in [slices.md](./slices.md)
|
||||||
|
|
||||||
## [3Nodes](3nodes.md)
|
## [Mycelium Nodes](mycelium_nodes.md)
|
||||||
|
|
||||||
- **Definition**: Physical computing hardware (servers, computers) that can be bought and sold
|
- **Definition**: Physical computing hardware (servers, computers) that can be bought and sold
|
||||||
- **Suppliers**: Hardware owners selling their equipment
|
- **Suppliers**: Hardware owners selling their equipment
|
||||||
|
@@ -12,7 +12,7 @@ This repository contains detailed specifications for all components of the TF Ma
|
|||||||
- [**Mutual Credit TFP System**](./points.md) - How value is exchanged between suppliers and consumers
|
- [**Mutual Credit TFP System**](./points.md) - How value is exchanged between suppliers and consumers
|
||||||
- [**Products & Services**](./products.md) - Overview of all offerings in the marketplace
|
- [**Products & Services**](./products.md) - Overview of all offerings in the marketplace
|
||||||
- [**Slices (Virtual Machines)**](./slices.md) - The fundamental compute resources of the marketplace
|
- [**Slices (Virtual Machines)**](./slices.md) - The fundamental compute resources of the marketplace
|
||||||
- [**3Nodes**](./3nodes.md) - Physical computing hardware marketplace
|
- [**Mycelium Nodes**](./mycelium_nodes.md) - Physical computing hardware marketplace
|
||||||
- [**Mycelium Names**](./names.md) - The global fair name system
|
- [**Mycelium Names**](./names.md) - The global fair name system
|
||||||
- [**Mycelium Gateways**](./mycelium_gw.md) - Internet connectivity services linking the marketplace to the outside world
|
- [**Mycelium Gateways**](./mycelium_gw.md) - Internet connectivity services linking the marketplace to the outside world
|
||||||
- [**Bandwidth Providers**](./bandwidth_providers.md) - Bandwidth supply for TF-run Mycelium Gateways
|
- [**Bandwidth Providers**](./bandwidth_providers.md) - Bandwidth supply for TF-run Mycelium Gateways
|
||||||
|
@@ -57,13 +57,13 @@ impl DocsController {
|
|||||||
render_template(&tmpl, "docs/getting_started.html", &ctx)
|
render_template(&tmpl, "docs/getting_started.html", &ctx)
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Renders the 3Nodes documentation page
|
/// Renders the Mycelium Nodes documentation page
|
||||||
pub async fn three_nodes(tmpl: web::Data<Tera>, session: Session) -> Result<impl Responder> {
|
pub async fn mycelium_nodes(tmpl: web::Data<Tera>, session: Session) -> Result<impl Responder> {
|
||||||
let mut ctx = crate::models::builders::ContextBuilder::new()
|
let mut ctx = crate::models::builders::ContextBuilder::new()
|
||||||
.active_page("docs")
|
.active_page("docs")
|
||||||
.build();
|
.build();
|
||||||
ctx.insert("active_section", "3nodes");
|
ctx.insert("active_section", "mycelium_nodes");
|
||||||
|
|
||||||
let config = get_app_config();
|
let config = get_app_config();
|
||||||
ctx.insert("gitea_enabled", &config.is_gitea_enabled());
|
ctx.insert("gitea_enabled", &config.is_gitea_enabled());
|
||||||
|
|
||||||
@@ -75,7 +75,7 @@ impl DocsController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
render_template(&tmpl, "docs/3nodes.html", &ctx)
|
render_template(&tmpl, "docs/mycelium_nodes.html", &ctx)
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Renders the compute resources documentation page
|
/// Renders the compute resources documentation page
|
||||||
|
@@ -377,8 +377,8 @@ impl MarketplaceController {
|
|||||||
render_template(&tmpl, "marketplace/compute_resources.html", &ctx)
|
render_template(&tmpl, "marketplace/compute_resources.html", &ctx)
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Renders the 3Nodes marketplace page with REAL farmer nodes from database
|
/// Renders the Mycelium Nodes marketplace page with REAL farmer nodes from database
|
||||||
pub async fn three_nodes(tmpl: web::Data<Tera>, session: Session, query: web::Query<std::collections::HashMap<String, String>>) -> Result<impl Responder> {
|
pub async fn mycelium_nodes(tmpl: web::Data<Tera>, session: Session, query: web::Query<std::collections::HashMap<String, String>>) -> Result<impl Responder> {
|
||||||
// Build services using established builder pattern
|
// Build services using established builder pattern
|
||||||
let currency_service = CurrencyService::builder()
|
let currency_service = CurrencyService::builder()
|
||||||
.build()
|
.build()
|
||||||
@@ -395,7 +395,7 @@ impl MarketplaceController {
|
|||||||
// Build context using ContextBuilder pattern
|
// Build context using ContextBuilder pattern
|
||||||
let mut ctx = crate::models::builders::ContextBuilder::new()
|
let mut ctx = crate::models::builders::ContextBuilder::new()
|
||||||
.active_page("marketplace")
|
.active_page("marketplace")
|
||||||
.active_section("three_nodes")
|
.active_section("mycelium_nodes")
|
||||||
.user_if_available(&session)
|
.user_if_available(&session)
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
@@ -484,7 +484,7 @@ impl MarketplaceController {
|
|||||||
ctx.insert("node_statistics", &node_marketplace_service.get_capacity_statistics());
|
ctx.insert("node_statistics", &node_marketplace_service.get_capacity_statistics());
|
||||||
ctx.insert("available_regions", &node_marketplace_service.get_available_regions());
|
ctx.insert("available_regions", &node_marketplace_service.get_available_regions());
|
||||||
|
|
||||||
render_template(&tmpl, "marketplace/three_nodes.html", &ctx)
|
render_template(&tmpl, "marketplace/mycelium_nodes.html", &ctx)
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Renders the gateways marketplace page
|
/// Renders the gateways marketplace page
|
||||||
|
@@ -454,7 +454,7 @@ impl Product {
|
|||||||
let mut product = Product {
|
let mut product = Product {
|
||||||
id: format!("fullnode_{}", node.id),
|
id: format!("fullnode_{}", node.id),
|
||||||
name: format!("Full Node: {}", node.name),
|
name: format!("Full Node: {}", node.name),
|
||||||
category_id: "3nodes".to_string(),
|
category_id: "mycelium_nodes".to_string(),
|
||||||
description: format!(
|
description: format!(
|
||||||
"Exclusive access to {} with {} CPU cores, {}GB RAM, {}GB storage in {}",
|
"Exclusive access to {} with {} CPU cores, {}GB RAM, {}GB storage in {}",
|
||||||
node.name, node.capacity.cpu_cores, node.capacity.memory_gb,
|
node.name, node.capacity.cpu_cores, node.capacity.memory_gb,
|
||||||
|
@@ -46,7 +46,7 @@ pub fn configure_routes(cfg: &mut web::ServiceConfig) {
|
|||||||
// Marketplace routes
|
// Marketplace routes
|
||||||
.route("/marketplace", web::get().to(MarketplaceController::dashboard))
|
.route("/marketplace", web::get().to(MarketplaceController::dashboard))
|
||||||
.route("/marketplace/compute", web::get().to(MarketplaceController::compute_resources))
|
.route("/marketplace/compute", web::get().to(MarketplaceController::compute_resources))
|
||||||
.route("/marketplace/3nodes", web::get().to(MarketplaceController::three_nodes))
|
.route("/marketplace/mycelium_nodes", web::get().to(MarketplaceController::mycelium_nodes))
|
||||||
.route("/marketplace/gateways", web::get().to(MarketplaceController::gateways))
|
.route("/marketplace/gateways", web::get().to(MarketplaceController::gateways))
|
||||||
.route("/marketplace/applications", web::get().to(MarketplaceController::applications))
|
.route("/marketplace/applications", web::get().to(MarketplaceController::applications))
|
||||||
.route("/marketplace/services", web::get().to(MarketplaceController::services))
|
.route("/marketplace/services", web::get().to(MarketplaceController::services))
|
||||||
@@ -245,7 +245,7 @@ pub fn configure_routes(cfg: &mut web::ServiceConfig) {
|
|||||||
// Documentation routes
|
// Documentation routes
|
||||||
.route("/docs", web::get().to(DocsController::index))
|
.route("/docs", web::get().to(DocsController::index))
|
||||||
.route("/docs/getting-started", web::get().to(DocsController::getting_started))
|
.route("/docs/getting-started", web::get().to(DocsController::getting_started))
|
||||||
.route("/docs/3nodes", web::get().to(DocsController::three_nodes))
|
.route("/docs/mycelium_nodes", web::get().to(DocsController::mycelium_nodes))
|
||||||
.route("/docs/compute", web::get().to(DocsController::compute))
|
.route("/docs/compute", web::get().to(DocsController::compute))
|
||||||
.route("/docs/gateways", web::get().to(DocsController::gateways))
|
.route("/docs/gateways", web::get().to(DocsController::gateways))
|
||||||
.route("/docs/applications", web::get().to(DocsController::applications))
|
.route("/docs/applications", web::get().to(DocsController::applications))
|
||||||
|
@@ -110,7 +110,7 @@ impl NodeMarketplaceService {
|
|||||||
|
|
||||||
for node in nodes {
|
for node in nodes {
|
||||||
// Filter by node type and status
|
// Filter by node type and status
|
||||||
if node.node_type == "3Node" && (self.include_offline_nodes || self.is_node_online(&node)) {
|
if node.node_type == "MyceliumNode" && (self.include_offline_nodes || self.is_node_online(&node)) {
|
||||||
if let Ok(product) = self.convert_node_to_product(&node, &user_email) {
|
if let Ok(product) = self.convert_node_to_product(&node, &user_email) {
|
||||||
all_products.push(product);
|
all_products.push(product);
|
||||||
}
|
}
|
||||||
@@ -205,7 +205,7 @@ impl NodeMarketplaceService {
|
|||||||
|
|
||||||
// Create metadata with location
|
// Create metadata with location
|
||||||
let metadata = crate::models::product::ProductMetadata {
|
let metadata = crate::models::product::ProductMetadata {
|
||||||
tags: vec!["3node".to_string(), "hardware".to_string(), node.region.clone()],
|
tags: vec!["mycelium_node".to_string(), "hardware".to_string(), node.region.clone()],
|
||||||
location: Some(node.location.clone()),
|
location: Some(node.location.clone()),
|
||||||
rating: Some(node.health_score / 20.0), // Convert health score to 5-star rating
|
rating: Some(node.health_score / 20.0), // Convert health score to 5-star rating
|
||||||
review_count: 0,
|
review_count: 0,
|
||||||
@@ -216,7 +216,7 @@ impl NodeMarketplaceService {
|
|||||||
let mut builder = crate::models::product::Product::builder()
|
let mut builder = crate::models::product::Product::builder()
|
||||||
.id(format!("node_{}", node.id))
|
.id(format!("node_{}", node.id))
|
||||||
.name(format!("{} - {}", node.name, farmer_display_name))
|
.name(format!("{} - {}", node.name, farmer_display_name))
|
||||||
.description(format!("3Node with {} CPU cores, {} GB RAM, {} GB storage in {}. Uptime: {:.1}%, Health Score: {:.1}",
|
.description(format!("Mycelium Node with {} CPU cores, {} GB RAM, {} GB storage in {}. Uptime: {:.1}%, Health Score: {:.1}",
|
||||||
node.capacity.cpu_cores,
|
node.capacity.cpu_cores,
|
||||||
node.capacity.memory_gb,
|
node.capacity.memory_gb,
|
||||||
node.capacity.storage_gb,
|
node.capacity.storage_gb,
|
||||||
|
@@ -49,7 +49,7 @@
|
|||||||
<td><strong>3Nodes</strong></td>
|
<td><strong>3Nodes</strong></td>
|
||||||
<td>Physical computing hardware marketplace</td>
|
<td>Physical computing hardware marketplace</td>
|
||||||
<td>Credits transferred based on hardware value</td>
|
<td>Credits transferred based on hardware value</td>
|
||||||
<td><a href="/docs/3nodes" class="btn btn-sm btn-outline-primary">Learn More</a></td>
|
<td><a href="/docs/mycelium_nodes" class="btn btn-sm btn-outline-primary">Learn More</a></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><strong>Mycelium Gateways</strong></td>
|
<td><strong>Mycelium Gateways</strong></td>
|
||||||
|
@@ -40,7 +40,7 @@
|
|||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link {% if active_section == '3nodes' %}active{% endif %}" href="/docs/3nodes">
|
<a class="nav-link {% if active_section == '3nodes' %}active{% endif %}" href="/docs/mycelium_nodes">
|
||||||
<i class="bi bi-hdd-rack me-1"></i>
|
<i class="bi bi-hdd-rack me-1"></i>
|
||||||
3Nodes
|
3Nodes
|
||||||
</a>
|
</a>
|
||||||
|
@@ -353,7 +353,7 @@
|
|||||||
<h2><i class="bi bi-question-circle me-2"></i>Ready to Buy or Sell 3Nodes?</h2>
|
<h2><i class="bi bi-question-circle me-2"></i>Ready to Buy or Sell 3Nodes?</h2>
|
||||||
<p class="lead">Visit the Project Mycelium 3Nodes section to start exploring options.</p>
|
<p class="lead">Visit the Project Mycelium 3Nodes section to start exploring options.</p>
|
||||||
<div class="mt-3">
|
<div class="mt-3">
|
||||||
<a href="/marketplace/3nodes" class="btn btn-primary me-2">Explore 3Nodes Marketplace</a>
|
<a href="/marketplace/mycelium_nodes" class="btn btn-primary me-2">Explore Mycelium Nodes Marketplace</a>
|
||||||
<a href="/docs" class="btn btn-outline-secondary">Back to Documentation</a>
|
<a href="/docs" class="btn btn-outline-secondary">Back to Documentation</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
@@ -49,7 +49,7 @@
|
|||||||
<i class="bi bi-hdd-rack text-primary display-4 mb-3"></i>
|
<i class="bi bi-hdd-rack text-primary display-4 mb-3"></i>
|
||||||
<h3>3Nodes</h3>
|
<h3>3Nodes</h3>
|
||||||
<p>Buy and sell physical computing hardware to support the Grid.</p>
|
<p>Buy and sell physical computing hardware to support the Grid.</p>
|
||||||
<a href="/marketplace/3nodes" class="btn btn-sm btn-outline-primary">Explore</a>
|
<a href="/marketplace/mycelium_nodes" class="btn btn-sm btn-outline-primary">Explore</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@@ -23,7 +23,7 @@
|
|||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<h5 class="card-title">3Nodes</h5>
|
<h5 class="card-title">3Nodes</h5>
|
||||||
<p class="card-text">120+ certified nodes</p>
|
<p class="card-text">120+ certified nodes</p>
|
||||||
<a href="/marketplace/3nodes" class="text-white">Browse 3Nodes →</a>
|
<a href="/marketplace/mycelium_nodes" class="text-white">Browse Mycelium Nodes →</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@@ -34,7 +34,7 @@
|
|||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link {% if active_section == 'three_nodes' %}active{% endif %}" href="/marketplace/3nodes">
|
<a class="nav-link {% if active_section == 'three_nodes' %}active{% endif %}" href="/marketplace/mycelium_nodes">
|
||||||
<i class="bi bi-hdd-rack me-1"></i>
|
<i class="bi bi-hdd-rack me-1"></i>
|
||||||
3Nodes
|
3Nodes
|
||||||
</a>
|
</a>
|
||||||
|
@@ -64,7 +64,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="col-md-3 d-flex align-items-end">
|
<div class="col-md-3 d-flex align-items-end">
|
||||||
<button type="submit" class="btn btn-primary me-2">Apply Filters</button>
|
<button type="submit" class="btn btn-primary me-2">Apply Filters</button>
|
||||||
<a href="/marketplace/3nodes" class="btn btn-outline-secondary">Clear</a>
|
<a href="/marketplace/mycelium_nodes" class="btn btn-outline-secondary">Clear</a>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
@@ -184,7 +184,7 @@
|
|||||||
data-product-name="{{ product_data.product.name }}"
|
data-product-name="{{ product_data.product.name }}"
|
||||||
data-unit-price="{{ product_data.price.display_amount }}"
|
data-unit-price="{{ product_data.price.display_amount }}"
|
||||||
data-currency="{{ product_data.price.display_currency }}"
|
data-currency="{{ product_data.price.display_currency }}"
|
||||||
data-category="3nodes">
|
data-category="mycelium_nodes">
|
||||||
<i class="bi bi-lightning-charge me-1"></i>Buy Now
|
<i class="bi bi-lightning-charge me-1"></i>Buy Now
|
||||||
</button>
|
</button>
|
||||||
<button class="btn btn-primary btn-sm add-to-cart-btn"
|
<button class="btn btn-primary btn-sm add-to-cart-btn"
|
@@ -104,7 +104,7 @@ async fn test_complete_marketplace_categories_ux_workflow() {
|
|||||||
|
|
||||||
// Simulate node browsing and information
|
// Simulate node browsing and information
|
||||||
let node_categories = vec![
|
let node_categories = vec![
|
||||||
("3node", "Dedicated ThreeFold node for farming"),
|
("mycelium_node", "Dedicated Mycelium node for farming"),
|
||||||
("titan", "High-performance enterprise node"),
|
("titan", "High-performance enterprise node"),
|
||||||
("quantum", "Quantum-safe storage node"),
|
("quantum", "Quantum-safe storage node"),
|
||||||
];
|
];
|
||||||
|
@@ -86,7 +86,7 @@ async fn test_anonymous_marketplace_browsing() -> Result<(), Box<dyn std::error:
|
|||||||
// Test each marketplace category
|
// Test each marketplace category
|
||||||
let categories = vec![
|
let categories = vec![
|
||||||
("/marketplace/compute", "compute resources"),
|
("/marketplace/compute", "compute resources"),
|
||||||
("/marketplace/3nodes", "3nodes"),
|
("/marketplace/mycelium_nodes", "mycelium_nodes"),
|
||||||
("/marketplace/gateways", "gateways"),
|
("/marketplace/gateways", "gateways"),
|
||||||
("/marketplace/applications", "applications"),
|
("/marketplace/applications", "applications"),
|
||||||
("/marketplace/services", "services"),
|
("/marketplace/services", "services"),
|
||||||
@@ -108,7 +108,7 @@ async fn test_anonymous_marketplace_browsing() -> Result<(), Box<dyn std::error:
|
|||||||
}
|
}
|
||||||
"/marketplace/3nodes" => {
|
"/marketplace/3nodes" => {
|
||||||
// Should show node listings
|
// Should show node listings
|
||||||
helper.browser.wait_for_element(".node-listings, .server-list, .3node-grid").await.ok();
|
helper.browser.wait_for_element(".node-listings, .server-list, .mycelium-node-grid").await.ok();
|
||||||
}
|
}
|
||||||
"/marketplace/gateways" => {
|
"/marketplace/gateways" => {
|
||||||
// Should show gateway services
|
// Should show gateway services
|
||||||
|
Reference in New Issue
Block a user