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.
TypeScript ai-agentsbill-of-materialserpinventory-managementleanmanufacturingmanufacturing-execution-systemmcp-servermesmrpopen-source-erppostgresqlproduction-planningqmsquality-management-systemreact-routerself-hostedsupabasetraceabilitytypescript
feat: navigation colors for univeristy menu
Brad Barbincdf4063bbb71
diff --git a/apps/university/app/config.tsx b/apps/university/app/config.tsxindex 041a1dab0d..0a2f2b6e2b 100644--- a/apps/university/app/config.tsx+++ b/apps/university/app/config.tsx@@ -1,4 +1,11 @@-import { LuBookOpen } from "react-icons/lu";+import {+ LuBookOpen,+ LuCode,+ LuCrown,+ LuShield,+ LuShoppingCart,+ LuSquareStack,+} from "react-icons/lu";type Config = Section[];@@ -38,7 +45,7 @@ type Video = {export const sections: Config = [{name: "Getting Started",- background: "#00bba7",+ background: "#6041d0",foreground: "#fff",id: "getting-started",icon: <LuBookOpen />,@@ -78,19 +85,113 @@ export const sections: Config = [},],},- // {- // name: "Setup",- // id: "setup",- // description: "Learn about Carbon's architecture and how it works.",- // },+ {+ name: "Getting Setup",+ id: "getting-setup",+ description: "Learn how to setup your organization to use Carbon.",+ topics: [+ {+ name: "Setting Up Your Company",+ id: "company-setup",+ description:+ "Learn how to setup your company in Carbon. This includes creating your company, adding users, and setting up your company's preferences. This is the first step to getting your organization ready to use Carbon.",+ challenge: [],+ videos: [+ {+ id: "company-setup",+ name: "Company Setup",+ description:+ "Learn how to setup your company in Carbon. This includes creating your company, adding users, and setting up your company's preferences. This is the first step to getting your organization ready to use Carbon.",+ duration: 100,+ },+ {+ id: "users-setup",+ name: "Users & Permissions",+ description:+ "Learn how to setup your users in Carbon. This includes creating your users, adding users, and setting up your users' preferences.",+ duration: 100,+ },+ {+ id: "resources-setup",+ name: "Resources",+ description:+ "Learn how to setup your work centers, machines, and processes in Carbon. This is the first step to getting your organization ready to use Carbon.",+ duration: 100,+ },+ {+ id: "integrations-setup",+ name: "Integrations",+ description: "Learn how to setup your integrations in Carbon.",+ duration: 100,+ },+ ],+ },+ ],+ },],},- // {- // name: "Selling",- // background: "#6041d0",- // foreground: "#fff",- // id: "selling",- // icon: <LuCrown />,- // courses: [],- // },+ {+ name: "Bill of Materials",+ background: "#4AA99D",+ foreground: "#fff",+ id: "bom",+ icon: <LuSquareStack />,+ courses: [],+ },+ {+ name: "Selling",+ background: "#488FB9",+ foreground: "#fff",+ id: "selling",+ icon: <LuCrown />,+ courses: [],+ },+ {+ name: "Manufacturing",+ background: "#78B2C4",+ foreground: "#fff",+ id: "selling",+ icon: <LuCrown />,+ courses: [],+ },+ {+ name: "Buying",+ background: "#EFB655",+ foreground: "#fff",+ id: "buying",+ icon: <LuShoppingCart />,+ courses: [],+ },+ {+ name: "Quality",+ background: "#EF8729",+ foreground: "#fff",+ id: "quality",+ icon: <LuShield />,+ courses: [],+ },+ {+ name: "Developing",+ background: "#DD6444",+ foreground: "#fff",+ id: "developing",+ icon: <LuCode />,+ courses: [],+ },+ {+ name: "Example",+ background: "#AB7DB3",+ foreground: "#fff",+ id: "example-1",+ icon: <LuCrown />,+ courses: [],+ },+ {+ name: "Example",+ background: "#8487C5",+ foreground: "#fff",+ id: "example-2",+ icon: <LuCrown />,+ courses: [],+ },];diff --git a/apps/university/app/root.tsx b/apps/university/app/root.tsxindex 8e0dadf91c..9f59e1f62e 100644--- a/apps/university/app/root.tsx+++ b/apps/university/app/root.tsx@@ -5,8 +5,6 @@ import {} from "@carbon/auth/session.server";import { validator } from "@carbon/form";import { Button, Heading, IconButton, toast, Toaster } from "@carbon/react";-import type { Theme } from "@carbon/utils";-import { themes } from "@carbon/utils";import {isRouteErrorResponse,Link,@@ -137,40 +135,8 @@ function Document({mode?: "light" | "dark";theme?: string;}) {- const selectedTheme = themes.find((t) => t.name === theme) as- | Theme- | undefined;-- // Create style objects for both light and dark modes- const lightVars: Record<string, string> = {};- const darkVars: Record<string, string> = {};-- if (selectedTheme) {- // Set light mode variables- Object.entries(selectedTheme.cssVars.light).forEach(([key, value]) => {- const cssKey = `--${key}`;- lightVars[cssKey] = `${value}`;- });-- // Set dark mode variables- Object.entries(selectedTheme.cssVars.dark).forEach(([key, value]) => {- const cssKey = `--${key}`;- darkVars[cssKey] = `${value}`;- });- }-- // Combine the styles with proper selectors- const themeStyle = {- ...(mode === "dark" ? darkVars : lightVars),- "--radius": "0.5rem",- } as React.CSSProperties;-return (- <html- lang="en"- className={`${mode} h-full overflow-x-hidden`}- style={themeStyle}- >+ <html lang="en" className={`${mode} h-full overflow-x-hidden`}><head><meta charSet="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />@@ -230,10 +196,10 @@ export default function App() {/></Link><div className="flex items-center">- <Button variant="ghost" asChild>- <NavLink to={path.to.about}>About</NavLink>- </Button><div className="items-center gap-1 hidden md:flex">+ <Button variant="ghost" asChild>+ <NavLink to={path.to.about}>About</NavLink>+ </Button>{user ? (<AvatarMenu />) : (diff --git a/apps/university/app/routes/about.tsx b/apps/university/app/routes/about.tsxindex fdacae46a5..d1cc2096af 100644--- a/apps/university/app/routes/about.tsx+++ b/apps/university/app/routes/about.tsx@@ -15,9 +15,9 @@ export default function AboutRoute() {>What do you want to learn?</Heading>- <p className="text-base max-w-2xl">+ <p className="text-muted-foreground text-balance text-left font-medium tracking-tighter text-lg max-w-2xl">Want to take command of your business? Need a quick answer to a- problem? Test your knowledge and track your progress+ problem? Test your knowledge and track your progress.</p><div className="flex items-center gap-2"><Button@@ -26,23 +26,73 @@ export default function AboutRoute() {leftIcon={<LuCirclePlay />}asChild>- <Link- to={path.to.video(sections[0].courses[0].topics[0].videos[0].id)}- >- Begin your first lesson- </Link>- </Button>- <Button- size="lg"- variant="secondary"- leftIcon={<LuBookOpen />}- asChild- >- <Link to={path.to.about}>See how it works</Link>+ <Link to={path.to.login}>Sign up to register</Link></Button></div></Hero>- <div className="w-full px-4 max-w-6xl mx-auto my-16"></div>+ <section className="border-b">+ <div className="flex flex-row gap-8 w-full px-4 max-w-6xl mx-auto my-24">+ <div className="flex flex-col max-w-2xl gap-6">+ <h3 className="text-muted-foreground uppercase text-sm font-display leading-[140%] tracking-tighter">+ How it works+ </h3>+ <Heading size="h1" className="font-display max-w-2xl">+ Register and Track Your Progress+ </Heading>+ <p className="text-muted-foreground text-balance text-left font-medium tracking-tighter text-lg">+ Sign up to track your progress. Then join a course! All courses+ are free, and you can earn your credential(s) for free too.+ Courses in Carbon University are designed to build off of each+ other as you follow the recommended path. You can also jump around+ if you'd like to skip ahead on anything.+ </p>+ </div>+ </div>+ </section>+ <section>+ <div className="flex flex-row gap-8 w-full px-4 max-w-6xl mx-auto my-24">+ <div className="flex flex-col max-w-2xl gap-6">+ <h3 className="text-muted-foreground uppercase text-sm font-display leading-[140%] tracking-tighter">+ Challenges+ </h3>+ <Heading+ size="h1"+ className="font-display text-[#212578] dark:text-white max-w-2xl"+ >+ Take Challenges+ </Heading>+ <p className="text-muted-foreground text-balance text-left font-medium tracking-tighter text-lg">+ Put your new Carbon knowledge to the test by taking challenges.+ You'll need to score 100% to pass a challenge, but there is no+ limit on the number of attempts.+ </p>+ <div className="flex items-center gap-2">+ <Button+ size="lg"+ variant="secondary"+ leftIcon={<LuCirclePlay />}+ asChild+ >+ <Link+ to={path.to.video(+ sections[0].courses[0].topics[0].videos[0].id+ )}+ >+ Begin your first lesson+ </Link>+ </Button>+ <Button+ size="lg"+ variant="secondary"+ leftIcon={<LuBookOpen />}+ asChild+ >+ <Link to={path.to.about}>See how it works</Link>+ </Button>+ </div>+ </div>+ </div>+ </section></div>);}diff --git a/apps/university/app/routes/course+/$sectionId.$courseId.tsx b/apps/university/app/routes/course+/$sectionId.$courseId.tsxindex aff1d72d54..6c0767b4c6 100644--- a/apps/university/app/routes/course+/$sectionId.$courseId.tsx+++ b/apps/university/app/routes/course+/$sectionId.$courseId.tsx@@ -25,8 +25,8 @@ export default function CourseRoute() {}return (- <VStack spacing={4}>- <div className="flex flex-col">+ <VStack spacing={4} className="w-full">+ <div className="flex flex-col w-full"><divclassName="border rounded rounded-b-none px-8 py-3"style={{@@ -86,61 +86,63 @@ export default function CourseRoute() {</div></div>- {course.topics.map((topic, index) => {- const isFirst = index === 0;- const isLast = index === course.topics.length - 1;- return (- <div- key={topic.id}- className={cn(- "border p-8 w-full",- isFirst && "rounded-t",- isLast && "rounded-b",- isFirst && !isLast && "border-b-0 rounded-b-none",- isLast && !isFirst && "border-t-0 rounded-t-none"- )}- >- <div className="grid grid-cols-2 gap-12">- <div className="flex flex-col gap-1">- <h3 className="text-[10px] uppercase font-display font-bold text-muted-foreground">- Topic- </h3>- <h2 className="text-xl font-display tracking-tight">- {topic.name}- </h2>- <p className="text-sm">{topic.description}</p>- </div>- <div className="flex flex-col gap-8 py-8 w-full text-sm">- <div className="flex flex-col gap-0">- {topic.videos.map((video) => (- <Link- key={video.id}- to={path.to.video(video.id)}- className="flex items-center justify-between gap-2 w-full rounded-md py-1.5 px-3 hover:bg-accent"+ <div className="flex flex-col w-full">+ {course.topics.map((topic, index) => {+ const isFirst = index === 0;+ const isLast = index === course.topics.length - 1;+ return (+ <div+ key={topic.id}+ className={cn(+ "border p-8 w-full",+ isFirst && "rounded-t",+ isLast && "rounded-b",+ isFirst && !isLast && "rounded-b-none",+ isLast && !isFirst && "border-t-0 rounded-t-none"+ )}+ >+ <div className="grid grid-cols-2 gap-12">+ <div className="flex flex-col gap-1">+ <h3 className="text-[10px] uppercase font-display font-bold text-muted-foreground">+ Topic+ </h3>+ <h2 className="text-xl font-display tracking-tight">+ {topic.name}+ </h2>+ <p className="text-sm">{topic.description}</p>+ </div>+ <div className="flex flex-col gap-8 py-8 w-full text-sm">+ <div className="flex flex-col gap-0">+ {topic.videos.map((video) => (+ <Link+ key={video.id}+ to={path.to.video(video.id)}+ className="flex items-center justify-between gap-2 w-full rounded-md py-1.5 px-3 hover:bg-accent"+ >+ <div className="flex items-center gap-2">+ <LuCirclePlay className="size-4 text-muted-foreground" />+ <span>{video.name}</span>+ </div>+ <span className="text-muted-foreground text-xs">+ {formatDuration(video.duration)}+ </span>+ </Link>+ ))}+ </div>+ {topic.challenge && (+ <Button+ leftIcon={<LuFlag className="size-4" />}+ variant="secondary">- <div className="flex items-center gap-2">- <LuCirclePlay className="size-4 text-muted-foreground" />- <span>{video.name}</span>- </div>- <span className="text-muted-foreground text-xs">- {formatDuration(video.duration)}- </span>- </Link>- ))}+ Take Topic Challenge+ </Button>+ )}</div>- {topic.challenge && (- <Button- leftIcon={<LuFlag className="size-4" />}- variant="secondary"- >- Take Topic Challenge- </Button>- )}</div></div>- </div>- );- })}+ );+ })}+ </div></VStack>);}diff --git a/apps/university/app/routes/course+/_layout.tsx b/apps/university/app/routes/course+/_layout.tsxindex e88c26c274..a1751e6930 100644--- a/apps/university/app/routes/course+/_layout.tsx+++ b/apps/university/app/routes/course+/_layout.tsx@@ -3,45 +3,51 @@ import { Link, Outlet } from "@remix-run/react";import { LuBookOpen, LuCirclePlay } from "react-icons/lu";import { Hero } from "~/components/Hero";import { sections } from "~/config";+import { useOptionalUser } from "~/hooks/useUser";import { path } from "~/utils/path";export default function CourseLayout() {+ const user = useOptionalUser();return (<div className="w-full flex flex-col">- <Hero>- <Heading- size="h1"- className="font-display text-[#212578] dark:text-white max-w-xl"- >- Your Journey Starts Here- </Heading>- <p className="text-base max-w-xl">- Learn the basics of Carbon and start your journey to becoming an- expert in Carbon. All for free.- </p>- <div className="flex items-center gap-2">- <Button- size="lg"- variant="secondary"- leftIcon={<LuCirclePlay />}- asChild+ {user === null && (+ <Hero>+ <Heading+ size="h1"+ className="font-display text-[#212578] dark:text-white max-w-xl">- <Link- to={path.to.video(sections[0].courses[0].topics[0].videos[0].id)}+ Your Journey Starts Here+ </Heading>+ <p className="text-muted-foreground dark:text-foreground text-balance text-left font-medium tracking-tighter text-lg max-w-xl">+ Learn the basics of Carbon and start your journey to becoming an+ expert in Carbon. All for free.+ </p>+ <div className="flex items-center gap-2">+ <Button+ size="lg"+ variant="secondary"+ leftIcon={<LuCirclePlay />}+ asChild>- Begin your first lesson- </Link>- </Button>- <Button- size="lg"- variant="secondary"- leftIcon={<LuBookOpen />}- asChild- >- <Link to={path.to.about}>See how it works</Link>- </Button>- </div>- </Hero>+ <Link+ to={path.to.video(+ sections[0].courses[0].topics[0].videos[0].id+ )}+ >+ Begin your first lesson+ </Link>+ </Button>+ <Button+ size="lg"+ variant="secondary"+ leftIcon={<LuBookOpen />}+ asChild+ >+ <Link to={path.to.about}>See how it works</Link>+ </Button>+ </div>+ </Hero>+ )}<div className="w-full px-4 max-w-6xl mx-auto my-16"><div className="grid grid-cols-1 md:grid-cols-[250px_1fr] gap-6"><nav className="space-y-4">diff --git a/apps/university/app/styles/tailwind.css b/apps/university/app/styles/tailwind.cssindex 6bbe67d591..e789136442 100644--- a/apps/university/app/styles/tailwind.css+++ b/apps/university/app/styles/tailwind.css@@ -16,19 +16,19 @@--popover-foreground: 240 10% 3.9%;--active: 240 5.9% 10%;--active-foreground: 0 0% 98%;- --primary: 240 5.9% 10%;+ --primary: 239 57% 30%;--primary-foreground: 0 0% 98%;- --secondary: 240 4.8% 95.9%;- --secondary-foreground: 240 5.9% 10%;+ --secondary: 248 100% 63%;+ --secondary-foreground: 248 5.9% 100%;--muted: 240 4.8% 95.9%;- --muted-foreground: 240 3.8% 46.1%;- --accent: 240 4.8% 89.9%;+ --muted-foreground: 240 3.8% 37.1%;+ --accent: 240 4.8% 95.9%;--accent-foreground: 240 5.9% 10%;- --destructive: 0 72.22% 50.59%;+ --destructive: 0 84.2% 60.2%;--destructive-foreground: 0 0% 98%;--border: 240 5.9% 90%;--input: 240 5.9% 90%;- --ring: 240 5% 64.9%;+ --ring: 240 10% 3.9%;--radius: 0.5rem;--sidebar-background: 0 0% 98%;--sidebar-foreground: 240 5.3% 26.1%;@@ -60,6 +60,27 @@}.dark {+ --background: 220 14.3% 6.1%;+ --foreground: 0 0% 98%;+ --card: 220 10% 3.9%;+ --card-foreground: 0 0% 98%;+ --popover: 220 10% 3.9%;+ --popover-foreground: 0 0% 98%;+ --primary: 0 0% 98%;+ --primary-foreground: 220 5.9% 10%;+ --active: 0 0% 98%;+ --active-foreground: 220 5.9% 10%;+ --secondary: 163 100% 69%;+ --secondary-foreground: 163 88% 13%;+ --muted: 0 0% 13.6%;+ --muted-foreground: 0 0% 65%;+ --accent: 0 0% 7.6%;+ --accent-foreground: 0 0% 98%;+ --destructive: 0 62.8% 30.6%;+ --destructive-foreground: 0 0% 98%;+ --border: 220 3.7% 15.9%;+ --input: 220 3.7% 15.9%;+ --ring: 220 4.9% 83.9%;--sidebar-background: 240 5.9% 10%;--sidebar-foreground: 240 4.8% 95.9%;--sidebar-primary: 224.3 76.3% 48%;