The-Data-Center-NEXURA/nexuradata-site

GitHub: The-Data-Center-NEXURA/nexuradata-site

为数据恢复与数字取证实验室提供的全栈运营平台,整合了营销网站、智能诊断助手、案卷管理、远程诊断和自动化工作流编排功能。

Stars: 1 | Forks: 0

# NEXURADATA 数据恢复和数字取证实验室的营销网站与启动平台。 本仓库涵盖: - 双语公共网站 (FR + EN) - 带有预鉴定、操作防护措施和案卷准备功能的引导式诊断助手 - 开通案卷表单 - 客户跟踪门户 - 内部控制台 `/operations/` - 用于 intake、跟踪、案卷自动化和操作员操作的 Cloudflare Pages Functions - Neon Postgres 数据库及 `wrangler.jsonc` 配置 ## 实用结构 - `index.html` / `en/index.html`:公共主页 (FR / EN) - 根目录下的 `*.html`:按原样发布的 FR 营销页面,以保持 URL 简短且稳定 - `en/*.html`:公共页面的 EN 版本;任何 FR 修改必须在 EN 端同步体现 - `suivi-dossier-client-montreal.html`:`noindex` 客户门户 - `operations/index.html`:需通过 Cloudflare Access 保护的控制台内部页面 - `assets/css/site.css`:共享样式 - `assets/js/site.js`:公共交互与操作员控制台 - `functions/api/diagnostic.js`:无需创建案卷的服务端预鉴定,供带有本地回退机制的公共机器人使用 - `functions/api/intake.js`:案卷开通 - `functions/api/status.js`:通过编号 + 代码进行客户跟踪 - `functions/api/ops/cases.js`:搜索、操作员操作、管家服务及自动化计划应用 - `functions/_lib/automation.js`:确定性分流、客户需求、情感信号、方案、SLA、时间表及防护措施 - `functions/_lib/concierge.js`:基于自动化计划的客户/操作员消息 - `functions/_lib/``:共享逻辑(DB、auth、emails、Stripe、rate-limit) - `migrations/neon/0001_full_schema.sql`:整合的 Postgres schema - `migrations/d1-archive/`:旧版 D1 数据库(仅作历史存档) - `wrangler.jsonc`:Pages/Functions 配置,仅包含非个人的角色值 - `.dev.vars.example`:不含机密信息或个人地址的本地模板,可复制为 `.dev.vars` ## 自动化与限制 - 公共诊断是一个确定性的引导式助手。它帮助选择流程,阻止危险操作,准备缺失信息,预填表单,并可通过 `/api/intake` 开通案卷。 - `/api/diagnostic` 提供无需数据库或创建案卷的服务端预鉴定;机器人在可用时使用它,并为静态预览保留本地回退机制。响应还包含简短的实验室交接信息:服务级别、SLA、下一步行动、缺失信息和操作员关注点。 - 服务端自动化计算类别、风险、客户需求、情感信号、方案、服务级别、SLA、状态计划、提交/支付计划、客户操作和操作员任务。 - `/operations/` 控制台可以重新生成管家消息,并将自动化计划应用于现有案卷;这些路由必须受 Cloudflare Access 保护。 - 任何数据恢复、取证分析、结果承诺、支付或物理干预均不得视为自动化执行。实验室在干预和计费前保留人工决策权。 - 自动化输出必须在案卷字段和时间表中保持可审计;避免使用不透明或无理据的消息。 ## 仓库规范 - 绝不提交 `.dev.vars`、`.env*`、`.wrangler/`、`release-cloudflare/` 或代理的本地导出文件。 - `.github/agents/Agent Discovery Results*` 文件是 VS Code/Copilot 的本地输出,必须保留在 Git 之外。 - 属于特定机器的个人地址和本地路径会被 `npm run check` 拦截。 - 内部 HTML 模板放在 `docs/` 中,而不是 `assets/` 中,因为 `assets/` 会随网站公开发布。 - `release-cloudflare/` 由 `npm run build` 重新生成;仅修改受跟踪的源文件。 - 根目录的 FR 页面及其 `en/` 版本必须保持同步,以保障双语 SEO。 ## RemoteLab 平台 (Pages Functions) 真实来源规范 ([apps/remotelab-api/src/server.ts](apps/remotelab-api/src/server.ts)) 已移植至 Cloudflare Pages Functions + Neon HTTP。所有路由均受 Cloudflare Access 保护(除了需要代理密钥的 `/api/monitoring/health`),在未配置 `DATABASE_URL` 时返回 503,并使用 `cases.case_id`(文本)作为案卷标识符。 | 领域 | 端点 | 库 | |---|---|---| | 案卷 | POST/GET `/api/cases`, GET `/api/cases/:caseId` | [functions/_lib/remotefix.js](functions/_lib/remotefix.js) | | 会话 | POST `/api/sessions` | 同上 | | 同意书 | POST `/api/consent` | 同上 | | 代理诊断 | POST `/api/agent/diagnostics` | 同上 | | 安全命令 | POST `/api/commands` | 同上 | | 监控 (accounts / agents / health / dashboard / convert) | `/api/monitoring/*` | [functions/_lib/monitor.js](functions/_lib/monitor.js) | | 商机 (rebuild / list / patch) | `/api/cases/:caseId/opportunities/rebuild`, `/api/admin/opportunities[/:id]` | [functions/_lib/opportunities.js](functions/_lib/opportunities.js) | | 报告 | POST `/api/reports/cases/:caseId`, GET `/api/reports/:reportId` | [functions/_lib/reports.js](functions/_lib/reports.js) | | 报价 | POST `/api/opportunities/:opportunityId/quote` | [functions/_lib/quotes.js](functions/_lib/quotes.js) | | 管理仪表盘 | GET `/api/admin/dashboard` | [functions/_lib/admin-dashboard.js](functions/_lib/admin-dashboard.js) | 相应的平台 schema 为 [migrations/neon/0004_remotelab_platform.sql](migrations/neon/0004_remotelab_platform.sql) (clients, monitoring_*, service_opportunities, generated_reports, quotes)。在 `0001_full_schema.sql` 之后应用以激活上述路由。 ### UI 参考 (未连线) - [apps/remotelab-portal/](apps/remotelab-portal/) — React/Vite/Tailwind/shadcn 客户门户 (`NexuraClientPortal.jsx`, `NexuraAdminConsole.jsx`)。不包含在 `npm run build`、CI 和实时网站中;作为 v2 UI 规范。 - [apps/remotelab-api/](apps/remotelab-api/) — 原始的 Node/Express 实现,保留作为移植的行为参考。同样不包含在 `npm run build` 和 CI 中。 ## 规范网站地图 此地图可避免在已有合适元素时堆积新版网站。 - **主要转化**:`index.html`、`tarifs-recuperation-donnees-montreal.html`、`suivi-dossier-client-montreal.html`、`paiement-reussi.html`、`paiement-annule.html`。 - **核心服务**:`recuperation-donnees-montreal.html`、`recuperation-raid-ssd-montreal.html`、`recuperation-telephone-montreal.html`、`forensique-numerique-montreal.html`、`services-recuperation-forensique-montreal.html`。 - **证明与信任**:`le-laboratoire.html`、`mandats-entreprise.html`、`reception-securisee-donnees-montreal.html`、`engagements-conformite-quebec.html`、`conditions-intervention-paiement.html`、`mentions-legales.html`、`politique-confidentialite.html`。 - **SEO 与教育**:`processus-recuperation-donnees-montreal.html`、`problemes-courants-recuperation-montreal.html`、`prevention-perte-donnees-montreal.html`、`sauvegarde-vs-recuperation-donnees-montreal.html`、`resilience-donnees-entreprise-montreal.html`、`zones-desservies-montreal-quebec.html`、`statut-services-montreal.html`。 - **内部控制台**:`operations/` 和 `/api/ops/*`,需通过 Cloudflare Access 保护。 在添加页面之前,请检查此地图并增强现有的规范页面。名称包含 `copy`、`old`、`backup`、`draft`、`test`、`tmp`、`v2` 或 `index2.html` 的文件会被 `npm run check` 拦截。 ## 启动前置条件 1. 配置一个 Neon Postgres 数据库并获取其 `DATABASE_URL`。 2. 通过 `psql` 或 Neon 控制台应用 schema `migrations/neon/0001_full_schema.sql`。 3. 将 `DATABASE_URL` 声明为 Cloudflare Pages 密钥。 4. 创建强密钥 `ACCESS_CODE_SECRET`。 5. 在 Cloudflare Email Routing 中配置 `contact@`、`urgence@`、`dossiers@` 别名。 6. 在 Resend 中验证发送域并提供 `RESEND_API_KEY`。 7. 在生产环境中配置 Stripe,设置 `STRIPE_MODE=live`,在 `STRIPE_SECRET_KEY` 中填入 live 密钥(`sk_live_...` 或 `rk_live_...`),并设置指向 `/api/stripe-webhook` 的 live webhook。 8. 使用 Cloudflare Access 保护 `/operations/*` 和 `/api/ops/*`。 详细的运行手册在 [`docs/LAUNCH-RUNBOOK.md`](docs/LAUNCH-RUNBOOK.md) 中。另见 [`docs/PLATFORM-HARDENING-TIMELINE.md`](docs/PLATFORM-HARDENING-TIMELINE.md) 和 [`docs/`](docs/) 以获取启动清单、快速部署指南、质量/可观测性基线以及竞争对手/定价研究笔记。 ## 命令 - `npm install` - `npm run build` - `npm run check` - `npm run ui:smoke` - `npm run secret:scan` - `npm run secret:scan:history` - `npm run audit` - `npm run audit:signatures` - `npm test` - `npm run test:coverage` - `npm run cf:whoami` - `npm run cf:dev` - `npm run cf:check` - `npm run cf:deploy` - `npm run cf:deploy:staging` 在 PR 或 push 前建议进行本地验证: ``` npm run secret:scan npm run check npm run ui:smoke npm run test:coverage npm run build git diff --check ``` CI 还会执行 `npm run audit`、`npm run audit:signatures`、CodeQL、依赖审查、njsscan SARIF 以及计划/手动的历史机密扫描。 `release-cloudflare/` 在每次构建时为静态资产重新生成。`functions/` 保留在项目根目录中以供 Cloudflare Pages Functions 使用。 ## Cloudflare Pages 1. 将 GitHub 仓库连接到 Cloudflare Pages。 2. 使用 `.` 作为根目录。 3. 使用 `npm run build` 作为构建命令。 4. 使用 `release-cloudflare` 作为构建输出目录。 5. 保留 `main` 作为生产分支。 6. 使用启动分支或 `staging` 进行预览。 7. 一旦 `wrangler.jsonc` 填充了真实的绑定,即将此文件视为配置的权威来源。
标签:B2B服务, Cloudflare Functions, Cloudflare Pages, D1数据库, HTML/CSS/JS, IT服务, MITM代理, Neon Postgres, PostgreSQL, RAID恢复, SaaS平台, Serverless, SLA管理, SSD恢复, Stripe支付集成, 双语网站, 在线表单, 多模态安全, 客户门户, 工单系统, 工单跟踪, 技术支持, 数字取证, 数据可视化, 数据恢复, 案件管理, 法务技术, 法语/英语, 电子取证, 移动设备取证, 网络研究, 自动化_triage_分类, 自动化脚本, 自定义脚本, 营销网站, 蒙特利尔, 诊断向导, 边缘计算, 运营控制台, 预筛选系统