Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Papermark Dev Guide

## Build & Run Commands
- `npm run dev` - Start development server
- `npm run build` - Build for production
- `npm run lint` - Run ESLint
- `npm run format` - Format code with Prettier
- `npm run dev:prisma` - Generate Prisma client and run migrations
- `npm run email` - Start email preview server (port 3001)
- `npm run trigger:v3:dev` - Run Trigger.dev locally

## Code Style
- **Formatting**: Use Prettier with 2-space indentation, double quotes
- **Imports**: Order - next, react, third-party, components, lib, styles, relative
- **TypeScript**: Strict mode, prefer explicit types over `any`
- **Components**: Use functional components with proper props typing
- **Naming**: PascalCase for components, camelCase for variables/functions
- **Error Handling**: Use try/catch for async operations, avoid uncaught rejections
- **State Management**: Prefer SWR for data fetching with proper error handling
- **CSS**: Use Tailwind CSS utility classes, prefer composition over custom classes

## Project Structure
- `/app`: Next.js App Router components and routes
- `/components`: Reusable UI components
- `/lib`: Utility functions and business logic
- `/pages`: Next.js Pages Router (legacy)
- `/prisma`: Database schema and migrations
4 changes: 4 additions & 0 deletions components/theme-toggle.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ export function ModeToggle() {
<Moon className="mr-2 h-4 w-4" />
Dark
</DropdownMenuRadioItem>
<DropdownMenuRadioItem value="seed-theme">
<div className="mr-2 h-4 w-4 rounded-full bg-[#b25447]" />
Seed to Scale
</DropdownMenuRadioItem>
<DropdownMenuRadioItem value="system">
<Monitor className="mr-2 h-4 w-4" />
System
Expand Down
1 change: 1 addition & 0 deletions lib/files/aws-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ export const getS3Client = () => {
),
}
: undefined,
forcePathStyle: true,
});
};

Expand Down
2 changes: 1 addition & 1 deletion pages/_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export default function App({
</Head>
<SessionProvider session={session}>
<PostHogCustomProvider>
<ThemeProvider attribute="class" defaultTheme="light" enableSystem>
<ThemeProvider attribute="class" defaultTheme="light" enableSystem themes={["light", "dark", "seed-theme"]}>
<PlausibleProvider
domain="papermark.io"
enabled={process.env.NEXT_PUBLIC_VERCEL_ENV === "production"}
Expand Down
Loading