Hanzo Dev commited on
Commit
23c1680
·
0 Parent(s):

Initial commit

Browse files
.gitignore ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ node_modules
2
+ .next
3
+ .cache
4
+ dist
5
+ build
6
+ .DS_Store
7
+ *.log
8
+ .env.local
9
+ *.tsbuildinfo
Dockerfile ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM node:20-slim
2
+
3
+ WORKDIR /app
4
+
5
+ # Copy package files
6
+ COPY package*.json ./
7
+
8
+ # Install dependencies
9
+ RUN npm ci --only=production
10
+
11
+ # Copy application files
12
+ COPY . .
13
+
14
+ # Build the application
15
+ RUN npm run build
16
+
17
+ # Expose port
18
+ EXPOSE 3000
19
+
20
+ # Start the application
21
+ CMD ["npm", "start"]
README.md ADDED
@@ -0,0 +1,294 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # DevTool Platform Template
2
+
3
+ A developer tools platform template built with Next.js 15, TypeScript, and @hanzo/ui components for creating modern development utilities.
4
+
5
+ ## Features
6
+
7
+ - ✨ Built with **@hanzo/ui** component library (shadcn/ui based)
8
+ - 🎨 **Monochromatic color scheme** with developer-focused aesthetics
9
+ - 📱 **Fully responsive** design (mobile, tablet, desktop)
10
+ - 🌙 **Dark mode** support with next-themes
11
+ - 🚀 **Next.js 15** App Router with React 19
12
+ - 🛠️ **Developer-centric** components
13
+ - ⚡ **TypeScript strict mode** enabled
14
+ - 🎯 **Performance optimized** for tool interfaces
15
+
16
+ ## Quick Start
17
+
18
+ ### Installation
19
+
20
+ ```bash
21
+ # Install dependencies
22
+ npm install
23
+
24
+ # Start development server
25
+ npm run dev
26
+ ```
27
+
28
+ Open [http://localhost:3000](http://localhost:3000) to view your dev tool platform.
29
+
30
+ ### Production Build
31
+
32
+ ```bash
33
+ # Create production build
34
+ npm run build
35
+
36
+ # Start production server
37
+ npm start
38
+ ```
39
+
40
+ ## Project Structure
41
+
42
+ ```
43
+ devtool/
44
+ ├── app/ # Next.js App Router
45
+ │ ├── layout.tsx # Root layout with theming
46
+ │ └── page.tsx # Landing page
47
+ ├── components/ # React components
48
+ │ └── sections/ # Page sections
49
+ │ ├── hero.tsx # Hero with CTA
50
+ │ └── features.tsx # Feature cards
51
+ ├── lib/ # Utilities and config
52
+ │ └── site.ts # Site configuration
53
+ ├── public/ # Static assets
54
+ └── package.json # Dependencies
55
+ ```
56
+
57
+ ## Component Usage
58
+
59
+ All components are imported from `@hanzo/ui` with developer-friendly styling:
60
+
61
+ ```tsx
62
+ import { Button, Card, CardContent, CardHeader, CardTitle } from '@hanzo/ui/components'
63
+
64
+ // Developer-styled button with monospace font
65
+ <Button size="lg" className="font-mono">
66
+ npm install @your-tool
67
+ </Button>
68
+
69
+ // Feature card with technical styling
70
+ <Card className="border-2 hover:border-black dark:hover:border-white">
71
+ <CardHeader>
72
+ <CardTitle className="font-mono">Feature Name</CardTitle>
73
+ </CardHeader>
74
+ <CardContent>
75
+ Technical description here
76
+ </CardContent>
77
+ </Card>
78
+ ```
79
+
80
+ ## Customization
81
+
82
+ ### Site Configuration
83
+
84
+ Edit `lib/site.ts` to customize your dev tool details:
85
+
86
+ ```typescript
87
+ export const siteConfig = {
88
+ name: "Your Tool Name",
89
+ tagline: "Your Tool Tagline",
90
+ description: "What your tool does",
91
+ url: "https://your-tool.com",
92
+ features: [
93
+ "Feature 1",
94
+ "Feature 2",
95
+ "Feature 3",
96
+ "Feature 4"
97
+ ]
98
+ }
99
+ ```
100
+
101
+ ### Styling
102
+
103
+ The template uses a monochromatic color scheme perfect for developer tools:
104
+
105
+ - Primary: Black (`#000000`)
106
+ - Secondary: Gray (`#666666`)
107
+ - Accent: Dark gradients for depth
108
+ - Code: Monospace fonts throughout
109
+ - Borders: High contrast for clarity
110
+
111
+ ### Adding Tool Pages
112
+
113
+ Create new pages for different tools:
114
+
115
+ ```tsx
116
+ // app/editor/page.tsx
117
+ import { Button, Card } from '@hanzo/ui/components'
118
+
119
+ export default function EditorPage() {
120
+ return (
121
+ <div className="container mx-auto py-12">
122
+ <h1 className="text-4xl font-mono font-bold mb-8">
123
+ Code Editor
124
+ </h1>
125
+ {/* Your editor implementation */}
126
+ </div>
127
+ )
128
+ }
129
+ ```
130
+
131
+ ## Developer Features
132
+
133
+ ### Code Display Components
134
+
135
+ ```tsx
136
+ // Code block with syntax highlighting
137
+ <pre className="bg-gray-900 text-gray-100 p-4 rounded-lg overflow-x-auto">
138
+ <code className="language-javascript">
139
+ {codeString}
140
+ </code>
141
+ </pre>
142
+
143
+ // Terminal-style output
144
+ <div className="bg-black text-green-400 p-4 font-mono text-sm">
145
+ $ npm install your-package
146
+ <br />
147
+ ✓ Installation complete
148
+ </div>
149
+ ```
150
+
151
+ ### API Integration
152
+
153
+ ```tsx
154
+ // Example API endpoint structure
155
+ // app/api/tools/[tool]/route.ts
156
+ export async function POST(request: Request) {
157
+ const data = await request.json()
158
+ // Process tool request
159
+ return Response.json({ result })
160
+ }
161
+ ```
162
+
163
+ ### Keyboard Shortcuts
164
+
165
+ ```tsx
166
+ // Example keyboard shortcut handler
167
+ useEffect(() => {
168
+ const handleKeyPress = (e: KeyboardEvent) => {
169
+ if (e.metaKey && e.key === 'k') {
170
+ // Open command palette
171
+ }
172
+ }
173
+ document.addEventListener('keydown', handleKeyPress)
174
+ return () => document.removeEventListener('keydown', handleKeyPress)
175
+ }, [])
176
+ ```
177
+
178
+ ## Available Scripts
179
+
180
+ | Command | Description |
181
+ |---------|-------------|
182
+ | `npm run dev` | Start development server |
183
+ | `npm run build` | Build for production |
184
+ | `npm start` | Start production server |
185
+ | `npm run lint` | Run ESLint |
186
+
187
+ ## Tool Categories
188
+
189
+ ### Supported Tool Types
190
+ - **Code Generators**: Templates, boilerplate, snippets
191
+ - **Testing Tools**: Unit tests, integration tests, E2E
192
+ - **Build Tools**: Bundlers, compilers, transpilers
193
+ - **Documentation**: API docs, README generators
194
+ - **Analysis Tools**: Linters, formatters, profilers
195
+ - **Deployment**: CI/CD, containerization, monitoring
196
+
197
+ ## Environment Variables
198
+
199
+ Create a `.env.local` file for configuration:
200
+
201
+ ```env
202
+ # Example environment variables
203
+ NEXT_PUBLIC_API_URL=https://api.your-tool.com
204
+ NEXT_PUBLIC_GITHUB_TOKEN=ghp_...
205
+ DATABASE_URL=postgresql://...
206
+ REDIS_URL=redis://...
207
+ ```
208
+
209
+ ## Responsive Design
210
+
211
+ The template adapts to different screen sizes:
212
+
213
+ ```tsx
214
+ // Responsive layout
215
+ <div className="grid grid-cols-1 lg:grid-cols-3 gap-6">
216
+ {/* Tool cards */}
217
+ </div>
218
+
219
+ // Responsive navigation
220
+ <nav className="flex flex-col md:flex-row gap-4">
221
+ {/* Navigation items */}
222
+ </nav>
223
+ ```
224
+
225
+ ## TypeScript
226
+
227
+ Strict mode is enabled for better type safety:
228
+
229
+ ```json
230
+ {
231
+ "compilerOptions": {
232
+ "strict": true,
233
+ "noImplicitAny": true,
234
+ "strictNullChecks": true,
235
+ "noUnusedLocals": true,
236
+ "noUnusedParameters": true
237
+ }
238
+ }
239
+ ```
240
+
241
+ ## Performance Optimization
242
+
243
+ - Lazy loading for heavy components
244
+ - Code splitting by feature
245
+ - Optimized bundle size
246
+ - Service worker for offline support
247
+ - WebAssembly support for compute-intensive tasks
248
+
249
+ ## Integration Examples
250
+
251
+ ### GitHub Integration
252
+ ```tsx
253
+ // Connect to GitHub API
254
+ const octokit = new Octokit({
255
+ auth: process.env.GITHUB_TOKEN,
256
+ })
257
+ ```
258
+
259
+ ### Database Integration
260
+ ```tsx
261
+ // Prisma ORM example
262
+ import { PrismaClient } from '@prisma/client'
263
+ const prisma = new PrismaClient()
264
+ ```
265
+
266
+ ### Real-time Features
267
+ ```tsx
268
+ // WebSocket connection
269
+ const ws = new WebSocket('wss://your-api.com')
270
+ ws.on('message', handleMessage)
271
+ ```
272
+
273
+ ## Browser Support
274
+
275
+ - Chrome 90+
276
+ - Firefox 88+
277
+ - Safari 14+
278
+ - Edge 90+
279
+
280
+ ## Contributing
281
+
282
+ 1. Fork the repository
283
+ 2. Create your feature branch
284
+ 3. Commit your changes
285
+ 4. Push to the branch
286
+ 5. Create a Pull Request
287
+
288
+ ## License
289
+
290
+ MIT
291
+
292
+ ## Support
293
+
294
+ For questions or issues, visit [github.com/hanzoai/templates](https://github.com/hanzoai/templates)
app/globals.css ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ @tailwind base;
2
+ @tailwind components;
3
+ @tailwind utilities;
4
+
5
+ @layer base {
6
+ :root {
7
+ --primary: #00d4ff;
8
+ --secondary: #00ff88;
9
+ --background: 0 0% 100%;
10
+ --foreground: 222.2 84% 4.9%;
11
+ --border: 214.3 31.8% 91.4%;
12
+ }
13
+
14
+ .dark {
15
+ --background: 222.2 84% 4.9%;
16
+ --foreground: 210 40% 98%;
17
+ --border: 217.2 32.6% 17.5%;
18
+ }
19
+ }
app/layout.tsx ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import type { Metadata } from 'next'
2
+ import { Inter } from 'next/font/google'
3
+ import './globals.css'
4
+ import { siteConfig } from '@/lib/site'
5
+
6
+ const inter = Inter({ subsets: ['latin'] })
7
+
8
+ export const metadata: Metadata = {
9
+ title: `${siteConfig.name} - ${siteConfig.tagline}`,
10
+ description: siteConfig.description,
11
+ }
12
+
13
+ export default function RootLayout({
14
+ children,
15
+ }: {
16
+ children: React.ReactNode
17
+ }) {
18
+ return (
19
+ <html lang="en">
20
+ <body className={inter.className}>
21
+ {children}
22
+ </body>
23
+ </html>
24
+ )
25
+ }
app/page.tsx ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import { Hero } from '@/components/sections/hero'
2
+ import { Features } from '@/components/sections/features'
3
+
4
+ export default function Home() {
5
+ return (
6
+ <main className="min-h-screen">
7
+ <Hero />
8
+ <Features />
9
+ </main>
10
+ )
11
+ }
components/sections/features.tsx ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import { siteConfig } from '@/lib/site'
2
+ import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@hanzo/ui/components'
3
+
4
+ export function Features() {
5
+ return (
6
+ <section className="py-24 px-4 bg-gray-50 dark:bg-gray-900">
7
+ <div className="max-w-7xl mx-auto">
8
+ <h2 className="text-3xl md:text-4xl font-bold text-center mb-12">
9
+ Key Features
10
+ </h2>
11
+ <div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-8">
12
+ {siteConfig.features.map((feature, index) => (
13
+ <Card key={index} className="border-2 hover:border-black dark:hover:border-white transition-colors">
14
+ <CardHeader>
15
+ <div className="w-12 h-12 rounded mb-4 bg-gradient-to-br from-gray-900 to-gray-600 dark:from-gray-100 dark:to-gray-400" />
16
+ <CardTitle className="font-mono">{feature}</CardTitle>
17
+ </CardHeader>
18
+ <CardContent>
19
+ <CardDescription>
20
+ Developer tools and utilities for modern workflows.
21
+ </CardDescription>
22
+ </CardContent>
23
+ </Card>
24
+ ))}
25
+ </div>
26
+ </div>
27
+ </section>
28
+ )
29
+ }
components/sections/hero.tsx ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import { siteConfig } from '@/lib/site'
2
+ import { Button } from '@hanzo/ui/components'
3
+
4
+ export function Hero() {
5
+ return (
6
+ <section className="relative py-24 px-4">
7
+ <div className="max-w-7xl mx-auto text-center">
8
+ <h1 className="text-5xl md:text-6xl font-bold mb-6">
9
+ {siteConfig.name}
10
+ </h1>
11
+ <p className="text-2xl md:text-3xl text-gray-600 dark:text-gray-400 mb-8">
12
+ {siteConfig.tagline}
13
+ </p>
14
+ <p className="text-lg text-gray-500 dark:text-gray-500 max-w-2xl mx-auto mb-12">
15
+ {siteConfig.description}
16
+ </p>
17
+ <div className="flex gap-4 justify-center">
18
+ <Button size="lg" className="font-mono">
19
+ npm install
20
+ </Button>
21
+ <Button size="lg" variant="outline" className="font-mono">
22
+ View Docs
23
+ </Button>
24
+ </div>
25
+ </div>
26
+ </section>
27
+ )
28
+ }
lib/site.ts ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ export const siteConfig = {
2
+ name: "DevForge",
3
+ tagline: "Code Smarter, Ship Faster",
4
+ description: "The ultimate developer tools platform for modern development workflows",
5
+ url: "https://devtool.hanzo.ai",
6
+ // Monochromatic color scheme for developer tools
7
+ primaryColor: "#000000",
8
+ secondaryColor: "#666666",
9
+ features: [
10
+ "AI-Powered Code Generation",
11
+ "Real-time Collaboration",
12
+ "Automated Testing Suite",
13
+ "CI/CD Pipeline Integration"
14
+ ]
15
+ };
16
+
17
+ export type SiteConfig = typeof siteConfig;
next-env.d.ts ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ /// <reference types="next" />
2
+ /// <reference types="next/image-types/global" />
3
+
4
+ // NOTE: This file should not be edited
5
+ // see https://nextjs.org/docs/app/api-reference/config/typescript for more information.
next.config.js ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ /** @type {import('next').NextConfig} */
2
+ const nextConfig = {
3
+ reactStrictMode: true,
4
+ images: {
5
+ domains: ['localhost'],
6
+ },
7
+ }
8
+
9
+ module.exports = nextConfig
package-lock.json ADDED
The diff for this file is too large to render. See raw diff
 
package.json ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "@hanzo/devtool-template",
3
+ "version": "0.1.0",
4
+ "private": true,
5
+ "scripts": {
6
+ "dev": "next dev",
7
+ "build": "next build",
8
+ "start": "next start",
9
+ "lint": "next lint"
10
+ },
11
+ "dependencies": {
12
+ "@hanzo/ui": "latest",
13
+ "@radix-ui/react-slot": "^1.2.3",
14
+ "@radix-ui/react-icons": "^1.3.2",
15
+ "class-variance-authority": "^0.7.1",
16
+ "clsx": "^2.1.1",
17
+ "framer-motion": "^11.18.2",
18
+ "lucide-react": "^0.525.0",
19
+ "next": "15.3.5",
20
+ "next-themes": "^0.4.6",
21
+ "react": "^19.0.0",
22
+ "react-dom": "^19.0.0",
23
+ "tailwind-merge": "^3.3.1"
24
+ },
25
+ "devDependencies": {
26
+ "@types/node": "^20",
27
+ "@types/react": "^19",
28
+ "@types/react-dom": "^19",
29
+ "eslint": "^9",
30
+ "eslint-config-next": "15.3.5",
31
+ "tailwindcss": "^3.4.17",
32
+ "typescript": "^5"
33
+ }
34
+ }
tailwind.config.js ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /** @type {import('tailwindcss').Config} */
2
+ module.exports = {
3
+ darkMode: ["class"],
4
+ content: [
5
+ "./pages/**/*.{ts,tsx}",
6
+ "./components/**/*.{ts,tsx}",
7
+ "./app/**/*.{ts,tsx}",
8
+ ],
9
+ theme: {
10
+ extend: {
11
+ colors: {
12
+ border: "hsl(var(--border))",
13
+ background: "hsl(var(--background))",
14
+ foreground: "hsl(var(--foreground))",
15
+ primary: {
16
+ DEFAULT: "hsl(var(--primary))",
17
+ foreground: "hsl(var(--primary-foreground))",
18
+ },
19
+ secondary: {
20
+ DEFAULT: "hsl(var(--secondary))",
21
+ foreground: "hsl(var(--secondary-foreground))",
22
+ },
23
+ },
24
+ },
25
+ },
26
+ plugins: [],
27
+ }
tsconfig.json ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ES2017",
4
+ "lib": ["dom", "dom.iterable", "esnext"],
5
+ "allowJs": true,
6
+ "skipLibCheck": true,
7
+ "strict": true,
8
+ "forceConsistentCasingInFileNames": true,
9
+ "noEmit": true,
10
+ "esModuleInterop": true,
11
+ "module": "esnext",
12
+ "moduleResolution": "node",
13
+ "resolveJsonModule": true,
14
+ "isolatedModules": true,
15
+ "jsx": "preserve",
16
+ "incremental": true,
17
+ "plugins": [{"name": "next"}],
18
+ "paths": {"@/*": ["./*"]}
19
+ },
20
+ "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
21
+ "exclude": ["node_modules"]
22
+ }