bunwind
is a minimal monorepo powered by Bun, Tailwind CSS v4, and Next.js using native npm workspaces.It demonstrates a clean setup for a shared UI package (
@bunwind/ui
) and a frontend app (@bunwind/web
), with a strong focus on modular design, styling with Tailwind v4, and modern TypeScript tooling.
This README is Step One in setting up the monorepo root.
README.md
ā Root-level setup and configurationpackages/ui/README.md
ā UI library setup (@bunwind/ui
)packages/web/README.md
ā Next.js app setup (@bunwind/web
)mkdir bunwind && cd bunwind && bun init -y
This command initializes a basic Bun project and generates:
bunwind/
āāā node_modules/
āāā .gitignore
āāā bun.lock
āāā index.ts
āāā package.json
āāā README.md
āāā tsconfig.json
rm index.ts
rm tsconfig.json
rm -rf node_modules
index.ts
: You are not building or running code from the root. Remove it.tsconfig.json
: You are not technically building or running code from the root. Remove it.node_modules/
: Bun installs type packages by default here (e.g. @types/bun
, typescript
, etc.). These are not used at the root and will be reinstalled properly in each workspace as needed.package.json
Open the file and edit it to look exactly like this:
{
"name": "bunwind",
"private": true,
"workspaces": ["packages/*"]
}
private: true
: Prevents accidental publishing of the monorepo root.workspaces
: Tells Bun to treat all subfolders inside packages/
as isolated workspace packages.main
, exports
, module
, dependencies
, or devDependencies
here.This is the minimal and correct monorepo root package.json
.
You do not need to install any packages at the root level.
Bun and TypeScript both support baseUrl
and paths
natively. No runtime or node modules are required at the root unless you later add tooling (like Biome, ESLint, Prettier, etc.). We will configure TypeScript properly inside each workspace where needed ā and those packages will install their own typescript
if required.
After following all steps, your root directory should look like this:
bunwind/
āāā .gitignore
āāā bun.lock
āāā package.json ā
Clean and minimal
āāā README.md ā
This file
From the root (this) directory run:
mkdir packages && cd packages && mkdir ui && cd ui && bun init -y
We continue with the next step in the packages/ui/README.md file