[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-93855":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":13,"contributorsCount":13,"subscribersCount":13,"size":13,"stars1d":13,"stars7d":13,"stars30d":13,"stars90d":13,"forks30d":13,"starsTrendScore":13,"compositeScore":15,"rankGlobal":10,"rankLanguage":10,"license":16,"archived":17,"fork":17,"defaultBranch":18,"hasWiki":17,"hasPages":19,"topics":20,"createdAt":10,"pushedAt":10,"updatedAt":21,"readmeContent":22,"aiSummary":23,"trendingCount":13,"starSnapshotCount":13,"syncStatus":24,"lastSyncTime":25,"discoverSource":26},93855,"gw","NextWeb4\u002Fgw","NextWeb4","HxHwang Gw 公文事务与写作管理系统","https:\u002F\u002Fnextweb4.github.io\u002Fgw\u002F",null,"HTML",160,0,147,40,"Other",false,"main",true,[],"2026-09-21 04:01:26","\u003Cp align=\"center\">\n  \u003Ca href=\"README.md\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FEnglish-0969da?style=flat-square\" alt=\"English\">\u003C\u002Fa>\n  \u003Ca href=\"README.zh-CN.md\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002F%E7%AE%80%E4%BD%93%E4%B8%AD%E6%96%87-c8102e?style=flat-square\" alt=\"简体中文\">\u003C\u002Fa>\n  \u003Ca href=\"README.ja.md\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002F%E6%97%A5%E6%9C%AC%E8%AA%9E-8250df?style=flat-square\" alt=\"日本語\">\u003C\u002Fa>\n\u003C\u002Fp>\n\n\u003Cp align=\"center\">\n  \u003Cimg src=\"assets\u002Fbrand\u002Fapp-icon.svg\" alt=\"HxHwang Gw application icon\" width=\"96\">\n\u003C\u002Fp>\n\n# HxHwang Gw\n\nA local-first system for official-document work, task and file tracking, drafting, weekly reports, document export, and controlled private synchronization.\n\n![Version](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fversion-0.3.1-0969da?style=flat-square)\n![Node.js](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FNode.js-24-339933?style=flat-square&logo=nodedotjs&logoColor=white)\n![pnpm](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fpnpm-11.9.0-f69220?style=flat-square&logo=pnpm&logoColor=white)\n![TypeScript](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FTypeScript-5.8-3178c6?style=flat-square&logo=typescript&logoColor=white)\n![License](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Flicense-All_rights_reserved-555?style=flat-square)\n\n## Overview\n\nHxHwang Gw is a pnpm monorepo that shares one domain model across a public GitHub Pages demonstration, separate Internet and intranet Web builds, and separate Internet and intranet Electron clients. It stores operational data locally first, separates network capabilities at build time, and provides explicit adapters for synchronization and AI requests.\n\nVersion 0.3.1 builds on the `\u002Fgw\u002F` deployment, real four-digit date validation, reusable people and organizations, deterministic task summaries, DOCX\u002FHTML\u002FTXT import, local custom formats, and edition-specific AI paths. It also fixes edition-specific Debian package names and expands the module-by-module user manual.\n\nThe public demonstration does not display private controls, import real business snapshots, call the private API, or enable AI. Use it to inspect the interface with sample data: [GitHub Pages demonstration](https:\u002F\u002Fnextweb4.github.io\u002Fgw\u002F).\n\n## Core Capabilities\n\n| Area | What is implemented |\n| --- | --- |\n| Work management | Tasks, reusable assigners\u002Fhandlers\u002Forganizations, Chinese statuses, stage tracking, deterministic work summaries, attachments, and searchable local records |\n| Writing | Rich-text drafting, DOCX\u002FHTML\u002FTXT import with sanitization, reusable custom formats, deterministic weekly reports, editable versions, and historical archives |\n| Documents | A shared A4-oriented engine for DOCX and PDF export; browser print is used on the Web and Electron printing on desktop |\n| Migration | Importers for two legacy prototype export shapes, with warnings when their shared version marker cannot identify the source reliably |\n| Local data | IndexedDB-backed repositories, snapshots, attachment references, and explicit recovery\u002Fexport operations |\n| Edition services | Internet builds use a session-only API key with an OpenAI-compatible endpoint; intranet builds use authenticated private sync and the internal AI gateway only |\n\nHistorical Skills, configuration, weekly reports, and unmapped source fields remain visible as read-only plain text. Imported HTML or script text is not executed.\n\n## Runtime Variants\n\n| Variant | Private controls | Intended use | Important boundary |\n| --- | --- | --- | --- |\n| Public Pages | Disabled | Product demonstration with built-in sample data | No business JSON, real attachments, snapshot restore, private API, or AI |\n| Internet Web \u002F desktop | Direct AI only | Non-classified use with an OpenAI-compatible HTTPS endpoint | The API key stays in session memory; browser use also requires provider CORS |\n| Intranet Web \u002F desktop | Internal sync and AI gateway | Use on a controlled internal origin | Provider keys stay on the server; the intranet desktop main process blocks direct public-AI IPC |\n\nAll variants remain local-first. Private synchronization begins only after a user supplies a server address and access code.\n\n## Requirements\n\n- Node.js `24`, matching the GitHub Actions toolchain.\n- pnpm `11.9.0`, declared through the root `packageManager` field.\n- Playwright Chromium for end-to-end tests and brand-asset generation.\n- Windows for NSIS installers; Linux for AppImage\u002FDEB packaging and final Linux compatibility checks.\n- A Chromium-class browser for the Web builds.\n\nThe repository version is `0.3.1`. Dependencies are locked by `pnpm-lock.yaml`; use the frozen lockfile for reproducible installs.\n\n## Install and Run\n\n```bash\ncorepack enable\npnpm install --frozen-lockfile\npnpm dev:web\n```\n\nThe default development server listens on the local interface. To exercise private controls with the intranet build mode:\n\n```bash\npnpm dev:web:intranet\n```\n\nTo exercise the Internet edition with an OpenAI-compatible endpoint:\n\n```bash\npnpm dev:web:internet\n```\n\nDo not point the public Pages build at a private API. Configuration, real attachments, and business snapshots belong only in a desktop or controlled intranet environment.\n\n## Typical Workflow\n\n1. Create or import tasks and file records, then review the migration report and read-only historical archive.\n2. Draft official-document content and maintain the relevant local knowledge entries.\n3. Generate a weekly report from the selected date range, edit it, save a version, and export it for review.\n4. Export a local snapshot before clearing browser data, changing devices, or uninstalling the desktop client.\n5. In a private build, explicitly connect to the server, pull the current master state, and push only locally newer records.\n6. Before any AI request, inspect and edit the redaction preview and confirm that the material is appropriate to send.\n\nGenerated documents are working outputs, not a substitute for editorial, policy, font, pagination, or secrecy review.\n\n## Local Data, Privacy, and Recovery\n\n- The public and intranet Web builds keep application records in the current browser profile's IndexedDB.\n- The desktop build uses the same local model and adds a restricted Electron bridge for native PDF export.\n- Clearing site data, removing a browser profile, or uninstalling without a snapshot can make local records unavailable.\n- Local redaction recognizes common phone numbers, email addresses, identity numbers, and labeled names, but cannot prove that a document is anonymous.\n- Sensitive, classified, or otherwise prohibited material must not enter this application or a public model.\n- Model keys, database credentials, and provider configuration stay on the private server, never in client storage.\n\nRead [`docs\u002FHELP.md`](docs\u002FHELP.md) before using migration, synchronization, attachments, or AI with real internal material.\n\n## Content and Network Boundaries\n\nThe checked-in knowledge pack is generated only from the repository's licensed material and an explicit HTTPS source allowlist. `pnpm content:sync` is an intentional network operation: it follows the repository's redirect and response-size policy, records source metadata, and does not scrape commercial reference products or overwrite manually maintained templates.\n\nPublic Pages uses a restrictive CSP and no private connection targets. The intranet\u002Fdesktop CSP allows HTTPS and local API endpoints needed for explicit private operation. Because an HTML CSP meta element cannot enforce `frame-ancestors`, production hosting must set `Content-Security-Policy: frame-ancestors 'none'` as an HTTP response header when framing protection is required.\n\n## Test and Validate\n\n```bash\npnpm lint\npnpm format:check\npnpm test\npnpm content:verify\npnpm assets:verify\npnpm exec playwright install chromium\npnpm test:e2e\npnpm test:e2e:internet\npnpm test:e2e:intranet\n```\n\n`pnpm test` runs package tests plus content-policy, workflow-contract, and UI-contract checks. The Playwright suites cover desktop and narrow viewports, the public\u002Fprivate feature split, migration, local workflows, document export, attachments, CSP behavior, and the rule that the intranet client performs no external request before explicit connection.\n\n`lint` and `format:check` currently delegate to TypeScript or JavaScript syntax\u002Ftype validation in each workspace; no independent source formatter is configured.\n\n## Build and Release\n\n```bash\npnpm build\npnpm build:web:internet\npnpm build:web:intranet\npnpm build:desktop\npnpm build:desktop:win:x64:internet\npnpm build:desktop:win:x64:intranet\npnpm build:desktop:linux:x64:internet\npnpm build:desktop:linux:x64:intranet\n```\n\nThe public Web build is written to `apps\u002Fweb\u002Fdist\u002F`; Internet and intranet Web builds are isolated in `dist-internet\u002F` and `dist-intranet\u002F`. Replace `x64` with `arm64` for ARM builds. Desktop packaging first builds a `file:\u002F\u002F`-compatible Web bundle and rejects absolute asset paths that Electron could not load.\n\nTags matching `v*` trigger Windows\u002FLinux, x64\u002Farm64, Internet\u002Fintranet packaging. A release is created only after all packages and Debian 10\u002F12 startup gates succeed; the matrix produces 12 edition-specific installers plus `SHA256SUMS.txt`.\n\n## Architecture and Module Boundaries\n\n```text\napps\u002Fweb          React\u002FVite UI and build-time public\u002Fprivate capability split\napps\u002Fdesktop      Electron main process, preload bridge, security policy, packaging\npackages\u002Fdomain   Shared entities, validation, weekly-report and archive semantics\npackages\u002Flocal-data  IndexedDB repositories, snapshots, attachments, local persistence\npackages\u002Fdocuments   DOCX\u002FPDF-oriented document model and export helpers\npackages\u002Fmigration   Legacy export recognition, mapping, warnings, archive preservation\npackages\u002Fsync-client Explicit private sync, attachment, redaction, and AI client\ncontent           Licensed sources, allowlist, generated knowledge pack, attribution\nscripts           Content policy, asset generation, build and workflow contract checks\ne2e               Public, Internet, and intranet Playwright scenarios\n```\n\nUI components must use package APIs rather than reaching into persistence internals. Network behavior belongs in `packages\u002Fsync-client`; local storage must not acquire implicit network access. Electron keeps context isolation and sandboxing enabled and exposes only the narrow preload contract.\n\n## Status and Known Limitations\n\n- The public demonstration targets `https:\u002F\u002Fnextweb4.github.io\u002Fgw\u002F`; deployment and package checks do not make the private API's shared-code authentication production-ready.\n- The application is designed for public or internal non-classified work, not classified records.\n- Browser storage durability depends on the browser profile and the user's snapshot practice.\n- DOCX\u002FPDF output depends on fonts and the final editor\u002Fviewer; formal documents still require manual review.\n- Legacy prototypes used a shared version identifier and omitted one Skill collection from their standard exporter, so ambiguous imports produce an explicit warning instead of a guessed source label.\n- Windows and Linux packages are not Authenticode\u002Fcode-signed. Real ARM hardware remains an external verification item even though CI builds and emulated installation gates exist.\n\nSee [`docs\u002FVERIFICATION_MATRIX.md`](docs\u002FVERIFICATION_MATRIX.md) for the maintained evidence matrix and [`RELEASE_NOTES.md`](RELEASE_NOTES.md) for release history.\n\n## Maintenance Guidance\n\n- Preserve the public\u002Fintranet\u002Fdesktop capability boundary and their separate output directories.\n- Add focused tests when changing domain invariants, persistence, migration, redaction, synchronization, Electron IPC, export behavior, or workflows.\n- Run content verification before changing licensed or generated knowledge files; authorization metadata and attribution must stay consistent.\n- Regenerate and verify PNG\u002FICO assets after changing `assets\u002Fbrand\u002Fapp-icon.svg`.\n- Keep package versions, release notes, desktop artifact names, all three README files, and workflow assertions synchronized.\n\nDependency choices, licenses, rejected alternatives, and rollback boundaries are documented in [`OPEN_SOURCE_AUDIT.md`](OPEN_SOURCE_AUDIT.md). Visual and interaction rules are documented in [`docs\u002FDESIGN_SYSTEM.md`](docs\u002FDESIGN_SYSTEM.md).\n\n## Author and Contact\n\n- **HaoXiangHwang**\n- [Rays688888@Gmail.com](mailto:Rays688888@Gmail.com)\n- \u003Chttps:\u002F\u002Fnextweb4.github.io\u002F>\n- \u003Chttps:\u002F\u002Fgithub.com\u002FNextWeb4>\n\n## Copyright and Licensing\n\nCopyright (c) 2026 HaoXiangHwang. All rights reserved.\n\nThe repository declares `UNLICENSED`; no permission to copy, modify, or redistribute the project's own code or content is granted without written authorization. Third-party dependencies remain subject to their respective licenses, and the scope of authorized reference material is recorded under `content\u002Flicensed\u002F`. Read [`COPYRIGHT.md`](COPYRIGHT.md) and [`content\u002FATTRIBUTION.md`](content\u002FATTRIBUTION.md) before reuse or distribution.\n","HxHwang Gw 是一个面向公文事务的本地优先型轻量级管理系统，支持任务跟踪、公文起草、周报生成、多格式文档（DOCX\u002FHTML\u002FTXT）导入导出及受控私有同步。系统基于 TypeScript 开发，采用 IndexedDB 本地存储，通过构建时分离网络能力实现内网\u002F外网双版本部署，并提供可扩展的 AI 接口适配与定制化公文格式管理。适用于党政机关、事业单位及国企内部的日常公文处理、事务协同与归档管理场景，尤其适合对数据主权和离线可用性有明确要求的中小型办公环境。",2,"2026-07-26 02:30:07","CREATED_QUERY"]