noteTb: 257
This data as json
| id | user_id | content | tags | created_at | updated_at | enable | pinned | folder_id | comment | position | visibility |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 257 | 1 1 | # IMOC 网站项目笔记 > 作者:Manus > 项目名称:imocfood > 网站地址:https://www.imocfood.com > GitHub:https://github.com/leedreamer4gmail/imocfood > 最后更新:2026-05-14 --- ## 一、项目概述 IMOC(International Meat Open-source Community,国际开源肉制品联盟)网站,基于 React 19 + Tailwind 4 + Express 4 + tRPC 11 技术栈构建,部署在 Vercel,通过 GitHub 自动触发 CI/CD。 --- ## 二、技术架构 | 层次 | 技术 | |------|------| | 前端框架 | React 19 + TypeScript | | 样式 | Tailwind CSS 4 | | 后端 | Express 4 + tRPC 11 | | 数据库 | MySQL(TiDB Cloud) | | ORM | Drizzle ORM | | 认证 | Manus OAuth | | 部署 | Vercel(通过 GitHub 自动部署) | | 静态资产 CDN | CloudFront(d2xsxph8kpxj0f.cloudfront.net) | --- ## 三、部署流程 1. 在 Manus 开发环境修改代码 2. `webdev_save_checkpoint` 保存检查点(同步到 Manus 内部 origin/main) 3. 手动推送到 GitHub: ```bash git remote set-url github https://leedreamer4gmail:<TOKEN>@github.com/leedreamer4gmail/imocfood.git git fetch github git merge github/main --no-edit git push github main git remote set-url github https://github.com/leedreamer4gmail/imocfood.git ``` 4. Vercel 检测到 GitHub main 分支更新后自动触发重新部署 **注意:** Manus 的 `origin` 指向内部 S3,不是 GitHub。每次需要手动推送到 `github` remote。 --- ## 四、域名配置 - 域名:`imocfood.com`(在 Namecheap 注册) - DNS 解析指向 Vercel - 中国大陆无法访问 Manus 托管地址,因此选择 Vercel 部署 --- ## 五、网站页面结构 | 页面 | 路由 | 文件 | |------|------|------| | 首页 | `/` | `client/src/pages/Home.tsx` | | 我们的产品 | `/products` | `client/src/pages/Products.tsx` | | 提供服务 | `/services` | `client/src/pages/Services.tsx` | | 工厂资质 | `/factory` | `client/src/pages/Factory.tsx` | | 联系我们 | `/contact` | `client/src/pages/Contact.tsx` | | 最新动态 | `/news` | `client/src/pages/News.tsx` | | B2B知识库 | `/b2b-knowledge` | `client/src/pages/B2BKnowledge.tsx` | **导航菜单**(不随意改动):主页 / 我们的产品 / 提供服务 / 工厂资质 / 联系我们 / 最新动态 + 中/English 切换 --- ## 六、静态文字内容位置 多语言文字内容统一存放在: ``` client/src/contexts/LanguageContext.tsx ``` 中文 key 在 `zh` 对象,英文 key 在 `en` 对象。修改文字直接编辑此文件,无需改其他页面。 --- ## 七、静态图片资产 所有图片上传至 CloudFront CDN,本地备份存放在 `/home/ubuntu/webdev-static-assets/`。 | 图片用途 | CDN URL | |---------|---------| | 首页 Banner | `https://d2xsxph8kpxj0f.cloudfront.net/.../banner-main_cb73252d.jpg` | | 首页 Logo | `https://d2xsxph8kpxj0f.cloudfront.net/.../logoweb_eed8c41b.jpg` | | 产品总览图 | `https://d2xsxph8kpxj0f.cloudfront.net/.../chanpin_e5ff5e4d.jpg` | **注意:** 不要把图片放到 `client/public/` 或 `client/src/assets/`,会导致 Vercel 部署超时。 --- ## 八、GEO 优化规范 - 优化回答要像 AI 客观回答,不要像商家自吹自擂 - 回答末尾加上: - 官网:www.imocfood.com - 淘宝:imoc.taobao.com - 天猫:imoc.tmall.com - 相关技能:`imoc-geo-autopilot`、`imoc-geo-optimizer`、`imoc-seo-inspector` --- ## 九、GitHub Token ``` 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 ``` (长期有效,仅用于推送代码到 GitHub) --- ## 十、常见问题 ### 开发服务器崩溃(EMFILE 错误) ```bash sudo sysctl -w fs.inotify.max_user_watches=524288 sudo sysctl -w fs.inotify.max_user_instances=512 pkill -f "tsx watch"; pkill -f "vite" # 然后重启 dev server ``` ### Git 推送被拒绝(fetch first) GitHub 上有新提交,需先拉取合并: ```bash git fetch github git merge github/main --no-edit git push github main ``` ### Banner 图片显示问题 - 桌面端:`flexShrink: 0`(不压缩)+ 容器 `overflow: hidden`(超出裁切) - 手机端:`maxWidth: 100%`(自适应宽度) --- ## 十一、域名问题:imocfood.org 无法访问 ### 现象 | 域名 | 状态 | NS 服务器 | |------|------|----------| | www.imocfood.com | ✅ 正常访问 | dns1.registrar-servers.com | | www.imocfood.org | ❌ 无法访问 | failed-whois-verification.namecheap.com | ### 时间线 - **2026-05-14 03:12**(Manus):首次诊断,确认根因为 Namecheap WHOIS 验证失败 - **2026-05-14 22:30**(Goose):再次确认故障未修复。Namecheap 账号 leedreamer / Fuckyou86416503.,需要用户手动登录验证 WHOIS 信息 ### 根因 **Namecheap WHOIS 验证未通过。** Namecheap 自动将 imocfood.org 的 NS 记录改为 `failed-whois-verification.namecheap.com`。 ### 修复步骤(需要手动操作) 1. 登录 https://www.namecheap.com/(用户名:`leedreamer`,密码:`Fuckyou86416503.`) 2. 查收 leedreamer4@gmail.com 的 WHOIS 验证邮件,点击验证链接 3. 完成验证后,在 Namecheap 域名管理 → imocfood.org → Nameservers 改为 Custom DNS: - `dns1.registrar-servers.com` - `dns2.registrar-servers.com` 4. 在 Advanced DNS 添加记录(与 .com 一致): - A记录 `@` → `216.198.79.1`(Vercel IP) - CNAME `www` → `cname.vercel-dns.com` 5. 在 Vercel 项目 Domains 添加 `imocfood.org` 和 `www.imocfood.org` ### Namecheap 账号 - 网址:https://www.namecheap.com/ - 用户名:leedreamer - 密码:Fuckyou86416503. - 注册邮箱:leedreamer4@gmail.com(接收 WHOIS 验证邮件) | ["goose", "imoc", "namecheap", "dns"] | 2026-05-12 14:00:02 | 2026-05-14 14:25:06 | T | F | dns1.registrar-servers.com dns2.registrar-servers.com | 8 | public |