Skip to content

nayhoo/ui

Repository files navigation

🌴 Everything Front-End TypeScript monorepo for Nayhoo apps.

tests


Table of content

Setup

This repo uses pnpm:

# Install pnpm with your preferred method: https://pnpm.io/installation.
npm i -g pnpm

# Install all dependencies.
pnpm i

Packages vs apps

This repo contains two types of workspaces:

  • packages: meant to be published to npm and installed,
  • apps: meant to be executed.

A good example to illustrate the difference is vite: you wouldn't publish an app like this to npm, you would run it, more specifically you would build the JS bundle and then deploy that somewhere.

For packages, you don't want to bundle all the monorepo dependencies, and instead publish them individually. That's why packages have a separate build tsconfig.json that resolves monorepo dependencies to node_modules.

Packages

eslint-config

My personal ESLint config for TS projects.

See the package here.

hooks

A collection of React hooks.

See the package here.

prettier-config

My personal Prettier config for TS projects.

See the package here.

tsconfig

See the package here.

ui

A collection of React components, built with Radix Primitives, styled with vanilla-extract.

See the package here.

utils

A collection of utility functions.

See the package here.

Apps

next

Next.js 15 example using @nayhoo/ui.

See the full example here.

react-cosmos

@nayhoo/ui fixtures to develop and QA components.

See the full example here.

vite

Vite example using @nayhoo/ui.

See the full example here.

Credits

Thank you NiGhTTraX for the great TypeScript monorepo template.