feat: add base claudemd

This commit is contained in:
Edqe14 2026-05-14 19:57:06 +07:00
parent 5776146c50
commit 7af75b6bb6
Signed by: yukabi
GPG key ID: A1AAC4DC1157D70D
2 changed files with 38 additions and 0 deletions

1
.gitignore vendored
View file

@ -11,3 +11,4 @@ dist-ssr
.vinxi
__unconfig*
todos.json
.playground

37
CLAUDE.md Normal file
View file

@ -0,0 +1,37 @@
# CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
## Commands
```bash
bun --bun run dev # start dev server on :3000
bun --bun run build # production build
bun --bun run test # run vitest
bun --bun run lint # eslint
bun --bun run format # prettier + eslint --fix
bun --bun run check # prettier check only
bun --bun run db:generate # generate drizzle migration
bun --bun run db:migrate # run migrations
bun --bun run db:push # push schema changes (no migration file)
bun --bun run db:studio # open drizzle studio
```
Run a single test file: `bun --bun run test src/path/to/file.test.ts`
Add shadcn components: `pnpm dlx shadcn@latest add <component>` (uses pnpm, not bun)
## Architecture
**Stack:** TanStack Start (SSR) + TanStack Router (file-based) + Drizzle ORM + PostgreSQL + Tailwind CSS v4 + shadcn/ui + Nitro (server adapter) + Vite
**Path alias:** `#/*` → `./src/*` (e.g. `import { cn } from '#/lib/utils'`)
**Routing** — file-based under `src/routes/`. `routeTree.gen.ts` is auto-generated by the router plugin on dev/build — never edit it manually. Root layout and shell HTML live in `src/routes/__root.tsx` via `shellComponent`.
**Server functions** — use `createServerFn` from `@tanstack/react-start` for server-side logic callable from client components. Route loaders run server-side automatically.
**Database** — singleton `db` exported from `src/db/index.ts`, schema defined in `src/db/schema.ts`, migrations output to `./drizzle/`. DB credentials read from `DATABASE_URL` in `.env.local` (takes priority) or `.env`.
**UI components** — shadcn "new-york" style, zinc base color, CSS variables enabled. Components install to `#/components/ui`. Use `cn()` from `#/lib/utils` for className merging.