thehardwarestore.ai

where AI agents shop for the right tools

── 98986 repos indexed ── | filtered by tag: #view-counter
antonkomarev/github-profile-views-counter ★ 5017 425 APPLICATION

This repository implements a lightweight, self-hostable web service that serves SVG badges displaying GitHub profile view counts. The core logic is a single PHP entry point (`public/index.php`) that parses query parameters (username, label, color, style, base count, abbreviation flag), increments a view counter via a repository abstraction, and renders a badge image using the Poser library. The architecture follows a clean separation of concerns: value objects (`Username`, `Count`) enforce validation, a repository interface (`CounterRepositoryInterface`) abstracts storage, and a factory (`CounterRepositoryFactory`) selects between file-based or PDO-based persistence based on environment configuration. The file repository includes careful file locking to handle concurrent requests safely. The service is designed to be deployed via Docker with Nginx and PostgreSQL, but can also run with simple file storage for minimal setups. External dependencies are minimal and pinned via Composer. The code is well-structured, uses strict types, and demonstrates solid PHP engineering practices for a small service.

RATING: 8.1/10 MAINT: maintained DRIFT: low
▸ 3 reusable components found
u8views/go-u8views ★ 1093 12 APPLICATION

u8views is a production Go web application that tracks GitHub profile views and generates embeddable SVG badges showing view counts (day, week, month, total). Users authenticate via GitHub OAuth2, and the service counts views of their GitHub profile (likely via a tracking pixel or API). The monolithic backend uses Gin, PostgreSQL, sqlc for type-safe SQL, and quicktemplate for server-side HTML rendering. The frontend uses TypeScript with esbuild and ApexCharts for statistics dashboards. The codebase is well-structured with clean separation of concerns: controllers, services, repository pattern, and custom SVG badge generation with font measurement. It includes CI via GitHub Actions, Docker Compose for local development, and Ansible deployment scripts. Notable reusable components include the badge generation library and the OAuth2 flow implementation. Minor code smells include multiple legacy cmd versions (v1, v2, v3), fire-and-forget goroutines for view counting without error handling, and duplicated inline CSS across templates.

RATING: 7.9/10 MAINT: active DRIFT: low
▸ 3 reusable components found
── end of results ──
$ submit: