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(readme): refresh content, screenshots and badges (#1771)

Sid0c14538d61e5
diff --git a/.github/assets/readme/architecture.png b/.github/assets/readme/architecture.png
new file mode 100644
index 0000000000..2ee8bb0977
Binary files /dev/null and b/.github/assets/readme/architecture.png differ
diff --git a/.github/assets/readme/assembly-dark.webp b/.github/assets/readme/assembly-dark.webp
new file mode 100644
index 0000000000..8e18f1684e
Binary files /dev/null and b/.github/assets/readme/assembly-dark.webp differ
diff --git a/.github/assets/readme/assembly-light.webp b/.github/assets/readme/assembly-light.webp
new file mode 100644
index 0000000000..6d230bd366
Binary files /dev/null and b/.github/assets/readme/assembly-light.webp differ
diff --git a/.github/assets/readme/bom-dark.webp b/.github/assets/readme/bom-dark.webp
new file mode 100644
index 0000000000..6709ade9e0
Binary files /dev/null and b/.github/assets/readme/bom-dark.webp differ
diff --git a/.github/assets/readme/bom-light.webp b/.github/assets/readme/bom-light.webp
new file mode 100644
index 0000000000..012f45136b
Binary files /dev/null and b/.github/assets/readme/bom-light.webp differ
diff --git a/.github/assets/readme/carbon-word-dark.svg b/.github/assets/readme/carbon-word-dark.svg
new file mode 100644
index 0000000000..c4463b4061
--- /dev/null
+++ b/.github/assets/readme/carbon-word-dark.svg
@@ -0,0 +1,9 @@
+<svg width="720" height="175" viewBox="0 0 720 175" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path fill-rule="evenodd" clip-rule="evenodd" d="M64.2993 3.57443C72.343 -1.19144 82.3494 -1.19151 90.3931 3.57443L142.163 34.2484C149.93 38.8505 154.692 47.2038 154.692 56.2254V118.775C154.692 127.796 149.93 136.149 142.163 140.752L90.3931 171.426C82.3494 176.192 72.343 176.191 64.2993 171.426L12.5296 140.752C4.76242 136.149 0 127.796 0 118.775V56.2254C0 47.2037 4.76242 38.8505 12.5296 34.2484L64.2993 3.57443ZM81.004 40.286C78.8708 39.0012 76.2016 38.9983 74.0657 40.2786L42.6851 59.0884C38.3192 61.7055 38.3303 68.0312 42.7057 70.6326L74.173 89.3408C74.3089 89.4216 74.3921 89.5681 74.3921 89.726V126.818C74.3922 132.04 80.0912 135.269 84.5774 132.589L115.594 114.057C117.626 112.843 118.87 110.652 118.87 108.287V66.8923C118.87 64.5357 117.635 62.3509 115.615 61.134L81.004 40.286Z" fill="#E6E6E6"/>
+<path d="M236.385 133.457C229.22 133.457 222.857 132.223 217.298 129.754C211.862 127.163 207.291 123.645 203.584 119.202C200.002 114.635 197.284 109.513 195.431 103.836C193.577 98.1581 192.651 92.2338 192.651 86.0626C192.651 79.8914 193.577 73.9671 195.431 68.2897C197.284 62.6122 200.002 57.5518 203.584 53.1086C207.291 48.6654 211.862 45.2095 217.298 42.741C222.857 40.1492 229.22 38.8532 236.385 38.8532C245.404 38.8532 253.249 41.0131 259.921 45.3329C266.716 49.6528 271.719 56.3176 274.931 65.3275L256.77 72.3626C255.288 67.6725 252.879 63.9081 249.543 61.0694C246.207 58.1072 241.821 56.6262 236.385 56.6262C230.95 56.6262 226.502 58.0455 223.043 60.8843C219.707 63.723 217.236 67.364 215.63 71.8072C214.024 76.2505 213.221 81.0023 213.221 86.0626C213.221 91.123 214.024 95.9365 215.63 100.503C217.236 104.946 219.707 108.587 223.043 111.426C226.502 114.141 230.95 115.499 236.385 115.499C241.821 115.499 246.207 114.08 249.543 111.241C252.879 108.402 255.288 104.638 256.77 99.9477L274.931 106.983C271.719 115.869 266.716 122.534 259.921 126.977C253.249 131.297 245.404 133.457 236.385 133.457Z" fill="#E6E6E6"/>
+<path d="M343.217 131.791L341.735 116.425V74.214C341.735 68.2897 339.943 63.8464 336.361 60.8843C332.778 57.7987 327.774 56.2559 321.35 56.2559C316.408 56.2559 311.528 57.2433 306.71 59.218C302.015 61.0694 297.691 63.9698 293.738 67.9194L282.248 54.4045C288.178 48.8505 294.479 44.901 301.151 42.5559C307.822 40.0874 315.111 38.8532 323.018 38.8532C335.372 38.8532 344.947 42.0005 351.742 48.2951C358.66 54.4663 362.12 63.1059 362.12 74.214V131.791H343.217ZM314.864 133.457C308.069 133.457 302.015 132.223 296.703 129.754C291.514 127.286 287.437 123.83 284.472 119.387C281.631 114.944 280.21 109.76 280.21 103.836C280.21 98.7752 281.26 94.3937 283.36 90.691C285.584 86.9883 288.426 84.0878 291.885 81.9896C294.85 80.1383 298.309 78.8423 302.262 78.1018C306.216 77.2378 310.355 76.8059 314.679 76.8059H343.403V92.1721H317.644C315.42 92.1721 313.196 92.4189 310.972 92.9126C308.749 93.2829 306.772 94.0234 305.042 95.1342C303.807 96.1216 302.757 97.3558 301.892 98.8369C301.151 100.318 300.78 102.046 300.78 104.021C300.78 107.97 302.262 111.118 305.228 113.463C308.316 115.684 312.393 116.795 317.458 116.795C321.906 116.795 325.921 115.808 329.504 113.833C333.21 111.858 336.175 109.143 338.399 105.687C340.623 102.231 341.735 98.3432 341.735 94.0234L348.036 104.206C346.553 110.624 344.206 116.054 340.994 120.498C337.781 124.818 333.952 128.088 329.504 130.31C325.056 132.408 320.176 133.457 314.864 133.457Z" fill="#E6E6E6"/>
+<path d="M375.823 131.791V40.5194H396.578V65.1424L392.687 65.6978C393.304 60.3906 395.096 55.7622 398.061 51.8127C401.026 47.7397 404.609 44.5924 408.809 42.3708C413.133 40.0257 417.395 38.8532 421.596 38.8532C424.561 38.8532 427.403 39.2235 430.121 39.964C432.839 40.7046 435.68 41.9388 438.645 43.6667L428.638 62.1802C427.279 61.3162 425.488 60.6374 423.264 60.1437C421.164 59.5266 419.125 59.218 417.148 59.218C414.554 59.218 411.96 59.7117 409.365 60.6991C406.894 61.6865 404.67 63.2293 402.694 65.3275C400.717 67.3023 399.234 69.8942 398.246 73.1032C397.628 74.8311 397.134 77.1144 396.764 79.9532C396.517 82.6685 396.393 86.4946 396.393 91.4315V131.791H375.823Z" fill="#E6E6E6"/>
+<path d="M492.002 133.457C487.06 133.457 482.365 132.47 477.918 130.495C473.594 128.52 469.825 125.496 466.613 121.423C463.401 117.227 460.992 111.796 459.386 105.132L464.76 106.427V131.791H444.375V2.75192H464.76V66.068H460.127C461.363 60.2672 463.463 55.3919 466.428 51.4424C469.517 47.3694 473.223 44.2838 477.547 42.1856C481.995 39.964 486.813 38.8532 492.002 38.8532C499.414 38.8532 506.086 40.7663 512.016 44.5924C518.069 48.2951 522.888 53.664 526.47 60.6991C530.053 67.7343 531.845 76.1887 531.845 86.0626C531.845 95.0725 530.177 103.157 526.841 110.315C523.629 117.474 519.058 123.151 513.128 127.348C507.198 131.421 500.156 133.457 492.002 133.457ZM486.998 114.573C491.816 114.573 496.017 113.401 499.6 111.056C503.306 108.711 506.147 105.378 508.124 101.059C510.101 96.7387 511.089 91.7401 511.089 86.0626C511.089 80.3851 510.101 75.3865 508.124 71.0667C506.147 66.7469 503.306 63.4144 499.6 61.0694C496.017 58.7244 491.816 57.5518 486.998 57.5518C482.18 57.5518 477.918 58.7861 474.211 61.2545C470.629 63.5996 467.849 66.932 465.872 71.2518C463.895 75.4482 462.907 80.3851 462.907 86.0626C462.907 91.7401 463.895 96.7387 465.872 101.059C467.849 105.378 470.629 108.711 474.211 111.056C477.918 113.401 482.18 114.573 486.998 114.573Z" fill="#E6E6E6"/>
+<path d="M583.567 133.457C574.919 133.457 567.135 131.421 560.217 127.348C553.298 123.275 547.862 117.659 543.909 110.5C540.079 103.342 538.164 95.1959 538.164 86.0626C538.164 76.9293 540.079 68.7834 543.909 61.6248C547.862 54.4663 553.237 48.9122 560.032 44.9627C566.95 40.8897 574.795 38.8532 583.567 38.8532C592.462 38.8532 600.245 40.8897 606.917 44.9627C613.711 48.9122 619.086 54.4663 623.039 61.6248C626.992 68.7834 628.969 76.9293 628.969 86.0626C628.969 95.1959 626.992 103.342 623.039 110.5C619.209 117.659 613.835 123.275 606.917 127.348C600.122 131.421 592.338 133.457 583.567 133.457ZM583.752 115.314C588.817 115.314 593.203 114.141 596.909 111.796C600.616 109.451 603.457 106.057 605.434 101.614C607.411 97.1707 608.399 91.9869 608.399 86.0626C608.399 80.0149 607.411 74.8311 605.434 70.5113C603.457 66.068 600.616 62.6739 596.909 60.3289C593.203 57.9838 588.817 56.8113 583.752 56.8113C578.44 56.8113 573.93 58.0455 570.224 60.514C566.518 62.859 563.676 66.1915 561.699 70.5113C559.723 74.8311 558.734 80.0149 558.734 86.0626C558.734 91.9869 559.723 97.1707 561.699 101.614C563.676 106.057 566.518 109.451 570.224 111.796C573.93 114.141 578.44 115.314 583.752 115.314Z" fill="#E6E6E6"/>
+<path d="M639.573 131.791V40.5194H660.143V60.6991L656.437 61.6248C658.043 56.3176 660.39 51.9978 663.479 48.6654C666.567 45.3329 670.15 42.8645 674.227 41.26C678.427 39.6555 682.813 38.8532 687.384 38.8532C697.639 38.8532 705.607 41.8154 711.29 47.7397C717.097 53.5406 720 61.8716 720 72.7329V131.791H699.43V80.3234C699.43 72.1775 697.947 66.1915 694.982 62.3653C692.017 58.5392 687.446 56.6262 681.269 56.6262C676.698 56.6262 672.806 57.737 669.594 59.9586C666.505 62.0568 664.158 65.3892 662.552 69.9559C660.946 74.5225 660.143 80.3234 660.143 87.3585V131.791H639.573Z" fill="#E6E6E6"/>
+</svg>
diff --git a/.github/assets/readme/carbon-word-light.svg b/.github/assets/readme/carbon-word-light.svg
new file mode 100644
index 0000000000..3fd85675c9
--- /dev/null
+++ b/.github/assets/readme/carbon-word-light.svg
@@ -0,0 +1,9 @@
+<svg width="720" height="175" viewBox="0 0 720 175" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path fill-rule="evenodd" clip-rule="evenodd" d="M64.2993 3.57443C72.343 -1.19144 82.3494 -1.19151 90.3931 3.57443L142.163 34.2484C149.93 38.8505 154.692 47.2038 154.692 56.2254V118.775C154.692 127.796 149.93 136.149 142.163 140.752L90.3931 171.426C82.3494 176.192 72.343 176.191 64.2993 171.426L12.5296 140.752C4.76242 136.149 0 127.796 0 118.775V56.2254C0 47.2037 4.76242 38.8505 12.5296 34.2484L64.2993 3.57443ZM81.004 40.286C78.8708 39.0012 76.2016 38.9983 74.0657 40.2786L42.6851 59.0884C38.3192 61.7055 38.3303 68.0312 42.7057 70.6326L74.173 89.3408C74.3089 89.4216 74.3921 89.5681 74.3921 89.726V126.818C74.3922 132.04 80.0912 135.269 84.5774 132.589L115.594 114.057C117.626 112.843 118.87 110.652 118.87 108.287V66.8923C118.87 64.5357 117.635 62.3509 115.615 61.134L81.004 40.286Z" fill="#101A24"/>
+<path d="M236.385 133.457C229.22 133.457 222.857 132.223 217.298 129.754C211.862 127.163 207.291 123.645 203.584 119.202C200.002 114.635 197.284 109.513 195.431 103.836C193.577 98.1581 192.651 92.2338 192.651 86.0626C192.651 79.8914 193.577 73.9671 195.431 68.2897C197.284 62.6122 200.002 57.5518 203.584 53.1086C207.291 48.6654 211.862 45.2095 217.298 42.741C222.857 40.1492 229.22 38.8532 236.385 38.8532C245.404 38.8532 253.249 41.0131 259.921 45.3329C266.716 49.6528 271.719 56.3176 274.931 65.3275L256.77 72.3626C255.288 67.6725 252.879 63.9081 249.543 61.0694C246.207 58.1072 241.821 56.6262 236.385 56.6262C230.95 56.6262 226.502 58.0455 223.043 60.8843C219.707 63.723 217.236 67.364 215.63 71.8072C214.024 76.2505 213.221 81.0023 213.221 86.0626C213.221 91.123 214.024 95.9365 215.63 100.503C217.236 104.946 219.707 108.587 223.043 111.426C226.502 114.141 230.95 115.499 236.385 115.499C241.821 115.499 246.207 114.08 249.543 111.241C252.879 108.402 255.288 104.638 256.77 99.9477L274.931 106.983C271.719 115.869 266.716 122.534 259.921 126.977C253.249 131.297 245.404 133.457 236.385 133.457Z" fill="#101A24"/>
+<path d="M343.217 131.791L341.735 116.425V74.214C341.735 68.2897 339.943 63.8464 336.361 60.8843C332.778 57.7987 327.774 56.2559 321.35 56.2559C316.408 56.2559 311.528 57.2433 306.71 59.218C302.015 61.0694 297.691 63.9698 293.738 67.9194L282.248 54.4045C288.178 48.8505 294.479 44.901 301.151 42.5559C307.822 40.0874 315.111 38.8532 323.018 38.8532C335.372 38.8532 344.947 42.0005 351.742 48.2951C358.66 54.4663 362.12 63.1059 362.12 74.214V131.791H343.217ZM314.864 133.457C308.069 133.457 302.015 132.223 296.703 129.754C291.514 127.286 287.437 123.83 284.472 119.387C281.631 114.944 280.21 109.76 280.21 103.836C280.21 98.7752 281.26 94.3937 283.36 90.691C285.584 86.9883 288.426 84.0878 291.885 81.9896C294.85 80.1383 298.309 78.8423 302.262 78.1018C306.216 77.2378 310.355 76.8059 314.679 76.8059H343.403V92.1721H317.644C315.42 92.1721 313.196 92.4189 310.972 92.9126C308.749 93.2829 306.772 94.0234 305.042 95.1342C303.807 96.1216 302.757 97.3558 301.892 98.8369C301.151 100.318 300.78 102.046 300.78 104.021C300.78 107.97 302.262 111.118 305.228 113.463C308.316 115.684 312.393 116.795 317.458 116.795C321.906 116.795 325.921 115.808 329.504 113.833C333.21 111.858 336.175 109.143 338.399 105.687C340.623 102.231 341.735 98.3432 341.735 94.0234L348.036 104.206C346.553 110.624 344.206 116.054 340.994 120.498C337.781 124.818 333.952 128.088 329.504 130.31C325.056 132.408 320.176 133.457 314.864 133.457Z" fill="#101A24"/>
+<path d="M375.823 131.791V40.5194H396.578V65.1424L392.687 65.6978C393.304 60.3906 395.096 55.7622 398.061 51.8127C401.026 47.7397 404.609 44.5924 408.809 42.3708C413.133 40.0257 417.395 38.8532 421.596 38.8532C424.561 38.8532 427.403 39.2235 430.121 39.964C432.839 40.7046 435.68 41.9388 438.645 43.6667L428.638 62.1802C427.279 61.3162 425.488 60.6374 423.264 60.1437C421.164 59.5266 419.125 59.218 417.148 59.218C414.554 59.218 411.96 59.7117 409.365 60.6991C406.894 61.6865 404.67 63.2293 402.694 65.3275C400.717 67.3023 399.234 69.8942 398.246 73.1032C397.628 74.8311 397.134 77.1144 396.764 79.9532C396.517 82.6685 396.393 86.4946 396.393 91.4315V131.791H375.823Z" fill="#101A24"/>
+<path d="M492.002 133.457C487.06 133.457 482.365 132.47 477.918 130.495C473.594 128.52 469.825 125.496 466.613 121.423C463.401 117.227 460.992 111.796 459.386 105.132L464.76 106.427V131.791H444.375V2.75192H464.76V66.068H460.127C461.363 60.2672 463.463 55.3919 466.428 51.4424C469.517 47.3694 473.223 44.2838 477.547 42.1856C481.995 39.964 486.813 38.8532 492.002 38.8532C499.414 38.8532 506.086 40.7663 512.016 44.5924C518.069 48.2951 522.888 53.664 526.47 60.6991C530.053 67.7343 531.845 76.1887 531.845 86.0626C531.845 95.0725 530.177 103.157 526.841 110.315C523.629 117.474 519.058 123.151 513.128 127.348C507.198 131.421 500.156 133.457 492.002 133.457ZM486.998 114.573C491.816 114.573 496.017 113.401 499.6 111.056C503.306 108.711 506.147 105.378 508.124 101.059C510.101 96.7387 511.089 91.7401 511.089 86.0626C511.089 80.3851 510.101 75.3865 508.124 71.0667C506.147 66.7469 503.306 63.4144 499.6 61.0694C496.017 58.7244 491.816 57.5518 486.998 57.5518C482.18 57.5518 477.918 58.7861 474.211 61.2545C470.629 63.5996 467.849 66.932 465.872 71.2518C463.895 75.4482 462.907 80.3851 462.907 86.0626C462.907 91.7401 463.895 96.7387 465.872 101.059C467.849 105.378 470.629 108.711 474.211 111.056C477.918 113.401 482.18 114.573 486.998 114.573Z" fill="#101A24"/>
+<path d="M583.567 133.457C574.919 133.457 567.135 131.421 560.217 127.348C553.298 123.275 547.862 117.659 543.909 110.5C540.079 103.342 538.164 95.1959 538.164 86.0626C538.164 76.9293 540.079 68.7834 543.909 61.6248C547.862 54.4663 553.237 48.9122 560.032 44.9627C566.95 40.8897 574.795 38.8532 583.567 38.8532C592.462 38.8532 600.245 40.8897 606.917 44.9627C613.711 48.9122 619.086 54.4663 623.039 61.6248C626.992 68.7834 628.969 76.9293 628.969 86.0626C628.969 95.1959 626.992 103.342 623.039 110.5C619.209 117.659 613.835 123.275 606.917 127.348C600.122 131.421 592.338 133.457 583.567 133.457ZM583.752 115.314C588.817 115.314 593.203 114.141 596.909 111.796C600.616 109.451 603.457 106.057 605.434 101.614C607.411 97.1707 608.399 91.9869 608.399 86.0626C608.399 80.0149 607.411 74.8311 605.434 70.5113C603.457 66.068 600.616 62.6739 596.909 60.3289C593.203 57.9838 588.817 56.8113 583.752 56.8113C578.44 56.8113 573.93 58.0455 570.224 60.514C566.518 62.859 563.676 66.1915 561.699 70.5113C559.723 74.8311 558.734 80.0149 558.734 86.0626C558.734 91.9869 559.723 97.1707 561.699 101.614C563.676 106.057 566.518 109.451 570.224 111.796C573.93 114.141 578.44 115.314 583.752 115.314Z" fill="#101A24"/>
+<path d="M639.573 131.791V40.5194H660.143V60.6991L656.437 61.6248C658.043 56.3176 660.39 51.9978 663.479 48.6654C666.567 45.3329 670.15 42.8645 674.227 41.26C678.427 39.6555 682.813 38.8532 687.384 38.8532C697.639 38.8532 705.607 41.8154 711.29 47.7397C717.097 53.5406 720 61.8716 720 72.7329V131.791H699.43V80.3234C699.43 72.1775 697.947 66.1915 694.982 62.3653C692.017 58.5392 687.446 56.6262 681.269 56.6262C676.698 56.6262 672.806 57.737 669.594 59.9586C666.505 62.0568 664.158 65.3892 662.552 69.9559C660.946 74.5225 660.143 80.3234 660.143 87.3585V131.791H639.573Z" fill="#101A24"/>
+</svg>
diff --git a/.github/assets/readme/sales-orders-dark.webp b/.github/assets/readme/sales-orders-dark.webp
new file mode 100644
index 0000000000..60999f97c8
Binary files /dev/null and b/.github/assets/readme/sales-orders-dark.webp differ
diff --git a/.github/assets/readme/sales-orders-light.webp b/.github/assets/readme/sales-orders-light.webp
new file mode 100644
index 0000000000..936749c636
Binary files /dev/null and b/.github/assets/readme/sales-orders-light.webp differ
diff --git a/.github/assets/readme/traceability-dark.webp b/.github/assets/readme/traceability-dark.webp
new file mode 100644
index 0000000000..776bd2a343
Binary files /dev/null and b/.github/assets/readme/traceability-dark.webp differ
diff --git a/.github/assets/readme/traceability-light.webp b/.github/assets/readme/traceability-light.webp
new file mode 100644
index 0000000000..6db9f68075
Binary files /dev/null and b/.github/assets/readme/traceability-light.webp differ
diff --git a/.github/assets/social-preview.png b/.github/assets/social-preview.png
new file mode 100644
index 0000000000..ce187f769a
Binary files /dev/null and b/.github/assets/social-preview.png differ
diff --git a/README.md b/README.md
index f6dbf52aad..40ec32fad9 100644
--- a/README.md
+++ b/README.md
@@ -1,36 +1,73 @@
<div align="center">
<a href="https://carbon.ms">
- <img width="auto" height="100" alt="Carbon Logo" src="https://github.com/user-attachments/assets/177634ca-5c37-43e2-8d55-1b9f490866d5" />
+ <picture>
+ <source media="(prefers-color-scheme: dark)" srcset=".github/assets/readme/carbon-word-dark.svg" />
+ <img height="72" alt="Carbon" src=".github/assets/readme/carbon-word-light.svg" />
+ </picture>
</a>
- <h3 align="center">Carbon</h3>
+ <h3>The open-source manufacturing ERP, MES &amp; QMS</h3>
- <p align="center">
- The open core for manufacturing.
- <br />
- ERP · MES · QMS — API-first, extensible, yours.
- <br />
- <br />
- <a href="https://carbon.ms"><strong>Website</strong></a> ·
- <a href="https://docs.carbon.ms"><strong>Documentation</strong></a> ·
+ <p>
+ Quote, plan, buy, build, inspect and ship on one live model of your factory,<br />
+ from a ten-person prototype shop to a rate-production line.
+ </p>
+
+ <p>
+ <a href="https://app.carbon.ms"><strong>Start free</strong></a> ·
+ <a href="https://docs.carbon.ms/docs/platform/self-hosting"><strong>Self-host</strong></a> ·
+ <a href="https://docs.carbon.ms"><strong>Docs</strong></a> ·
+ <a href="https://docs.carbon.ms/api-reference"><strong>API</strong></a> ·
+ <a href="https://docs.carbon.ms/mcp"><strong>MCP</strong></a> ·
<a href="https://discord.gg/yGUJWhNqzy"><strong>Discord</strong></a> ·
<a href="https://github.com/orgs/crbnos/projects/1/views/1"><strong>Roadmap</strong></a>
</p>
- <p align="center">
+ <p>
+ <a href="https://github.com/crbnos/carbon/stargazers"><img src="https://img.shields.io/github/stars/crbnos/carbon?style=flat-square&logo=github&label=Stars&color=000000&labelColor=000000" alt="GitHub stars" /></a>
+ <a href="https://discord.gg/yGUJWhNqzy"><img src="https://img.shields.io/badge/Discord-000000?style=flat-square&logo=discord&logoColor=white" alt="Discord" /></a>
<img src="https://img.shields.io/badge/TypeScript-000000?style=flat-square&logo=typescript&logoColor=white" alt="TypeScript" />
<img src="https://img.shields.io/badge/React-000000?style=flat-square&logo=react&logoColor=white" alt="React" />
- <img src="https://img.shields.io/badge/Supabase-000000?style=flat-square&logo=supabase&logoColor=white" alt="Supabase" />
+ <img src="https://img.shields.io/badge/Postgres-000000?style=flat-square&logo=postgresql&logoColor=white" alt="Postgres" />
<img src="https://img.shields.io/badge/Rust-000000?style=flat-square&logo=rust&logoColor=white" alt="Rust" />
- <img src="https://img.shields.io/badge/License-AGPL--3.0-000000?style=flat-square" alt="License" />
+ <a href="LICENSE"><img src="https://img.shields.io/badge/License-AGPL--3.0-000000?style=flat-square" alt="License: AGPL-3.0" /></a>
</p>
</div>
<br />
-![ERP Screenshot](https://github.com/user-attachments/assets/2e09b891-d5e2-4f68-b924-a1c8ea42d24d)
-
-![MES Screenshot](https://github.com/user-attachments/assets/b04f3644-91aa-4f74-af8d-6f3e12116a6b)
+<a href="https://carbon.ms">
+ <picture>
+ <source media="(prefers-color-scheme: dark)" srcset=".github/assets/readme/assembly-dark.webp" />
+ <img alt="Carbon assembly instructions: step-by-step 3D work instructions authored from the CAD model" src=".github/assets/readme/assembly-light.webp" />
+ </picture>
+</a>
+
+<table>
+ <tr>
+ <td width="33%" valign="top">
+ <picture>
+ <source media="(prefers-color-scheme: dark)" srcset=".github/assets/readme/sales-orders-dark.webp" />
+ <img alt="Sales orders list with status, linked jobs and order totals" src=".github/assets/readme/sales-orders-light.webp" />
+ </picture>
+ <p align="center"><sub><b>Quote to cash.</b> Quotes, orders, jobs and invoices on one record.</sub></p>
+ </td>
+ <td width="33%" valign="top">
+ <picture>
+ <source media="(prefers-color-scheme: dark)" srcset=".github/assets/readme/bom-dark.webp" />
+ <img alt="Multi-level bill of materials with planning and supersession" src=".github/assets/readme/bom-light.webp" />
+ </picture>
+ <p align="center"><sub><b>Unfork your BOM.</b> Multi-level BOMs, revisions and configuration.</sub></p>
+ </td>
+ <td width="33%" valign="top">
+ <picture>
+ <source media="(prefers-color-scheme: dark)" srcset=".github/assets/readme/traceability-dark.webp" />
+ <img alt="Lot and serial traceability graph" src=".github/assets/readme/traceability-light.webp" />
+ </picture>
+ <p align="center"><sub><b>Traceability by default.</b> Lot and serial genealogy, forwards and back.</sub></p>
+ </td>
+ </tr>
+</table>
<br />
@@ -38,172 +75,220 @@
- [Why Carbon](#why-carbon)
- [Features](#features)
+- [Get Carbon](#get-carbon)
+- [API & MCP](#api--mcp)
- [Architecture](#architecture)
- [Tech Stack](#tech-stack)
- [Monorepo](#monorepo)
-- [Getting Started](#getting-started)
-- [Local Dev CLI (`crbn`)](#local-dev-cli-crbn)
-- [Environment Variables](#environment-variables)
-- [Logging In](#logging-in)
+- [Local Development](#local-development)
- [Commands](#commands)
-- [API](#api)
-- [Migration Notes](#migration-notes)
+- [Security](#security)
+- [Contributing](#contributing)
+- [License](#license)
<br />
## Why Carbon
-We built Carbon after years of building end-to-end manufacturing systems with off-the-shelf solutions. We realized that:
+Legacy ERPs were built for accountants in the 1990s. We built Carbon after years of running manufacturing on off-the-shelf systems and finding that:
- Modern, API-first tooling didn't exist
- Vendor lock-in bordered on extortion
-- There is no "perfect ERP" because each company is unique
+- There is no "perfect ERP", because every manufacturer is unique
-We built Carbon to solve these problems ☝️
+So Carbon puts ERP, MRP, MES and QMS on **one Postgres schema you can read, own and extend**. Every stage, from CAD to cash, writes to the same record: no handoffs, no re-keying, no reconciliation.
+
+Carbon is an open-source alternative to [NetSuite](https://carbon.ms/compare/netsuite), [Epicor](https://carbon.ms/compare/epicor), [SAP Business One](https://carbon.ms/compare/sap-business-one), [Plex](https://carbon.ms/compare/plex), [Odoo](https://carbon.ms/compare/odoo) and [ERPNext](https://carbon.ms/compare/erpnext), built for discrete manufacturing: complex assembly, contract manufacturing, configure-to-order and high-mix, low-volume production. See [all comparisons](https://carbon.ms/compare).
<br />
## Features
-| | |
-| ------------------ | --------------------------------------------------- |
-| **ERP** | Sales, purchasing, inventory, items, accounting |
-| **MES** | Shop floor execution and job operations |
-| **QMS** | Inspections, non-conformances, CAPAs |
-| **MRP** | Material requirements planning |
-| **Traceability** | Full lot and serial tracking |
-| **Nested BoM** | Multi-level bills of material |
-| **Configurator** | Product configuration |
-| **Capacity Planning** | Scheduling against real resource capacity |
-| **Custom Fields** | Extend any record |
-| **API & Webhooks** | Build your own apps on top of Carbon |
-| **MCP Client/Server** | AI-native integration surface |
-| **Accounting** | GL, journals, and third-party sync |
-
-See the [full roadmap](https://github.com/orgs/crbnos/projects/1/views/1) for what's next (up next: Simulation).
+| | |
+| ---------------------------- | -------------------------------------------------------------------------------- |
+| **ERP** | Sales (quotes, orders, RMAs), purchasing, inventory, items, invoicing |
+| **MRP & Planning** | Material requirements planning, demand forecasts, finite capacity scheduling |
+| **MES** | Digital travelers, 3D assembly instructions, barcode/QR tracking, live labor |
+| **QMS** | Inspections, FAI, non-conformances, CAPA, gauge calibration, risk register |
+| **Traceability** | Serial and lot genealogy, forwards and back |
+| **Engineering** | Nested BoMs, revisions, change orders, item supersession, product configurator |
+| **Accounting** | GL, journals, multi-entity and multi-currency, Xero / QuickBooks sync |
+| **Workflows** | No-code automation rules with full run history |
+| **Maintenance & Assets** | Scheduled maintenance, fixed assets, kanban replenishment |
+| **API, Webhooks & MCP** | 1,500+ typed API operations, served over HTTP and as a built-in MCP server |
+| **Custom Fields** | Extend any record |
+| **Integrations** | Onshape, SolidWorks, Paperless Parts, Linear, Jira, Slack, Ramp, Stripe, Zebra |
+
+See the [full roadmap](https://github.com/orgs/crbnos/projects/1/views/1) for what's next.
**Technical highlights**
-- Unified auth and permissions across apps
-- Full-stack type safety (Database → UI)
+- Full-stack type safety, from the database to the UI
+- Row-level security, multi-tenant by design
+- Role- and attribute-based access control (Employee, Customer, Supplier)
- Realtime database subscriptions
-- Attribute-based access control (ABAC)
-- Role-based access control (Customer, Supplier, Employee)
-- Row-level security (RLS)
-- Composable user groups
+- Unified auth and permissions across apps
- Dependency graph for operations
-- Third-party integrations
+- Rust geometry service: STEP → GLB and assembly motion planning
<br />
-## Architecture
+## Get Carbon
+
+| | |
+| --- | --- |
+| **Carbon Cloud** | The fastest way to start. [Create a company](https://app.carbon.ms), no call required. |
+| **Self-hosted** | Run the whole stack on a single VPS, your own AWS account, or air-gapped. See the [self-hosting guide](https://docs.carbon.ms/docs/platform/self-hosting). |
+| **Develop locally** | Hack on the source: follow [Local Development](#local-development). |
+
+<br />
+
+## API & MCP
+
+Carbon is API-first. The [**Carbon API**](https://docs.carbon.ms/api) is the service layer, the same code the app runs when you click a button: 1,500+ operations across 15 modules, each validating its input, recalculating what depends on it and enforcing your permissions. Every operation is reachable two ways, with the same arguments:
+
+- **HTTP:** `POST https://app.carbon.ms/api/v1/{module}/{operation}`, with a published [OpenAPI spec](https://app.carbon.ms/api/v1/openapi.json) for [generating a typed client](https://docs.carbon.ms/api/sdks) in any language
+- **[MCP](https://docs.carbon.ms/api/mcp):** as tools for Claude, ChatGPT, Cursor and other agents, scoped to the permissions of the key or signed-in user
+
+Create a key under **Settings → API Keys**, then:
+
+```bash
+curl -X POST https://app.carbon.ms/api/v1/sales/getSalesOrders \
+ -H "Authorization: Bearer $CARBON_API_KEY" \
+ -H "Content-Type: application/json" \
+ -d '{ "args": { "limit": 10 } }'
+```
+
+Self-hosted, the same API is served by your ERP at `/api/v1`. For the rare case the service layer doesn't cover, the [Data API](https://docs.carbon.ms/api/data) exposes every table and view directly.
-Carbon is designed to make it easy for you to extend the platform by building your own apps through our API. We provide some examples to get you started in the [examples](https://github.com/crbnos/carbon/blob/main/examples) folder.
+<br />
+
+## Architecture
-![Carbon Functionality](https://github.com/user-attachments/assets/d73b3297-afb4-4bd4-a381-61b31a78aa38)
+ERP and MES are React Router apps over a single Postgres database. Permissions (row-level security), computed totals and change events live in the database itself; background work runs through Inngest, which calls back into the ERP to execute jobs. The [architecture guide](https://docs.carbon.ms/docs/building/architecture) follows one click all the way down.
-![Carbon Architecture](https://github.com/user-attachments/assets/e5532a5f-609c-4404-8706-aa9bd59e180b)
+<a href="https://docs.carbon.ms/docs/building/architecture">
+ <img alt="How Carbon fits together: shop floor, office and customers reach the MES and ERP, which read and write Postgres; subscribed writes queue Inngest jobs that run back in the ERP" src=".github/assets/readme/architecture.png" width="720" />
+</a>
<br />
## Tech Stack
-| Layer | Technology |
-| ---------- | --------------------------------------------------------------------- |
-| Framework | [React Router](https://reactrouter.com) |
-| Language | [TypeScript](https://www.typescriptlang.org/) |
-| Styling | [Tailwind](https://tailwindcss.com) |
-| Behavior | [Radix UI](https://radix-ui.com) |
-| Database | [Supabase](https://supabase.com) (Postgres + RLS) |
-| Auth | [Supabase](https://supabase.com) |
-| Cache | [Redis](https://redis.io) |
-| Jobs | [Inngest](https://inngest.com) |
-| Email | SMTP ([Nodemailer](https://nodemailer.com)) |
-| i18n | [Lingui](https://lingui.dev) |
-| Hosting | [Vercel](https://vercel.com) |
-| Billing | [Stripe](https://stripe.com) |
-| Geometry | [Rust](https://www.rust-lang.org) (FCL collision + OpenCASCADE CAD) |
+| Layer | Technology |
+| -------------- | ------------------------------------------------------------------------------------------------ |
+| Apps | [React Router 7](https://reactrouter.com) on [Vite](https://vite.dev), [TypeScript](https://www.typescriptlang.org/) |
+| UI | [Tailwind 4](https://tailwindcss.com), [Radix](https://radix-ui.com), [React Aria](https://react-spectrum.adobe.com/react-aria/), [TanStack Table and Query](https://tanstack.com) |
+| Forms | [Zod](https://zod.dev) with `@carbon/form` |
+| Database | [Postgres](https://www.postgresql.org) with row-level security, [PostgREST](https://postgrest.org) and [Kysely](https://kysely.dev) |
+| API | [oRPC](https://orpc.unnoq.com) with OpenAPI, [MCP](https://modelcontextprotocol.io) server |
+| AI | [AI SDK](https://ai-sdk.dev) (Anthropic, OpenAI) |
+| Jobs & events | [Inngest](https://inngest.com) |
+| Cache | [Redis](https://redis.io) |
+| 3D & CAD | [three.js](https://threejs.org) / react-three-fiber; Rust with [OpenCASCADE](https://dev.opencascade.org) and [FCL](https://github.com/flexible-collision-library/fcl) |
+| Documents | [React PDF](https://react-pdf.org), [React Email](https://react.email), [TipTap](https://tiptap.dev) |
+| i18n | [Lingui](https://lingui.dev) |
+| Tooling | [pnpm](https://pnpm.io), [Turborepo](https://turbo.build), [Biome](https://biomejs.dev), [Vitest](https://vitest.dev) |
+| Docs | [Next.js](https://nextjs.org) + [Fumadocs](https://fumadocs.dev) |
+| Hosting | [AWS](https://aws.amazon.com) via [SST](https://sst.dev), or self-hosted with Docker |
<br />
## Monorepo
-The monorepo follows the Turborepo convention of grouping packages into two folders:
+A [pnpm](https://pnpm.io) + [Turborepo](https://turbo.build) monorepo:
```
carbon
-├── apps # applications
-└── packages # shared code
+├── apps # ERP, MES and the Rust assembler
+├── packages # shared TypeScript packages
+├── crates # Rust crates behind the assembler (CAD conversion, collision, motion planning)
+└── docs # docs.carbon.ms, with content and glossary as @carbon/content
```
### `/apps`
-| App | Description | How to run |
-| ----------- | -------------------------------------------------------------- | --------------------------------------------------- |
-| `erp` | ERP application | `pnpm dev` (boots stack + ERP via `crbn up` picker) |
-| `mes` | MES — shop floor | `pnpm dev` (select MES in picker, or both) |
-| `academy` | Training | `pnpm dev:academy` |
-| `starter` | Example app built on the API | `pnpm dev:starter` |
-| `assembler` | Geometry service (Rust): STEP → GLB + assembly motion planning | spawned by `crbn up` (needs a release binary — see [Optional: assembler](#optional-the-assembler-geometry-service)) |
-
-`pnpm dev` runs the per-worktree dev CLI (`crbn up`). ERP and MES are first-class — the CLI boots the docker stack, applies migrations, regenerates types/swagger, and spawns the selected apps behind portless. The `assembler` geometry service is spawned too when its release binary is present. Academy and starter are standalone Turborepo entries.
+| App | Description |
+| ----------- | --------------------------------------------------------------- |
+| `erp` | ERP: sales, purchasing, inventory, planning, quality, accounting |
+| `mes` | MES: the shop floor app, run on tablets next to the machines |
+| `assembler` | Rust geometry service: STEP → GLB and assembly motion planning |
+| `academy` | Training |
+| `starter` | Example app built on the API |
### `/packages`
-| Package | Description |
-| ------------------- | --------------------------------------------------------------------------- |
-| `@carbon/database` | Database schema, migrations and types |
-| `@carbon/documents` | Transactional PDFs and email templates |
-| `@carbon/ee` | Integration definitions and configurations |
-| `@carbon/config` | Shared configuration (vitest, tsconfig, tailwind) across apps and packages |
-| `@carbon/jobs` | Background jobs and workers |
-| `@carbon/logger` | Shared logger used across apps |
-| `@carbon/react` | Shared web-based UI components |
-| `@carbon/kv` | Redis cache client |
-| `@carbon/lib` | Third-party client libraries (slack, resend) |
-| `@carbon/stripe` | Stripe integration |
-| `@carbon/utils` | Shared utility functions used across apps and packages |
+| Package | Description |
+| ------------------------ | ---------------------------------------------------------------------------- |
+| `@carbon/database` | Schema, migrations, generated types and database clients |
+| `@carbon/auth` | Authentication, RBAC, sessions, API keys and OAuth |
+| `@carbon/api` | API contract: the generated operation manifest behind the Carbon API and MCP |
+| `@carbon/react` | Shared UI components (Radix, React Aria, Tailwind) |
+| `@carbon/form` | `ValidatedForm` and field components for zod + FormData |
+| `@carbon/jobs` | Inngest background jobs: events, integrations, notifications, workflows |
+| `@carbon/planning` | MRP and scheduling engines |
+| `@carbon/documents` | PDFs, email templates, ZPL labels, QR and barcodes |
+| `@carbon/printing` | Printer routing, label queue and ProxyBox delivery |
+| `@carbon/viewer` | 3D models and animated assembly instructions (react-three-fiber) |
+| `@carbon/files` | File handling: images, HEIC, CAD formats |
+| `@carbon/tiptap` | Rich-text editor extensions and components |
+| `@carbon/onboarding` | Implementation Hub: guided company setup |
+| `@carbon/notifications` | Notification event taxonomy shared by apps and jobs |
+| `@carbon/workflows-core` | Community-licensed contracts for workflow triggers |
+| `@carbon/locale` | Lingui i18n runtime for ERP and MES |
+| `@carbon/lib` | Server utilities: event system, Inngest client, SMTP, Slack |
+| `@carbon/kv` | Redis client and rate limiting |
+| `@carbon/env` | Validated environment variables, secrets kept server-side |
+| `@carbon/logger` | Isomorphic logger built on LogTape |
+| `@carbon/utils` | Pure shared utilities (dates, precision, BOM, formatting) |
+| `@carbon/stripe` | Stripe billing (Carbon Cloud only) |
+| `@carbon/ee` | Enterprise features and integrations (commercial license) |
+| `@carbon/checks` | Conformance checks that keep the codebase consistent |
+| `@carbon/dev` | The `crbn` dev CLI: worktrees, Docker stacks, dev URLs |
+| `@carbon/harness` | Harness for AI coding agents working on this repo |
+| `@carbon/config` | Shared Vitest, TypeScript and Tailwind configuration |
<br />
-## Getting Started
-
-### Prerequisites
+## Local Development
-- [Docker](https://docs.docker.com/desktop/install/mac-install/) — the monorepo uses Docker for local development
-- [Node.js](https://nodejs.org) v22 (via `nvm`)
-- [pnpm](https://pnpm.io) (via Corepack — see below; never `npm`)
+**Prerequisites:** [Docker](https://docs.docker.com/get-docker/), [Node.js](https://nodejs.org) 22 and [pnpm](https://pnpm.io) (via Corepack). On Windows, use WSL or Git Bash.
-You'll also want accounts with the following external services:
-
-| Service | Purpose |
-| ---------------------------------------------------- | -------------------------- |
-| [Posthog](https://us.posthog.com/signup) | Product analytics platform |
-| [Stripe](https://dashboard.stripe.com/login) | Payments service |
-| An SMTP provider (e.g. [Resend](https://resend.com)) | Email service |
+```bash
+git clone https://github.com/crbnos/carbon.git && cd carbon
+corepack enable && pnpm install
+cp .env.example .env
+pnpm dev
+```
-Posthog has a free tier which should be plenty to support local development. If you're self hosting and you don't want to use Posthog, it's pretty easy to remove the analytics.
+`pnpm dev` boots the whole backend in Docker (Postgres, PostgREST, auth, storage, realtime, Inngest, Redis and a mail catcher), applies migrations, generates types and starts the apps:
-### Clone
+| Surface | URL |
+| ------------ | ------------------------ |
+| ERP | http://localhost:3000 |
+| MES | http://localhost:3001 |
+| API | http://localhost:54321 |
-Clone the repo, or fork it at https://github.com/crbnos/carbon/fork. Carbon is licensed under AGPLv3. If you'd rather not share your changes with your users, as AGPLv3 requires, or if you want the Enterprise features in packages/ee, you'll need a [commercial license](https://carbon.ms/sales).
+Sign in as `[email protected]`: the dev stack seeds that user and skips the magic link. To fill a company with a full demo story (items, BOMs, orders, jobs, inspections, journals), seed one of the industry datasets (`satellite`, `robotics`, `precision`, `motor`):
```bash
-git clone https://github.com/crbnos/carbon.git
-cd carbon
+pnpm db:seed:dev -- --email [email protected] --dataset satellite
```
-### Install
+No external accounts are needed to run locally. Email, Google/Microsoft sign-in, Stripe, PostHog and AI providers are all optional and configured in `.env`; see [environment variables](https://docs.carbon.ms/docs/platform/self-hosting/environment-variables).
+
+### Worktrees and the `crbn` CLI
-This repo uses **pnpm** as its package manager. Enable Corepack so the correct pnpm version (pinned via `packageManager` in `package.json`) is used automatically:
+`pnpm dev` is shorthand for `crbn up --no-portless`. Run `source ./setup.sh` once to put `crbn` on your `PATH` and you get a separate, isolated stack per git worktree, so several branches can run side by side, each on its own HTTPS `.dev` URLs via [portless](https://github.com/vercel-labs/portless):
```bash
-corepack enable # one-time: activates pnpm shim from packageManager field
-nvm use # use node v22
-pnpm install # install dependencies
+crbn checkout -b feat/my-thing # new branch + worktree off HEAD
+crbn up # boot this worktree's stack at erp.<branch>.dev
+crbn checkout 760 # check out PR #760 into its own worktree
+crbn status | down | reset # ports and health, stop, wipe and reboot
```
-The dev stack (Postgres, GoTrue, Kong, Storage, Inngest, Inbucket, Studio, Realtime) is booted later by `crbn up` — see [Local Dev CLI](#local-dev-cli-crbn) below. There is no separate "start the database" step.
+The full command reference is in the [local development guide](https://docs.carbon.ms/docs/building/local-development).
<details>
<summary><h3>Optional: the <code>assembler</code> geometry service</h3></summary>
@@ -237,212 +322,12 @@ The dev stack (Postgres, GoTrue, Kong, Storage, Inngest, Inbucket, Studio, Realt
</details>
-<br />
-
-## Local Dev CLI (`crbn`)
-
-[![](https://cdn.loom.com/sessions/thumbnails/690e6a4ec1c24216b56a22aa2667ba51-ee9275cabb59a0aa-full-play.gif#t=0.1)](https://www.loom.com/embed/690e6a4ec1c24216b56a22aa2667ba51)
-
-`crbn` is a small CLI at `packages/dev/bin/crbn` that wraps two things:
-
-- **Git worktrees** — every feature branch can live in its own checkout dir, so you can switch branches without stashing.
-- **Per-worktree docker compose stack** — each worktree gets its own Postgres / Supabase services on dynamic ports, isolated under a `carbon-<slug>` compose project. Routing is handled by [portless](https://github.com/portless-dev/portless) (a local HTTPS reverse proxy that serves `*.dev` hostnames on `:443` with locally-trusted certs — installed automatically on first `crbn up`).
-
-> **Windows users:** the dev CLI (`crbn`, `setup.sh`) is POSIX-only and expects **WSL or Git Bash**. Native cmd.exe / PowerShell shells are not supported. From a WSL/Git Bash prompt, the standard flow (`./setup.sh`, `pnpm dev`, `crbn checkout …`) works the same as on macOS/Linux.
-
-Run `setup.sh` once to put `crbn` on your `$PATH` and install the `crbn` shell function (so `crbn checkout` can change cwd):
-
-```bash
-./setup.sh # writes a sentinel block to ~/.zshrc or ~/.bashrc
-source ~/.zshrc # or open a new shell
-crbn # shows commands
-```
-
-Common flows:
-
-```bash
-crbn checkout sid/cool-thing # cd into worktree (creates if missing,
- # auto-fetches from origin if needed)
-crbn checkout -b feat/new-thing # new branch off origin/main + worktree
-crbn checkout sid/cool-thing --up # …and boot the stack inside it
-crbn checkout 760 # fetch GitHub PR #760 into a `pr-760`
- # branch + worktree (fork PRs work too)
-crbn copy # re-sync .env from main checkout
-crbn up | down | reset | status # per-worktree compose stack
-crbn new | list | remove # interactive worktree management
-```
-
-`crbn up` flags:
-
-- `--no-migrate` — skip `supabase migration up` (use when schema is already current and you just want to re-boot containers fast)
-- `--no-regen` — skip regenerating `packages/database/src/types.ts` + `swagger-docs-schema.ts` (auto-skipped when `--no-migrate` is set, since no schema change implies no type drift)
-
-Files synced by `crbn copy` are listed under `package.json#crbn.copy` (defaults to `[".env"]`). To uninstall the rc block: `./setup.sh --uninstall`.
-
-<br />
-
-## Environment Variables
-
-Create an `.env` file and copy the contents of `.env.example` into it:
-
-```bash
-cp ./.env.example ./.env
-```
-
-Then configure each service:
-
-<details>
-<summary><strong>1. Social Sign In</strong></summary>
-
-Signing in requires you to set up one of two methods:
-
-- Email requires SMTP credentials (you'll set this up later on)
-- Sign-in with Google requires a Google auth client with these variables. [See the Supabase docs for instructions on how to set this up](https://supabase.com/docs/guides/auth/social-login/auth-google):
- - Set `Authorized JavaScript origins` to `https://api.carbon.dev`
- - Set `Authorized redirect URIs` to `https://api.carbon.dev/auth/v1/callback`
- - **About the two API URLs you'll see:** each worktree has its own scoped Supabase URL (`https://<worktree>.api.dev`) for app traffic, **and** there is one stable alias `https://api.carbon.dev` registered on whichever worktree is currently `up`. The stable alias exists only so OAuth callbacks have a single registered redirect URI — one Google Console entry covers every worktree. Day-to-day, your app talks to its worktree-scoped URL; only the OAuth callback hits the stable alias.
-- You should set environment variables like the following:
- - `SUPABASE_AUTH_EXTERNAL_GOOGLE_CLIENT_ID="******.apps.googleusercontent.com"`
- - `SUPABASE_AUTH_EXTERNAL_GOOGLE_CLIENT_SECRET="GOCSPX-****************"`
-
-</details>
-
-<details>
-<summary><strong>2. Supabase</strong></summary>
-
-Backend services run inside the per-worktree docker stack — `crbn up` boots them and writes everything you need into `.env.local` automatically:
-
-- `SUPABASE_URL` — portless alias (e.g. `https://local-dev.api.dev`)
-- `SUPABASE_ANON_KEY`, `SUPABASE_SERVICE_ROLE_KEY` — keys minted per-worktree from a random `SUPABASE_JWT_SECRET`
-- `SUPABASE_DB_URL` — direct Postgres URL on a dynamic port
-
-`.env.local` is generated; do not commit it or hand-edit values that came from `crbn up` (they are re-derived on each boot). Put genuine secrets (OAuth client IDs, Stripe keys, SMTP credentials) in `.env` only.
-
-Run `crbn status` at any time to see the live port assignment and the URLs portless is serving.
-
-</details>
-
-<details>
-<summary><strong>3. Redis (caching)</strong></summary>
-
-No setup needed for local dev — `crbn up` boots a shared Redis container and writes `REDIS_URL` into `.env.local` automatically (each worktree gets its own logical Redis DB). For self-hosted production, set `REDIS_URL` to any Redis-compatible endpoint (Upstash, AWS ElastiCache, etc.) in your prod environment.
-
-</details>
-
<details>
-<summary><strong>4. Posthog (analytics)</strong></summary>
-
-In Posthog go to `https://[region].posthog.com/project/[project-id]/settings/project-details` to find your Project ID and Project API key:
-
-- `POSTHOG_API_HOST=[https://[region].posthog.com]`
-- `POSTHOG_PROJECT_PUBLIC_KEY=[Project API Key starting 'phc*']`
-
-</details>
-
-<details>
-<summary><strong>5. Stripe (payments)</strong></summary>
-
-[Create a Stripe account](https://dashboard.stripe.com/login), add a `STRIPE_SECRET_KEY` from the Stripe `Settings > Developers` interface:
-
-- `STRIPE_SECRET_KEY="sk_test_*************"`
-
-</details>
-
-<details>
-<summary><strong>6. SMTP (email)</strong></summary>
-
-Transactional email (user invitations, email verification, onboarding) is sent over SMTP. Any provider works — Resend, Amazon SES, or your own relay:
-
-- `SMTP_HOST="smtp.example.com"`
-- `SMTP_PORT="587"` (465 uses implicit TLS, 587 uses STARTTLS)
-- `SMTP_USER="********"`
-- `SMTP_PASSWORD="********"`
-- `SMTP_FROM="Carbon <[email protected]>"`
-
-Leave them unset to disable email entirely — the apps boot and run fine without it.
-
-- `RESEND_API_KEY="re_**********"` (Optional — Resend marketing contacts; also a legacy SMTP fallback when `SMTP_*` is unset)
-- `RESEND_AUDIENCE_ID="*****"` (Optional — required for contact management in `packages/jobs`)
-
-</details>
-
-<br />
-
-Finally, boot the stack and the apps:
-
-```bash
-pnpm dev # equivalent to `crbn up` — picker lets you choose ERP/MES
-```
-
-`crbn up` prints a summary box with the live URLs once the stack is healthy. Defaults look like:
-
-| Surface | URL |
-| --------------- | -------------------------------------------------------------- |
-| ERP | `https://<worktree>.erp.dev` |
-| MES | `https://<worktree>.mes.dev` |
-| Supabase API | `https://<worktree>.api.dev` |
-| Supabase Studio | `https://<worktree>.studio.dev` |
-| Inngest | `https://<worktree>.inngest.dev` |
-| Mail (Inbucket) | `https://<worktree>.mail.dev` |
-| Postgres | `postgresql://postgres:postgres@localhost:<PORT_DB>/postgres` |
-
-`<worktree>` is derived from the branch name (e.g. `sid-local-dev` → `local-dev`). The main checkout drops the prefix and just uses `erp.dev`, `mes.dev`, etc. Ports for raw TCP services (Postgres, Inbucket, Inngest) are dynamic per-worktree — `crbn status` is the source of truth.
-
-Academy and starter still run on classic localhost ports via `pnpm dev:academy` / `pnpm dev:starter` (they are not part of the per-worktree stack).
-
-<br />
-
-## Logging In
-
-For local development you don't need email or OAuth configured. `crbn up` seeds a smoke-test user (`[email protected]`) and writes `[email protected]` into `.env.local` for you. When that bypass email is set, signing in with it skips the magic link and logs you straight into the ERP:
-
-1. Open the ERP at the URL from the `crbn up` summary (e.g. `https://<worktree>.erp.dev/login`).
-2. Type `[email protected]` into the email field.
-3. Click **Sign in with Email**.
-
-You'll land on the authenticated dashboard (`/x`) — no inbox check required. The same session cookie works for the MES app at `https://<worktree>.mes.dev`.
-
-> The bypass only applies to the exact address in `DEV_BYPASS_EMAIL` and only when that user is active — it's a dev convenience, not present in production. Any other email falls back to the normal magic-link / verification flow (which needs SMTP configured). To sign in as your own account instead, use the magic link and read it from the local mail catcher at `https://<worktree>.mail.dev`.
-
-<br />
-
-## Code Formatting
-
-This project uses [Biome](https://biomejs.dev/) for code formatting and linting. To set up automatic formatting on save in VS Code:
-
-1. Install the [Biome VS Code extension](https://marketplace.visualstudio.com/items?itemName=biomejs.biome)
-2. Add the following to your VS Code settings (`.vscode/settings.json` or global settings):
-
-```json
-"editor.codeActionsOnSave": {
- "source.organizeImports.biome": "explicit",
- "source.fixAll.biome": "explicit"
-},
-"editor.defaultFormatter": "biomejs.biome"
-```
-
-<br />
-
-## Commands
-
-| Command | Description |
-| ------------------------------ | ------------------------------------------------------------------ |
-| `pnpm dev` | Boot the stack + apps (`crbn up` picker) |
-| `pnpm run db:function:new <name>` | Add an edge function |
-| `pnpm run db:migrate:new <name>` | Add a database migration |
-| `pnpm run agent:new <name>` | Add an AI agent |
-| `pnpm run tool:new <name>` | Add an AI tool |
-| `crbn down` | Stop the stack (keeps volumes — data preserved) |
-| `crbn reset` | Wipe the stack and start clean (destroys Postgres volume + flushes the redis db for this worktree) |
-| `pnpm db:types` | Regenerate types → `packages/database/src/types.ts` + `functions/lib/types.ts` (normally `crbn up` does this after applying migrations) |
-| `pnpm generate:swagger` | Regenerate swagger → `packages/database/src/swagger-docs-schema.ts` |
-| `pnpm --filter <pkg> <cmd>` | Run a command against a single workspace, e.g. `pnpm --filter @carbon/react test` |
-
-### Restoring a production snapshot
+<summary><h3>Restoring a production snapshot</h3></summary>
To restore a production database snapshot locally, use `crbn restore`. It handles both plain-text `.backup` and custom-format `.dump` archives, drops and rebuilds the public schema, realigns internal sequences, resets storage metadata, then applies any migrations the backup predates and regenerates types.
-1. Export a backup from your production Supabase project (`pg_dump` or Supabase Dashboard → Database → Backups).
+1. Export a backup of your production database with `pg_dump`.
2. Run it from your worktree root:
```bash
@@ -469,98 +354,64 @@ To restore a production database snapshot locally, use `crbn restore`. It handle
The underlying script, `scripts/restore-database.sh`, can still be invoked directly — it takes the same options as environment variables (`SCRUB_EMAILS`, `ADMIN_EMAIL`, `ADMIN_PASSWORD`, `RESTORE_MODE`), but note it defaults to **not** scrubbing emails and leaves the trailing `pnpm db:migrate` / `pnpm db:types` to you.
-<br />
-
-## API
-
-The API documentation is located in the ERP app at `${ERP}/x/api/js/intro`. It is auto-generated based on changes to the database.
-
-There are two ways to use the API:
-
-1. From another codebase using a supabase client library — [JavaScript](https://supabase.com/docs/reference/javascript/introduction), [Flutter](https://supabase.com/docs/reference/dart/introduction), [Python](https://supabase.com/docs/reference/python/introduction), [C#](https://supabase.com/docs/reference/csharp/introduction), [Swift](https://supabase.com/docs/reference/swift/introduction), [Kotlin](https://supabase.com/docs/reference/kotlin/introduction)
-2. From within the codebase using our packages
-
-### From another codebase
-
-First, set up the necessary credentials in environment variables. For the example below:
-
-1. Navigate to settings in the ERP to generate an API key. Set this in `CARBON_API_KEY`.
-2. Get the Supabase URL to call (this is `SUPABASE_URL` in your `.env` if hosting locally, e.g. http://localhost:54321). Set this as `CARBON_API_URL`.
-3. Get the `SUPABASE_ANON_KEY` e.g. from your `.env` file. Set this as `CARBON_PUBLIC_KEY`.
+</details>
-If you're self-hosting you can also use the supabase service key instead of the public key for root access. In that case you don't need to include the `carbon-key` header.
+<br />
-```ts
-import { Database } from "@carbon/database";
-import { createClient } from "@supabase/supabase-js";
+## Commands
-const apiKey = process.env.CARBON_API_KEY;
-const apiUrl = process.env.CARBON_API_URL;
-const publicKey = process.env.CARBON_PUBLIC_KEY;
+| Command | Description |
+| ---------------------------------- | ------------------------------------------------------------ |
+| `pnpm dev` | Boot the stack and apps on localhost |
+| `pnpm db:migrate:new <name>` | Create a database migration |
+| `pnpm db:migrate` | Apply pending migrations |
+| `pnpm generate:types` | Regenerate database types after a migration |
+| `pnpm db:seed:dev -- --dataset <key>` | Seed a demo company |
+| `pnpm lint` / `pnpm test` | Biome lint / unit tests |
+| `pnpm exec turbo run typecheck --filter=<pkg>` | Typecheck one package |
+| `pnpm --filter <pkg> <cmd>` | Run a command in one workspace |
-const carbon = createClient<Database>(apiUrl, publicKey, {
- global: {
- headers: {
- "carbon-key": apiKey,
- },
- },
-});
+This project uses [Biome](https://biomejs.dev/) for formatting and linting; install the [VS Code extension](https://marketplace.visualstudio.com/items?itemName=biomejs.biome) for format-on-save.
-// returns items from the company associated with the api key
-const { data, error } = await carbon.from("item").select("*");
-```
+<br />
-### From the monorepo
+## Security
-```tsx
-import { getCarbonServiceRole } from "@carbon/auth/client.server";
-const carbon = getCarbonServiceRole();
+**Found a vulnerability?** Please email [[email protected]](mailto:[email protected]) instead of opening a public issue. We respond within 3 business days and credit reporters once a fix ships. The full policy is in [SECURITY.md](.github/SECURITY.md).
-// returns all items across companies
-const { data, error } = await carbon.from("item").select("*");
+Security is enforced by the database, not left to application code:
-// returns items from a specific company
-const companyId = "xyz";
-const { data, error } = await carbon
- .from("item")
- .select("*")
- .eq("companyId", companyId);
-```
+- **Tenant isolation in Postgres.** Every table is scoped to a company and guarded by row-level security, so a query can only see its own company's rows.
+- **Granular permissions.** Role-based access per module and action for employees, customers and suppliers, applied the same way in the app, the API and MCP.
+- **Scoped API keys.** Keys carry explicit permissions, are stored only as hashes and are rate limited per key.
+- **Sign-in.** Passkeys, SSO, and enforced two-factor authentication on the Business plan.
+- **Audit log.** A record of who changed what and when, on the Business plan.
+- **Your perimeter.** Self-host on a single server, in your own cloud account or fully air-gapped, for programs with ITAR or CMMC requirements.
<br />
-## Migration Notes
-
-<details>
-<summary><strong>Trigger.dev → Inngest</strong></summary>
-
-Background jobs have been migrated from [Trigger.dev](https://trigger.dev) to [Inngest](https://inngest.com). Key changes:
+## Contributing
-- **Job definitions** moved from `packages/jobs/trigger/` to `packages/jobs/src/inngest/functions/`
-- **Triggering jobs** from app code uses `trigger()` and `batchTrigger()` from `@carbon/jobs` instead of `tasks.trigger()` from `@trigger.dev/sdk`
-- **Inngest dev server** runs via `npx inngest-cli@latest dev -u http://localhost:3000/api/inngest`
-- **Environment variables**: `TRIGGER_SECRET_KEY`, `TRIGGER_API_URL`, and `TRIGGER_PROJECT_ID` are no longer needed. Set `INNGEST_EVENT_KEY` and `INNGEST_SIGNING_KEY` instead (not required for local dev).
+We welcome contributions of all sizes. Read [CONTRIBUTING.md](.github/CONTRIBUTING.md) to get started, and say hi in [Discord](https://discord.gg/yGUJWhNqzy). Good first issues are labelled [`good first issue`](https://github.com/crbnos/carbon/labels/good%20first%20issue).
-</details>
+<a href="https://github.com/crbnos/carbon/graphs/contributors">
+ <img src="https://contrib.rocks/image?repo=crbnos/carbon&max=100" alt="Contributors" />
+</a>
-<details>
-<summary><strong>Upstash → Local Redis</strong></summary>
+### Star history
-The caching layer (`@carbon/kv`) no longer depends on Upstash. A standard Redis instance is used instead. The `REDIS_URL` environment variable still applies, but you can point it at any Redis-compatible server (including a local Docker container).
-
-</details>
+<a href="https://star-history.com/#crbnos/carbon&Date">
+ <picture>
+ <source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/svg?repos=crbnos/carbon&type=Date&theme=dark" />
+ <img alt="Star history chart" src="https://api.star-history.com/svg?repos=crbnos/carbon&type=Date" />
+ </picture>
+</a>
-<details>
-<summary><strong>Supabase CLI → docker compose (<code>crbn</code>)</strong></summary>
-
-Local dev no longer relies on `supabase start` / `supabase stop`. The full backend stack (Postgres 15, GoTrue, Kong, Storage, Realtime, Studio, Inngest, Inbucket, edge-runtime) runs from `packages/dev/docker/docker-compose.dev.yml` under a per-worktree compose project (`carbon-<slug>`), managed by `crbn up` / `down` / `reset`. Ports are allocated dynamically per worktree so multiple branches can run side-by-side. Key changes:
+<br />
-- `pnpm db:start` / `db:stop` / `db:kill` / `db:build` are removed — use `crbn up` / `down` / `reset`.
-- `.env.local` is generated by `crbn up` (worktree-specific URLs, ports, JWT secret, anon/service keys). Genuine secrets stay in `.env`.
-- `pnpm db:migrate` now drives `supabase migration up --db-url $SUPABASE_DB_URL`; it falls back to the CLI's linked-project mode when `SUPABASE_DB_URL` is unset.
-- `pnpm db:types` generates types directly from `$SUPABASE_DB_URL` (no `supabase gen types --local`).
+## License
-</details>
+Carbon is open core. Everything in this repository is licensed under [AGPLv3](LICENSE), except the Enterprise files (`packages/ee` and any file whose name contains `.ee.`), which are under the [Carbon Commercial License](packages/ee/LICENSE). See [Licensing](https://docs.carbon.ms/docs/platform/licensing) for what that means in practice.
<br />