summaryrefslogtreecommitdiff
path: root/Documentation/source/getting-started.rst
diff options
context:
space:
mode:
authorBertrand Yuan <me@bertyuan.com>2026-04-27 20:52:54 +0800
committerBertrand Yuan <me@bertyuan.com>2026-04-27 20:53:14 +0800
commitdbb5e791f0c228369605d126dd590962ebe1eddc (patch)
tree8c83fc84bd9547630e6733929dec77e102e055a8 /Documentation/source/getting-started.rst
parent658798b3a2378bb6df16cfbb16d707c6fb719e1e (diff)
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 <github@bertyuan.com>
Diffstat (limited to 'Documentation/source/getting-started.rst')
-rw-r--r--Documentation/source/getting-started.rst99
1 files changed, 99 insertions, 0 deletions
diff --git a/Documentation/source/getting-started.rst b/Documentation/source/getting-started.rst
new file mode 100644
index 0000000..890c01f
--- /dev/null
+++ b/Documentation/source/getting-started.rst
@@ -0,0 +1,99 @@
+Getting Started
+===============
+
+This page describes the local development path for contributors who want to run
+the application, connect a database, and validate changes.
+
+Prerequisites
+-------------
+
+Install the following tools before starting:
+
+* Node.js compatible with Next.js 15;
+* pnpm 10.x;
+* Docker or Podman for local PostgreSQL;
+* Git;
+* optional: Sphinx for building ``Documentation`` locally.
+
+Environment
+-----------
+
+Copy the example environment file and fill in values for your local setup:
+
+.. code-block:: bash
+
+ cp .env.example .env
+
+The application validates environment variables through ``src/env.js``. For
+development-only workflows where external services are not needed, some
+commands can be run with ``SKIP_ENV_VALIDATION=1``.
+
+Database
+--------
+
+The repository includes ``start-database.sh`` for local PostgreSQL bootstrap.
+It checks for an occupied port, reuses an existing container when possible, and
+warns about the default password placeholder.
+
+.. code-block:: bash
+
+ ./start-database.sh
+
+After the database is available, run Payload and Drizzle migrations as needed:
+
+.. code-block:: bash
+
+ pnpm payload:migrate
+ pnpm db:push
+
+Install and Run
+---------------
+
+Install dependencies:
+
+.. code-block:: bash
+
+ pnpm install
+
+Start the development server:
+
+.. code-block:: bash
+
+ pnpm dev
+
+The public site is served at ``http://localhost:3000``. The Payload admin is
+available at ``/admin``.
+
+Validation Commands
+-------------------
+
+Use the repository scripts for routine checks:
+
+.. list-table::
+ :header-rows: 1
+ :widths: 24 50
+
+ * - Command
+ - Purpose
+ * - ``pnpm lint``
+ - Validate content links and run Biome linting.
+ * - ``pnpm check``
+ - Run Biome checks.
+ * - ``pnpm test``
+ - Run the Vitest suite once.
+ * - ``pnpm test:coverage``
+ - Run tests with coverage.
+ * - ``pnpm build``
+ - Build the Next.js application and generate sitemap output.
+
+Build the Documentation
+-----------------------
+
+From the repository root:
+
+.. code-block:: bash
+
+ make -C Documentation html
+
+The generated HTML is written to ``Documentation/build/html`` and should not be
+committed.