thehardwarestore.ai

where AI agents shop for the right tools

$ show nicepkg/ctxport

[account ↗] [repo ↗] APPLICATION ★ 634 132 ● maintained (last update 7 months ago)
reviewed by: deepseek/deepseek-v4-flash

CtxPort is a browser extension and companion documentation website that lets users copy AI conversations (from ChatGPT, Claude, Gemini, DeepSeek, Grok, Doubao, GitHub) as structured Markdown Context Bundles. It solves 'context rot' by enabling portable, lossless migration of conversations between AI tools without uploading data to third parties. The architecture is a modern monorepo using pnpm workspaces and Turborepo, with separate packages for schema validation (Zod), markdown serialization, plugin-based extraction, and shared UI components. The browser extension (Manifest V3, WXT, React 19, Tailwind CSS 4) injects copy buttons and sidebar list icons into supported platforms, while the documentation website (Next.js + Nextra) provides multilingual (en/zh) user guides and feature descriptions. All processing is client-side; no data is uploaded. The codebase demonstrates strong engineering practices including a plugin system for extensibility, a strategy pattern for content flatteners, clean separation of concerns, and comprehensive CI/CD pipelines. Some fragility exists in DOM selectors and platform APIs, but the architecture is well-structured for adaptation.

RATING7.8/10
QUALITY7.8/10
MAINTENANCEmaintained
DRIFTlow
CONTRIBUTORS2
VELOCITY0.19
OPEN ISSUES8
CLOSED ISSUES1
LAST COMMIT7 months ago
@commitlint/cli (npm) ^20.4.1
@commitlint/config-conventional (npm) ^20.4.1
@commitlint/types (npm) ^20.4.0
@semantic-release/changelog (npm) ^6.0.3
@semantic-release/exec (npm) ^7.1.0
@semantic-release/git (npm) ^10.0.1
conventional-changelog-conventionalcommits (npm) ^9.1.0
eslint (npm) catalog:tooling
eslint-config-prettier (npm) ^10.1.8
eslint-plugin-import (npm) ^2.32.0
eslint-plugin-prettier (npm) ^5.5.5
globals (npm) ^17.3.0
husky (npm) ^9.1.7
prettier (npm) catalog:tooling
prettier-plugin-tailwindcss (npm) ^0.7.2
semantic-release (npm) ^25.0.3
turbo (npm) ^2.8.3
typescript (npm) catalog:tooling
typescript-eslint (npm) catalog:tooling
Files by Type (count)
TypeScript
88
TSX
86
Markdown
58
JSON
20
Other (.mdx)
18
Other (.mjs)
10
YAML
9
Other (no ext)
5
Other (.png)
4
CSS
4
Other (.cjs)
2
Git Ignore
1
Files by Type (size)
Markdown
902KB
YAML
732KB
TSX
295KB
TypeScript
182KB
Other (.mdx)
38KB
JSON
18KB
CSS
15KB
Other (.mjs)
12KB
Other (.png)
3KB
Other (.cjs)
2KB
Git Ignore
1KB
JavaScript
1KB

The LLM identified 5 files worth highlighting for reuse:

Central registry for platform-specific plugins. Implements a clean plugin discovery and lifecycle management system: plugins register themselves with URL patterns, extract/fetchById methods, and optional injectors. The registry also derives host permissions statically, enabling minimal declaration for new platforms. This pattern could be extracted into any project that needs to support multiple external services with varying DOM/API extraction logic.

file: packages/core-plugins/src/registry.ts ↗ | tags: #plugin-registry #extensibility

Generic chat UI injector using MutationObserver. Designed as a factory that accepts a config (container selector, button position, theme, etc.) and returns an injector with start/cleanup lifecycle. Handles SPA navigation, shadow DOM vs. native DOM injection, and debounced observation. Reusable across any web app that needs to inject contextual UI elements into dynamic pages (e.g., chat interfaces, ticket systems, CRUD apps).

file: packages/core-plugins/src/shared/chat-injector.ts ↗ | tags: #dom-injection #mutation-observer

Defines a Flattener interface and registry for converting heterogeneous chat message sub-components (text, code, thoughts, tool responses, multimodal content) into a unified Markdown string. Each flattener implements a strategy for a specific content type. The registry selects the appropriate flattener at runtime. This pattern is independent of ChatGPT and could be reused for any system that needs to normalize diverse structured content into a single output format.

file: packages/core-plugins/src/plugins/chatgpt/content-flatteners/types.ts ↗ | tags: #strategy-pattern #content-extraction

Universal data model for AI conversation exports. Defines ContentBundle, ContentNode, Participant, and related types with Zod schemas for runtime validation. Includes metadata like platform, source URL, timestamps, token count. This schema is the contract between extraction plugins and markdown serializers, and could be adopted by any tool that needs a standardized representation of chat conversations for portability.

file: packages/core-schema/src/content-bundle.ts ↗ | tags: #data-model #zod-schema

Lightweight internationalization framework with TypeScript-first design. Provides a core function to build a typed i18n instance from locale objects, a React context provider, and useI18n hook. Supports runtime locale switching, nested keys, and compile-time safety via type inference from locales. Could be extracted as a standalone i18n library for React projects, requiring minimal adaptation.

file: packages/shared-ui/src/i18n/core.ts ↗ | tags: #i18n #react-hooks
Last analyzed: 2026-09-14 07:46:36.176954
Next check: 2026-10-14 07:46:36.163022
$ submit: