feat: rename 3Nodes to Mycelium Nodes across codebase and documentation

This commit is contained in:
mik-tf
2025-09-06 22:21:15 -04:00
parent add1136a89
commit 202a0fd622
19 changed files with 34 additions and 34 deletions

View File

@@ -6,11 +6,11 @@ This document outlines the comprehensive redesign of the Project Mycelium market
## 🎯 Main Objectives
### 1. Rebranding & Terminology Updates
- [ ] **3nodes → Mycelium Nodes**
- [ ] Update frontend templates (dashboard, marketplace, docs)
- [ ] Update backend models and services
- [ ] Update database/storage references
- [ ] Update API responses and documentation
- [x] **3nodes → Mycelium Nodes**
- [x] Update frontend templates (dashboard, marketplace, docs)
- [x] Update backend models and services
- [x] Update database/storage references
- [x] Update API responses and documentation
- [ ] **Farmers → Resource Providers**
- [ ] Update user roles and permissions

View File

@@ -9,7 +9,7 @@ The marketplace is organized into categories that align with the exchange mechan
| 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 |
| **[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 |
| **[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) |

View File

@@ -15,7 +15,7 @@ The TF Marketplace offers various products and services that facilitate the mutu
- Natively connected to the Mycelium network
- 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
- **Suppliers**: Hardware owners selling their equipment

View File

@@ -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
- [**Products & Services**](./products.md) - Overview of all offerings in 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 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

View File

@@ -57,12 +57,12 @@ impl DocsController {
render_template(&tmpl, "docs/getting_started.html", &ctx)
}
/// Renders the 3Nodes documentation page
pub async fn three_nodes(tmpl: web::Data<Tera>, session: Session) -> Result<impl Responder> {
/// Renders the Mycelium Nodes documentation page
pub async fn mycelium_nodes(tmpl: web::Data<Tera>, session: Session) -> Result<impl Responder> {
let mut ctx = crate::models::builders::ContextBuilder::new()
.active_page("docs")
.build();
ctx.insert("active_section", "3nodes");
ctx.insert("active_section", "mycelium_nodes");
let config = get_app_config();
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

View File

@@ -377,8 +377,8 @@ impl MarketplaceController {
render_template(&tmpl, "marketplace/compute_resources.html", &ctx)
}
/// Renders the 3Nodes 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> {
/// Renders the Mycelium Nodes marketplace page with REAL farmer nodes from database
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
let currency_service = CurrencyService::builder()
.build()
@@ -395,7 +395,7 @@ impl MarketplaceController {
// Build context using ContextBuilder pattern
let mut ctx = crate::models::builders::ContextBuilder::new()
.active_page("marketplace")
.active_section("three_nodes")
.active_section("mycelium_nodes")
.user_if_available(&session)
.build();
@@ -484,7 +484,7 @@ impl MarketplaceController {
ctx.insert("node_statistics", &node_marketplace_service.get_capacity_statistics());
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

View File

@@ -454,7 +454,7 @@ impl Product {
let mut product = Product {
id: format!("fullnode_{}", node.id),
name: format!("Full Node: {}", node.name),
category_id: "3nodes".to_string(),
category_id: "mycelium_nodes".to_string(),
description: format!(
"Exclusive access to {} with {} CPU cores, {}GB RAM, {}GB storage in {}",
node.name, node.capacity.cpu_cores, node.capacity.memory_gb,

View File

@@ -46,7 +46,7 @@ pub fn configure_routes(cfg: &mut web::ServiceConfig) {
// Marketplace routes
.route("/marketplace", web::get().to(MarketplaceController::dashboard))
.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/applications", web::get().to(MarketplaceController::applications))
.route("/marketplace/services", web::get().to(MarketplaceController::services))
@@ -245,7 +245,7 @@ pub fn configure_routes(cfg: &mut web::ServiceConfig) {
// Documentation routes
.route("/docs", web::get().to(DocsController::index))
.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/gateways", web::get().to(DocsController::gateways))
.route("/docs/applications", web::get().to(DocsController::applications))

View File

@@ -110,7 +110,7 @@ impl NodeMarketplaceService {
for node in nodes {
// 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) {
all_products.push(product);
}
@@ -205,7 +205,7 @@ impl NodeMarketplaceService {
// Create metadata with location
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()),
rating: Some(node.health_score / 20.0), // Convert health score to 5-star rating
review_count: 0,
@@ -216,7 +216,7 @@ impl NodeMarketplaceService {
let mut builder = crate::models::product::Product::builder()
.id(format!("node_{}", node.id))
.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.memory_gb,
node.capacity.storage_gb,

View File

@@ -49,7 +49,7 @@
<td><strong>3Nodes</strong></td>
<td>Physical computing hardware marketplace</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>
<td><strong>Mycelium Gateways</strong></td>

View File

@@ -40,7 +40,7 @@
</a>
</li>
<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>
3Nodes
</a>

View File

@@ -353,7 +353,7 @@
<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>
<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>
</div>
</div>

View File

@@ -49,7 +49,7 @@
<i class="bi bi-hdd-rack text-primary display-4 mb-3"></i>
<h3>3Nodes</h3>
<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>

View File

@@ -23,7 +23,7 @@
<div class="card-body">
<h5 class="card-title">3Nodes</h5>
<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>

View File

@@ -34,7 +34,7 @@
</a>
</li>
<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>
3Nodes
</a>

View File

@@ -64,7 +64,7 @@
</div>
<div class="col-md-3 d-flex align-items-end">
<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>
</form>
</div>
@@ -184,7 +184,7 @@
data-product-name="{{ product_data.product.name }}"
data-unit-price="{{ product_data.price.display_amount }}"
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
</button>
<button class="btn btn-primary btn-sm add-to-cart-btn"

View File

@@ -104,7 +104,7 @@ async fn test_complete_marketplace_categories_ux_workflow() {
// Simulate node browsing and information
let node_categories = vec![
("3node", "Dedicated ThreeFold node for farming"),
("mycelium_node", "Dedicated Mycelium node for farming"),
("titan", "High-performance enterprise node"),
("quantum", "Quantum-safe storage node"),
];

View File

@@ -86,7 +86,7 @@ async fn test_anonymous_marketplace_browsing() -> Result<(), Box<dyn std::error:
// Test each marketplace category
let categories = vec![
("/marketplace/compute", "compute resources"),
("/marketplace/3nodes", "3nodes"),
("/marketplace/mycelium_nodes", "mycelium_nodes"),
("/marketplace/gateways", "gateways"),
("/marketplace/applications", "applications"),
("/marketplace/services", "services"),
@@ -108,7 +108,7 @@ async fn test_anonymous_marketplace_browsing() -> Result<(), Box<dyn std::error:
}
"/marketplace/3nodes" => {
// 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" => {
// Should show gateway services