Skip to content

Commit 3d0649d

Browse files
committed
feat: add instructions about frontend development
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
1 parent 3edfac3 commit 3d0649d

5 files changed

Lines changed: 135 additions & 14 deletions

File tree

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
Frontend
2+
========
3+
4+
By default, the Nextcloud server repository ships with the frontend already built for production.
5+
For development purposes, you may want to rebuild it in **development mode**.
6+
This allows you, for example, to inspect server components using the Vue Devtools browser extension.
7+
8+
Building server for development
9+
-------------------------------
10+
11+
To rebuild the frontend in development mode:
12+
13+
1. Access the Nextcloud container:
14+
15+
.. code-block:: bash
16+
17+
docker compose exec -u www-data nextcloud bash
18+
19+
2. Go to the root folder of the Nextcloud server:
20+
21+
.. code-block:: bash
22+
23+
cd /var/www/html
24+
25+
3. Install dependencies and build in dev mode:
26+
27+
.. code-block:: bash
28+
29+
npm ci && npm run dev
30+
31+
Reverting the server build
32+
--------------------------
33+
34+
If you build the frontend in development mode, you must revert the changes before pulling new updates from the Nextcloud **master** branch.
35+
Otherwise, you may run into conflicts.
36+
37+
To revert the build:
38+
39+
1. Exit the container.
40+
2. From your host machine, go to the Nextcloud server root folder.
41+
3. Remove the ``dist`` folder and restore it from Git:
42+
43+
.. code-block:: bash
44+
45+
rm -rf dist
46+
git checkout -- dist
47+
48+
After pulling the latest changes, you can rebuild the frontend in development mode again if needed.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
=======================
2+
Development environment
3+
=======================
4+
5+
.. toctree::
6+
:maxdepth: 2
7+
8+
setup
9+
updating
10+
frontend

developer_manual/getting-started/development-environment.rst renamed to developer_manual/getting-started/development-environment/setup.rst

Lines changed: 33 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
1-
Development environment
2-
=======================
1+
Setup
2+
=====
3+
4+
.. note::
5+
If the project does not have an issue for what you want to work on, please create one first.
6+
7+
If you would like to start contributing code, you may wish to begin with our list of good first issues.
8+
See the respective sections below for further instructions.
39

410
Prerequisites
511
-------------
@@ -29,15 +35,6 @@ Additional dependencies
2935
- ``poppler-utils``
3036
- System locale configured with UTF-8 charset
3137

32-
Developing for LibreSign
33-
------------------------
34-
35-
.. note::
36-
If the project does not have an issue for what you want to work on, please create one first.
37-
38-
If you would like to start contributing code, you may wish to begin with our list of good first issues.
39-
See the respective sections below for further instructions.
40-
4138
Setting up Nextcloud
4239
--------------------
4340

@@ -78,12 +75,35 @@ Inside the container, go to ``apps-extra/libresign`` and run:
7875
# Build and watch JS changes
7976
npm run watch
8077
81-
Final configuration
82-
-------------------
78+
Configuring LibreSign
79+
---------------------
8380

8481
After setting up the environment and installing LibreSign, open
8582
``Administration Settings > LibreSign`` in Nextcloud and:
8683

8784
- Click the **Download binaries** button.
8885
- Once all items show status **successful** (except “root certificate not configured”),
8986
continue to the next section to configure the root certificate.
87+
88+
89+
Extra apps
90+
----------
91+
92+
LibreSign also integrates with the following Nextcloud apps:
93+
94+
.. list-table::
95+
:header-rows: 1
96+
:widths: 20 80
97+
98+
* - **App**
99+
- **Description**
100+
* - `guests <https://apps.nextcloud.com/apps/guests>`__
101+
- Allows inviting guest users to sign documents.
102+
* - `notifications <https://github.com/nextcloud/notifications>`__
103+
- Sends notifications about signature requests and updates.
104+
* - `activity <https://github.com/nextcloud/activity>`__
105+
- Logs activities such as signature requests and confirmations.
106+
* - `viewer <https://github.com/nextcloud/viewer>`__
107+
- Enables PDF viewing inside LibreSign without leaving the app.
108+
* - `files_pdfviewer <https://apps.nextcloud.com/apps/files_pdfviewer>`__
109+
- Required in combination with *viewer* for proper PDF rendering.
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
Updating
2+
========
3+
4+
It is recommended to periodically update both Nextcloud and LibreSign in your local environment to ensure compatibility.
5+
6+
Updating Nextcloud
7+
------------------
8+
9+
- First, check if there are any local modifications in your Nextcloud repository:
10+
11+
.. code-block:: bash
12+
13+
cd path/to/nextcloud
14+
git status
15+
16+
.. note::
17+
If there are uncommitted changes, resolve them (commit, stash, or discard) before pulling updates.
18+
This avoids conflicts when updating from the master branch.
19+
20+
- Pull the latest changes from the Nextcloud **master** branch:
21+
22+
.. code-block:: bash
23+
24+
git pull origin master
25+
26+
- After pulling, the ``3rdparty`` folder may be outdated. In that case, run:
27+
28+
.. code-block:: bash
29+
30+
git submodule update --init --recursive
31+
32+
Updating LibreSign
33+
------------------
34+
35+
- Before starting a new task, always make sure your local ``main`` branch is up to date with the upstream repository:
36+
37+
.. code-block:: bash
38+
39+
cd path/to/libresign
40+
git checkout main
41+
git pull upstream main
42+
43+
- Then create your feature or fix branch from the updated ``main``.

developer_manual/getting-started/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ Getting started
66
:maxdepth: 2
77

88
branch-policies
9-
development-environment
9+
development-environment/index

0 commit comments

Comments
 (0)