| title | Quickstart |
|---|
After scaffolding, your project looks like this:
my-app/
├── zenbu.config.ts # The only required config file
├── package.json
├── vite.config.ts
├── tsconfig.json
└── src/
├── main/
│ └── services/
│ ├── init.ts # Opens the main window on boot
│ └── cwd.ts # RPC service that returns process.cwd()
└── renderer/
├── index.html
├── main.tsx
└── App.tsx
The zenbu.config.ts file is the entry point. It tells Zenbu.js where everything in your project is.
import { defineConfig, definePlugin } from "@zenbujs/core/config"
export default defineConfig({
uiEntrypoint: "./src/renderer",
plugins: [
definePlugin({
name: "app",
services: ["./src/main/services/*.ts"],
}),
],
})Add a schema: "./src/main/schema.ts" field to the plugin when you're ready to introduce a database. The top-level db field is optional and defaults to ./.zenbu/db.
| Script | What it does |
|---|---|
pnpm run dev |
Run the app locally with hot reloading. |
pnpm run link |
Regenerate types after changing your project structure. |
pnpm run db:generate |
Create a migration after changing your database schema. |
pnpm run build:source |
Stage the source tree for publishing. |
pnpm run build:electron |
Produce a signed .app / installer. |