Skip to content

Commit 3140e95

Browse files
committed
Update tests and READMEs
1 parent b107bb2 commit 3140e95

6 files changed

Lines changed: 132 additions & 139 deletions

File tree

README.md

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
> **Production-ready Claude Code configurations for popular frameworks and tools**
1111
12-
🎉 **Version 1.0.0** - Production-ready with comprehensive testing and 126+ passing tests
12+
🎉 **Version 1.0.0** - Production-ready with comprehensive testing and 124 passing tests
1313
📦 **NPM Package** - Install with `npm install -g claude-config-composer` or use `npx`
1414

1515
## 🚨 **Breaking Changes for Existing Users**
@@ -23,14 +23,15 @@
2323

2424
## 🎯 Key Features
2525

26-
-**126+ Passing Tests** - Comprehensive test coverage
27-
-**7 Production Configurations** - Frameworks, UI libraries, databases, and tools
26+
-**124 Passing Tests** - Comprehensive test coverage
27+
-**8+ Production Configurations** - Frameworks, UI libraries, databases, MCP servers, and tools
2828
-**Intelligent Merging** - Combine multiple configs without conflicts
2929
-**Zero Dependencies** (runtime) - Lightweight and fast
3030
-**TypeScript** - Full type safety and modern development
3131
-**Git Integration** - Automatic .gitignore updates and backups
3232

3333
### Report Issues
34+
3435
Found a bug? Please report it at [GitHub Issues](https://github.com/Matt-Dionis/claude-code-configs/issues)
3536

3637
## 🎯 Two Ways to Use This Repository
@@ -91,25 +92,31 @@ cp configurations/frameworks/nextjs-15/CLAUDE.md your-project/
9192
**Available configurations:**
9293

9394
**Frameworks:**
95+
9496
- `nextjs-15` - Next.js 15 with App Router and React 19
9597

9698
**UI & Styling:**
99+
97100
- `shadcn` - shadcn/ui component library with Radix UI
98101
- `tailwindcss` - Utility-first CSS framework with responsive design
99102

100103
**Databases:**
104+
101105
- `drizzle` - Type-safe ORM with schema management and migrations
102106

103107
**Development Tools:**
108+
104109
- `vercel-ai-sdk` - Streaming AI applications with function calling
105110

106111
**MCP Servers (Complete Solutions):**
112+
107113
- `memory-mcp-server` - MCP server with vector search and persistence
108114
- `token-gated-mcp-server` - Token-gated MCP server using the [Radius MCP SDK](https://github.com/radiustechsystems/mcp-sdk)
109115

110116
## 📸 What Gets Generated - Before & After Example
111117

112118
### Before: Empty Project Directory
119+
113120
```
114121
your-nextjs-project/
115122
├── app/
@@ -119,14 +126,15 @@ your-nextjs-project/
119126
```
120127

121128
### After: Running `npx claude-config-composer nextjs-15 shadcn tailwindcss`
129+
122130
```
123131
your-nextjs-project/
124132
├── app/
125133
├── components/
126134
├── package.json
127135
├── next.config.js
136+
├── CLAUDE.md # ✨ Combined best practices from all configs
128137
└── .claude/ # ✨ Generated configuration
129-
├── CLAUDE.md # Combined best practices from all configs
130138
├── agents/
131139
│ ├── nextjs-app-router.md # Next.js routing expertise
132140
│ ├── component-builder.md # shadcn component patterns
@@ -141,12 +149,11 @@ your-nextjs-project/
141149
│ ├── format-code.sh # Auto-format on save
142150
│ ├── validate-components.sh # Component validation
143151
│ └── optimize-imports.sh # Import optimization
144-
├── settings.json # Merged permissions & env vars
145-
├── README.md # Setup instructions
146-
└── package.json # Dependencies tracking
152+
└── settings.json # Merged permissions & env vars
147153
```
148154

149-
### 🎯 Key Benefits of Generated Config:
155+
### 🎯 Key Benefits of Generated Config
156+
150157
- **40+ specialized agents** covering Next.js, shadcn, and Tailwind expertise
151158
- **Intelligent permission controls** tailored to your stack
152159
- **Automated workflows** via hooks for formatting, validation, and optimization

claude-config-composer/README.md

Lines changed: 81 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,35 @@
1-
# Claude Config Composer (Beta v1.0.0-beta.1)
1+
# Claude Config Composer v1.0.0
22

33
Generate custom Claude Code configurations for your exact tech stack.
44

5-
🚧 **Beta Release:** v1.0.0-beta.1 - Production-ready but not yet on NPM. Use local installation method below.
6-
📦 **NPM Package:** Coming in v1.0.0 with `npx` support!
5+
🎉 **Production Ready:** v1.0.0 - Full test coverage with 124 passing tests
6+
📦 **NPM Package:** Available with `npm install -g claude-config-composer` or use `npx`
77

8-
## 🚀 Quick Start (Current - Local Installation)
8+
## 🚀 Quick Start
9+
10+
### NPX (Recommended - No Installation Required)
11+
12+
```bash
13+
# In your project directory
14+
npx claude-config-composer nextjs-15 shadcn
15+
# Your .claude/ directory is created instantly
16+
```
17+
18+
### Global Installation
919

1020
```bash
11-
# One-time setup
21+
# Install globally
22+
npm install -g claude-config-composer
23+
24+
# Use anywhere
25+
cd /path/to/your/project
26+
claude-compose nextjs-15 shadcn
27+
```
28+
29+
### Local Development
30+
31+
```bash
32+
# Clone for development
1233
git clone https://github.com/Matt-Dionis/claude-code-configs.git
1334
cd claude-code-configs/claude-config-composer
1435
npm install && npm run build
@@ -18,79 +39,79 @@ cd /path/to/your/project
1839
node /path/to/claude-code-configs/claude-config-composer/dist/cli.js nextjs-15 shadcn
1940
```
2041

21-
## 🔜 Coming Soon: Zero Installation with NPX
22-
23-
Once published to npm, you'll be able to run without any installation:
24-
25-
```bash
26-
# In your project directory
27-
npx claude-config-composer nextjs-15 shadcn
28-
# Your .claude/ directory is created instantly
29-
```
30-
3142
## Common Stacks
3243

3344
```bash
34-
# Using the local installation path from above:
35-
COMPOSER=/path/to/claude-code-configs/claude-config-composer/dist/cli.js
36-
3745
# Next.js + shadcn/ui
38-
node $COMPOSER nextjs-15 shadcn
46+
npx claude-config-composer nextjs-15 shadcn
3947

40-
# Full-stack Next.js
41-
node $COMPOSER nextjs-15 shadcn prisma trpc typescript
48+
# Full-stack Next.js with database
49+
npx claude-config-composer nextjs-15 shadcn drizzle tailwindcss
4250

43-
# React + shadcn/ui
44-
node $COMPOSER react-19 shadcn tanstack typescript
51+
# Next.js with AI capabilities
52+
npx claude-config-composer nextjs-15 vercel-ai-sdk
53+
54+
# Next.js with MCP server
55+
npx claude-config-composer nextjs-15 memory-mcp-server
4556
```
4657

4758
## Features
4859

49-
**Zero installation** - Will use npx once published, leaving no trace
60+
**Zero installation** - Use npx without installing anything
5061
**Intelligent merging** - Combines configs without duplication
5162
**Automatic backups** - Preserves existing .claude/ configs
5263
**Git-friendly** - Auto-adds to .gitignore
53-
**Production ready** - Generated configs work immediately
54-
**Conflict detection** - Warns about incompatible configurations
55-
**Dependency resolution** - Automatically suggests required dependencies
64+
**Production ready** - 124 tests ensure reliability
65+
**TypeScript** - Full type safety throughout
66+
**Smart conflict resolution** - Handles overlapping configurations gracefully
5667

5768
## Advanced Usage
5869

5970
### Interactive Mode
71+
6072
```bash
6173
# Opens interactive selection UI
62-
node /path/to/claude-config-composer/dist/cli.js
74+
npx claude-config-composer
6375
```
6476

6577
### List Available Configs
78+
79+
```bash
80+
npx claude-config-composer list
81+
```
82+
83+
### Dry Run (Preview without creating files)
84+
6685
```bash
67-
node /path/to/claude-config-composer/dist/cli.js list
86+
npx claude-config-composer nextjs-15 shadcn --dry-run
6887
```
6988

70-
### Custom Output Directory
89+
### Validate Configuration
90+
7191
```bash
72-
node /path/to/claude-config-composer/dist/cli.js nextjs-15 shadcn --output .claude-custom
92+
npx claude-config-composer validate
7393
```
7494

7595
### Skip Backup/Gitignore
96+
7697
```bash
77-
node /path/to/claude-config-composer/dist/cli.js nextjs-15 shadcn --no-backup --no-gitignore
98+
npx claude-config-composer nextjs-15 shadcn --no-backup --no-gitignore
7899
```
79100

80101
## What Gets Generated
81102

82103
```
83-
.claude/
104+
your-project/
84105
├── CLAUDE.md # Combined documentation
85-
├── .claude/
86-
│ ├── settings.json # Merged settings
87-
│ ├── agents/ # Framework-specific agents
88-
│ ├── commands/ # Custom commands
89-
│ └── hooks/ # Development hooks
90-
├── README.md
91-
└── package.json
106+
└── .claude/
107+
├── settings.json # Merged settings
108+
├── agents/ # Framework-specific agents
109+
├── commands/ # Custom commands
110+
└── hooks/ # Development hooks
92111
```
93112

113+
**Note:** No README.md or package.json files are generated - only Claude Code configuration files.
114+
94115
---
95116

96117
## 🛠️ Development & Contributing
@@ -116,26 +137,36 @@ npm run dev nextjs-15 shadcn
116137

117138
### Frameworks
118139

119-
- **Next.js 15**: App Router, React 19, Server Components
120-
- **React 19**: Latest React with Server Components
140+
- **nextjs-15**: Next.js 15 with App Router, React 19, Server Components
121141

122142
### UI/Styling
123143

124-
- **shadcn/ui**: Radix UI + Tailwind components
125-
- **Tailwind CSS**: Utility-first CSS framework
144+
- **shadcn**: shadcn/ui with Radix UI + Tailwind components
145+
- **tailwindcss**: Tailwind CSS utility-first framework
126146

127147
### Tooling
128148

129-
- **TypeScript**: Type-safe development
130-
- **TanStack**: Query, Table, Router, Form
149+
- **vercel-ai-sdk**: Vercel AI SDK for building AI applications
150+
151+
### Databases
152+
153+
- **drizzle**: Drizzle ORM for TypeScript
154+
155+
### MCP Servers
131156

132-
### Database
157+
- **memory-mcp-server**: Memory/knowledge management MCP server
158+
- **token-gated-mcp-server**: Token-gated access MCP server
159+
- **simple-mcp-server**: Basic MCP server template
133160

134-
- **Prisma**: Modern ORM for Node.js
161+
## Test Coverage & CI
135162

136-
### API
163+
The project has comprehensive test coverage with 124 passing tests:
137164

138-
- **tRPC**: End-to-end typesafe APIs
165+
-**Unit Tests**: Core functionality testing
166+
-**Integration Tests**: End-to-end CLI testing
167+
-**Config Validation**: All configurations verified
168+
-**TypeScript**: Full type checking with no errors
169+
-**CI/CD**: GitHub Actions on Node 18.x and 20.x
139170

140171
## How It Works
141172

claude-config-composer/src/generator/config-generator.ts

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,8 @@ export class ConfigGenerator {
111111

112112
if (claudeMdConfigs.length > 0) {
113113
const mergedClaudeMd = this.configMerger.merge(claudeMdConfigs);
114-
const claudeMdPath = await PathValidator.createSafeFilePath('CLAUDE.md', '.', outputDir);
114+
// Write directly to outputDir without additional path validation since outputDir is already validated
115+
const claudeMdPath = path.join(outputDir, 'CLAUDE.md');
115116
await fs.writeFile(claudeMdPath, mergedClaudeMd);
116117
}
117118
if (spinner) spinner.succeed(steps[currentStep]);
@@ -128,11 +129,8 @@ export class ConfigGenerator {
128129
const agentName = typeof validatedAgent.name === 'string' ? validatedAgent.name : 'unknown';
129130
const filename = `${PathValidator.validateFilename(agentName.toLowerCase().replace(/[^a-z0-9-]/g, '-'))}.md`;
130131
const content = this.componentMerger.generateAgentFile(validatedAgent);
131-
const agentPath = await PathValidator.createSafeFilePath(
132-
filename,
133-
'.claude/agents',
134-
outputDir
135-
);
132+
// Write directly to agentsDir
133+
const agentPath = path.join(agentsDir, filename);
136134
await fs.writeFile(agentPath, content);
137135
}
138136
if (spinner) spinner.text = `${steps[currentStep]} (${mergedAgents.length} agents)`;
@@ -151,11 +149,8 @@ export class ConfigGenerator {
151149
typeof validatedCommand.name === 'string' ? validatedCommand.name : 'unknown';
152150
const filename = `${PathValidator.validateFilename(commandName.toLowerCase().replace(/[^a-z0-9-]/g, '-'))}.md`;
153151
const content = this.componentMerger.generateCommandFile(validatedCommand);
154-
const commandPath = await PathValidator.createSafeFilePath(
155-
filename,
156-
'.claude/commands',
157-
outputDir
158-
);
152+
// Write directly to commandsDir
153+
const commandPath = path.join(commandsDir, filename);
159154
await fs.writeFile(commandPath, content);
160155
}
161156
if (spinner) spinner.text = `${steps[currentStep]} (${mergedCommands.length} commands)`;
@@ -173,11 +168,8 @@ export class ConfigGenerator {
173168
const hookName =
174169
typeof validatedHook.name === 'string' ? validatedHook.name : 'unknown-hook';
175170
const hookContent = typeof validatedHook.content === 'string' ? validatedHook.content : '';
176-
const hookPath = await PathValidator.createSafeFilePath(
177-
hookName,
178-
'.claude/hooks',
179-
outputDir
180-
);
171+
// Write directly to hooksDir
172+
const hookPath = path.join(hooksDir, hookName);
181173
await fs.writeFile(hookPath, hookContent);
182174
}
183175
if (spinner) spinner.text = `${steps[currentStep]} (${mergedHooks.length} hooks)`;

claude-config-composer/tests/cli.test.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -97,17 +97,13 @@ describe('CLI Core Commands', () => {
9797

9898
// Check that files were created
9999
const claudeMd = await fs.readFile(path.join(testProjectDir, 'CLAUDE.md'), 'utf-8');
100-
const readmeMd = await fs.readFile(path.join(testProjectDir, 'README.md'), 'utf-8');
101-
const packageJson = await fs.readFile(path.join(testProjectDir, 'package.json'), 'utf-8');
102100
const settingsJson = await fs.readFile(
103101
path.join(testProjectDir, '.claude', 'settings.json'),
104102
'utf-8'
105103
);
106104

107105
expect(claudeMd).toContain('Next.js 15');
108106
expect(claudeMd).toContain('App Router');
109-
expect(readmeMd).toContain('Claude Code Configuration');
110-
expect(JSON.parse(packageJson)).toHaveProperty('name');
111107
expect(JSON.parse(settingsJson)).toHaveProperty('permissions');
112108

113109
// Check agents directory
@@ -236,7 +232,7 @@ describe('CLI Core Commands', () => {
236232
describe('error handling', () => {
237233
it('should show helpful error for unknown commands', () => {
238234
try {
239-
execSync(`node ${CLI_PATH} unknown-command 2>&1`, { encoding: 'utf-8', shell: true });
235+
execSync(`node ${CLI_PATH} unknown-command 2>&1`, { encoding: 'utf-8' });
240236
// Should not reach here - command should fail
241237
expect(true).toBe(false);
242238
} catch (error: any) {

0 commit comments

Comments
 (0)