Skip to content

Commit dc8d49b

Browse files
authored
Merge pull request #997 from f/claude/update-claude-md-PZz4h
Create or update CLAUDE.MD file
2 parents 89a5424 + 69f6e65 commit dc8d49b

File tree

1 file changed

+70
-0
lines changed

1 file changed

+70
-0
lines changed

CLAUDE.md

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
# CLAUDE.md
2+
3+
> Quick reference for Claude Code when working on prompts.chat
4+
5+
## Project Overview
6+
7+
**prompts.chat** is a social platform for AI prompts built with Next.js 16 App Router, React 19, TypeScript, and PostgreSQL/Prisma. It allows users to share, discover, and collect prompts.
8+
9+
For detailed agent guidelines, see [AGENTS.md](AGENTS.md).
10+
11+
## Quick Commands
12+
13+
```bash
14+
# Development
15+
npm run dev # Start dev server at localhost:3000
16+
npm run build # Production build (runs prisma generate)
17+
npm run lint # Run ESLint
18+
19+
# Database
20+
npm run db:migrate # Run Prisma migrations
21+
npm run db:push # Push schema changes
22+
npm run db:studio # Open Prisma Studio
23+
npm run db:seed # Seed database
24+
25+
# Type checking
26+
npx tsc --noEmit # Check TypeScript types
27+
```
28+
29+
## Key Files
30+
31+
| File | Purpose |
32+
|------|---------|
33+
| `prompts.config.ts` | Main app configuration (branding, theme, auth, features) |
34+
| `prisma/schema.prisma` | Database schema |
35+
| `src/lib/auth/index.ts` | NextAuth configuration |
36+
| `src/lib/db.ts` | Prisma client singleton |
37+
| `messages/*.json` | i18n translation files |
38+
39+
## Project Structure
40+
41+
```
42+
src/
43+
├── app/ # Next.js App Router pages
44+
│ ├── (auth)/ # Login, register
45+
│ ├── api/ # API routes
46+
│ ├── prompts/ # Prompt CRUD pages
47+
│ └── admin/ # Admin dashboard
48+
├── components/ # React components
49+
│ ├── ui/ # shadcn/ui base components
50+
│ └── prompts/ # Prompt-related components
51+
└── lib/ # Utilities and config
52+
├── ai/ # OpenAI integration
53+
├── auth/ # NextAuth setup
54+
└── plugins/ # Auth and storage plugins
55+
```
56+
57+
## Code Patterns
58+
59+
- **Server Components** by default, `"use client"` only when needed
60+
- **Translations:** Use `useTranslations()` or `getTranslations()` from next-intl
61+
- **Styling:** Tailwind CSS with `cn()` utility for conditional classes
62+
- **Forms:** React Hook Form + Zod validation
63+
- **Database:** Prisma client from `@/lib/db`
64+
65+
## Before Committing
66+
67+
1. Run `npm run lint` to check for issues
68+
2. Add translations for any user-facing text
69+
3. Use existing UI components from `src/components/ui/`
70+
4. Never commit secrets (use `.env`)

0 commit comments

Comments
 (0)