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.

docs: fancy boxes

Brad Barbin2294efc36afa
diff --git a/apps/carbon/app/modules/settings/ui/useSettingsSidebar.tsx b/apps/carbon/app/modules/settings/ui/useSettingsSidebar.tsx
index 2f06a023cc..2b9109c189 100644
--- a/apps/carbon/app/modules/settings/ui/useSettingsSidebar.tsx
+++ b/apps/carbon/app/modules/settings/ui/useSettingsSidebar.tsx
@@ -4,13 +4,18 @@ import { path } from "~/utils/path";
const settingsRoutes: AuthenticatedRouteGroup[] = [
{
- name: "Configure",
+ name: "Company",
routes: [
{
- name: "Company",
+ name: "Business",
to: path.to.company,
role: "employee",
},
+ ],
+ },
+ {
+ name: "System",
+ routes: [
{
name: "Sequences",
to: path.to.sequences,
diff --git a/apps/carbon/app/routes/onboarding+/_layout.tsx b/apps/carbon/app/routes/onboarding+/_layout.tsx
index 11c05754f9..44f0945037 100644
--- a/apps/carbon/app/routes/onboarding+/_layout.tsx
+++ b/apps/carbon/app/routes/onboarding+/_layout.tsx
@@ -13,7 +13,7 @@ import { BsFillHexagonFill } from "react-icons/bs";
import { getLocationsList } from "~/modules/resources";
import { getCompany } from "~/modules/settings";
import { requirePermissions } from "~/services/auth";
-import { onboardingList, path } from "~/utils/path";
+import { onboardingSequence, path } from "~/utils/path";
import type { ShouldRevalidateFunction } from "@remix-run/react";
@@ -34,19 +34,19 @@ export async function loader({ request }: LoaderFunctionArgs) {
}
const pathname = new URL(request.url).pathname;
- const pathIndex = onboardingList.findIndex((p) => p === pathname);
+ const pathIndex = onboardingSequence.findIndex((p) => p === pathname);
const previousPath =
- pathIndex === 0 ? undefined : onboardingList[pathIndex - 1];
+ pathIndex === 0 ? undefined : onboardingSequence[pathIndex - 1];
const nextPath =
- pathIndex === onboardingList.length - 1
+ pathIndex === onboardingSequence.length - 1
? path.to.authenticatedRoot
- : onboardingList[pathIndex + 1];
+ : onboardingSequence[pathIndex + 1];
return {
currentIndex: pathIndex,
- onboardingSteps: onboardingList.length,
+ onboardingSteps: onboardingSequence.length,
previousPath,
nextPath,
};
diff --git a/apps/carbon/app/routes/onboarding+/index.tsx b/apps/carbon/app/routes/onboarding+/index.tsx
index 6296ab71fe..d4c5596859 100644
--- a/apps/carbon/app/routes/onboarding+/index.tsx
+++ b/apps/carbon/app/routes/onboarding+/index.tsx
@@ -1,6 +1,6 @@
import { redirect } from "@remix-run/node";
-import { onboardingList } from "~/utils/path";
+import { onboardingSequence } from "~/utils/path";
export async function loader() {
- return redirect(onboardingList[0]);
+ return redirect(onboardingSequence[0]);
}
diff --git a/apps/carbon/app/utils/path.ts b/apps/carbon/app/utils/path.ts
index 6a51fbdf14..a2063f759e 100644
--- a/apps/carbon/app/utils/path.ts
+++ b/apps/carbon/app/utils/path.ts
@@ -398,7 +398,7 @@ export const path = {
},
} as const;
-export const onboardingList = [
+export const onboardingSequence = [
path.to.onboarding.user,
path.to.onboarding.company,
] as const;
diff --git a/www/components/features.tsx b/www/components/features.tsx
index c9a2db5c53..982add4495 100644
--- a/www/components/features.tsx
+++ b/www/components/features.tsx
@@ -4,6 +4,13 @@ import { GiSpeedometer } from "react-icons/gi";
import { GoSync } from "react-icons/go";
import { HiCode, HiFingerPrint } from "react-icons/hi";
import { TbBuildingFactory2 } from "react-icons/tb";
+import { useGlowPointer } from "../hooks/useGlowPointer";
+
+declare global {
+ interface Window {
+ usingGlowPointer: boolean;
+ }
+}
const features = [
{
@@ -43,14 +50,18 @@ const features = [
] as const;
function Features({ showIcons = false }) {
+ useGlowPointer();
+
return (
<>
<div className="grid grid-cols-1 gap-6 my-12 sm:grid-cols-2 md:grid-cols-3 ">
{features.map(({ icon: Icon, ...feature }, i) => (
<div
- className="flex items-start p-8 space-x-4 bg-black/[0.03] hover:bg-black/[0.05] dark:bg-zinc-900 dark:hover:bg-zinc-800/50 sm:-inset-x-6 rounded-md shadow-sm hover:scale-105 hover:translate hover:shadow-xl transition-all duration-300 ease-in-out"
+ data-glow
+ className="flex items-start p-8 space-x-4 bg-black/[0.03] dark:bg-zinc-900 sm:-inset-x-6 round shadow-sm transition-all duration-300 ease-in-out"
key={feature.name.split(" ").join("-")}
>
+ <div data-glow />
{showIcons && (
<Icon
className="mt-0.5 block w-8 h-8"
diff --git a/www/components/pages/Home.tsx b/www/components/pages/Home.tsx
index 87c2862919..f05e98e987 100644
--- a/www/components/pages/Home.tsx
+++ b/www/components/pages/Home.tsx
@@ -3,6 +3,7 @@
import { clamp, motion, useMotionValueEvent, useScroll } from "framer-motion";
import Head from "next/head";
import React, { useState } from "react";
+import { useGlowPointer } from "../../hooks/useGlowPointer";
import { useWindowSize } from "../../hooks/useWindowSize";
import Features from "../features";
import Sticky from "../sticky";
@@ -27,6 +28,7 @@ function Gradient() {
}
function Hero() {
+ useGlowPointer();
const { height, width } = useWindowSize();
if (!height) return null;
@@ -39,10 +41,6 @@ function Hero() {
height={height}
width={width}
render={({ progress }) => {
- const scale = {
- transform: `scale(${clamp(0.8, 1, 1 - progress * 0.3)})`,
- };
-
return (
<div className="flex flex-col justify-between text-center">
<div>
@@ -82,11 +80,9 @@ function Hero() {
Carbon is an open-source starting point for resource planning
</motion.p>
</div>
- <div
- className="flex fix-flex-col h-32 mt-4 md:mt-0 mb-6 md:mb-0 items-center justify-center gap-3 md:flex-row xl:flex-row"
- style={scale}
- >
+ <div className="flex fix-flex-col h-32 mt-4 md:mt-0 mb-6 md:mb-0 items-center justify-center gap-3 md:flex-row xl:flex-row">
<motion.a
+ data-glow
{...fadeIn}
transition={{
duration: 0.5,
@@ -99,6 +95,7 @@ function Hero() {
Learn
</motion.a>
<motion.a
+ data-glow
{...fadeIn}
transition={{
duration: 0.5,
@@ -108,6 +105,7 @@ function Hero() {
className="flex items-center justify-center w-full px-8 py-3 text-base font-medium text-white no-underline bg-zinc-800 border border-transparent rounded-md dark:bg-zinc-100 dark:text-black betterhover:dark:hover:bg-gray-300 betterhover:hover:bg-gray-700 md:py-3 md:text-lg md:px-10 md:leading-6 fix-width-auto xl:w-auto"
href="/develop/getting-started"
>
+ <div data-glow />
Develop
</motion.a>
</div>
diff --git a/www/hooks/useGlowPointer.tsx b/www/hooks/useGlowPointer.tsx
new file mode 100644
index 0000000000..9eae516aa4
--- /dev/null
+++ b/www/hooks/useGlowPointer.tsx
@@ -0,0 +1,26 @@
+import { useCallback, useEffect } from "react";
+
+export function useGlowPointer() {
+ const update = useCallback(({ x, y }) => {
+ document.body.style.setProperty("--x", x.toFixed(2));
+ document.body.style.setProperty("--xp", (x / window.innerWidth).toFixed(2));
+ document.body.style.setProperty("--y", y.toFixed(2));
+ document.body.style.setProperty(
+ "--yp",
+ (y / window.innerHeight).toFixed(2)
+ );
+ }, []);
+
+ useEffect(() => {
+ if (window.usingGlowPointer) return;
+ window.usingGlowPointer = true;
+ document.body.addEventListener("pointermove", update);
+ document.body.style.setProperty("--base", "0");
+ document.body.style.setProperty("--spread", "360");
+ return () => {
+ window.usingGlowPointer = false;
+ document.body.removeEventListener("pointermove", update);
+ };
+ }, [update]);
+ return null;
+}
diff --git a/www/pages/learn/introduction.mdx b/www/pages/learn/introduction.mdx
index 16364bfd13..633d894170 100644
--- a/www/pages/learn/introduction.mdx
+++ b/www/pages/learn/introduction.mdx
@@ -7,23 +7,13 @@ import { Features } from "../../components";
# Carbon ERP
-The major difference between Carbon and other open-source ERPs is the license. ERPs like [Odoo](https://www.odoo.com/) and [ERPNext](https://erpnext.com/) require that you open-source your code if you use their code. With Carbon, you can use the code as a starting point for your own ERP without having to open-source your code. This is known as a "permissive" license.
+Carbon ERP is an open-source ERP. There are a few differences between Carbon and other open-source ERPs:
-## Why Carbon ERP?
+1. ERPs like [Odoo](https://www.odoo.com/) and [ERPNext](https://erpnext.com/) have "copyleft" licenses, which require that you open-source your code if you use their code as a starting point. With Carbon, you can use the code as a starting point for your own systems without having to open-source your code. This is known as a "permissive" license.
+2. Carbon is geared toward manufacturing. Particularly it's solving for matching highly variable demand with highly variable supply. This is almost impossible to solve with closed systems.
-We built Carbon ERP because we wanted a real solution to manufacturing scheduling. But in order to solve scheduling, we needed to build routing, which required bill of materials, which required inventory, which required purchasing, and so on. So we built Carbon ERP.
+We wanted a real solution to manufacturing scheduling, and we couldn't find one. But in order to solve scheduling, we needed to build routing, which requires bill of materials, which requires inventory, which required purchasing, and so on. So we built Carbon ERP.
-Currently Carbon is missing big chunks of neccessary functionality. By the time it's ready for production, it will have stable support the following modules:
+Currently Carbon is missing big chunks of functionality. By the time it's ready for production, it will have stable support all of the modules required to run a manufacturing business.
-- [x] Accounting
-- [x] Inventory
-- [x] Purchasing
-- [x] Sales
-- [x] Manufacturing
-- [x] Resources Management
-- [x] Timecards
-- [x] Bill of Material and Routing Configuration
-- [x] Supplier Accounts
-- [x] Customer Accounts
-
-We'll then be able to focus on the original goal of scheduling and planning.
+Then we'll then be able to focus on the original goal of scheduling and planning. In the process we hope to have built something that resembles [Tesla's Warp](https://electrek.co/2016/02/15/tesla-3dx-model-3/).
diff --git a/www/styles.css b/www/styles.css
index 5a2d4070f4..6ee20a49e2 100644
--- a/www/styles.css
+++ b/www/styles.css
@@ -1,5 +1,9 @@
@tailwind utilities;
+:root {
+ --radius: 12px;
+}
+
code {
@apply text-sm;
}
@@ -200,3 +204,97 @@ aside {
display: none;
}
}
+
+/* Glow specific styles */
+
+.round {
+ border-radius: var(--radius);
+}
+
+.dark [data-glow] {
+ --border-size: calc(var(--border, 2) * 1px);
+ --spotlight-size: calc(var(--size, 150) * 1px);
+ --hue: calc(var(--base) + (var(--xp, 0) * var(--spread, 0)));
+ background-image: radial-gradient(
+ var(--spotlight-size) var(--spotlight-size) at calc(var(--x, 0) * 1px)
+ calc(var(--y, 0) * 1px),
+ hsl(
+ var(--hue, 210) calc(var(--saturation, 100) * 1%)
+ calc(var(--lightness, 70) * 1%) / var(--bg-spot-opacity, 0.1)
+ ),
+ transparent
+ );
+ background-color: var(--backdrop, transparent);
+ background-size: calc(100% + (2 * var(--border-size)))
+ calc(100% + (2 * var(--border-size)));
+ background-position: 50% 50%;
+ background-attachment: fixed;
+ border: var(--border-size) solid var(--backup-border);
+ position: relative;
+}
+
+.dark [data-glow]::before,
+.dark [data-glow]::after {
+ pointer-events: none;
+ content: "";
+ position: absolute;
+ inset: calc(var(--border-size) * -1);
+ border: var(--border-size) solid transparent;
+ border-radius: var(--radius);
+ background-attachment: fixed;
+ background-size: calc(100% + (2 * var(--border-size)))
+ calc(100% + (2 * var(--border-size)));
+ background-repeat: no-repeat;
+ background-position: 50% 50%;
+ mask: linear-gradient(transparent, transparent), linear-gradient(white, white);
+ mask-clip: padding-box, border-box;
+ mask-composite: intersect;
+}
+
+/* This is the emphasis light */
+.dark [data-glow]::before {
+ background-image: radial-gradient(
+ calc(var(--spotlight-size) * 0.75) calc(var(--spotlight-size) * 0.75) at
+ calc(var(--x, 0) * 1px) calc(var(--y, 0) * 1px),
+ hsl(
+ var(--hue, 210) calc(var(--saturation, 100) * 1%)
+ calc(var(--lightness, 50) * 1%) / var(--border-spot-opacity, 1)
+ ),
+ transparent 100%
+ );
+ z-index: 2;
+ filter: brightness(2);
+}
+/* This is the spotlight */
+.dark [data-glow]::after {
+ background-image: radial-gradient(
+ calc(var(--spotlight-size) * 0.5) calc(var(--spotlight-size) * 0.5) at
+ calc(var(--x, 0) * 1px) calc(var(--y, 0) * 1px),
+ hsl(0 100% 100% / var(--border-light-opacity, 1)),
+ transparent 100%
+ );
+ z-index: 2;
+}
+
+.dark [data-glow] [data-glow] {
+ position: absolute;
+ inset: 0;
+ will-change: filter;
+}
+
+.dark [data-glow] > [data-glow] {
+ border-radius: calc(var(--radius) * 1px);
+ border-width: calc(var(--border-size) * 20);
+ filter: blur(calc(var(--border-size) * 10));
+ background: none;
+ pointer-events: none;
+}
+
+.dark [data-glow] > [data-glow]::before {
+ inset: -10px;
+ border-width: 10px;
+}
+
+.dark [data-glow] [data-glow] {
+ border: none;
+}
diff --git a/www/theme.config.js b/www/theme.config.js
index 6425056867..ee935d46cd 100644
--- a/www/theme.config.js
+++ b/www/theme.config.js
@@ -55,4 +55,5 @@ export default {
titleTemplate: "%s – Carbon ERP",
};
},
+ additionalMetaTags: [{ content: "en", httpEquiv: "Content-Language" }],
};