Skip to content

Clean and typesafe starter monorepo using Turborepo along with Next.js and tRPC

License

Notifications You must be signed in to change notification settings

tiesen243/create-yuki-turbo

Repository files navigation

Create Yuki Turbo

Clean and typesafe starter monorepo using Turborepo along with Next.js and tRPC.

About

This is a template for creating a new application with monorepo structure using Turborepo and contains:

apps
  └─ web
      ├─ Next.js 14
      ├─ React 18
      ├─ Tailwind CSS
      └─ E2E Typesafe API Server & Client
packages
  ├─ api
  |   └─ tRPC v11 router definition
  ├─ auth
  |   └─ Authentication using Lucia & Arctic
  ├─ db
  |   └─ Typesafe db calls using Prisma
  └─ ui
      └─ Start of a UI package for the webapp using shadcn-ui
tooling
  ├─ eslint
  |   └─ shared, fine-grained, eslint presets
  ├─ prettier
  |   └─ shared prettier configuration
  ├─ tailwind
  |   └─ shared tailwind configuration
  └─ typescript
      └─ shared tsconfig you can extend from

In this template, we use @yuki as a placeholder for package names. As a user, you might want to replace it with your own organization or project name. You can use find-and-replace to change all the instances of @yuki to something like @my-company or @project-name.

Installation

npx create-turbo@latest -e https://github.com/tiesen243/create-yuki-turbo

Quick Start

  1. Setup the project:
# Install dependencies
bun install

# Configure environment variables
cp .env.example .env
  1. When you want to add a new UI component:

Run the ui-add script to add a new UI component using the interactive shadcn/ui CLI:

bun ui-add
  1. When you want to add a new package:

Run the following command to add a new package:

bun turbo gen init

The generator sets up the package.json, tsconfig.json and a index.ts, as well as configures all the necessary configurations for tooling around your package such as formatting, linting and typechecking. When the package is created, you're ready to go build out the package.

  1. To update all packages in the monorepo:
sudo chmod -x ./update-packages.sh
./update-packages.sh

License

This project is licensed under the MIT License - see the LICENSE file for details.

yuki

About

Clean and typesafe starter monorepo using Turborepo along with Next.js and tRPC

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published