Spaces:
Runtime error
Runtime error
Hanzo Dev
commited on
Commit
·
6dee33f
0
Parent(s):
Initial commit for analyticsdash template
Browse files- .gitignore +10 -0
- Dockerfile +21 -0
- README.md +41 -0
- app/globals.css +19 -0
- app/layout.tsx +25 -0
- app/page.tsx +11 -0
- components/sections/features.tsx +32 -0
- components/sections/hero.tsx +33 -0
- lib/site.ts +16 -0
- next-env.d.ts +5 -0
- next.config.js +9 -0
- package-lock.json +0 -0
- package.json +34 -0
- tailwind.config.js +27 -0
- tsconfig.json +22 -0
.gitignore
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
node_modules
|
| 2 |
+
.next
|
| 3 |
+
.cache
|
| 4 |
+
dist
|
| 5 |
+
build
|
| 6 |
+
.DS_Store
|
| 7 |
+
*.log
|
| 8 |
+
.env.local
|
| 9 |
+
.env.*.local
|
| 10 |
+
*.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,41 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
title: analyticsdash Template
|
| 3 |
+
emoji: 🚀
|
| 4 |
+
colorFrom: gray
|
| 5 |
+
colorTo: black
|
| 6 |
+
sdk: docker
|
| 7 |
+
app_port: 3000
|
| 8 |
+
pinned: true
|
| 9 |
+
---
|
| 10 |
+
|
| 11 |
+
# analyticsdash Template
|
| 12 |
+
|
| 13 |
+
A Hanzo template for building modern applications.
|
| 14 |
+
|
| 15 |
+
## Features
|
| 16 |
+
- Built with @hanzo/ui
|
| 17 |
+
- Fully responsive
|
| 18 |
+
- TypeScript support
|
| 19 |
+
- Tailwind CSS styling
|
| 20 |
+
- shadcn/ui components
|
| 21 |
+
|
| 22 |
+
## Installation
|
| 23 |
+
|
| 24 |
+
```bash
|
| 25 |
+
npx create-hanzo-app --template analyticsdash
|
| 26 |
+
```
|
| 27 |
+
|
| 28 |
+
## Development
|
| 29 |
+
|
| 30 |
+
```bash
|
| 31 |
+
npm install
|
| 32 |
+
npm run dev
|
| 33 |
+
```
|
| 34 |
+
|
| 35 |
+
## Build
|
| 36 |
+
|
| 37 |
+
```bash
|
| 38 |
+
npm run build
|
| 39 |
+
```
|
| 40 |
+
|
| 41 |
+
Check out the [Hanzo Template Gallery](https://huggingface.co/spaces/hanzoai/gallery) for more 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: #14b8a6;
|
| 8 |
+
--secondary: #06b6d4;
|
| 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,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import { siteConfig } from '@/lib/site'
|
| 2 |
+
|
| 3 |
+
export function Features() {
|
| 4 |
+
return (
|
| 5 |
+
<section className="py-24 px-4 bg-gray-50 dark:bg-gray-900">
|
| 6 |
+
<div className="max-w-7xl mx-auto">
|
| 7 |
+
<h2 className="text-3xl md:text-4xl font-bold text-center mb-12">
|
| 8 |
+
Key Features
|
| 9 |
+
</h2>
|
| 10 |
+
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-8">
|
| 11 |
+
{siteConfig.features.map((feature, index) => (
|
| 12 |
+
<div
|
| 13 |
+
key={index}
|
| 14 |
+
className="p-6 bg-white dark:bg-gray-800 rounded-lg shadow-lg"
|
| 15 |
+
>
|
| 16 |
+
<div
|
| 17 |
+
className="w-12 h-12 rounded-lg mb-4"
|
| 18 |
+
style={{
|
| 19 |
+
background: `linear-gradient(135deg, ${siteConfig.primaryColor}, ${siteConfig.secondaryColor})`
|
| 20 |
+
}}
|
| 21 |
+
/>
|
| 22 |
+
<h3 className="text-lg font-semibold mb-2">{feature}</h3>
|
| 23 |
+
<p className="text-gray-600 dark:text-gray-400">
|
| 24 |
+
Powerful tools and features to enhance your workflow.
|
| 25 |
+
</p>
|
| 26 |
+
</div>
|
| 27 |
+
))}
|
| 28 |
+
</div>
|
| 29 |
+
</div>
|
| 30 |
+
</section>
|
| 31 |
+
)
|
| 32 |
+
}
|
components/sections/hero.tsx
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import { siteConfig } from '@/lib/site'
|
| 2 |
+
|
| 3 |
+
export function Hero() {
|
| 4 |
+
return (
|
| 5 |
+
<section className="relative py-24 px-4">
|
| 6 |
+
<div className="max-w-7xl mx-auto text-center">
|
| 7 |
+
<h1 className="text-5xl md:text-6xl font-bold mb-6">
|
| 8 |
+
{siteConfig.name}
|
| 9 |
+
</h1>
|
| 10 |
+
<p className="text-2xl md:text-3xl text-gray-600 dark:text-gray-400 mb-8">
|
| 11 |
+
{siteConfig.tagline}
|
| 12 |
+
</p>
|
| 13 |
+
<p className="text-lg text-gray-500 dark:text-gray-500 max-w-2xl mx-auto mb-12">
|
| 14 |
+
{siteConfig.description}
|
| 15 |
+
</p>
|
| 16 |
+
<div className="flex gap-4 justify-center">
|
| 17 |
+
<button
|
| 18 |
+
className="px-8 py-3 rounded-lg font-medium text-white"
|
| 19 |
+
style={{ backgroundColor: siteConfig.primaryColor }}
|
| 20 |
+
>
|
| 21 |
+
Get Started
|
| 22 |
+
</button>
|
| 23 |
+
<button
|
| 24 |
+
className="px-8 py-3 rounded-lg font-medium border-2"
|
| 25 |
+
style={{ borderColor: siteConfig.secondaryColor, color: siteConfig.secondaryColor }}
|
| 26 |
+
>
|
| 27 |
+
Learn More
|
| 28 |
+
</button>
|
| 29 |
+
</div>
|
| 30 |
+
</div>
|
| 31 |
+
</section>
|
| 32 |
+
)
|
| 33 |
+
}
|
lib/site.ts
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
export const siteConfig = {
|
| 2 |
+
name: "AnalyticsDash",
|
| 3 |
+
tagline: "Data That Drives Decisions",
|
| 4 |
+
description: "Real-time analytics and insights for data-driven teams",
|
| 5 |
+
url: "https://analytics.hanzo.ai",
|
| 6 |
+
primaryColor: "#14b8a6",
|
| 7 |
+
secondaryColor: "#06b6d4",
|
| 8 |
+
features: [
|
| 9 |
+
"Real-time Dashboards",
|
| 10 |
+
"Custom Metrics",
|
| 11 |
+
"Predictive Analytics",
|
| 12 |
+
"Data Export & API"
|
| 13 |
+
]
|
| 14 |
+
};
|
| 15 |
+
|
| 16 |
+
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/analytics-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 |
+
"@radix-ui/react-slot": "^1.2.3",
|
| 13 |
+
"@radix-ui/react-icons": "^1.3.2",
|
| 14 |
+
"class-variance-authority": "^0.7.1",
|
| 15 |
+
"clsx": "^2.1.1",
|
| 16 |
+
"framer-motion": "^11.18.2",
|
| 17 |
+
"lucide-react": "^0.525.0",
|
| 18 |
+
"next": "15.3.5",
|
| 19 |
+
"next-themes": "^0.4.6",
|
| 20 |
+
"react": "^19.0.0",
|
| 21 |
+
"react-dom": "^19.0.0",
|
| 22 |
+
"tailwind-merge": "^3.3.1"
|
| 23 |
+
},
|
| 24 |
+
"devDependencies": {
|
| 25 |
+
"@types/minimatch": "^5.1.2",
|
| 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 |
+
}
|