mirror of
https://github.com/hanzoai/home.git
synced 2026-10-30 18:34:19 +00:00
main
typescript 7.0.2 is the native compiler and exports no JavaScript API, so next 15 cannot read it. It comes in aliased as tsgo and does the typechecking; typescript stays on the 6 line for the tools. A side-effect stylesheet import needs an ambient declaration on the new compiler; with it, 22 diagnostics before and after, the same count on both. Co-authored-by: Hanzo Dev <[email protected]>
@hanzo/home
A forkable personal homepage template with stats dashboard, social integrations, and client-side SQL queries.
Built with Next.js, @hanzo/stats, and @hanzo/ui.
Features
- GitHub Stats: Commits, repositories, lines of code, activity charts
- AI Usage: Token usage, model breakdown, interaction history
- Music Integration: Spotify and SoundCloud embeds
- Social Links: LinkedIn, Twitter, Instagram, Facebook, StackOverflow
- SQL Query Console: Run queries against your data client-side
- Dark Theme: Beautiful monochrome dark design
- Responsive: Works on all devices
- Static Export: Deploy to GitHub Pages or any static host
Quick Start
1. Fork this repository
Click the "Fork" button on GitHub to create your own copy.
2. Clone and install
git clone https://github.com/YOUR-USERNAME/home
cd home
npm install
3. Configure
Edit stats.config.ts to customize:
export const config = {
name: 'Your Name',
title: 'Software Engineer',
subtitle: 'Building the future with code',
avatar: 'https://github.com/your-username.png',
links: {
github: 'https://github.com/your-username',
twitter: 'https://x.com/your-username',
linkedin: 'https://linkedin.com/in/your-username',
},
features: {
github: true,
ai: true,
music: false,
stackoverflow: false,
},
github: {
users: ['your-username'],
since: '2010-01-01',
},
}
4. Sync your data
npm run sync
This fetches your GitHub commits and generates the stats database.
5. Run locally
npm run dev
Visit http://localhost:3000 to see your homepage.
Deployment
GitHub Pages
- Uncomment
output: 'export'innext.config.mjs - Set your
basePathif needed - Build and export:
npm run build
- Deploy the
outdirectory to GitHub Pages
Vercel
Click the button below to deploy to Vercel:
Cloudflare Pages
Connect your GitHub repository to Cloudflare Pages with these settings:
- Build command:
npm run build - Build output directory:
out(or.nextfor SSR)
Customization
Adding Music
Enable music in stats.config.ts:
features: {
music: true,
},
music: {
spotify: {
userId: 'your-spotify-id',
playlists: ['playlist-id-1', 'playlist-id-2'],
},
soundcloud: {
username: 'your-soundcloud-username',
},
},
Adding StackOverflow
features: {
stackoverflow: true,
},
stackoverflow: {
userId: '123456',
apiKey: 'your-api-key', // Optional, from stackapps.com
},
Custom Theme
Edit CSS variables in styles/globals.css:
:root {
--background: #000;
--foreground: #fff;
--primary: #fff;
--accent: #fff;
--border: #222;
}
Adding Charts
Use the @hanzo/stats chart utilities in your components:
import { useQuery, processSqlTemplate, defaultCharts } from '@hanzo/stats'
const { data } = useQuery(db, processSqlTemplate(defaultCharts[0].sql))
Data Sync
The npm run sync command fetches data from:
- GitHub API (commits, repos)
- Local Claude usage files (if configured)
Set up a GitHub Action to sync daily:
name: Sync Stats
on:
schedule:
- cron: '0 0 * * *'
workflow_dispatch:
jobs:
sync:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
- run: npm install
- run: npm run sync
- run: npm run build
- uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./out
License
BSD-3-Clause © Hanzo AI, Inc.
Built with ❤️ by Hanzo AI
Description
Forkable personal homepage template with GitHub stats and social integrations.
186 KiB
Languages
TypeScript
67.2%
CSS
16.6%
JavaScript
16.2%