From dbb5e791f0c228369605d126dd590962ebe1eddc Mon Sep 17 00:00:00 2001 From: Bertrand Yuan Date: Mon, 27 Apr 2026 20:52:54 +0800 Subject: docs: add comprehensive documentation for operations This commit introduces a complete set of documentation files covering various aspects of the project, including environment setup, quality checks, command references, and architecture. The documentation is structured to assist developers and contributors in understanding the project's configuration, workflow, and best practices. Additionally, translations for Simplified and Traditional Chinese have been added to ensure accessibility for a wider audience. This enhances the overall usability and maintainability of the project. Signed-off-by: Bertrand Yuan --- Documentation/source/zh_CN/operations.rst | 65 +++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 Documentation/source/zh_CN/operations.rst (limited to 'Documentation/source/zh_CN/operations.rst') diff --git a/Documentation/source/zh_CN/operations.rst b/Documentation/source/zh_CN/operations.rst new file mode 100644 index 0000000..ddacb09 --- /dev/null +++ b/Documentation/source/zh_CN/operations.rst @@ -0,0 +1,65 @@ +运维 +==== + +环境配置 +-------- + +关键环境变量在 ``src/env.js`` 中校验: + +.. list-table:: + :header-rows: 1 + :widths: 34 44 + + * - 变量 + - 用途 + * - ``DATABASE_URL`` + - PostgreSQL 连接字符串。 + * - ``RESEND_API_KEY`` + - Resend API key。 + * - ``RESEND_AUDIENCE_ID`` + - Resend audience ID。 + * - ``EMAIL_FROM`` + - 发件邮箱。 + * - ``BETTER_AUTH_SECRET`` + - better-auth secret,生产环境必填。 + * - ``GOOGLE_CLIENT_ID`` / ``GOOGLE_CLIENT_SECRET`` + - Google OAuth 凭据。 + * - ``GITHUB_CLIENT_ID`` / ``GITHUB_CLIENT_SECRET`` + - GitHub OAuth 凭据。 + +数据库流程 +---------- + +Payload collection 变更: + +.. code-block:: bash + + pnpm payload:migrate:create + pnpm payload:migrate + pnpm payload:generate + +应用 schema 变更: + +.. code-block:: bash + + pnpm db:generate + pnpm db:migrate + +质量检查 +-------- + +.. code-block:: bash + + pnpm lint + pnpm check + pnpm test + pnpm build + +文档构建 +-------- + +.. code-block:: bash + + make -C Documentation html + +生成的 ``Documentation/build`` 不应提交。 -- cgit v1.2.3