跳到主要内容

配置

成功启动平台并不意味着它会按照你想要的方式显示内容。现在还早,我们还有一些工作要做。让我们从配置我们的 SaaS 网站开始。

配置平台基础信息

配置平台的基本信息,使所有显示基本信息的地方都与你相关。

请在根目录下找到 config.js。在这里,你可以修改平台的基本信息,比如网站名称、描述、域名,以及网站是否国际化等。该文件中的提示可以帮助你进行必要的设置。它看起来是这样的:

config.js
const config = {
// The three items here are mandatory and are basic information about your startup that is vital for SEO.
// The domain name part is not required “https://”, “www”, and finally no slash. just the naked domain.
// The contact email is used for the support email in the app, and also for the Resend integration (if you use it).
appName: "OneDay.Build",
appDescription: "OneDay.Build provides individual developers or startups with a set of basic functionality packages for building a SaaS platform.The NextJS boilerplate with all you need to build your SaaS, AI tool, or any other web app.",
domainName: "OneDay.Build",
contactEmail: "bassnova@gmail.com",
};

export default config;

配置功能

OneDay.Build 为你的 SaaS 平台提供的许多功能,例如 Auth 和支付,都是使用第三方工具实现的。因此,为了与这些工具顺畅地通信,平台需要存储每个第三方工具的 API 信息。在本地调试阶段,你可以通过在根目录下的 .env 文件中记录这些 API 信息来完成这一步。

打开 .env 文件。我们已经为你可能使用的服务预设了一些字段名称。你可以注册相应的服务提供商,然后在这里填写 API 信息。如果你在注册过程中遇到任何问题,我们的文档也会提供相应的指导。 .env 文件还包含相关帮助信息的 URL。

.env

# ===============================================================
# MangoDB: https://docs.oneday.build/docs/features/Database
# +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
DATABASE_URL= " "

# ===============================================================
# Auth: https://docs.oneday.build/docs/features/Auth
#
# +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
SECRET = ' '

GITHUB_CLIENT_ID =
GITHUB_CLIENT_SECRET =
GOOGLE_CLIENT_ID =
GOOGLE_CLIENT_SECRET =