From bfc24070d7a442a062e02821d74420aee2e59146 Mon Sep 17 00:00:00 2001 From: mik-tf Date: Mon, 8 Sep 2025 11:43:53 -0400 Subject: [PATCH] feat: rename Application Solutions to Agentic Apps in docs, UI, and codebase --- docs/dev/design/marketplace-redesign-plan.md | 4 ++-- specs/marketplace.md | 2 +- specs/products.md | 2 +- src/controllers/dashboard.rs | 22 +++++++++---------- src/models/user.rs | 10 ++++----- src/services/order.rs | 10 ++++----- src/static/js/user-database.js | 4 ++-- src/views/dashboard/application_provider.html | 12 +++++----- src/views/docs/applications.html | 2 +- src/views/docs/index.html | 2 +- src/views/home/about.html | 2 +- src/views/legal/terms.html | 2 +- .../provider_dashboards_ux_test.rs | 14 ++++++------ .../ux_suite/environment/test_data_manager.rs | 4 ++-- 14 files changed, 46 insertions(+), 46 deletions(-) diff --git a/docs/dev/design/marketplace-redesign-plan.md b/docs/dev/design/marketplace-redesign-plan.md index ee4c99c..2cfea79 100644 --- a/docs/dev/design/marketplace-redesign-plan.md +++ b/docs/dev/design/marketplace-redesign-plan.md @@ -18,8 +18,8 @@ This document outlines the comprehensive redesign of the Project Mycelium market - [ ] Update navigation and menus - [ ] Update backend user management -- [ ] **Application Solutions → Agentic Apps** - - [ ] Update product categories +- [x] **Application Solutions → Agentic Apps** + - [x] Update product categories - [ ] Update marketplace listings - [ ] Update search and filtering - [ ] Update backend product models diff --git a/specs/marketplace.md b/specs/marketplace.md index 96d2985..9eb1b0f 100644 --- a/specs/marketplace.md +++ b/specs/marketplace.md @@ -14,7 +14,7 @@ The marketplace is organized into categories that align with the exchange mechan | **[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) | | **Human Energy Services** | Professional technical services | Service providers (designers, admins, developers) | Users needing expertise | TFP transferred based on agreed rates | -| **Application Solutions** | Pre-configured, self-healing applications | Solution providers | End users | Users provide slices to solution providers while maintaining sovereignty | +| **Agentic Apps** | Pre-configured, self-healing applications | Solution providers | End users | Users provide slices to solution providers while maintaining sovereignty | | **TFP Exchange** (phase 2)| Trading platform for TFP | TFP sellers | TFP buyers | Direct exchange of TFP for currencies (TFT, USD, etc.) | ## Marketplace Features diff --git a/specs/products.md b/specs/products.md index 32d8777..430755c 100644 --- a/specs/products.md +++ b/specs/products.md @@ -86,7 +86,7 @@ The TF Marketplace offers various products and services that facilitate the mutu - Support for various domain types and structures -## [Application Solutions](apps.md) +## [Agentic Apps](apps.md) - **Definition**: Pre-configured, self-healing applications deployed on the platform - **Suppliers**: Solution providers who develop and maintain applications diff --git a/src/controllers/dashboard.rs b/src/controllers/dashboard.rs index 5416945..1214679 100644 --- a/src/controllers/dashboard.rs +++ b/src/controllers/dashboard.rs @@ -79,8 +79,8 @@ impl DashboardController { Some(user) } - /// Helper function to count deployments across all users for a specific app provider - fn count_cross_user_deployments(app_provider_email: &str) -> std::collections::HashMap { + /// Helper function to count deployments across all users for a specific application provider + fn count_cross_user_deployments(application_provider_email: &str) -> std::collections::HashMap { use std::collections::HashMap; let mut deployment_counts: HashMap = HashMap::new(); @@ -108,8 +108,8 @@ impl DashboardController { // Count deployments for this app provider's apps for deployment in &user_data.application_deployments { // Check if this deployment belongs to an app from our app provider - // We need to get the app provider's apps to match - let provider_apps = UserPersistence::get_user_apps(app_provider_email); + // We need to get the application provider's apps to match + let provider_apps = UserPersistence::get_user_apps(application_provider_email); for provider_app in &provider_apps { if deployment.app_id == provider_app.id && deployment.status == "Active" { @@ -517,7 +517,7 @@ impl DashboardController { let mut ctx = crate::models::builders::ContextBuilder::new() .active_page("dashboard") .build(); - ctx.insert("active_section", "app_provider"); + ctx.insert("active_section", "application_provider"); let config = get_app_config(); ctx.insert("gitea_enabled", &config.is_gitea_enabled()); @@ -607,7 +607,7 @@ impl DashboardController { }) .collect(); - let app_provider_data = crate::models::user::AppProviderData { + let application_provider_data = crate::models::user::AppProviderData { published_apps: fresh_apps.len() as i32, total_deployments: fresh_apps.iter().map(|a| a.deployments).sum::(), active_deployments, @@ -618,7 +618,7 @@ impl DashboardController { revenue_history: Vec::new(), }; - ctx.insert("app_provider_data", &app_provider_data); + ctx.insert("application_provider_data", &application_provider_data); } else { // Ensure template always has a defined structure even without a logged-in user let empty: crate::models::user::AppProviderData = crate::models::user::AppProviderData { @@ -631,10 +631,10 @@ impl DashboardController { deployment_stats: Vec::new(), revenue_history: Vec::new(), }; - ctx.insert("app_provider_data", &empty); + ctx.insert("application_provider_data", &empty); } - render_template(&tmpl, "dashboard/app_provider.html", &ctx) + render_template(&tmpl, "dashboard/application_provider.html", &ctx) } /// Renders the service provider section of the dashboard @@ -2936,7 +2936,7 @@ impl DashboardController { } }).collect(); - let app_provider_data = crate::models::user::AppProviderData { + let application_provider_data = crate::models::user::AppProviderData { apps: fresh_apps.clone(), published_apps: fresh_apps.len() as i32, total_deployments, @@ -2947,7 +2947,7 @@ impl DashboardController { revenue_history: Vec::new(), }; - return Ok(ResponseBuilder::ok().json(app_provider_data).build()); + return Ok(ResponseBuilder::ok().json(application_provider_data).build()); } else { } diff --git a/src/models/user.rs b/src/models/user.rs index bfc4b0f..93d7215 100644 --- a/src/models/user.rs +++ b/src/models/user.rs @@ -405,11 +405,11 @@ impl Default for ServiceLevelAgreement { /// Application deployment configuration #[derive(Debug, Clone, Serialize, Deserialize)] -pub struct AppDeployment { +pub struct ApplicationDeployment { pub id: String, pub app_id: String, pub customer_email: String, - pub deployment_status: AppDeploymentStatus, + pub deployment_status: ApplicationDeploymentStatus, pub resource_allocation: ResourceUtilization, pub monthly_cost: rust_decimal::Decimal, pub deployed_at: Option>, @@ -418,9 +418,9 @@ pub struct AppDeployment { pub monitoring_enabled: bool, } -/// App deployment status +/// Application deployment status #[derive(Debug, Clone, Serialize, Deserialize)] -pub enum AppDeploymentStatus { +pub enum ApplicationDeploymentStatus { Pending, Deploying, Running, @@ -429,7 +429,7 @@ pub enum AppDeploymentStatus { Maintenance, } -impl Default for AppDeploymentStatus { +impl Default for ApplicationDeploymentStatus { fn default() -> Self { Self::Pending } diff --git a/src/services/order.rs b/src/services/order.rs index 6633e50..3e8ab42 100644 --- a/src/services/order.rs +++ b/src/services/order.rs @@ -804,8 +804,8 @@ impl OrderService { // Only create deployments for application products if item.product_category == "application" { - // Find the app provider by looking up who published this app - if let Some(app_provider_email) = self.find_app_provider(&item.product_id) { + // Find the application provider by looking up who published this app + if let Some(application_provider_email) = self.find_application_provider(&item.product_id) { // Create deployment for each quantity ordered for _i in 0..item.quantity { @@ -838,7 +838,7 @@ impl OrderService { .unwrap(); // Add deployment to application provider's data - if let Err(e) = UserPersistence::add_user_application_deployment(&app_provider_email, deployment.clone()) { + if let Err(e) = UserPersistence::add_user_application_deployment(&application_provider_email, deployment.clone()) { } else { } @@ -857,8 +857,8 @@ impl OrderService { Ok(()) } - /// Find the app provider (user who published the app) by product ID - fn find_app_provider(&self, product_id: &str) -> Option { + /// Find the application provider (user who published the app) by product ID + fn find_application_provider(&self, product_id: &str) -> Option { // Get all user data files and search for the app let user_data_dir = std::path::Path::new("user_data"); if !user_data_dir.exists() { diff --git a/src/static/js/user-database.js b/src/static/js/user-database.js index be33410..b838cd9 100644 --- a/src/static/js/user-database.js +++ b/src/static/js/user-database.js @@ -33,7 +33,7 @@ class UserDatabase { display_name: 'Alex Thompson', email: 'user2@example.com', password: 'password', - role: 'app_provider', + role: 'application_provider', location: 'Berlin, Germany', joined_date: '2024-02-20', reputation: 4.9, @@ -84,7 +84,7 @@ class UserDatabase { display_name: 'Jordan Mitchell', email: 'user5@example.com', password: 'password', - role: 'multi', // Can be resource_provider, app_provider, service_provider, user + role: 'multi', // Can be resource_provider, application_provider, service_provider, user location: 'Toronto, Canada', joined_date: new Date().toISOString().split('T')[0], reputation: 5.0, diff --git a/src/views/dashboard/application_provider.html b/src/views/dashboard/application_provider.html index 7ba3c43..96a23a4 100644 --- a/src/views/dashboard/application_provider.html +++ b/src/views/dashboard/application_provider.html @@ -13,7 +13,7 @@
Published Apps
-

{% if app_provider_data is defined and app_provider_data.published_apps is defined %}{{ app_provider_data.published_apps }}{% else %}0{% endif %}

+

{% if application_provider_data is defined and application_provider_data.published_apps is defined %}{{ application_provider_data.published_apps }}{% else %}0{% endif %}

Active
@@ -22,7 +22,7 @@
Active Deployments
-

{% if app_provider_data is defined and app_provider_data.active_deployments is defined %}{{ app_provider_data.active_deployments }}{% else %}0{% endif %}

+

{% if application_provider_data is defined and application_provider_data.active_deployments is defined %}{{ application_provider_data.active_deployments }}{% else %}0{% endif %}

Instances
@@ -31,7 +31,7 @@
Customer Base
-

{% if app_provider_data is defined and app_provider_data.total_deployments is defined %}{{ app_provider_data.total_deployments }}{% else %}0{% endif %}

+

{% if application_provider_data is defined and application_provider_data.total_deployments is defined %}{{ application_provider_data.total_deployments }}{% else %}0{% endif %}

Total Deployments
@@ -40,7 +40,7 @@
Monthly Earnings
-

{% if app_provider_data is defined and app_provider_data.monthly_revenue_usd is defined %}{{ app_provider_data.monthly_revenue_usd }}{% else %}0{% endif %}

+

{% if application_provider_data is defined and application_provider_data.monthly_revenue_usd is defined %}{{ application_provider_data.monthly_revenue_usd }}{% else %}0{% endif %}

$/month
@@ -232,8 +232,8 @@ {{ super() }}