{"id":31574744,"url":"https://github.com/remcostoeten/honolytics","last_synced_at":"2026-05-16T18:02:11.965Z","repository":{"id":311366114,"uuid":"1043322769","full_name":"remcostoeten/honolytics","owner":"remcostoeten","description":"Self-hosted analytics built with HONO, TypeScript \u0026 modern web tech. Privacy-focused, lightweight, developer-friendly.","archived":false,"fork":false,"pushed_at":"2025-10-04T19:55:53.000Z","size":655,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-10-04T20:25:24.125Z","etag":null,"topics":["analytics","edge-runtime","hono","privacy","self-hosted","typescript"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/remcostoeten.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-08-23T15:59:37.000Z","updated_at":"2025-10-04T18:17:16.000Z","dependencies_parsed_at":"2025-08-24T11:20:57.927Z","dependency_job_id":"4eaedd49-3db6-49ac-82b8-a0dd4feec482","html_url":"https://github.com/remcostoeten/honolytics","commit_stats":null,"previous_names":["remcostoeten/hono-analytics","remcostoeten/honolytics"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/remcostoeten/honolytics","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/remcostoeten%2Fhonolytics","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/remcostoeten%2Fhonolytics/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/remcostoeten%2Fhonolytics/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/remcostoeten%2Fhonolytics/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/remcostoeten","download_url":"https://codeload.github.com/remcostoeten/honolytics/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/remcostoeten%2Fhonolytics/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278486275,"owners_count":25994941,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-05T02:00:06.059Z","response_time":54,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["analytics","edge-runtime","hono","privacy","self-hosted","typescript"],"created_at":"2025-10-05T16:58:39.470Z","updated_at":"2025-10-05T16:58:41.935Z","avatar_url":"https://github.com/remcostoeten.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Honolytics\n\nA lightweight analytics solution built with Hono.js featuring:\n\n- **Real-time Analytics Collection** - Track pageviews, users, sessions, and custom events\n- **Hooks** - React hooks for building analytics dashboards with centralized configuration\n- **High Performance** - Built on Hono.js for blazing-fast performance\n- **Privacy-First** - Self-hosted analytics solution you control\n- **Multi-Platform** - Works with React, Next.js, and vanilla JavaScript\n\n\u003e [!NOTE]\n\u003e Current version (0.1) has no storage included. You bring your own server and database. In upcomming version I will implement various storage solutions.\n\n## Quick Start\n\n### 1. Install Hooks\n\n```bash\nbun add honolytics\n```\n\n### 2. Wrap Your App with Provider\n\n```tsx\nimport { HonolyticsProvider } from 'honolytics'\n\nfunction App() {\n  return (\n    \u003cHonolyticsProvider\n      apiKey=\"your-api-key-here\"\n      endpoint=\"http://localhost:8000\"\n    \u003e\n      \u003c /\u003e\n    \u003c/HonolyticsProvider\u003e\n  )\n}\n```\n\n### 3. Use Analytics Hooks\n\n```tsx\nimport { useAnalytics, useTotals } from 'honolytics'\n\nfunction () {\n  const { data, loading, error } = useAnalytics()\n  const { data: totals } = useTotals()\n\n  if (loading) return \u003cdiv\u003eLoading...\u003c/div\u003e\n  if (error) return \u003cdiv\u003eError: {error}\u003c/div\u003e\n\n  return (\n    \u003cdiv\u003e\n\u003ch1\u003eAnalytics\u003c/h1\u003e\n      \u003cp\u003eUsers: {totals?.users}\u003c/p\u003e\n      \u003cp\u003eSessions: {totals?.sessions}\u003c/p\u003e\n      \u003cp\u003ePage Views: {totals?.pageviews}\u003c/p\u003e\n    \u003c/div\u003e\n  )\n}\n```\n\n## Packages\n\n### [honolytics](./packages/hooks/)\n\nReact hooks for building analytics s with centralized configuration.\n\n**Key Features:**\n- **Centralized Configuration** - Set API config once, use everywhere\n- **Backward Compatible** - Existing code still works\n- **Specialized Hooks** - Individual hooks for different data slices\n- **Live Updates** - Built-in polling support\n- **TypeScript** - Full type safety\n\n**Available Hooks:**\n- `useAnalytics()` - Complete analytics data\n- `useTotals()` - Total metrics (users, sessions, pageviews)\n- `useTimeseries()` - Time-series data points\n- `useTopPages()` - Top pages breakdown\n- `useCountries()` - Country breakdown\n- `useBrowsers()` - Browser breakdown\n- `useDevices()` - Device breakdown\n\n[Full Documentation](./packages/hooks/README.md)\n\n\n## Development\n\nThis project uses a monorepo structure with:\n- **Bun** for package management\n- **TypeScript** for type safety\n- **React** for UI components\n\n```bash\n# Install dependencies\nbun install\n\n# Build all packages\nbun run build\n\n# Type check\nbun run typecheck\n```\n\n## Usage Examples\n\n### Basic \n```tsx\nfunction Simple() {\n  const { data: totals, loading } = useTotals()\n\n  if (loading) return \u003cdiv\u003eLoading...\u003c/div\u003e\n\n  return (\n    \u003cdiv style={{ display: 'grid', gridTemplateColumns: 'repeat(4, 1fr)', gap: '1rem' }}\u003e\n      \u003cdiv\u003eUsers: {totals?.users}\u003c/div\u003e\n      \u003cdiv\u003eSessions: {totals?.sessions}\u003c/div\u003e\n      \u003cdiv\u003ePage Views: {totals?.pageviews}\u003c/div\u003e\n      \u003cdiv\u003eAvg Duration: {totals?.avgDuration}ms\u003c/div\u003e\n    \u003c/div\u003e\n  )\n}\n```\n\n### With Date Range\n```tsx\nfunction MonthlyReport() {\n  const lastMonth = {\n    from: new Date(2024, 9, 1),\n    to: new Date(2024, 9, 31)\n  }\n\n  const { data } = useAnalytics({\n    dateRange: lastMonth\n  })\n\n  return \u003cdiv\u003eOctober 2024 Analytics\u003c/div\u003e\n}\n```\n\n### Live  with Polling\n```tsx\nfunction Live() {\n  const { data } = useAnalytics({\n    pollingInterval: 30000 // Refresh every 30 seconds\n  })\n\n  return \u003cdiv\u003eLive Analytics (auto-refreshing)\u003c/div\u003e\n}\n```\n\n\n## Contributing\n\n1. Fork the repository\n2. Create your feature branch (`git checkout -b feat/amazing-feature`)\n3. Commit your changes (`git commit -m 'Add amazing feature'`)\n4. Push to the branch (`git push origin feat/amazing-feature`)\n5. Open a Pull Request\n\n## License\n\nThis project is licensed under the MIT License.\n\n---\nxxx,\nRemco Stoeten\n\u003csmall\u003eStars are appreciated for my e-penor growth\u003c/small\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fremcostoeten%2Fhonolytics","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fremcostoeten%2Fhonolytics","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fremcostoeten%2Fhonolytics/lists"}