Skip to content

Open-source manufacturing ERP, MES and QMS. Quoting, MRP, inventory, shop floor, quality and lot/serial traceability on one Postgres schema, with a REST API and MCP server. Self-host or use Carbon Cloud.

feat: add loom videos to university

Brad Barbin2bddd730e932
diff --git a/apps/erp/app/components/Configurator/ConfiguratorForm/ConfiguratorForm.tsx b/apps/erp/app/components/Configurator/ConfiguratorForm/ConfiguratorForm.tsx
index 599afba1eb..ab12e397ad 100644
--- a/apps/erp/app/components/Configurator/ConfiguratorForm/ConfiguratorForm.tsx
+++ b/apps/erp/app/components/Configurator/ConfiguratorForm/ConfiguratorForm.tsx
@@ -471,6 +471,8 @@ function ConfiguratorProgress() {
const { currentStep, totalSteps } = useConfigurator();
const progress = ((currentStep + 1) / totalSteps) * 100;
+ if (totalSteps <= 1) return null;
+
return (
<div className="w-full space-y-2">
<Progress value={progress} className="h-2" />
diff --git a/apps/university/app/config.tsx b/apps/university/app/config.tsx
index df8b488996..e513a3b1d6 100644
--- a/apps/university/app/config.tsx
+++ b/apps/university/app/config.tsx
@@ -113,7 +113,8 @@ export const modules: Config = [
lessons: [
{
id: "what-is-carbon",
- videoId: "1234567890",
+ videoId:
+ "51e0c6dd053b4a3e904fc795d4fc298f?sid=0bb2081d-6bc4-4efb-8361-d2717dda9781",
name: "What is Carbon?",
description:
"Meet Carbon, the next generation of accessible, scalable, and data-centric ERP/MES/QMS software. Carbon was designed from the ground up to be approachable and easy to get started with, but highly flexible and capable of scaling up to the largest projects.",
@@ -121,7 +122,8 @@ export const modules: Config = [
},
{
id: "carbon-modules",
- videoId: "1234567890",
+ videoId:
+ "51e0c6dd053b4a3e904fc795d4fc298f?sid=0bb2081d-6bc4-4efb-8361-d2717dda9781",
name: "Carbon's Modules",
description:
"Learn about Carbon's modular architecture and how different modules work together to provide comprehensive business management capabilities.",
@@ -129,7 +131,8 @@ export const modules: Config = [
},
{
id: "architecture-overview",
- videoId: "1234567890",
+ videoId:
+ "51e0c6dd053b4a3e904fc795d4fc298f?sid=0bb2081d-6bc4-4efb-8361-d2717dda9781",
name: "Architecture Overview",
description:
"Understand Carbon's technical architecture, including its web-based design, database structure, and API capabilities.",
@@ -170,7 +173,8 @@ export const modules: Config = [
lessons: [
{
id: "tables",
- videoId: "1234567890",
+ videoId:
+ "51e0c6dd053b4a3e904fc795d4fc298f?sid=0bb2081d-6bc4-4efb-8361-d2717dda9781",
name: "Tables",
description:
"Learn how to use tables to view, sort, filter, and manage your data effectively in Carbon.",
@@ -178,7 +182,8 @@ export const modules: Config = [
},
{
id: "forms",
- videoId: "1234567890",
+ videoId:
+ "51e0c6dd053b4a3e904fc795d4fc298f?sid=0bb2081d-6bc4-4efb-8361-d2717dda9781",
name: "Forms",
description:
"Master the art of creating and using forms to input and edit data in Carbon.",
@@ -186,7 +191,8 @@ export const modules: Config = [
},
{
id: "documents",
- videoId: "1234567890",
+ videoId:
+ "51e0c6dd053b4a3e904fc795d4fc298f?sid=0bb2081d-6bc4-4efb-8361-d2717dda9781",
name: "Documents",
description:
"Understand how to work with documents, including creation, editing, and sharing capabilities.",
@@ -194,7 +200,8 @@ export const modules: Config = [
},
{
id: "custom-fields",
- videoId: "1234567890",
+ videoId:
+ "51e0c6dd053b4a3e904fc795d4fc298f?sid=0bb2081d-6bc4-4efb-8361-d2717dda9781",
name: "Custom Fields",
description:
"Learn how to extend Carbon's functionality by creating custom fields to capture additional data.",
@@ -254,7 +261,8 @@ export const modules: Config = [
{
id: "company-setup",
name: "Company Setup",
- videoId: "1234567890",
+ videoId:
+ "51e0c6dd053b4a3e904fc795d4fc298f?sid=0bb2081d-6bc4-4efb-8361-d2717dda9781",
description:
"Learn how to setup your company in Carbon. This includes creating your company, adding users, and setting up your company's preferences.",
duration: 100,
@@ -262,7 +270,8 @@ export const modules: Config = [
{
id: "users-permissions",
name: "Users and Permissions",
- videoId: "1234567890",
+ videoId:
+ "51e0c6dd053b4a3e904fc795d4fc298f?sid=0bb2081d-6bc4-4efb-8361-d2717dda9781",
description:
"Learn how to setup your users in Carbon. This includes creating users, setting permissions, and managing access levels.",
duration: 100,
@@ -270,7 +279,8 @@ export const modules: Config = [
{
id: "locations-resources",
name: "Locations and Resources",
- videoId: "1234567890",
+ videoId:
+ "51e0c6dd053b4a3e904fc795d4fc298f?sid=0bb2081d-6bc4-4efb-8361-d2717dda9781",
description:
"Learn how to setup your work centers, machines, and processes in Carbon. This is essential for manufacturing and resource planning.",
duration: 100,
@@ -278,7 +288,8 @@ export const modules: Config = [
{
id: "integrations",
name: "Integrations",
- videoId: "1234567890",
+ videoId:
+ "51e0c6dd053b4a3e904fc795d4fc298f?sid=0bb2081d-6bc4-4efb-8361-d2717dda9781",
description:
"Learn how to setup your integrations in Carbon to connect with other business systems and tools.",
duration: 100,
@@ -317,7 +328,8 @@ export const modules: Config = [
{
id: "import-tools",
name: "Import Tools",
- videoId: "1234567890",
+ videoId:
+ "51e0c6dd053b4a3e904fc795d4fc298f?sid=0bb2081d-6bc4-4efb-8361-d2717dda9781",
description:
"Learn how to use Carbon's built-in import tools to efficiently migrate your data from other systems.",
duration: 100,
@@ -326,7 +338,8 @@ export const modules: Config = [
supplemental: [
{
id: "importing-data-api",
- videoId: "1234567890",
+ videoId:
+ "51e0c6dd053b4a3e904fc795d4fc298f?sid=0bb2081d-6bc4-4efb-8361-d2717dda9781",
name: "Importing Data with the API",
description:
"Learn how to use Carbon's API to programmatically import data and integrate with other systems.",
@@ -368,7 +381,8 @@ export const modules: Config = [
lessons: [
{
id: "parts-materials-consumables-tools",
- videoId: "1234567890",
+ videoId:
+ "51e0c6dd053b4a3e904fc795d4fc298f?sid=0bb2081d-6bc4-4efb-8361-d2717dda9781",
name: "Parts, Materials and Tools",
description:
"Learn the differences between various item types and when to use each one in your business processes.",
@@ -376,7 +390,8 @@ export const modules: Config = [
},
{
id: "method-types",
- videoId: "1234567890",
+ videoId:
+ "51e0c6dd053b4a3e904fc795d4fc298f?sid=0bb2081d-6bc4-4efb-8361-d2717dda9781",
name: "Method Types",
description:
"Understand the different method types available for items and how they affect manufacturing processes.",
@@ -384,7 +399,8 @@ export const modules: Config = [
},
{
id: "tracking-types",
- videoId: "1234567890",
+ videoId:
+ "51e0c6dd053b4a3e904fc795d4fc298f?sid=0bb2081d-6bc4-4efb-8361-d2717dda9781",
name: "Tracking Types",
description:
"Learn about different tracking types and how they help manage inventory and traceability.",
@@ -413,7 +429,8 @@ export const modules: Config = [
lessons: [
{
id: "methods",
- videoId: "1234567890",
+ videoId:
+ "51e0c6dd053b4a3e904fc795d4fc298f?sid=0bb2081d-6bc4-4efb-8361-d2717dda9781",
name: "Methods",
description:
"Learn how to create and manage manufacturing methods that define how items are produced.",
@@ -421,7 +438,8 @@ export const modules: Config = [
},
{
id: "bill-of-process",
- videoId: "1234567890",
+ videoId:
+ "51e0c6dd053b4a3e904fc795d4fc298f?sid=0bb2081d-6bc4-4efb-8361-d2717dda9781",
name: "Bill of Process",
description:
"Understand how to create and manage bills of process that define the manufacturing steps.",
@@ -429,7 +447,8 @@ export const modules: Config = [
},
{
id: "bill-of-materials",
- videoId: "1234567890",
+ videoId:
+ "51e0c6dd053b4a3e904fc795d4fc298f?sid=0bb2081d-6bc4-4efb-8361-d2717dda9781",
name: "Bill of Materials",
description:
"Learn how to create and manage bills of materials that define what components are needed.",
@@ -437,7 +456,8 @@ export const modules: Config = [
},
{
id: "revisions-versions",
- videoId: "1234567890",
+ videoId:
+ "51e0c6dd053b4a3e904fc795d4fc298f?sid=0bb2081d-6bc4-4efb-8361-d2717dda9781",
name: "Revisions and Versions",
description:
"Master the revision and version control system for managing changes to methods and bills.",
@@ -445,7 +465,8 @@ export const modules: Config = [
},
{
id: "get-method-save-method",
- videoId: "1234567890",
+ videoId:
+ "51e0c6dd053b4a3e904fc795d4fc298f?sid=0bb2081d-6bc4-4efb-8361-d2717dda9781",
name: "Get Method and Save Method",
description:
"Learn how to retrieve and save methods programmatically using Carbon's API.",
@@ -455,11 +476,12 @@ export const modules: Config = [
supplemental: [
{
id: "product-configurator",
- videoId: "1234567890",
+ videoId:
+ "ec2f2c8607274c2cb35d3479ff97c86a?sid=6635bc72-1c9e-407a-ac6f-fded2726fbcb",
name: "Product Configurator",
description:
"Learn how to use Carbon's product configurator to create complex, configurable products.",
- duration: 100,
+ duration: 330,
},
],
},
@@ -494,7 +516,8 @@ export const modules: Config = [
lessons: [
{
id: "planning",
- videoId: "1234567890",
+ videoId:
+ "51e0c6dd053b4a3e904fc795d4fc298f?sid=0bb2081d-6bc4-4efb-8361-d2717dda9781",
name: "Planning",
description:
"See how Carbon's planning tools help you forecast demand and generate replenishment requirements.",
@@ -502,7 +525,8 @@ export const modules: Config = [
},
{
id: "inventory-management",
- videoId: "1234567890",
+ videoId:
+ "51e0c6dd053b4a3e904fc795d4fc298f?sid=0bb2081d-6bc4-4efb-8361-d2717dda9781",
name: "Inventory Levels",
description:
"Learn how to monitor and manage inventory levels, set reorder points, and handle stock movements.",
@@ -548,7 +572,8 @@ export const modules: Config = [
lessons: [
{
id: "recording-rfq",
- videoId: "1234567890",
+ videoId:
+ "51e0c6dd053b4a3e904fc795d4fc298f?sid=0bb2081d-6bc4-4efb-8361-d2717dda9781",
name: "Recording an RFQ",
description:
"Learn how to record and manage Request for Quote (RFQ) documents from customers.",
@@ -556,7 +581,8 @@ export const modules: Config = [
},
{
id: "quote-overview",
- videoId: "1234567890",
+ videoId:
+ "51e0c6dd053b4a3e904fc795d4fc298f?sid=0bb2081d-6bc4-4efb-8361-d2717dda9781",
name: "Quote Overview",
description:
"Understand the structure and components of a quote in Carbon.",
@@ -565,7 +591,8 @@ export const modules: Config = [
{
id: "digital-quotes",
- videoId: "1234567890",
+ videoId:
+ "51e0c6dd053b4a3e904fc795d4fc298f?sid=0bb2081d-6bc4-4efb-8361-d2717dda9781",
name: "Digital Quotes",
description:
"Create professional digital quotes that can be easily shared with customers.",
@@ -573,7 +600,8 @@ export const modules: Config = [
},
{
id: "quote-revisions",
- videoId: "1234567890",
+ videoId:
+ "51e0c6dd053b4a3e904fc795d4fc298f?sid=0bb2081d-6bc4-4efb-8361-d2717dda9781",
name: "Quote Revisions",
description:
"Learn how to manage quote revisions and track changes throughout the quoting process.",
@@ -581,7 +609,8 @@ export const modules: Config = [
},
{
id: "converting-quotes-orders",
- videoId: "1234567890",
+ videoId:
+ "51e0c6dd053b4a3e904fc795d4fc298f?sid=0bb2081d-6bc4-4efb-8361-d2717dda9781",
name: "Converting Quotes to Orders",
description:
"Master the process of converting approved quotes into sales orders.",
@@ -611,7 +640,8 @@ export const modules: Config = [
lessons: [
{
id: "quote-methods",
- videoId: "1234567890",
+ videoId:
+ "51e0c6dd053b4a3e904fc795d4fc298f?sid=0bb2081d-6bc4-4efb-8361-d2717dda9781",
name: "Quote Methods",
description:
"Learn how to use different quote methods to standardize your estimation process and ensure consistency.",
@@ -619,7 +649,8 @@ export const modules: Config = [
},
{
id: "quote-costing",
- videoId: "1234567890",
+ videoId:
+ "51e0c6dd053b4a3e904fc795d4fc298f?sid=0bb2081d-6bc4-4efb-8361-d2717dda9781",
name: "Quote Costing and Pricing",
description:
"Master the art of calculating accurate costs for quotes including materials, labor, and overhead.",
@@ -657,7 +688,8 @@ export const modules: Config = [
lessons: [
{
id: "sales-orders",
- videoId: "1234567890",
+ videoId:
+ "51e0c6dd053b4a3e904fc795d4fc298f?sid=0bb2081d-6bc4-4efb-8361-d2717dda9781",
name: "Sales Orders",
description:
"Learn how to create and manage sales orders in Carbon.",
@@ -665,7 +697,8 @@ export const modules: Config = [
},
{
id: "make-to-order-parts",
- videoId: "1234567890",
+ videoId:
+ "51e0c6dd053b4a3e904fc795d4fc298f?sid=0bb2081d-6bc4-4efb-8361-d2717dda9781",
name: "Make to Order Parts",
description:
"Understand how to handle make-to-order parts and production planning.",
@@ -673,14 +706,16 @@ export const modules: Config = [
},
{
id: "shipping-orders",
- videoId: "1234567890",
+ videoId:
+ "51e0c6dd053b4a3e904fc795d4fc298f?sid=0bb2081d-6bc4-4efb-8361-d2717dda9781",
name: "Shipping Orders",
description: "Learn how to process and track order shipments.",
duration: 100,
},
{
id: "sales-invoices",
- videoId: "1234567890",
+ videoId:
+ "51e0c6dd053b4a3e904fc795d4fc298f?sid=0bb2081d-6bc4-4efb-8361-d2717dda9781",
name: "Sales Invoices",
description:
"Master the creation and management of sales invoices.",
@@ -759,7 +794,8 @@ export const modules: Config = [
lessons: [
{
id: "job-overview",
- videoId: "1234567890",
+ videoId:
+ "51e0c6dd053b4a3e904fc795d4fc298f?sid=0bb2081d-6bc4-4efb-8361-d2717dda9781",
name: "Job Overview",
description:
"Learn the fundamentals of job management and how jobs drive production in Carbon.",
@@ -767,7 +803,8 @@ export const modules: Config = [
},
{
id: "scheduling",
- videoId: "1234567890",
+ videoId:
+ "51e0c6dd053b4a3e904fc795d4fc298f?sid=0bb2081d-6bc4-4efb-8361-d2717dda9781",
name: "Scheduling",
description:
"Learn how to schedule jobs and manage production timelines effectively.",
@@ -775,7 +812,8 @@ export const modules: Config = [
},
{
id: "production-planning",
- videoId: "1234567890",
+ videoId:
+ "51e0c6dd053b4a3e904fc795d4fc298f?sid=0bb2081d-6bc4-4efb-8361-d2717dda9781",
name: "Production Planning",
description:
"Learn how to plan production activities and coordinate resources effectively.",
@@ -783,7 +821,8 @@ export const modules: Config = [
},
{
id: "closing-job",
- videoId: "1234567890",
+ videoId:
+ "51e0c6dd053b4a3e904fc795d4fc298f?sid=0bb2081d-6bc4-4efb-8361-d2717dda9781",
name: "Closing a Job",
description:
"Learn the proper process for completing and closing jobs in the production system.",
@@ -866,7 +905,8 @@ export const modules: Config = [
lessons: [
{
id: "mes-overview",
- videoId: "1234567890",
+ videoId:
+ "51e0c6dd053b4a3e904fc795d4fc298f?sid=0bb2081d-6bc4-4efb-8361-d2717dda9781",
name: "MES Overview",
description:
"Learn about Manufacturing Execution Systems and how Carbon implements MES functionality.",
@@ -874,7 +914,8 @@ export const modules: Config = [
},
{
id: "tracking-time-quantities",
- videoId: "1234567890",
+ videoId:
+ "51e0c6dd053b4a3e904fc795d4fc298f?sid=0bb2081d-6bc4-4efb-8361-d2717dda9781",
name: "Tracking Time and Quantities",
description:
"Learn how to track production time and quantities for accurate job costing and efficiency analysis.",
@@ -882,7 +923,8 @@ export const modules: Config = [
},
{
id: "tracking-batch-serial",
- videoId: "1234567890",
+ videoId:
+ "51e0c6dd053b4a3e904fc795d4fc298f?sid=0bb2081d-6bc4-4efb-8361-d2717dda9781",
name: "Tracking Batch and Serial Parts",
description:
"Learn how to track batch and serial numbered parts for traceability and quality control.",
@@ -890,7 +932,8 @@ export const modules: Config = [
},
{
id: "issuing-parts",
- videoId: "1234567890",
+ videoId:
+ "51e0c6dd053b4a3e904fc795d4fc298f?sid=0bb2081d-6bc4-4efb-8361-d2717dda9781",
name: "Issuing Parts",
description:
"Learn how to issue parts to jobs and track material consumption accurately.",
@@ -898,7 +941,8 @@ export const modules: Config = [
},
{
id: "job-traveler",
- videoId: "1234567890",
+ videoId:
+ "51e0c6dd053b4a3e904fc795d4fc298f?sid=0bb2081d-6bc4-4efb-8361-d2717dda9781",
name: "Job Traveler",
description:
"Learn how to use job travelers to guide production processes and provide instructions.",
@@ -977,7 +1021,8 @@ export const modules: Config = [
lessons: [
{
id: "purchasing-overview",
- videoId: "1234567890",
+ videoId:
+ "51e0c6dd053b4a3e904fc795d4fc298f?sid=0bb2081d-6bc4-4efb-8361-d2717dda9781",
name: "Purchasing Overview",
description:
"Learn about the complete purchasing process from supplier selection to payment.",
@@ -985,7 +1030,8 @@ export const modules: Config = [
},
{
id: "supplier-quotes",
- videoId: "1234567890",
+ videoId:
+ "51e0c6dd053b4a3e904fc795d4fc298f?sid=0bb2081d-6bc4-4efb-8361-d2717dda9781",
name: "Supplier Quotes",
description:
"Learn how to manage supplier quotes and compare pricing effectively.",
@@ -993,7 +1039,8 @@ export const modules: Config = [
},
{
id: "purchase-orders",
- videoId: "1234567890",
+ videoId:
+ "51e0c6dd053b4a3e904fc795d4fc298f?sid=0bb2081d-6bc4-4efb-8361-d2717dda9781",
name: "Purchase Orders",
description:
"Learn how to create and manage purchase orders effectively.",
@@ -1001,7 +1048,8 @@ export const modules: Config = [
},
{
id: "receiving-purchase-order",
- videoId: "1234567890",
+ videoId:
+ "51e0c6dd053b4a3e904fc795d4fc298f?sid=0bb2081d-6bc4-4efb-8361-d2717dda9781",
name: "Receiving a Purchase Order",
description:
"Learn how to receive and inspect purchased goods properly.",
@@ -1072,7 +1120,8 @@ export const modules: Config = [
lessons: [
{
id: "purchase-invoices",
- videoId: "1234567890",
+ videoId:
+ "51e0c6dd053b4a3e904fc795d4fc298f?sid=0bb2081d-6bc4-4efb-8361-d2717dda9781",
name: "Purchase Invoices",
description:
"Learn how to process and manage purchase invoices for payment.",
@@ -1080,7 +1129,8 @@ export const modules: Config = [
},
{
id: "purchasing-planning",
- videoId: "1234567890",
+ videoId:
+ "51e0c6dd053b4a3e904fc795d4fc298f?sid=0bb2081d-6bc4-4efb-8361-d2717dda9781",
name: "Purchasing Planning",
description:
"Learn how to plan purchasing activities based on demand and inventory levels.",
@@ -1088,7 +1138,8 @@ export const modules: Config = [
},
{
id: "historical-costs",
- videoId: "1234567890",
+ videoId:
+ "51e0c6dd053b4a3e904fc795d4fc298f?sid=0bb2081d-6bc4-4efb-8361-d2717dda9781",
name: "Historical Costs",
description:
"Learn how to analyze historical costs for better purchasing decisions.",
@@ -1096,7 +1147,8 @@ export const modules: Config = [
},
{
id: "supplier-pricing",
- videoId: "1234567890",
+ videoId:
+ "51e0c6dd053b4a3e904fc795d4fc298f?sid=0bb2081d-6bc4-4efb-8361-d2717dda9781",
name: "Supplier Pricing",
description:
"Learn how to analyze supplier pricing and develop negotiation strategies.",
@@ -1153,7 +1205,8 @@ export const modules: Config = [
lessons: [
{
id: "non-conformances",
- videoId: "1234567890",
+ videoId:
+ "51e0c6dd053b4a3e904fc795d4fc298f?sid=0bb2081d-6bc4-4efb-8361-d2717dda9781",
name: "Non-Conformances",
description:
"Learn how to track and manage non-conforming materials and products.",
@@ -1161,7 +1214,8 @@ export const modules: Config = [
},
{
id: "gauges-calibrations",
- videoId: "1234567890",
+ videoId:
+ "51e0c6dd053b4a3e904fc795d4fc298f?sid=0bb2081d-6bc4-4efb-8361-d2717dda9781",
name: "Gauges and Calibrations",
description:
"Learn how to manage measurement equipment and calibration schedules.",
@@ -1253,7 +1307,8 @@ export const modules: Config = [
lessons: [
{
id: "api-keys",
- videoId: "1234567890",
+ videoId:
+ "51e0c6dd053b4a3e904fc795d4fc298f?sid=0bb2081d-6bc4-4efb-8361-d2717dda9781",
name: "API Keys",
description:
"Learn how to create and manage API keys for secure access to Carbon's API.",
@@ -1261,7 +1316,8 @@ export const modules: Config = [
},
{
id: "typescript-api-client",
- videoId: "1234567890",
+ videoId:
+ "51e0c6dd053b4a3e904fc795d4fc298f?sid=0bb2081d-6bc4-4efb-8361-d2717dda9781",
name: "TypeScript API Client",
description:
"Learn how to use Carbon's TypeScript API client for seamless integration.",
@@ -1269,7 +1325,8 @@ export const modules: Config = [
},
{
id: "csharp-api-client",
- videoId: "1234567890",
+ videoId:
+ "51e0c6dd053b4a3e904fc795d4fc298f?sid=0bb2081d-6bc4-4efb-8361-d2717dda9781",
name: "C# API Client",
description:
"Learn how to use Carbon's C# API client for .NET applications.",
@@ -1277,7 +1334,8 @@ export const modules: Config = [
},
{
id: "python-api-client",
- videoId: "1234567890",
+ videoId:
+ "51e0c6dd053b4a3e904fc795d4fc298f?sid=0bb2081d-6bc4-4efb-8361-d2717dda9781",
name: "Python API Client",
description:
"Learn how to integrate with Carbon using the Python API client.",
@@ -1285,7 +1343,8 @@ export const modules: Config = [
},
{
id: "webhooks",
- videoId: "1234567890",
+ videoId:
+ "51e0c6dd053b4a3e904fc795d4fc298f?sid=0bb2081d-6bc4-4efb-8361-d2717dda9781",
name: "Webhooks",
description:
"Learn how to use webhooks for real-time event notifications from Carbon.",
@@ -1334,7 +1393,8 @@ export const modules: Config = [
lessons: [
{
id: "integrations",
- videoId: "1234567890",
+ videoId:
+ "51e0c6dd053b4a3e904fc795d4fc298f?sid=0bb2081d-6bc4-4efb-8361-d2717dda9781",
name: "Integrations",
description:
"Learn how to integrate Carbon with other business systems and tools.",
@@ -1342,7 +1402,8 @@ export const modules: Config = [
},
{
id: "applications",
- videoId: "1234567890",
+ videoId:
+ "51e0c6dd053b4a3e904fc795d4fc298f?sid=0bb2081d-6bc4-4efb-8361-d2717dda9781",
name: "Applications",
description:
"Learn how to build custom applications that integrate with Carbon's platform.",
diff --git a/apps/university/app/routes/course+/$moduleId.$courseId.tsx b/apps/university/app/routes/course+/$moduleId.$courseId.tsx
index 73d047625d..491f899d58 100644
--- a/apps/university/app/routes/course+/$moduleId.$courseId.tsx
+++ b/apps/university/app/routes/course+/$moduleId.$courseId.tsx
@@ -10,7 +10,7 @@ import {
import { modules } from "~/config";
import { useProgress } from "~/hooks";
import { path } from "~/utils/path";
-import { formatDuration } from "~/utils/video";
+import { formatDuration, getAllLessonsForTopic } from "~/utils/video";
export const loader = async ({ request, params }: LoaderFunctionArgs) => {
const { courseId } = params;
@@ -32,7 +32,11 @@ export default function CourseRoute() {
const totalDuration =
course?.topics.reduce((acc, topic) => {
return (
- acc + topic.lessons.reduce((acc, lesson) => acc + lesson.duration, 0)
+ acc +
+ getAllLessonsForTopic(topic).reduce(
+ (acc, lesson) => acc + lesson.duration,
+ 0
+ )
);
}, 0) ?? 0;
@@ -170,8 +174,12 @@ export default function CourseRoute() {
</div>
<div className="flex flex-col gap-4 py-8 w-full text-sm">
<div className="flex flex-col gap-0">
- {topic.lessons.map((lesson) => {
+ {getAllLessonsForTopic(topic).map((lesson) => {
const isCompleted = completedLessons.includes(lesson.id);
+ const isSupplemental = topic.supplemental?.some(
+ (supplementalLesson: any) =>
+ supplementalLesson.id === lesson.id
+ );
return (
<Link
key={lesson.id}
@@ -184,7 +192,14 @@ export default function CourseRoute() {
) : (
<LuCirclePlay className="size-4 flex-shrink-0 text-muted-foreground" />
)}
- <span>{lesson.name}</span>
+ <span>
+ {lesson.name}
+ {isSupplemental && (
+ <span className="ml-1 text-xs text-muted-foreground">
+ (Supplemental)
+ </span>
+ )}
+ </span>
</div>
<span className="text-muted-foreground text-xs">
{formatDuration(lesson.duration)}
diff --git a/apps/university/app/routes/lesson+/$id.tsx b/apps/university/app/routes/lesson+/$id.tsx
index 9cf3e1a26f..4be4a30ea3 100644
--- a/apps/university/app/routes/lesson+/$id.tsx
+++ b/apps/university/app/routes/lesson+/$id.tsx
@@ -1,10 +1,10 @@
import { getCarbon } from "@carbon/auth";
import { getOrRefreshAuthSession } from "@carbon/auth/session.server";
-import { Button } from "@carbon/react";
+import { Button, Spinner } from "@carbon/react";
import { json, Link, useFetcher, useParams } from "@remix-run/react";
import type { ActionFunctionArgs, LoaderFunctionArgs } from "@vercel/remix";
+import { useEffect } from "react";
import {
- LuCheck,
LuChevronLeft,
LuChevronRight,
LuCircleCheck,
@@ -16,6 +16,7 @@ import { useProgress } from "~/hooks";
import { path } from "~/utils/path";
import {
formatDuration,
+ getAllLessonsForTopic,
getLessonContext,
getNextLesson,
getPreviousLesson,
@@ -81,10 +82,10 @@ export const action = async ({ request, params }: ActionFunctionArgs) => {
return json({ success: true });
};
-
export default function LessonRoute() {
const { lessonCompletions, challengeAttempts } = useProgress();
const { id } = useParams();
+ const fetcher = useFetcher<typeof action>();
if (!id) {
throw new Error("Lesson ID is required");
@@ -122,8 +123,6 @@ export default function LessonRoute() {
const isChallengeAttempted = hasChallenge && attemptsByTopic[topic.id];
const challengeAttemptCount = attemptsByTopic[topic.id] ?? 0;
- const fetcher = useFetcher<typeof action>();
-
const onComplete = async () => {
fetcher.submit(null, {
method: "POST",
@@ -131,6 +130,29 @@ export default function LessonRoute() {
});
};
+ useEffect(() => {
+ const handleMessage = (event: MessageEvent) => {
+ console.log("xxx", event);
+ if (event.origin !== "https://www.loom.com") return;
+
+ if (event.data && typeof event.data === "object") {
+ // Alternative event format some Loom embeds use
+ if (event.data.event === "ended") {
+ console.log("Video ended (alternative format)");
+ onComplete();
+ }
+ }
+ };
+
+ // Add event listener
+ window.addEventListener("message", handleMessage);
+
+ // Cleanup function
+ return () => {
+ window.removeEventListener("message", handleMessage);
+ };
+ }, [id]); // Re-run when lesson ID changes
+
return (
<div className="w-full px-4 max-w-5xl mx-auto mt-4 pb-24 flex flex-col gap-8">
<div className="flex items-center gap-2">
@@ -160,28 +182,56 @@ export default function LessonRoute() {
<div className="flex flex-col w-full">
<div className="w-full aspect-video bg-black rounded-t-lg overflow-hidden">
- <iframe
- src={`https://player.vimeo.com/video/${lesson.videoId}?h=00000000&badge=0&autopause=0&player_id=0&app_id=58479`}
- allow="autoplay; fullscreen; picture-in-picture"
- className="w-full h-full"
- title={lesson.name}
- />
+ <div
+ style={{
+ position: "relative",
+ paddingBottom: "56.25%",
+ height: "0",
+ }}
+ >
+ <div className="absolute inset-0 flex items-center justify-center">
+ <Spinner className="h-8 w-8" />
+ </div>
+ <iframe
+ title={lesson.name}
+ src={`https://www.loom.com/embed/${lesson.videoId}`}
+ allowFullScreen
+ style={{
+ position: "absolute",
+ top: 0,
+ left: 0,
+ width: "100%",
+ height: "100%",
+ }}
+ onLoad={(e) => {
+ const iframe = e.currentTarget;
+
+ // Wait for ready message before adding event listener
+ const handleMessage = (event: MessageEvent) => {
+ if (event.data?.type === "ready") {
+ iframe.contentWindow?.postMessage(
+ {
+ method: "addEventListener",
+ value: "ended",
+ context: "player.js",
+ },
+ "*"
+ );
+ window.removeEventListener("message", handleMessage);
+ }
+ };
+
+ window.addEventListener("message", handleMessage);
+ }}
+ />
+ </div>
</div>
<div
- className="w-full h-12 rounded-b-lg flex items-center justify-end gap-2 px-3"
+ className="dark w-full h-12 rounded-b-lg flex items-center justify-end gap-2 px-3"
style={{
backgroundColor: module.background,
}}
>
- <Button
- variant="secondary"
- leftIcon={<LuCheck className="size-4" />}
- onClick={onComplete}
- isDisabled={fetcher.state !== "idle"}
- isLoading={fetcher.state !== "idle"}
- >
- Complete Lesson
- </Button>
<Share
text={typeof window !== "undefined" ? window.location.href : ""}
/>
@@ -267,8 +317,11 @@ export default function LessonRoute() {
Lessons in this topic
</h3>
<div className="flex flex-col gap-1">
- {topic.lessons.map((topicLesson) => {
+ {getAllLessonsForTopic(topic).map((topicLesson) => {
const isCompleted = completedLessons.includes(topicLesson.id);
+ const isSupplemental = topic.supplemental?.some(
+ (lesson: any) => lesson.id === topicLesson.id
+ );
return (
<Link
key={topicLesson.id}
@@ -291,6 +344,11 @@ export default function LessonRoute() {
}
>
{topicLesson.name}
+ {isSupplemental && (
+ <span className="ml-1 text-xs text-muted-foreground">
+ (Supplemental)
+ </span>
+ )}
</span>
</div>
<span className="text-muted-foreground text-xs">
diff --git a/apps/university/app/utils/video.ts b/apps/university/app/utils/video.ts
index 883622218c..ef54537292 100644
--- a/apps/university/app/utils/video.ts
+++ b/apps/university/app/utils/video.ts
@@ -28,6 +28,7 @@ export function getLessonContext(lessonId: string) {
for (const module of modules) {
for (const course of module.courses) {
for (const topic of course.topics) {
+ // Search in regular lessons
const lesson = topic.lessons.find(
(lesson: { id: string }) => lesson.id === lessonId
);
@@ -37,28 +38,52 @@ export function getLessonContext(lessonId: string) {
course,
topic,
lesson,
+ lessonType: "regular" as const,
};
}
+
+ // Search in supplemental lessons
+ if (topic.supplemental) {
+ const supplementalLesson = topic.supplemental.find(
+ (lesson: { id: string }) => lesson.id === lessonId
+ );
+ if (supplementalLesson) {
+ return {
+ module,
+ course,
+ topic,
+ lesson: supplementalLesson,
+ lessonType: "supplemental" as const,
+ };
+ }
+ }
}
}
}
return null;
}
+export function getAllLessonsForTopic(topic: any) {
+ const allLessons = [...topic.lessons];
+ if (topic.supplemental) {
+ allLessons.push(...topic.supplemental);
+ }
+ return allLessons;
+}
+
export function getNextLesson(lessonId: string) {
const context = getLessonContext(lessonId);
if (!context) return null;
const { topic } = context;
- const currentIndex = topic.lessons.findIndex(
- (lesson) => lesson.id === lessonId
- );
+ const allLessons = getAllLessonsForTopic(topic);
+ const currentIndex = allLessons.findIndex((lesson) => lesson.id === lessonId);
- if (currentIndex === -1 || currentIndex === topic.lessons.length - 1) {
+ if (currentIndex === -1 || currentIndex === allLessons.length - 1) {
return null;
}
- return topic.lessons[currentIndex + 1];
+ return allLessons[currentIndex + 1];
}
export function getPreviousLesson(lessonId: string) {
@@ -66,13 +91,12 @@ export function getPreviousLesson(lessonId: string) {
if (!context) return null;
const { topic } = context;
- const currentIndex = topic.lessons.findIndex(
- (lesson) => lesson.id === lessonId
- );
+ const allLessons = getAllLessonsForTopic(topic);
+ const currentIndex = allLessons.findIndex((lesson) => lesson.id === lessonId);
if (currentIndex <= 0) {
return null;
}
- return topic.lessons[currentIndex - 1];
+ return allLessons[currentIndex - 1];
}
diff --git a/packages/database/supabase/migrations/20250630205714_revisions-fix-2.sql b/packages/database/supabase/migrations/20250630205714_revisions-fix-2.sql
new file mode 100644
index 0000000000..e69de29bb2