This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
pnpm dev # Start Next.js dev server (http://localhost:3000)
pnpm build # Build Next.js static export to out/
pnpm lint # Run ESLint
pnpm electron:dev # Compile electron/ → dist-electron/, then launch Electron (requires pnpm dev running)
pnpm electron:build # Full production build: next build + tsc + electron-builder → release/This is a Next.js 16 + Electron desktop app.
Two processes:
- Renderer (
src/): Next.js App Router UI, styled with Tailwind CSS v4. In dev, Electron loadshttp://localhost:3000. In production, loads static files fromout/. - Main process (
electron/): TypeScript compiled to CommonJS viaelectron/tsconfig.json, output todist-electron/. Entry point referenced inpackage.json#main.
Key paths:
src/app/— Next.js App Router pages/layoutselectron/main.ts— Electron main process (window creation, app lifecycle)electron/preload.ts— Preload script; usecontextBridge.exposeInMainWorld()here to expose Node APIs to the renderer safelydist-electron/— Compiled Electron main/preload JS (gitignore-able, generated bytsc)out/— Static Next.js export (generated bynext build)release/— Packaged distributable output fromelectron-builder
Path alias: @/* → src/*
Package manager: pnpm. Electron binary approved in pnpm-workspace.yaml via onlyBuiltDependencies.
Always use shadcn components first. Do not write custom CSS or raw HTML elements when a shadcn component exists.
- All 55 components are already installed in
src/components/ui/ - Style:
base-nova(uses@base-ui/reactprimitives under the hood, not Radix) - Tailwind CSS v4 with CSS variables — use semantic tokens (
bg-background,text-foreground,text-muted-foreground,border-border, etc.), never hardcode colors likebg-zinc-950 - Dark mode is always on —
<html class="dark">is set inlayout.tsx TooltipProvideris already wrapping the app inlayout.tsxsrc/lib/utils.ts—cn()utility for merging class names- Config:
components.jsonat project root
Component rules:
- Inputs →
<Input>from@/components/ui/input - Textareas →
<Textarea>from@/components/ui/textarea - Labels →
<Label>from@/components/ui/label - Modals/overlays →
<Dialog>from@/components/ui/dialog - Dividers →
<Separator>from@/components/ui/separator - Scrollable areas →
<ScrollArea>from@/components/ui/scroll-area - Status pills →
<Badge>from@/components/ui/badge - Icon buttons with hints → wrap in
<Tooltip>+<TooltipTrigger>+<TooltipContent> - Add new components (if missing) with:
pnpm dlx shadcn@latest add <component>