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
@@ -4,19 +4,21 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
4
4
5
5
## Project Overview
6
6
7
-
Grill is a modern Solana development kit monorepo that provides React components and utilities for building Solana applications with automatic account batching and caching. It's built on top of gill-react and integrates with @solana/kit.
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 zero-config CLI that transforms Anchor IDLs into modern TypeScript clients with full type safety and ES modules support.
8
+
9
+
The monorepo contains:
10
+
-**Coda CLI** - The main tool for generating TypeScript clients from Anchor IDLs
11
+
-**Codama utilities** - Custom visitors and renderers for enhanced code generation
12
+
-**Generated clients** - Pre-built clients for popular Solana programs
8
13
9
14
## Technology Stack
10
15
11
-
-**Package Manager**: Bun (v1.2.19)
16
+
-**Package Manager**: Bun (v1.2.20)
12
17
-**Build System**: Turbo for monorepo orchestration
13
-
-**Framework**: React 19 with TypeScript
14
-
-**Solana**: @solana/kit, gill, gill-react
15
-
-**State Management**: @tanstack/react-query for caching
16
-
-**Routing**: @tanstack/react-router (in example-dapp)
17
-
-**Styling**: Tailwind CSS v4 with shadcn/ui components
18
+
-**Language**: TypeScript with ES modules
19
+
-**Code Generation**: Codama for AST transformations
18
20
-**Code Quality**: Biome for formatting, ESLint for linting
19
-
-**Testing**: Vitest
21
+
-**Testing**: Bun test runner
20
22
21
23
## Essential Commands
22
24
@@ -27,6 +29,11 @@ bun run build # Build all packages
27
29
bun run build:watch # Watch mode for all packages
28
30
bun run build:watch:packages # Watch mode for packages only
29
31
32
+
# Code Generation
33
+
bun run codegen # Run code generation for all clients
34
+
bunx coda generate # Generate client with Coda CLI
35
+
bunx coda init # Initialize coda.config.mjs
36
+
30
37
# Code Quality
31
38
bun run lint # Run biome check + eslint
32
39
bun run lint:fix # Fix linting issues
@@ -40,65 +47,76 @@ bun test # Run tests directly
40
47
bun run changeset # Create changeset for version bumps
41
48
bun run ci:publish # Publish packages to npm
42
49
43
-
# Example App Development
44
-
cd apps/example-dapp
45
-
bun run dev # Start Vite dev server
46
-
bun run build # Build the app
47
-
48
50
# IMPORTANT: After making code changes
49
51
bun run build # Build to check for TypeScript errors
50
52
bun run lint:fix # Fix linting and formatting issues
51
53
```
52
54
53
-
## Architecture
54
-
55
-
### Monorepo Structure
56
-
57
-
The project uses Bun workspaces with packages in two directories:
58
-
-`packages/*` - Core library packages
59
-
-`apps/*` - Example applications
60
-
61
-
### Core Packages
62
-
63
-
1.**@macalinao/grill** - Main package providing React context and hooks
64
-
-`GrillProvider`: Creates DataLoader for batching account requests with sonner toast notifications
65
-
-`GrillHeadlessProvider`: Headless version without UI features (for custom implementations)
66
-
-`WalletProvider`: Kit wallet integration context
67
-
-`useAccount`: Hook for fetching account data with batching
68
-
-`useKitWallet`: Access wallet signer and RPC
69
-
- Note: sonner is a required peer dependency for transaction toast notifications
70
-
71
-
2.**@macalinao/solana-batch-accounts-loader** - DataLoader implementation for batching Solana account fetches
72
-
73
-
3.**@macalinao/wallet-adapter-compat** - Compatibility layer between @solana/wallet-adapter and @solana/kit
55
+
## Repository Structure
74
56
75
-
4.**dataloader-es** - ES module compatible DataLoader implementation
76
-
77
-
### Provider Hierarchy
78
-
79
-
When using Grill, providers must be set up in this order:
0 commit comments