gl-life-claude-zen 1.0.3 → 1.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +255 -0
- package/README.md +166 -0
- package/bin/create-gl-life-claude.js +56 -1
- package/dist/hooks/auto-format.js +1 -1
- package/dist/hooks/complete-task.js +1 -1
- package/dist/hooks/enforce-migration-workflow.js +1 -1
- package/dist/hooks/enforce-structured-development.js +1 -1
- package/dist/hooks/enforce-test-pyramid.js +1 -1
- package/dist/hooks/init-task-tracker.js +1 -1
- package/dist/hooks/start-task.js +1 -1
- package/dist/hooks/task-status.js +1 -1
- package/dist/hooks/validate-database-changes.js +1 -1
- package/dist/hooks/validate-e2e-coverage.js +1 -1
- package/dist/hooks/validate-git-workflow.js +1 -1
- package/dist/hooks/validate-integration-site.js +2 -0
- package/dist/hooks/validate-migration-impact.js +1 -1
- package/dist/hooks/validate-task-completion.js +1 -1
- package/dist/hooks/validate-test-quality.js +1 -1
- package/dist/hooks/validate-test-results.js +1 -1
- package/dist/hooks/validate-ui-integration.js +1 -1
- package/dist/scripts/help.js +1 -1
- package/dist/scripts/plan-amend.js +1 -1
- package/dist/scripts/plan-create.js +1 -1
- package/dist/scripts/plan-help.js +1 -1
- package/dist/scripts/plan-init.js +1 -1
- package/dist/scripts/plan-manager.js +1 -1
- package/dist/scripts/setup-git-hooks.js +1 -1
- package/dist/scripts/task-done.js +1 -1
- package/dist/scripts/task-merge.js +1 -1
- package/dist/scripts/task-next.js +1 -1
- package/dist/scripts/task-start.js +1 -1
- package/dist/scripts/task-status.js +1 -1
- package/lib/init.js +13 -5
- package/package.json +7 -2
- package/templates/.claude/CLAUDE.md +196 -0
- package/templates/.claude/settings.json +40 -0
- package/templates/.gitignore +14 -0
- package/templates/README.md +4 -0
- package/templates/test-site/README.md +271 -0
- package/templates/test-site/index.html +13 -0
- package/templates/test-site/package.json +25 -0
- package/templates/test-site/server.js +125 -0
- package/templates/test-site/src/App.css +130 -0
- package/templates/test-site/src/App.jsx +78 -0
- package/templates/test-site/src/index.css +39 -0
- package/templates/test-site/src/main.jsx +10 -0
- package/templates/test-site/vite.config.js +12 -0
|
@@ -0,0 +1,271 @@
|
|
|
1
|
+
# Integration Test Website
|
|
2
|
+
|
|
3
|
+
A lightweight, hot-reloading test site for stakeholder validation of UI components before production deployment.
|
|
4
|
+
|
|
5
|
+
## Purpose
|
|
6
|
+
|
|
7
|
+
This test site allows stakeholders to:
|
|
8
|
+
- Preview UI components in isolation
|
|
9
|
+
- Interact with components using realistic data
|
|
10
|
+
- Validate behavior before production deployment
|
|
11
|
+
- Test responsiveness across devices
|
|
12
|
+
- Approve visual design and UX flows
|
|
13
|
+
|
|
14
|
+
## Quick Start
|
|
15
|
+
|
|
16
|
+
### 1. Install Dependencies
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
cd test-site
|
|
20
|
+
npm install
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
### 2. Run Development Server
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
npm run dev
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
The server will automatically allocate a port (default: 3000-3009 range) and display the URL.
|
|
30
|
+
|
|
31
|
+
**Port Management Features:**
|
|
32
|
+
- **Fixed Port Allocation**: Uses port 3000 by default, with automatic fallback to 3001-3009 if occupied
|
|
33
|
+
- **Auto-Cleanup**: Automatically kills stale processes on the assigned port before starting
|
|
34
|
+
- **Port Reuse**: Consistently uses the same port for a stable development experience
|
|
35
|
+
- **Conflict Resolution**: Automatically finds an available port if the preferred port is in use
|
|
36
|
+
|
|
37
|
+
Open the displayed URL (typically [http://localhost:3000](http://localhost:3000)) to view the test site.
|
|
38
|
+
|
|
39
|
+
### 3. Add Your Components
|
|
40
|
+
|
|
41
|
+
Edit `src/App.jsx` to import and render your components:
|
|
42
|
+
|
|
43
|
+
```jsx
|
|
44
|
+
// Import your component
|
|
45
|
+
import { Button } from '../Agent/src/components/Button'
|
|
46
|
+
|
|
47
|
+
function App() {
|
|
48
|
+
return (
|
|
49
|
+
<div className="demo-section">
|
|
50
|
+
<h2>Button Component Demo</h2>
|
|
51
|
+
<Button onClick={() => alert('Clicked!')}>
|
|
52
|
+
Click Me
|
|
53
|
+
</Button>
|
|
54
|
+
</div>
|
|
55
|
+
)
|
|
56
|
+
}
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
## Available Scripts
|
|
60
|
+
|
|
61
|
+
### `npm run dev`
|
|
62
|
+
Starts the development server with:
|
|
63
|
+
- **Port management**: Auto-allocates port from 3000-3009 range
|
|
64
|
+
- **Hot reload**: Instant updates when you save files
|
|
65
|
+
- **Auto-cleanup**: Kills stale processes before starting
|
|
66
|
+
- **Graceful shutdown**: Releases port on Ctrl+C
|
|
67
|
+
|
|
68
|
+
### `npm run dev:simple`
|
|
69
|
+
Starts Vite server without port management (uses default Vite behavior).
|
|
70
|
+
|
|
71
|
+
### `npm run build`
|
|
72
|
+
Builds the site for production to the `dist/` folder.
|
|
73
|
+
|
|
74
|
+
### `npm run preview`
|
|
75
|
+
Preview the production build locally before deploying.
|
|
76
|
+
|
|
77
|
+
### `npm run deploy`
|
|
78
|
+
Builds and deploys the site to GitHub Pages.
|
|
79
|
+
|
|
80
|
+
## Deployment to GitHub Pages
|
|
81
|
+
|
|
82
|
+
### First-time Setup
|
|
83
|
+
|
|
84
|
+
1. Create a GitHub repository for your project (if not already done)
|
|
85
|
+
2. Enable GitHub Pages in repository settings:
|
|
86
|
+
- Go to Settings → Pages
|
|
87
|
+
- Source: Deploy from a branch
|
|
88
|
+
- Branch: Select `gh-pages` branch
|
|
89
|
+
- Click Save
|
|
90
|
+
|
|
91
|
+
### Deploy Updates
|
|
92
|
+
|
|
93
|
+
```bash
|
|
94
|
+
npm run deploy
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
This will build the site and push it to the `gh-pages` branch automatically.
|
|
98
|
+
|
|
99
|
+
Your test site will be available at:
|
|
100
|
+
```
|
|
101
|
+
https://<your-username>.github.io/<repo-name>/
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
## Sharing with Stakeholders
|
|
105
|
+
|
|
106
|
+
### Option 1: GitHub Pages (Recommended)
|
|
107
|
+
Deploy to GitHub Pages and share the URL. Updates are instant when you run `npm run deploy`.
|
|
108
|
+
|
|
109
|
+
### Option 2: Local Network
|
|
110
|
+
Run `npm run dev` and share your local IP address (find with `ipconfig` on Windows or `ifconfig` on Mac/Linux):
|
|
111
|
+
```
|
|
112
|
+
http://192.168.1.XXX:3000
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
### Option 3: Tunneling Service
|
|
116
|
+
Use a service like ngrok to create a public URL for your local server:
|
|
117
|
+
```bash
|
|
118
|
+
npx ngrok http 3000
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
## Framework Support
|
|
122
|
+
|
|
123
|
+
### React (Default)
|
|
124
|
+
The template uses Vite + React with hot reload. No additional setup needed.
|
|
125
|
+
|
|
126
|
+
### Vue
|
|
127
|
+
To use Vue instead of React:
|
|
128
|
+
|
|
129
|
+
1. Replace dependencies in `package.json`:
|
|
130
|
+
```json
|
|
131
|
+
{
|
|
132
|
+
"dependencies": {
|
|
133
|
+
"vue": "^3.3.4"
|
|
134
|
+
},
|
|
135
|
+
"devDependencies": {
|
|
136
|
+
"@vitejs/plugin-vue": "^4.5.0",
|
|
137
|
+
"vite": "^5.0.8"
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
2. Update `vite.config.js`:
|
|
143
|
+
```js
|
|
144
|
+
import { defineConfig } from 'vite'
|
|
145
|
+
import vue from '@vitejs/plugin-vue'
|
|
146
|
+
|
|
147
|
+
export default defineConfig({
|
|
148
|
+
plugins: [vue()],
|
|
149
|
+
// ...rest of config
|
|
150
|
+
})
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
3. Rename `src/main.jsx` → `src/main.js` and update content:
|
|
154
|
+
```js
|
|
155
|
+
import { createApp } from 'vue'
|
|
156
|
+
import App from './App.vue'
|
|
157
|
+
import './index.css'
|
|
158
|
+
|
|
159
|
+
createApp(App).mount('#app')
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
### Svelte
|
|
163
|
+
To use Svelte:
|
|
164
|
+
|
|
165
|
+
1. Replace dependencies in `package.json`:
|
|
166
|
+
```json
|
|
167
|
+
{
|
|
168
|
+
"devDependencies": {
|
|
169
|
+
"@sveltejs/vite-plugin-svelte": "^3.0.0",
|
|
170
|
+
"svelte": "^4.2.8",
|
|
171
|
+
"vite": "^5.0.8"
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
2. Update `vite.config.js`:
|
|
177
|
+
```js
|
|
178
|
+
import { defineConfig } from 'vite'
|
|
179
|
+
import { svelte } from '@sveltejs/vite-plugin-svelte'
|
|
180
|
+
|
|
181
|
+
export default defineConfig({
|
|
182
|
+
plugins: [svelte()],
|
|
183
|
+
// ...rest of config
|
|
184
|
+
})
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
3. Rename files to `.svelte` and update imports.
|
|
188
|
+
|
|
189
|
+
## Best Practices
|
|
190
|
+
|
|
191
|
+
### 1. Use Realistic Data
|
|
192
|
+
Don't use placeholder text. Use realistic data that stakeholders will recognize:
|
|
193
|
+
```jsx
|
|
194
|
+
<UserCard
|
|
195
|
+
name="John Smith"
|
|
196
|
+
email="john.smith@company.com"
|
|
197
|
+
role="Product Manager"
|
|
198
|
+
/>
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
### 2. Show Multiple States
|
|
202
|
+
Demonstrate different component states:
|
|
203
|
+
```jsx
|
|
204
|
+
<Button variant="primary">Primary</Button>
|
|
205
|
+
<Button variant="secondary">Secondary</Button>
|
|
206
|
+
<Button disabled>Disabled</Button>
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
### 3. Test Edge Cases
|
|
210
|
+
Show how components handle edge cases:
|
|
211
|
+
```jsx
|
|
212
|
+
<UserName name="Really Long Name That Might Wrap" />
|
|
213
|
+
<UserName name="" /> {/* Empty state */}
|
|
214
|
+
<ErrorMessage>Something went wrong!</ErrorMessage>
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
### 4. Group by Feature
|
|
218
|
+
Organize components by feature or user flow:
|
|
219
|
+
```jsx
|
|
220
|
+
<section className="login-flow">
|
|
221
|
+
<h2>Login Flow</h2>
|
|
222
|
+
<LoginForm />
|
|
223
|
+
<ForgotPassword />
|
|
224
|
+
<SignUpLink />
|
|
225
|
+
</section>
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
### 5. Add Annotations
|
|
229
|
+
Explain what stakeholders should validate:
|
|
230
|
+
```jsx
|
|
231
|
+
<div className="demo-section">
|
|
232
|
+
<h2>Shopping Cart</h2>
|
|
233
|
+
<p><strong>Validation Points:</strong></p>
|
|
234
|
+
<ul>
|
|
235
|
+
<li>Items can be added/removed</li>
|
|
236
|
+
<li>Quantity updates recalculate total</li>
|
|
237
|
+
<li>Discount codes apply correctly</li>
|
|
238
|
+
</ul>
|
|
239
|
+
<ShoppingCart items={mockCartItems} />
|
|
240
|
+
</div>
|
|
241
|
+
```
|
|
242
|
+
|
|
243
|
+
## Troubleshooting
|
|
244
|
+
|
|
245
|
+
### Components Not Found
|
|
246
|
+
If your components can't be imported:
|
|
247
|
+
- Check the import path is correct relative to `test-site/src/`
|
|
248
|
+
- Ensure components are exported properly
|
|
249
|
+
- Verify file extensions match (.jsx, .tsx, etc.)
|
|
250
|
+
|
|
251
|
+
### Styles Not Working
|
|
252
|
+
- Import component CSS files alongside components
|
|
253
|
+
- Check that Tailwind/styled-components are configured if used
|
|
254
|
+
- Verify CSS module naming conventions
|
|
255
|
+
|
|
256
|
+
### Hot Reload Issues
|
|
257
|
+
- Save files to trigger reload
|
|
258
|
+
- Check terminal for build errors
|
|
259
|
+
- Restart dev server: `Ctrl+C` then `npm run dev`
|
|
260
|
+
|
|
261
|
+
## Tips for Stakeholder Review
|
|
262
|
+
|
|
263
|
+
1. **Schedule a live demo session** - Walk through components together
|
|
264
|
+
2. **Record a video** - Show interactions and flows
|
|
265
|
+
3. **Create a checklist** - What needs approval on each component
|
|
266
|
+
4. **Collect feedback** - Add a feedback form or use GitHub Issues
|
|
267
|
+
5. **Version deployments** - Use git tags to track approved versions
|
|
268
|
+
|
|
269
|
+
## License
|
|
270
|
+
|
|
271
|
+
This template is part of the gl-life-claude-zen package and follows the same license as the parent project.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8" />
|
|
5
|
+
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
|
|
6
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
7
|
+
<title>Integration Test Site - Component Preview</title>
|
|
8
|
+
</head>
|
|
9
|
+
<body>
|
|
10
|
+
<div id="root"></div>
|
|
11
|
+
<script type="module" src="/src/main.jsx"></script>
|
|
12
|
+
</body>
|
|
13
|
+
</html>
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "integration-test-site",
|
|
3
|
+
"private": true,
|
|
4
|
+
"version": "1.0.0",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"description": "Integration test website for stakeholder validation of UI components",
|
|
7
|
+
"scripts": {
|
|
8
|
+
"dev": "node server.js",
|
|
9
|
+
"dev:simple": "vite",
|
|
10
|
+
"build": "vite build",
|
|
11
|
+
"preview": "vite preview",
|
|
12
|
+
"deploy": "npm run build && npx gh-pages -d dist"
|
|
13
|
+
},
|
|
14
|
+
"dependencies": {
|
|
15
|
+
"react": "^18.2.0",
|
|
16
|
+
"react-dom": "^18.2.0"
|
|
17
|
+
},
|
|
18
|
+
"devDependencies": {
|
|
19
|
+
"@types/react": "^18.2.43",
|
|
20
|
+
"@types/react-dom": "^18.2.17",
|
|
21
|
+
"@vitejs/plugin-react": "^4.2.1",
|
|
22
|
+
"gh-pages": "^6.1.1",
|
|
23
|
+
"vite": "^5.0.8"
|
|
24
|
+
}
|
|
25
|
+
}
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Test site development server with port management
|
|
5
|
+
*
|
|
6
|
+
* Features:
|
|
7
|
+
* - Uses PortManager for fixed port allocation (3000-3009 range)
|
|
8
|
+
* - Auto-cleanup of stale processes on restart
|
|
9
|
+
* - Port reuse for consistent URLs
|
|
10
|
+
* - Graceful shutdown handling
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
import { spawn } from 'child_process';
|
|
14
|
+
import { fileURLToPath } from 'url';
|
|
15
|
+
import { dirname, join } from 'path';
|
|
16
|
+
import { readFileSync, existsSync } from 'fs';
|
|
17
|
+
|
|
18
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
19
|
+
const __dirname = dirname(__filename);
|
|
20
|
+
|
|
21
|
+
// Try to load PortManager from parent project
|
|
22
|
+
let PortManager;
|
|
23
|
+
try {
|
|
24
|
+
// Check if running from installed package
|
|
25
|
+
const parentPackagePath = join(__dirname, '../../node_modules/.gl-life-claude/utils/port-manager.js');
|
|
26
|
+
if (existsSync(parentPackagePath)) {
|
|
27
|
+
const module = await import(parentPackagePath);
|
|
28
|
+
PortManager = module.PortManager;
|
|
29
|
+
} else {
|
|
30
|
+
// Fallback: Check workspace root
|
|
31
|
+
const workspacePackagePath = join(__dirname, '../../../utils/port-manager.js');
|
|
32
|
+
if (existsSync(workspacePackagePath)) {
|
|
33
|
+
const module = await import(workspacePackagePath);
|
|
34
|
+
PortManager = module.PortManager;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
} catch (err) {
|
|
38
|
+
console.warn('⚠️ Port manager not available, using default port 3000');
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Start Vite dev server with port management
|
|
43
|
+
*/
|
|
44
|
+
async function startServer() {
|
|
45
|
+
let port = 3000;
|
|
46
|
+
let portManager = null;
|
|
47
|
+
|
|
48
|
+
if (PortManager) {
|
|
49
|
+
try {
|
|
50
|
+
portManager = new PortManager();
|
|
51
|
+
|
|
52
|
+
// Allocate port for test-site
|
|
53
|
+
const allocation = await portManager.allocate('test-site-dev', {
|
|
54
|
+
service: 'vite',
|
|
55
|
+
range: [3000, 3009],
|
|
56
|
+
autoCleanup: true
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
port = allocation.port;
|
|
60
|
+
console.log(`✓ Port ${port} allocated for test-site`);
|
|
61
|
+
|
|
62
|
+
} catch (err) {
|
|
63
|
+
console.warn(`⚠️ Port allocation failed: ${err.message}`);
|
|
64
|
+
console.warn(' Using default port 3000');
|
|
65
|
+
port = 3000;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
// Start Vite server
|
|
70
|
+
console.log(`🚀 Starting Vite dev server on port ${port}...`);
|
|
71
|
+
|
|
72
|
+
const vite = spawn('npx', ['vite', '--port', port.toString(), '--host'], {
|
|
73
|
+
stdio: 'inherit',
|
|
74
|
+
shell: true,
|
|
75
|
+
cwd: __dirname
|
|
76
|
+
});
|
|
77
|
+
|
|
78
|
+
// Graceful shutdown
|
|
79
|
+
const cleanup = async () => {
|
|
80
|
+
console.log('\n🛑 Shutting down server...');
|
|
81
|
+
|
|
82
|
+
if (vite && !vite.killed) {
|
|
83
|
+
vite.kill('SIGTERM');
|
|
84
|
+
|
|
85
|
+
// Force kill after 5 seconds
|
|
86
|
+
setTimeout(() => {
|
|
87
|
+
if (!vite.killed) {
|
|
88
|
+
vite.kill('SIGKILL');
|
|
89
|
+
}
|
|
90
|
+
}, 5000);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
if (portManager) {
|
|
94
|
+
try {
|
|
95
|
+
await portManager.release('test-site-dev');
|
|
96
|
+
console.log('✓ Port released');
|
|
97
|
+
} catch (err) {
|
|
98
|
+
// Ignore release errors on shutdown
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
process.exit(0);
|
|
103
|
+
};
|
|
104
|
+
|
|
105
|
+
process.on('SIGINT', cleanup);
|
|
106
|
+
process.on('SIGTERM', cleanup);
|
|
107
|
+
|
|
108
|
+
vite.on('error', (err) => {
|
|
109
|
+
console.error('❌ Server error:', err.message);
|
|
110
|
+
cleanup();
|
|
111
|
+
});
|
|
112
|
+
|
|
113
|
+
vite.on('exit', (code) => {
|
|
114
|
+
if (code !== 0 && code !== null) {
|
|
115
|
+
console.error(`❌ Server exited with code ${code}`);
|
|
116
|
+
}
|
|
117
|
+
cleanup();
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
// Run server
|
|
122
|
+
startServer().catch(err => {
|
|
123
|
+
console.error('❌ Failed to start server:', err.message);
|
|
124
|
+
process.exit(1);
|
|
125
|
+
});
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
.app {
|
|
2
|
+
max-width: 1280px;
|
|
3
|
+
margin: 0 auto;
|
|
4
|
+
padding: 2rem;
|
|
5
|
+
min-height: 100vh;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.app-header {
|
|
9
|
+
margin-bottom: 3rem;
|
|
10
|
+
text-align: center;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.app-header h1 {
|
|
14
|
+
font-size: 3em;
|
|
15
|
+
line-height: 1.1;
|
|
16
|
+
margin-bottom: 0.5rem;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.app-header p {
|
|
20
|
+
font-size: 1.2em;
|
|
21
|
+
color: #888;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.app-main {
|
|
25
|
+
text-align: left;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.demo-section,
|
|
29
|
+
.instructions,
|
|
30
|
+
.component-list {
|
|
31
|
+
margin-bottom: 3rem;
|
|
32
|
+
padding: 2rem;
|
|
33
|
+
border: 1px solid #ccc;
|
|
34
|
+
border-radius: 8px;
|
|
35
|
+
background: rgba(255, 255, 255, 0.05);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.demo-section h2,
|
|
39
|
+
.instructions h2,
|
|
40
|
+
.component-list h2 {
|
|
41
|
+
margin-top: 0;
|
|
42
|
+
font-size: 1.8em;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.demo-description {
|
|
46
|
+
color: #888;
|
|
47
|
+
margin-bottom: 2rem;
|
|
48
|
+
line-height: 1.6;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.component-placeholder {
|
|
52
|
+
padding: 3rem;
|
|
53
|
+
border: 2px dashed #646cff;
|
|
54
|
+
border-radius: 8px;
|
|
55
|
+
text-align: center;
|
|
56
|
+
background: rgba(100, 108, 255, 0.05);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.component-placeholder p {
|
|
60
|
+
font-size: 1.2em;
|
|
61
|
+
margin-bottom: 1rem;
|
|
62
|
+
color: #888;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.component-placeholder code {
|
|
66
|
+
background: rgba(0, 0, 0, 0.2);
|
|
67
|
+
padding: 0.5rem 1rem;
|
|
68
|
+
border-radius: 4px;
|
|
69
|
+
display: inline-block;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.result-display {
|
|
73
|
+
margin-top: 2rem;
|
|
74
|
+
padding: 1.5rem;
|
|
75
|
+
background: rgba(100, 108, 255, 0.1);
|
|
76
|
+
border-radius: 8px;
|
|
77
|
+
border-left: 4px solid #646cff;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.result-display h3 {
|
|
81
|
+
margin: 0 0 1rem 0;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.result-display pre {
|
|
85
|
+
background: rgba(0, 0, 0, 0.2);
|
|
86
|
+
padding: 1rem;
|
|
87
|
+
border-radius: 4px;
|
|
88
|
+
overflow-x: auto;
|
|
89
|
+
font-size: 0.9em;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.instructions h3 {
|
|
93
|
+
margin-top: 2rem;
|
|
94
|
+
font-size: 1.3em;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.instructions ol {
|
|
98
|
+
line-height: 2;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.instructions code {
|
|
102
|
+
background: rgba(255, 255, 255, 0.1);
|
|
103
|
+
padding: 0.2em 0.4em;
|
|
104
|
+
border-radius: 4px;
|
|
105
|
+
font-family: 'Courier New', monospace;
|
|
106
|
+
font-size: 0.9em;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.code-example {
|
|
110
|
+
background: rgba(0, 0, 0, 0.3);
|
|
111
|
+
padding: 1.5rem;
|
|
112
|
+
border-radius: 8px;
|
|
113
|
+
overflow-x: auto;
|
|
114
|
+
font-size: 0.9em;
|
|
115
|
+
line-height: 1.6;
|
|
116
|
+
margin-top: 1rem;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.component-list ul {
|
|
120
|
+
line-height: 2;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.app-footer {
|
|
124
|
+
margin-top: 4rem;
|
|
125
|
+
padding-top: 2rem;
|
|
126
|
+
border-top: 1px solid #ccc;
|
|
127
|
+
color: #888;
|
|
128
|
+
font-size: 0.9em;
|
|
129
|
+
text-align: center;
|
|
130
|
+
}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { useState } from 'react'
|
|
2
|
+
import './App.css'
|
|
3
|
+
// Import your components from Agent/src here
|
|
4
|
+
// Example: import { YourComponent } from '../../Agent/src/components/YourComponent'
|
|
5
|
+
|
|
6
|
+
function App() {
|
|
7
|
+
return (
|
|
8
|
+
<div className="app">
|
|
9
|
+
<header className="app-header">
|
|
10
|
+
<h1>Integration Test Site</h1>
|
|
11
|
+
<p>Component Preview for Stakeholder Validation</p>
|
|
12
|
+
</header>
|
|
13
|
+
|
|
14
|
+
<main className="app-main">
|
|
15
|
+
<section className="demo-section">
|
|
16
|
+
<h2>Your Components Go Here</h2>
|
|
17
|
+
<p className="demo-description">
|
|
18
|
+
Import your UI components from <code>../Agent/src/components/</code> and render them below
|
|
19
|
+
for stakeholder testing and validation.
|
|
20
|
+
</p>
|
|
21
|
+
|
|
22
|
+
<div className="component-placeholder">
|
|
23
|
+
<p>👆 Replace this section with your component</p>
|
|
24
|
+
<code>{'<YourComponent prop1="value" onEvent={handleEvent} />'}</code>
|
|
25
|
+
</div>
|
|
26
|
+
</section>
|
|
27
|
+
|
|
28
|
+
<section className="instructions">
|
|
29
|
+
<h2>How to Add Your Components</h2>
|
|
30
|
+
<ol>
|
|
31
|
+
<li>Copy your component from <code>Agent/src/components/</code> to <code>test-site/src/components/</code></li>
|
|
32
|
+
<li>Import it: <code>import { YourComponent } from './components/YourComponent'</code></li>
|
|
33
|
+
<li>OR import directly: <code>import { YourComponent } from '../../Agent/src/components/YourComponent'</code></li>
|
|
34
|
+
<li>Render it in the demo section above with realistic props</li>
|
|
35
|
+
<li>Add event handlers to demonstrate interactivity</li>
|
|
36
|
+
<li>Run <code>npm run dev</code> to test locally at http://localhost:3000</li>
|
|
37
|
+
<li>Deploy with <code>npm run deploy</code> to share with stakeholders via GitHub Pages</li>
|
|
38
|
+
</ol>
|
|
39
|
+
|
|
40
|
+
<h3>Example: GitHub Auth Login Component</h3>
|
|
41
|
+
<pre className="code-example">{`// 1. Copy your login component
|
|
42
|
+
cp ../Agent/src/components/GitHubLogin.jsx src/components/
|
|
43
|
+
|
|
44
|
+
// 2. Import and use it
|
|
45
|
+
import { GitHubLogin } from './components/GitHubLogin'
|
|
46
|
+
|
|
47
|
+
function App() {
|
|
48
|
+
const handleLogin = (user) => {
|
|
49
|
+
console.log('User logged in:', user)
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
return (
|
|
53
|
+
<div>
|
|
54
|
+
<GitHubLogin onLogin={handleLogin} />
|
|
55
|
+
</div>
|
|
56
|
+
)
|
|
57
|
+
}`}</pre>
|
|
58
|
+
</section>
|
|
59
|
+
|
|
60
|
+
<section className="component-list">
|
|
61
|
+
<h2>Quick Start</h2>
|
|
62
|
+
<ul>
|
|
63
|
+
<li>📦 Install dependencies: <code>npm install</code></li>
|
|
64
|
+
<li>🚀 Start dev server: <code>npm run dev</code></li>
|
|
65
|
+
<li>🌍 Deploy to GitHub Pages: <code>npm run deploy</code></li>
|
|
66
|
+
<li>📝 Edit <code>src/App.jsx</code> to add your components</li>
|
|
67
|
+
</ul>
|
|
68
|
+
</section>
|
|
69
|
+
</main>
|
|
70
|
+
|
|
71
|
+
<footer className="app-footer">
|
|
72
|
+
<p>Built with Vite + React for fast hot reload</p>
|
|
73
|
+
</footer>
|
|
74
|
+
</div>
|
|
75
|
+
)
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export default App
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;
|
|
3
|
+
line-height: 1.5;
|
|
4
|
+
font-weight: 400;
|
|
5
|
+
|
|
6
|
+
color-scheme: light dark;
|
|
7
|
+
color: rgba(255, 255, 255, 0.87);
|
|
8
|
+
background-color: #242424;
|
|
9
|
+
|
|
10
|
+
font-synthesis: none;
|
|
11
|
+
text-rendering: optimizeLegibility;
|
|
12
|
+
-webkit-font-smoothing: antialiased;
|
|
13
|
+
-moz-osx-font-smoothing: grayscale;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
* {
|
|
17
|
+
box-sizing: border-box;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
body {
|
|
21
|
+
margin: 0;
|
|
22
|
+
display: flex;
|
|
23
|
+
place-items: center;
|
|
24
|
+
min-width: 320px;
|
|
25
|
+
min-height: 100vh;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
#root {
|
|
29
|
+
width: 100%;
|
|
30
|
+
margin: 0 auto;
|
|
31
|
+
text-align: center;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
@media (prefers-color-scheme: light) {
|
|
35
|
+
:root {
|
|
36
|
+
color: #213547;
|
|
37
|
+
background-color: #ffffff;
|
|
38
|
+
}
|
|
39
|
+
}
|