File size: 6,519 Bytes
6310e51
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
# DevTool Platform Template

A developer tools platform template built with Next.js 15, TypeScript, and @hanzo/ui components for creating modern development utilities.

## Features

- ✨ Built with **@hanzo/ui** component library (shadcn/ui based)
- 🎨 **Monochromatic color scheme** with developer-focused aesthetics
- πŸ“± **Fully responsive** design (mobile, tablet, desktop)
- πŸŒ™ **Dark mode** support with next-themes
- πŸš€ **Next.js 15** App Router with React 19
- πŸ› οΈ **Developer-centric** components
- ⚑ **TypeScript strict mode** enabled
- 🎯 **Performance optimized** for tool interfaces

## Quick Start

### Installation

```bash
# Install dependencies
npm install

# Start development server
npm run dev
```

Open [http://localhost:3000](http://localhost:3000) to view your dev tool platform.

### Production Build

```bash
# Create production build
npm run build

# Start production server
npm start
```

## Project Structure

```
devtool/
β”œβ”€β”€ app/                  # Next.js App Router
β”‚   β”œβ”€β”€ layout.tsx       # Root layout with theming
β”‚   └── page.tsx         # Landing page
β”œβ”€β”€ components/          # React components
β”‚   └── sections/        # Page sections
β”‚       β”œβ”€β”€ hero.tsx     # Hero with CTA
β”‚       └── features.tsx # Feature cards
β”œβ”€β”€ lib/                 # Utilities and config
β”‚   └── site.ts          # Site configuration
β”œβ”€β”€ public/              # Static assets
└── package.json         # Dependencies
```

## Component Usage

All components are imported from `@hanzo/ui` with developer-friendly styling:

```tsx
import { Button, Card, CardContent, CardHeader, CardTitle } from '@hanzo/ui/components'

// Developer-styled button with monospace font
<Button size="lg" className="font-mono">
  npm install @your-tool
</Button>

// Feature card with technical styling
<Card className="border-2 hover:border-black dark:hover:border-white">
  <CardHeader>
    <CardTitle className="font-mono">Feature Name</CardTitle>
  </CardHeader>
  <CardContent>
    Technical description here
  </CardContent>
</Card>
```

## Customization

### Site Configuration

Edit `lib/site.ts` to customize your dev tool details:

```typescript
export const siteConfig = {
  name: "Your Tool Name",
  tagline: "Your Tool Tagline",
  description: "What your tool does",
  url: "https://your-tool.com",
  features: [
    "Feature 1",
    "Feature 2",
    "Feature 3",
    "Feature 4"
  ]
}
```

### Styling

The template uses a monochromatic color scheme perfect for developer tools:

- Primary: Black (`#000000`)
- Secondary: Gray (`#666666`)
- Accent: Dark gradients for depth
- Code: Monospace fonts throughout
- Borders: High contrast for clarity

### Adding Tool Pages

Create new pages for different tools:

```tsx
// app/editor/page.tsx
import { Button, Card } from '@hanzo/ui/components'

export default function EditorPage() {
  return (
    <div className="container mx-auto py-12">
      <h1 className="text-4xl font-mono font-bold mb-8">
        Code Editor
      </h1>
      {/* Your editor implementation */}
    </div>
  )
}
```

## Developer Features

### Code Display Components

```tsx
// Code block with syntax highlighting
<pre className="bg-gray-900 text-gray-100 p-4 rounded-lg overflow-x-auto">
  <code className="language-javascript">
    {codeString}
  </code>
</pre>

// Terminal-style output
<div className="bg-black text-green-400 p-4 font-mono text-sm">
  $ npm install your-package
  <br />
  βœ“ Installation complete
</div>
```

### API Integration

```tsx
// Example API endpoint structure
// app/api/tools/[tool]/route.ts
export async function POST(request: Request) {
  const data = await request.json()
  // Process tool request
  return Response.json({ result })
}
```

### Keyboard Shortcuts

```tsx
// Example keyboard shortcut handler
useEffect(() => {
  const handleKeyPress = (e: KeyboardEvent) => {
    if (e.metaKey && e.key === 'k') {
      // Open command palette
    }
  }
  document.addEventListener('keydown', handleKeyPress)
  return () => document.removeEventListener('keydown', handleKeyPress)
}, [])
```

## Available Scripts

| Command | Description |
|---------|-------------|
| `npm run dev` | Start development server |
| `npm run build` | Build for production |
| `npm start` | Start production server |
| `npm run lint` | Run ESLint |

## Tool Categories

### Supported Tool Types
- **Code Generators**: Templates, boilerplate, snippets
- **Testing Tools**: Unit tests, integration tests, E2E
- **Build Tools**: Bundlers, compilers, transpilers
- **Documentation**: API docs, README generators
- **Analysis Tools**: Linters, formatters, profilers
- **Deployment**: CI/CD, containerization, monitoring

## Environment Variables

Create a `.env.local` file for configuration:

```env
# Example environment variables
NEXT_PUBLIC_API_URL=https://api.your-tool.com
NEXT_PUBLIC_GITHUB_TOKEN=ghp_...
DATABASE_URL=postgresql://...
REDIS_URL=redis://...
```

## Responsive Design

The template adapts to different screen sizes:

```tsx
// Responsive layout
<div className="grid grid-cols-1 lg:grid-cols-3 gap-6">
  {/* Tool cards */}
</div>

// Responsive navigation
<nav className="flex flex-col md:flex-row gap-4">
  {/* Navigation items */}
</nav>
```

## TypeScript

Strict mode is enabled for better type safety:

```json
{
  "compilerOptions": {
    "strict": true,
    "noImplicitAny": true,
    "strictNullChecks": true,
    "noUnusedLocals": true,
    "noUnusedParameters": true
  }
}
```

## Performance Optimization

- Lazy loading for heavy components
- Code splitting by feature
- Optimized bundle size
- Service worker for offline support
- WebAssembly support for compute-intensive tasks

## Integration Examples

### GitHub Integration
```tsx
// Connect to GitHub API
const octokit = new Octokit({
  auth: process.env.GITHUB_TOKEN,
})
```

### Database Integration
```tsx
// Prisma ORM example
import { PrismaClient } from '@prisma/client'
const prisma = new PrismaClient()
```

### Real-time Features
```tsx
// WebSocket connection
const ws = new WebSocket('wss://your-api.com')
ws.on('message', handleMessage)
```

## Browser Support

- Chrome 90+
- Firefox 88+
- Safari 14+
- Edge 90+

## Contributing

1. Fork the repository
2. Create your feature branch
3. Commit your changes
4. Push to the branch
5. Create a Pull Request

## License

MIT

## Support

For questions or issues, visit [github.com/hanzoai/templates](https://github.com/hanzoai/templates)