Files
template-sanity/README.md
2025-07-25 02:54:47 +02:00

105 lines
2.6 KiB
Markdown
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# ✨ Lumify Sanity Template
Official CLI and starter template for building modern web apps with Next.js, Sanity, Bun, and Shadcn UI — bundled into a single monorepo.
---
## 📦 What It Does
The `@lumify-systems/template-sanity` CLI sets up a fully functional monorepo with:
***Next.js App Router** for the frontend
* 📝 **Sanity Studio** CMS with custom schemas
* 🏗️ **TurboRepo** structure (client, studio, shared packages)
* 🎨 **Shadcn UI** components and theming pre-installed
* 🧪 Preconfigured dev tools (Tailwind, TypeScript, ESLint, Prettier)
---
## 🚀 How to Use
### Setup GitHub private NPM registry
Create a file called `.npmrc` in your home directory with the following content:
```
@lumify-systems:registry=https://npm.pkg.github.com/
//npm.pkg.github.com/:_authToken=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
```
You can now scaffold a new project using the CLI:
```bash
bunx @lumify-systems/template-sanity
```
Then follow the interactive prompts:
* Choose a project name
* Select a package manager (bun, npm, etc.)
* (Optionally) Provide a path to a favicon
After that:
* The CLI will create a Sanity project and prompt you to log in.
* It will open a GitHub repository creation screen in your browser.
* Once you confirm and hit **Enter** in the CLI again, it will push the entire project and complete setup automatically.
* You can edit your values anytime after setup in `packages/sanity-connection/index.ts`.
---
## 🗂️ Project Structure
```
apps/
client/ # Next.js frontend
studio/ # Sanity Studio CMS
packages/
ui/ # Shadcn components & design system
sanity-connection/ # Shared Sanity config and token
typescript-config/ # Shared TypeScript presets
```
All apps and packages are connected with TurboRepo workspaces.
You can run commands from the root:
```bash
bun run dev # Start client and studio in parallel
bun run build # Build all apps and packages
bun run deploy # Deploy the Sanity Studio
```
---
## 🧩 Shadcn UI
Shadcn UI is pre-installed and configured in `client` 
To add components run the following inside the client folder:
```bash
bunx shadcn-ui@latest add [component]
```
🔗 [ui.shadcn.dev](https://ui.shadcn.dev/docs/components)
🔗 [shadcnui-blocks.com](http://www.shadcnui-blocks.com)
🔗 [kokonutui.com](https://kokonutui.com)
🔗 [ui.aceternity.com](https://ui.aceternity.com)
🔗 [21st.dev](https://21st.dev)
---
## 🧠 Sanity Docs
Customize your Studio or learn more about Sanity at:
📘 [sanity.io/docs](https://www.sanity.io/docs)
---
Happy building with Lumify! 🚀