diff --git a/docs/dev/design/marketplace-redesign-plan.md b/docs/dev/design/marketplace-redesign-plan.md index 8ec0711..ee4c99c 100644 --- a/docs/dev/design/marketplace-redesign-plan.md +++ b/docs/dev/design/marketplace-redesign-plan.md @@ -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 diff --git a/specs/marketplace.md b/specs/marketplace.md index 6c5d390..96d2985 100644 --- a/specs/marketplace.md +++ b/specs/marketplace.md @@ -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) | diff --git a/specs/3nodes.md b/specs/mycelium_nodes.md similarity index 100% rename from specs/3nodes.md rename to specs/mycelium_nodes.md diff --git a/specs/products.md b/specs/products.md index e51c747..32d8777 100644 --- a/specs/products.md +++ b/specs/products.md @@ -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 diff --git a/specs/readme.md b/specs/readme.md index fc8d75c..45b4399 100644 --- a/specs/readme.md +++ b/specs/readme.md @@ -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 diff --git a/src/controllers/docs.rs b/src/controllers/docs.rs index 2e88788..18db44d 100644 --- a/src/controllers/docs.rs +++ b/src/controllers/docs.rs @@ -57,13 +57,13 @@ impl DocsController { render_template(&tmpl, "docs/getting_started.html", &ctx) } - /// Renders the 3Nodes documentation page - pub async fn three_nodes(tmpl: web::Data, session: Session) -> Result { + /// Renders the Mycelium Nodes documentation page + pub async fn mycelium_nodes(tmpl: web::Data, session: Session) -> Result { 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 diff --git a/src/controllers/marketplace.rs b/src/controllers/marketplace.rs index d262653..e1bfc2e 100644 --- a/src/controllers/marketplace.rs +++ b/src/controllers/marketplace.rs @@ -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, session: Session, query: web::Query>) -> Result { + /// Renders the Mycelium Nodes marketplace page with REAL farmer nodes from database + pub async fn mycelium_nodes(tmpl: web::Data, session: Session, query: web::Query>) -> Result { // 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 diff --git a/src/models/product.rs b/src/models/product.rs index 08b7384..f8ca66b 100644 --- a/src/models/product.rs +++ b/src/models/product.rs @@ -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, diff --git a/src/routes/mod.rs b/src/routes/mod.rs index 918bfa9..80956b4 100644 --- a/src/routes/mod.rs +++ b/src/routes/mod.rs @@ -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)) diff --git a/src/services/node_marketplace.rs b/src/services/node_marketplace.rs index b9df118..0c777b5 100644 --- a/src/services/node_marketplace.rs +++ b/src/services/node_marketplace.rs @@ -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, diff --git a/src/views/docs/index.html b/src/views/docs/index.html index 176f873..499d1f5 100644 --- a/src/views/docs/index.html +++ b/src/views/docs/index.html @@ -49,7 +49,7 @@ 3Nodes Physical computing hardware marketplace Credits transferred based on hardware value - Learn More + Learn More Mycelium Gateways diff --git a/src/views/docs/layout.html b/src/views/docs/layout.html index 8dea6cd..70546e5 100644 --- a/src/views/docs/layout.html +++ b/src/views/docs/layout.html @@ -40,7 +40,7 @@