Skip to content

Repository files navigation

@majornutcracker/design-system

Agnostic design system for web and React Native. Monorepo powered by Yarn workspaces and Turborepo.

Packages

Package Description
@majornutcracker/design-system-core Framework-agnostic tokens and theme helpers
@majornutcracker/design-system-react React components
@majornutcracker/design-system-react-native React Native components

Requirements

Toolchain

  • Node >=20 (see .nvmrc, currently 22.23.1)
  • Yarn 1.22
  • Turborepo ^2.5 with Terminal UI ("ui": "tui" in turbo.json) for interactive dev/native tasks

Environment variables (Turbo pass-through)

Turbo forwards these from your shell to tasks (globalPassThroughEnv):

Variable Purpose
ANDROID_HOME Android SDK (required for dev:react-native:android)
ANDROID_SDK_ROOT Same as ANDROID_HOME (compatibility)
JAVA_HOME JDK 17 for Gradle
HOME User home
PATH Must include Java, Android SDK tools, and Node

Android tasks pass through the same set. iOS tasks pass through PATH only.

Configure SDK/JDK vars in .zshrc (or your shell profile) before running native commands via Turbo.

Gradle home: scripts/android.sh may set GRADLE_USER_HOME to repo-local gradle-home-local/ for an allowlisted OS username only (see docs/android-gradle.md). Optional; most contributors use default ~/.gradle.

Interactive tasks

These Turbo tasks run with "persistent": true and "interactive": true (Expo/Next need a real TTY):

  • dev — Next.js and Expo Metro
  • androidexpo run:android
  • iosexpo run:ios

Run them from a terminal (not a non-interactive runner). Turbo uses its TUI to attach stdin to the child process.

Scripts

yarn install
yarn build
yarn typecheck
yarn clean
yarn dev:react              # Next.js example on :3000
yarn dev:react-native       # Expo Metro (bare workflow)
yarn dev:react-native:prebuild  # Generate native ios/ android/ projects
yarn dev:react-native:android   # expo run:android
yarn dev:react-native:ios       # expo run:ios

Bare Expo workflow for example-react-native:

  1. yarn build — compile workspace packages
  2. yarn dev:react-native:prebuild — first time or after native config changes
  3. yarn dev:react-native:android or yarn dev:react-native:ios — native build + run
  4. yarn dev:react-native — Metro only (when native projects already exist)

Examples

App Stack Command
apps/example-react Next.js 15 yarn dev:react
apps/example-react-native Expo 57 + Router (bare) yarn dev:react-native / :prebuild / :android / :ios

Run yarn build first so workspace packages emit dist/ before starting the examples.

Structure

apps/
  example-react/
  example-react-native/
packages/
  core/
  react/
  react-native/

Contributing

See CONTRIBUTING.md for setup, Turbo, Prettier, git hooks, and a link to docs/versioning.md.

Docs

About

Majornutcracker's agnostic design system for web and React Native

Resources

Code of conduct

Contributing

Security policy

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages