update claude

This commit is contained in:
songtianlun 2025-07-29 09:10:00 +08:00
parent 6a6f1e0454
commit 1d21411055

View File

@ -1,4 +1,71 @@
# 项目概况
# CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
## Development Commands
**Development server:**
```bash
npm run dev # Start development server on http://localhost:3000
```
**Build and deployment:**
```bash
npm run build # Build production application
npm run start # Start production server
npm run lint # Run ESLint for code quality checks
```
**Database operations:**
```bash
npx prisma generate # Generate Prisma client after schema changes
npx prisma db push # Push schema changes to database
npx prisma studio # Open Prisma Studio database GUI
```
## Architecture Overview
This is a **Next.js 15** application with **App Router** using:
- **Authentication**: Supabase Auth with custom UI components
- **Database**: PostgreSQL via Supabase with Prisma ORM
- **Styling**: TailwindCSS v4 with custom theme system
- **State Management**: React Context for auth and theme
- **File Storage**: Configured for Cloudflare R2 (images)
- **Deployment**: Configured for Vercel
### Key Architectural Decisions
1. **Authentication Flow**: Supabase handles auth, middleware manages sessions, useAuth hook provides client state
2. **Database Design**: Prisma schema defines relationships between Users, Prompts, Versions, Tags, Albums, and TestRuns
3. **Theme System**: Custom ThemeProvider with localStorage persistence and system preference detection
4. **Component Structure**: Reusable UI components in `/components/ui/`, layout components in `/components/layout/`
### Core Data Models
The application centers around these main entities:
- **User**: Profile information and authentication
- **Prompt**: AI prompts with versioning and organization features
- **PromptVersion**: Version control for prompt iterations
- **PromptTag**: Categorization system
- **PromptAlbum**: Collection/organization system
- **PromptTestRun**: Testing and validation results
### Environment Setup
Required environment variables:
- `NEXT_PUBLIC_SUPABASE_URL`
- `NEXT_PUBLIC_SUPABASE_ANON_KEY`
- `DATABASE_URL`
### Component Patterns
- Use `'use client'` directive for interactive components
- Theme-aware components should use TailwindCSS dark mode classes
- Authentication state accessed via `useAuth()` hook
- Navigation handled through the Header component with mobile responsiveness
## 项目概况
- Github: Prmbr
- Domain: prmbr.com
- Name: Prmbr - AI Prompt Studio