summaryrefslogtreecommitdiff
path: root/Documentation/source/getting-started.rst
blob: 890c01f30b166561946a726d5a4fd1e737045064 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
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.