aboutsummaryrefslogtreecommitdiffstats
path: root/CONTRIBUTING.md
diff options
context:
space:
mode:
authorLibravatar Vijay A <avijayr@protonmail.com>2021-05-19 10:33:26 +0530
committerLibravatar Vijay Raghavan Aravamudhan <vraravam@users.noreply.github.com>2021-05-19 10:34:38 +0530
commite3e17652c7d90fed0f981d68b875fec9ce71d041 (patch)
treefbd16ed0dedcbcc51f234b373744f7feacc3b1ff /CONTRIBUTING.md
parentBump lodash from 4.17.19 to 4.17.21 (diff)
downloadferdium-server-e3e17652c7d90fed0f981d68b875fec9ce71d041.tar.gz
ferdium-server-e3e17652c7d90fed0f981d68b875fec9ce71d041.tar.zst
ferdium-server-e3e17652c7d90fed0f981d68b875fec9ce71d041.zip
[Housekeeping] Added missing hygiene configs/files for developer/contributor.
Diffstat (limited to 'CONTRIBUTING.md')
-rw-r--r--CONTRIBUTING.md151
1 files changed, 151 insertions, 0 deletions
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
new file mode 100644
index 0000000..d276763
--- /dev/null
+++ b/CONTRIBUTING.md
@@ -0,0 +1,151 @@
1# Contributing to ferdi-server
2
3:tada: First off, thanks for taking the time and your effort to make Ferdi better! :tada:
4
5## Table of contents
6
7<!-- TOC depthFrom:2 depthTo:2 withLinks:1 updateOnSave:1 orderedList:0 -->
8
9- [Contributing to ferdi-server](#contributing-to-ferdi-server)
10 - [Table of contents](#table-of-contents)
11 - [Code of Conduct](#code-of-conduct)
12 - [What should I know before I get started?](#what-should-i-know-before-i-get-started)
13 - [How Can I Contribute?](#how-can-i-contribute)
14 - [Setting up your Development machine](#setting-up-your-development-machine)
15 - [Install System-level dependencies](#install-system-level-dependencies)
16 - [Node.js, npm, node-gyp](#nodejs-npm-node-gyp)
17 - [Git](#git)
18 - [Clone repository with submodule](#clone-repository-with-submodule)
19 - [Install dependencies](#install-dependencies)
20 - [Styleguide](#styleguide)
21 - [Git Commit Messages format](#git-commit-messages-format)
22 - [Javascript Coding style-checker](#javascript-coding-style-checker)
23
24<!-- /TOC -->
25
26## Code of Conduct
27
28This project and everyone participating in it is governed by the [Ferdi Code of Conduct](https://github.com/getferdi/ferdi/blob/develop/CODE_OF_CONDUCT.md). By participating, you are expected to uphold this code. Please report unacceptable behavior to [stefan@adlk.io](mailto:stefan@adlk.io).
29
30## What should I know before I get started?
31
32For the moment, Ferdi's development is a bit slow but all contributions are highly appreciated. [Check this issue for discussion](https://github.com/getferdi/ferdi/issues/956).
33
34## How Can I Contribute?
35
36As a basic rule, before filing issues, feature requests or anything else. Take a look at the issues and check if this has not already been reported by another user. If so, engage in the already existing discussion.
37
38## Setting up your Development machine
39
40### Install System-level dependencies
41
42#### Node.js, npm, node-gyp
43
44Please make sure you are running the exact node version used by the developers/contributors as specified in the [nvmrc file](./.nvmrc).
45
46Currently, these are the combinations of system dependencies that work on an intel-based machines for MacOS/Linux/Windows (building on an ARM-based machine is still a work-in-progress due to node-sass native dependencies)
47
48```bash
49node -v
50v14.16.1
51npm -v
526.14.12
53node-gyp -v
54v8.0.0
55```
56
57#### Git
58
59The version [2.23.0](https://github.com/git-for-windows/git/releases/tag/v2.23.0.windows.1) for Git is working fine for development. You can then use the console from Git to do the development procedure.
60
61<!-- #### Debian/Ubuntu
62
63```bash
64apt install libx11-dev libxext-dev libxss-dev libxkbfile-dev rpm
65```
66
67#### Fedora
68
69```bash
70dnf install libX11-devel libXext-devel libXScrnSaver-devel libxkbfile-devel rpm
71```
72
73#### Windows
74
75Please make sure you run this command as an administrator:
76
77```bash
78npm i -g windows-build-tools --vs2015
79```
80 -->
81
82### Clone repository with submodule
83
84```bash
85git clone https://github.com/getferdi/server.git
86cd server
87git submodule update --init --recursive
88```
89
90It is important you execute the last command to get the required submodules (recipes, server).
91
92### Install dependencies
93
94- Run the following command to install all dependencies, and link sibling modules with ferdi-server.
95
96```bash
97npm i
98```
99
100- Copy the `.env.example` file into `.env` and change the values to match your system.
101
102```bash
103cp .env.example .env
104```
105
106_Note:_
107
1081. Have env DB_SSL=true only if your database is postgres and it is hosted online on platforms like GCP, AWS, etc
1092. You will have to provide a value for `API_KEY` that is at least 16 characters long.
110
111- If using sqlite for local development, create the database directory (whatever is set to `DATA` in `.env`)
112
113```bash
114mkdir -p data
115```
116
117- Run the database migrations with
118
119 ```bash
120 node ace migration:refresh
121 ```
122
123- To get the full functionality, you will need to have an SMTP server running for local development.
124
125<!-- ### Package recipe repository
126
127Ferdi requires its recipes to be packaged before it can use it. When running Ferdi as a development instance, you'll need to package the local recipes before you can create any services inside Ferdi.
128
129```bash
130cd recipes && npm i && npm run package
131``` -->
132
133### Start development app
134
135 ```bash
136 npm start --dev
137 ```
138
139### Styleguide
140
141#### Git Commit Messages format
142
143- Use the present tense ("Add feature" not "Added feature")
144- Use the imperative mood ("Move cursor to..." not "Moves cursor to...")
145- Limit the first line to 72 characters or less
146- Reference issues and pull requests liberally after the first line
147- When only changing documentation, include `[ci skip]` in the commit description
148
149#### Javascript Coding style-checker
150
151- Please use `es-lint` and the defined rules to maintain a consistent style