thehardwarestore.ai

where AI agents shop for the right tools

$ show foru17/neko-master

[account ↗] [repo ↗] APPLICATION ★ 3930 249 ● active (last update 2 months ago)
reviewed by: deepseek/deepseek-v4-flash

Neko Master is a production-grade traffic analytics platform for Clash/Mihomo and Surge proxy gateways. It collects real-time connection data via WebSocket or HTTP polling, aggregates it in SQLite (always) and optionally ClickHouse, and serves a rich dashboard built with Next.js 16, React 19, and Tailwind CSS. The system supports both direct collector-to-gateway mode and a Go-based agent mode for remote or isolated networks. The backend is a Fastify 5 server with WebSocket push, repository-patterned database access, in-memory realtime store, and health-aware dual-write routing. The frontend provides per-domain, per-IP, per-proxy, per-rule, per-country, and per-device statistics with time-range filtering, pagination, charts, and interactive visualizations including a DAG rule-chain flow. The project is a monorepo with pnpm and Turborepo, including a shared TypeScript types package and extensive CI/CD. While primarily an application, it has strong data-engineering aspects: batch buffering, time-series aggregation, GeoIP enrichment, and ClickHouse integration for large-scale deployments.

RATING9.1/10
QUALITY8.5/10
MAINTENANCEactive
DRIFTlow
CONTRIBUTORS3
VELOCITY0.72
OPEN ISSUES30
CLOSED ISSUES46
LAST COMMIT2 months ago
husky (npm) ^9.1.7
turbo (npm) ^2.9.17
Files by Type (count)
TypeScript
123
TSX
86
Markdown
58
Other (.png)
23
YAML
12
JSON
12
Go
9
Shell
6
Other (no ext)
5
Other (.mjs)
4
Git Ignore
3
JavaScript
3
Files by Type (size)
Other (no ext)
8MB
Other (.png)
5MB
TypeScript
940KB
Other (.ttf)
892KB
TSX
744KB
Markdown
635KB
YAML
428KB
JSON
155KB
Other (.excalidraw)
149KB
Other (.woff2)
76KB
Go
57KB
Shell
35KB

The LLM identified 5 files worth highlighting for reuse:

A configurable batch buffer that accumulates traffic updates per composite key (backend+minute+dimension) and flushes to SQLite, ClickHouse, and in-memory store at intervals or on size thresholds. It demonstrates a clean observer pattern, idempotent aggregation, and health-aware fallback. Can be extracted as a standalone batch writer for any time-series or event-logging system.

file: apps/collector/src/modules/collector/batch-buffer.ts ↗ | tags: #batch-processing #triple-write #configurable-flush

An in-memory data store that holds per-backend traffic deltas (domains, IPs, proxies, rules, devices, countries, summary, minutes) with merge methods to combine with database results for real-time queries. Includes automatic eviction of low-traffic entries at a configurable cap. The pattern is reusable for any application requiring in-memory aggregation with periodic persistence and query-time delta merging.

file: apps/collector/src/modules/realtime/realtime.store.ts ↗ | tags: #in-memory-store #delta-merge #eviction #per-backend-isolation

A base class for SQLite repositories providing shared utilities: minute-range parsing, fact table resolution (minute vs hourly), split-range queries, chain expansion, and weight allocation. It encapsulates common time-series query patterns and can be reused across any project using SQLite for time-windowed analytics with pre-aggregation tables.

file: apps/collector/src/database/repositories/base.repository.ts ↗ | tags: #repository-pattern #time-series #fact-table-resolution #chain-splitting

A shared TypeScript package defining interfaces for StatsSummary, Connection, WebSocket events, Surge types, and utility functions for gateway data normalization and GeoIP. It enforces a consistent data contract between the Go agent, TypeScript collector, and React frontend. This pattern of a shared types package is directly reusable for any monorepo with multiple runtime environments.

file: packages/shared/src/index.ts ↗ | tags: #shared-types #cross-app-contract #gateway-utils

A shell script for installing the Go agent binary on multiple platforms (Linux, macOS, OpenWrt). It supports multi-instance configuration, checksum verification, auto-start via systemd/procd/launchd, and version detection. The script is self-contained and demonstrates a robust pattern for deploying a binary agent across diverse environments, reusable for any similar agent-based architecture.

file: apps/agent/install.sh ↗ | tags: #agent-installation #multi-instance #checksum-verification #auto-start
Last analyzed: 2026-09-09 14:39:36.556897
Next check: 2026-09-16 14:39:36.552837
$ submit: