How to Structure a Design System Monorepo

How to structure a design system monorepo

Project Source Code

Get the project source code below, and follow along with the lesson material.

Download Project Source Code

To set up the project on your local machine, please follow the directions provided in the README.md file. If you run into any issues with running the project source code, then feel free to reach out to the author in the course's Discord channel.

This lesson preview is part of the Build a Complete Company Design System course and can be unlocked immediately with a \newline Pro subscription or a single-time purchase. Already have access to this course? Log in here.

This video is available to students only
Unlock This Course

Get unlimited access to Build a Complete Company Design System, plus 70+ \newline books, guides and courses with the \newline Pro subscription.

Thumbnail for the \newline course Build a Complete Company Design System

So let's see now how we can architecture our mono repo so that it will be easy to work with and maintain. Here is an example of how our mono repo will look like. In the bottom we can see that we have Figma as our design truth and then we have three packages containing our mono repo. The first package is the foundation packets and if you remember from paste layering this is the kernel of our design system that will host of all of our design tokens. Then we have the component library which will of course host our react components and it will depend on the foundation packets to consume the design tokens. And the last packet that will help us develop and document our design system it is the storybook packets and to see how it will look like. This is a storybook. Here we have a simple button component. This is a simple react button component that consumes our design tokens. Here we have different colors and this is our typography. So let's move forward to start actually building our mono repo.