Commit Graph

79 Commits

Author SHA1 Message Date
5fde7d249f feat: add PostHog telemetry with privacy-focused tracking
Integrate optional PostHog telemetry to track page views, RDAP queries,
user interactions, and errors while maintaining user privacy.

Key features:
- Type-safe event tracking with discriminated unions
- Automatic source map upload for production error tracking
- Privacy protections (query targets excluded from successful lookups)
- Do Not Track (DNT) header support
- Optional telemetry (disabled by default without environment variables)
- Error boundary with automatic error tracking
- Context-based telemetry integration throughout UI components

Environment variables required for telemetry:
- NEXT_PUBLIC_POSTHOG_KEY: PostHog project API key (client-side)
- NEXT_PUBLIC_POSTHOG_HOST: PostHog API endpoint (client-side)
- POSTHOG_PERSONAL_API_KEY: Source map upload key (server-side)
2025-10-23 18:00:24 -05:00
5fcf9dd94b refactor: reorganize project structure and consolidate test files
Consolidate test files into centralized __tests__ directory with clearer
naming. Rename utility modules for improved clarity and consistency.
Rename Generic component to RdapObjectRouter to better reflect purpose.
2025-10-23 16:34:05 -05:00
31706a1623 refactor: introduce unified contact parsing and display system
Extracts contact information parsing logic into reusable parsers for
both JSContact and vCard formats. Introduces ContactTable component
for consistent contact rendering across both formats, reducing code
duplication and improving maintainability.

- Add contact-parser.ts with parseJSContact() and parseVCard()
- Add ContactTable component for unified contact display
- Refactor JSContactDisplay and VCardDisplay to use new parsers
- Add comprehensive test suite for contact parsers (488 test cases)
- Move WHOIS Server field to DataList in EntitiesSection
- Fix DynamicDate tooltip to avoid duplicate time display
- Standardize import paths to use @ alias
- Update tooltip text for RDAP URL button clarity
2025-10-23 15:41:55 -05:00
2c67f49e2f refactor: introduce EmDash component and improve table semantics
Created a reusable EmDash component to standardize placeholder rendering
across tables. Updated DynamicDate to use semantic <time> element instead
of Button wrapper. Improved table alignment with proper left/center/right
positioning in LinksSection and NameserversSection. Enhanced typography in
RemarksSection with medium font weight for headings.
2025-10-23 15:14:57 -05:00
704b8380f6 refactor: replace HoverCard with Tooltip in StatusBadge
Simplifies the status information display by using the lighter-weight
Tooltip component instead of HoverCard, providing more immediate
feedback on hover while maintaining the same functionality.
2025-10-23 15:02:54 -05:00
a257675bf7 refactor: improve icon handling with component-based approach
Replace ReactNode icon props with IconComponent type for better
type safety and consistency. Add configurable iconSize prop to
control icon dimensions. Update ShareButton to pass icon
components instead of JSX elements.
2025-10-23 14:58:26 -05:00
0fa8abf490 refactor: unify copy-to-clipboard functionality with enhanced UX
Consolidate clipboard copy logic into a reusable CopyButton component with
visual feedback (checkmark, tooltip, color change). Replace inline clipboard
code in AbstractCard and ShareButton with the new component. Add type guards,
memoization, and improved error handling throughout.
2025-10-23 14:23:57 -05:00
698328f445 refactor: simplify ThemeToggle with config-driven approach
Replace imperative theme toggling logic with declarative
THEME_CONFIG object for cleaner, more maintainable code.
Add type safety with Theme type and isTheme type guard.
2025-10-23 13:10:00 -05:00
a51d21df83 feat: add shareable URL functionality with copy-to-clipboard button
Implement URL parameter serialization for sharing RDAP queries with
deep linking support. Add ShareButton component with clipboard
integration and visual feedback. Queries are automatically restored
from URL parameters on page load, enabling direct navigation to
specific RDAP lookups.
2025-10-23 11:59:33 -05:00
ada17fc9a9 feat: add dynamic filename generation for RDAP JSON downloads
Implement context-aware filename generation for downloaded RDAP
responses, replacing the generic "response.json" with descriptive
names based on object type, identifier, and query timestamp.
Filenames follow the pattern: rdap-{type}-{identifier}-{timestamp}.json,
with automatic CIDR conversion for IP networks and proper sanitization
of special characters.
2025-10-23 11:12:58 -05:00
9635098102 feat: add three-way theme toggle with system preference support
Enhanced ThemeToggle component to cycle through light, dark, and system
themes instead of just toggling between light and dark. Added DesktopIcon
for system theme state and improved accessibility with descriptive labels
showing current and next theme states.
2025-10-23 11:01:02 -05:00
a2a83e9593 feat: add OverlayScrollbars for improved scrolling UI
Replace native ScrollArea with OverlayScrollbars library in
AbstractCard raw view and main page layout. Provides consistent,
customizable scrollbars with auto-hide behavior across the
application.
2025-10-23 10:21:48 -05:00
ec9509e880 refactor: replace lucide-react with Radix icons and add GitHub link
Replace lucide-react dependency with Radix UI's native icon system.
Increase theme toggle icon size from 18px to 22px for better visibility.
Add GitHub repository link with icon button in the navigation header.
2025-10-23 10:06:54 -05:00
83556e950b feat: add global date format preferences with timezone support
Implements a synchronized date format toggle across all timestamps
with persistent user preferences. Timestamps now support three format
views (relative, absolute, ISO) with tooltips and copy functionality.
Adds automatic timezone detection and display.
2025-10-23 09:58:09 -05:00
86b7b5779e chore: remove top padding from abstract card 2025-10-22 18:27:40 -05:00
99b65363b4 fix: address code quality issues and critical bugs
- Fix getBestURL HTTPS prioritization bug (critical security issue)
- Standardize equality operators to === for status code checks
- Add JSON parsing error handling with try-catch
- Improve IP address validation with explicit error messages
- Fix ARIA label accessibility (add id="search" to TextField)
- Remove unused callback hook in useLookup
- Add type detection debouncing (150ms) using @mantine/hooks
- Remove duplicate LookupInput component from src/components/form/
2025-10-22 16:56:42 -05:00
3ff347b81f feat: enhance RDAP component rendering with comprehensive data display
Major improvements to RDAP card components:
- Add tooltips to action buttons in AbstractCard for better UX
- Implement dedicated section components (EntitiesSection, LinksSection,
  NameserversSection, RemarksSection, SecureDNSSection, VCardDisplay)
- Add conditional rendering for optional fields across all card types
- Enhance Entity and Nameserver cards with full data display
- Add WHOIS server (port43) display to relevant cards
- Improve visual hierarchy with nested entity displays
- Fix autodetection to only run when in autodetect mode
- Add proper null/undefined checks throughout components
2025-10-22 16:19:04 -05:00
335bc6aee8 feat: add CopyButton and StatusBadge components with enhanced RDAP card UX
This commit introduces two new reusable components and significantly
improves the user experience across all RDAP cards:

New Components:
- CopyButton: Provides one-click copying functionality for handles,
  addresses, and other identifiers
- StatusBadge: Displays color-coded status badges with proper type
  safety

RDAP Card Enhancements:
- Replace deprecated ClipboardCopyIcon with ClipboardIcon
- Add copy buttons next to all handles, addresses, and identifiers
- Migrate status displays from PropertyList to StatusBadge components
  with color coding
- Replace PropertyList with proper DataList components for roles and
  public IDs
- Improve Events table layout and styling
- Wrap all copyable values in Code components for better visual
  distinction

Type Safety Improvements:
- Add rdapStatusColors mapping with proper Radix UI badge color types
- Update IpNetwork and AutonomousNumber schemas to use typed
  StatusEnum arrays
2025-10-22 12:56:30 -05:00
0e9336df1d refactor: reorganize project structure and consolidate network utilities
Major restructuring to improve codebase organization:
- Moved test files to src/__tests__/ directory
- Reorganized UI components from src/components/common to src/components/ui
- Consolidated RDAP-related code into src/rdap/ directory structure
- Split network helpers into modular files (asn.ts, ipv4.ts, ipv6.ts)
- Created centralized exports via src/lib/network/index.ts
- Migrated utility functions from src/helpers.ts to src/lib/utils.ts
- Separated RDAP services into dedicated modules (rdap-api.ts, registry.ts, url-resolver.ts)

This refactoring enhances code maintainability and follows a clearer separation of concerns.
2025-10-22 12:31:08 -05:00
7073936e6c feat: migrate to Radix UI and implement dark mode with next-themes
Replace @headlessui/react and @heroicons/react with @radix-ui/themes and
@radix-ui/react-icons for a more comprehensive component library. Add
next-themes for dark mode support with a new ThemeToggle component. Update
all components to use Radix UI primitives and theming system, including
AbstractCard, DynamicDate, ErrorCard, Property, PropertyList, LookupInput,
and all card components (AutnumCard, DomainCard, EntityCard, IPCard,
NameserverCard). Update global styles and app configuration to support theme
switching.
2025-10-22 11:59:52 -05:00
611074b546 feat: implement Entity and Nameserver cards with type safety improvements
- Add EntityCard component to display entity information with handle, roles, and public IDs
- Add NameserverCard component to display nameserver details
- Integrate new cards into Generic component for proper object rendering
- Remove unused dependencies (immutability-helper, type-fest)
- Enhance type safety in LookupInput with Zod validation
- Replace console.log statements with appropriate comments
- Initialize registryDataRef with proper typed default values
- Remove unused code and debug logging from rdap.ts and useLookup hook
- Update Object.entries type definition without external dependency
2025-10-22 11:02:50 -05:00
c17f733da1 ci: implement comprehensive CI/CD and workflow automation
- Add GitHub Actions workflows for CI, release, and deployment
- Configure Renovate for automated dependency updates
- Set up Husky pre-commit hooks with lint-staged
- Add commitlint for enforcing Conventional Commits
- Configure semantic-release for automated versioning
- Add Prettier configuration for consistent formatting
- Reformat codebase with new formatting rules
2025-10-22 02:48:18 -05:00
2c1f882cd9 refactor: replace Google Fonts with FontSource packages and migrate to cn utility
- Replace Google Fonts CDN with self-hosted FontSource packages
- Add @fontsource-variable/inter for variable Inter font
- Add @fontsource/ibm-plex-mono with weight 400 for monospace font
- Create src/lib/utils.ts with shadcn's cn utility function
- Install tailwind-merge for intelligent Tailwind class merging
- Replace all clsx usages with cn utility across components
  - LookupInput.tsx: 7 replacements
  - ErrorCard.tsx: 1 replacement
  - Property.tsx: 2 replacements
- Remove Google Fonts URL import from globals.css
2025-10-22 02:22:39 -05:00
771a27da29 build: upgrade Tailwind CSS from v3 to v4
- Migrate from Tailwind CSS 3.x to 4.1.15
- Replace autoprefixer with @tailwindcss/postcss 4.1.15
- Update PostCSS configuration for Tailwind v4 compatibility
- Convert globals.scss to globals.css for CSS-first configuration
- Remove legacy tailwind.config.cjs in favor of CSS-based config
- Update all component imports to use new globals.css
- Remove old.tsx.disabled file
2025-10-22 02:11:09 -05:00
66bf588647 feat: upgrade to Next.js 15, React 19, and migrate to ESLint 9 flat config
Major framework upgrades:
- Next.js 13 → 15.5.6
- React 18.2.0 → 19.2.0
- ESLint 8 → 9 with flat config migration

Dependency updates:
- @headlessui/react, date-fns, zod, true-myth, usehooks-ts
- @typescript-eslint packages to v8
- TypeScript to v5.9.3
- Prettier to v3.6.2

Breaking changes:
- Migrate from .eslintrc.json to eslint.config.mjs
- Remove deprecated swcMinify option from next.config.mjs
- Update all React type definitions
2025-10-22 01:53:58 -05:00
5fb095a498 test: add comprehensive testing infrastructure with critical bug fixes
- Add Vitest testing framework with 88 passing tests across 4 test files
- Fix critical entity validator bug (service array index)
- Implement validator architecture with 'matched but invalid' state support
- Add strict IPv4/IPv6 validation with detailed error messages
- Add case-insensitive domain and ASN matching
- Add explicit validator priority ordering (url→json→tld→ip→domain)
- Add integration tests with real IANA registry validation
- Add AutnumCard component for AS number display
- Update dependencies: prettier 2.8.1→2.8.8

Test coverage:
- helpers.test.ts: IPv4/IPv6 CIDR matching (27 tests)
- helpers.asn.test.ts: ASN range validation (22 tests)
- rdap.test.ts: Type detection with edge cases (36 tests)
- rdap.integration.test.ts: Real IANA registry tests (3 tests)

Bug fixes:
- Entity validator now correctly uses service[1] for tags (0=email, 1=tags, 2=urls)
- IPv4 validation rejects octets >255 with specific error messages
- IPv6 validation checks for invalid hex chars and multiple ::
- Domain regex supports multi-label domains (a.b.c.d.example.net)
- Type detection priority prevents URL/JSON false matches as domains
2025-10-22 01:23:15 -05:00
09cd0bf49b build: migrate to pnpm and add vitest testing infrastructure
- Replace Yarn with pnpm as package manager
- Add Vitest with React Testing Library and happy-dom
- Configure test setup and add test scripts (test, test:ui, test:run)
- Add IPCard component and update lookup components
- Remove unused react-ogp dependency
- Add type-check script
2025-10-22 00:34:53 -05:00
b3048086c3 Add await registry-informed getTypes method with smart entity tag validation
fuck type coloring madness
2024-05-12 02:10:15 -05:00
c6a31f341c fix entity placeholder, pulse animate autodetected target, remove completed todo 2024-05-11 05:27:21 -05:00
abb6df7383 Add lock icon to non-autodetect target types 2024-05-11 01:33:16 -05:00
19c3442144 type/import fixes, improve placeholder examples 2024-05-11 01:19:57 -05:00
83402d54f5 Update 'next' and '@headlessui/react'
Using latest v2 of HeadlessUI
Also removed unused text-left class on LookupInputButton
2024-05-11 01:19:35 -05:00
34a3c8efa6 Use placeholders constants with SimplifiedTargetType 2024-05-10 05:58:35 -05:00
29e294d951 Add actions: copy to clipboard, download response file 2024-05-10 05:43:55 -05:00
06e1b603fc Fix selectable targets type 2024-05-10 02:36:02 -05:00
4ff929105e cut down additional padding
useful for mobile viewports
2024-05-10 02:35:47 -05:00
1f93c8568f fix minor linting/type errors 2024-05-10 02:25:44 -05:00
00088afa5c Make search icon clickable button 2024-05-10 02:25:17 -05:00
2f2a34efcf provide shorthand precise target type naming, fix ip / ip4-6 issue with LookupInput under refined TargetType definition 2024-05-10 02:15:10 -05:00
d819920f8a Use .dashed class instead of global attribute selector for title indication 2024-05-10 01:47:09 -05:00
5390c697e2 reduce card header padding on mobile viewport 2024-05-10 01:38:10 -05:00
3fa293a237 allow x scrolling on overflowing viewports (mobile) 2024-05-09 23:08:54 -05:00
bd49b57376 begin adding URL, link action on AbstractCard 2024-05-09 23:08:32 -05:00
28f58a362f clerical: import/doc/format fixes 2024-05-09 23:07:40 -05:00
590908ac68 notate domain card type in rendered html 2024-05-09 23:06:44 -05:00
1b026e6af4 implement detectedType, fix wrapping inside listbox button 2024-05-09 23:06:10 -05:00
757adcf385 Use react-timeago for DynamicDate component, improve relative timing display 2024-05-09 22:09:42 -05:00
c1dbc78c3f reformatting, improve name/docs 2024-05-09 21:45:46 -05:00
cb798c4ec1 Add proper isLoading implementation/spinning icon, detectedType prop stub 2024-05-09 21:45:23 -05:00
ec4036a45b reorganize/document, add detectedType prop for LookupInput 2024-05-09 20:19:32 -05:00