You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CLAUDE.md
+49-23Lines changed: 49 additions & 23 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,6 +7,7 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
7
7
Coda is an automated client generation tool for Solana programs. Built on top of [Codama](https://github.com/codama-idl/codama), Coda provides a CLI that transforms Anchor IDLs into modern TypeScript clients with full type safety and ES modules support.
8
8
9
9
The monorepo contains:
10
+
10
11
-**Coda CLI** - The main tool for generating TypeScript clients from Anchor IDLs
11
12
-**Codama utilities** - Custom visitors and renderers for enhanced code generation
12
13
-**Generated clients** - Pre-built clients for popular Solana programs
@@ -71,27 +72,31 @@ coda/
71
72
## Core Packages
72
73
73
74
### 1. **@macalinao/coda** - CLI for client generation
74
-
- Works out of the box (looks for `./idls/*.json` by default)
75
-
- Configurable via `coda.config.mjs`
76
-
- Generates TypeScript clients with full type safety
77
-
- Built on Codama for extensibility
78
-
- Supports glob patterns for IDL discovery
75
+
76
+
- Works out of the box (looks for `./idls/*.json` by default)
77
+
- Configurable via `coda.config.mjs`
78
+
- Generates TypeScript clients with full type safety
When writing documentation for Coda or generated clients:
287
308
288
-
1.**Command Examples**:
309
+
1.**Command Examples**:
289
310
- Always show direct command usage: `coda generate`, not `bunx coda generate` or `npx coda`
290
311
- Assume users have installed the package globally or are using it directly
291
312
- Show the simplest path to success
@@ -318,6 +339,7 @@ When writing documentation for Coda or generated clients:
318
339
The `apps/docs/` folder contains the documentation site built with Fumadocs and Next.js 15. The structure follows the Fumadocs reference implementation in `vendor/fumadocs/apps/docs/`.
@@ -326,26 +348,30 @@ The `apps/docs/` folder contains the documentation site built with Fumadocs and
326
348
-**Linting**: Modern ESLint flat config (eslint.config.mjs)
327
349
328
350
### Development
351
+
329
352
```bash
330
353
cd apps/docs
331
354
bun run dev # Start dev server on localhost:3000
332
355
bun run build # Build for production
333
356
```
334
357
335
358
### Adding Documentation
359
+
336
360
1. Create MDX files in `apps/docs/content/docs/`
337
361
2. Update navigation in `meta.json` files if needed
338
362
3. Code blocks automatically get syntax highlighting
339
363
4. Use frontmatter for page metadata (title, description)
340
364
5.**Important**: Do NOT include `# Title` headers in MDX files - the title is already specified in the YAML frontmatter and will be rendered automatically
341
365
342
366
### Key Files
367
+
343
368
-`src/app/layout.config.tsx` - Site branding and navigation
344
369
-`source.config.ts` - MDX and syntax highlighting config
345
370
-`src/app/global.css` - Tailwind v4 imports with @source directives
346
371
-`content/docs/` - Documentation content in MDX
347
372
348
373
### MDX Writing Guidelines
374
+
349
375
-**No redundant headers**: Since the title is specified in YAML frontmatter, do NOT add `# Title` as the first line of content
350
376
- Start documentation content directly with the introduction paragraph or first section (`##`)
351
377
- The title from frontmatter will be automatically rendered by Fumadocs
0 commit comments