二开指南

二开指南

这页列出把 NextDevTpl 改成自己 SaaS 时最常见的修改入口。

品牌

修改项路径
站点名、URL、metadatasrc/config/site.ts
Logopublic/logo.svg 和 Header 组件
全局样式src/app/globals.css
Open Graph 图片模板src/features/shared/components/og-image-template.tsx

导航

区域路径
Header 和 Footersrc/config/nav.ts
Dashboard 侧边栏src/config/nav.tssrc/features/dashboard/components/sidebar.tsx
Admin 侧边栏src/config/nav.tssrc/features/admin/components/admin-sidebar.tsx

首页

营销页组件在:

src/features/marketing/components

首页路由在:

src/app/[locale]/(marketing)/page.tsx

大部分文案在:

messages/en.json
messages/zh.json

定价和套餐

修改项路径
套餐名和限制src/config/subscription-plan.ts
支付产品映射src/config/payment.ts
定价区 UIsrc/features/marketing/components/pricing-section.tsx
订阅 UIsrc/features/subscription

新增产品模块

新功能建议放在:

src/features/<your-feature>

推荐结构:

src/features/example/
├── actions.ts
├── components/
├── schemas/
├── types.ts
└── index.ts

路由组合放在 src/app,可复用业务逻辑放在 feature module。

内容

内容路径
文档src/content/docs/<locale>
博客src/content/blog/<locale>
法律页面src/content/legal/<locale>
PSEO 数据src/features/pseo/data/pseo-pages.json

提交前检查

pnpm typecheck
pnpm lint

如果改了认证、积分、支付、存储、工单或后台任务,要跑对应测试。

本页目录