diff options
author | Vijay A <avijayr@protonmail.com> | 2021-05-19 10:33:26 +0530 |
---|---|---|
committer | Vijay Raghavan Aravamudhan <vraravam@users.noreply.github.com> | 2021-05-19 10:34:38 +0530 |
commit | e3e17652c7d90fed0f981d68b875fec9ce71d041 (patch) | |
tree | fbd16ed0dedcbcc51f234b373744f7feacc3b1ff /CONTRIBUTING.md | |
parent | Bump lodash from 4.17.19 to 4.17.21 (diff) | |
download | ferdium-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.md | 151 |
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 | |||
28 | This 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 | |||
32 | For 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 | |||
36 | As 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 | |||
44 | Please make sure you are running the exact node version used by the developers/contributors as specified in the [nvmrc file](./.nvmrc). | ||
45 | |||
46 | Currently, 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 | ||
49 | node -v | ||
50 | v14.16.1 | ||
51 | npm -v | ||
52 | 6.14.12 | ||
53 | node-gyp -v | ||
54 | v8.0.0 | ||
55 | ``` | ||
56 | |||
57 | #### Git | ||
58 | |||
59 | The 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 | ||
64 | apt install libx11-dev libxext-dev libxss-dev libxkbfile-dev rpm | ||
65 | ``` | ||
66 | |||
67 | #### Fedora | ||
68 | |||
69 | ```bash | ||
70 | dnf install libX11-devel libXext-devel libXScrnSaver-devel libxkbfile-devel rpm | ||
71 | ``` | ||
72 | |||
73 | #### Windows | ||
74 | |||
75 | Please make sure you run this command as an administrator: | ||
76 | |||
77 | ```bash | ||
78 | npm i -g windows-build-tools --vs2015 | ||
79 | ``` | ||
80 | --> | ||
81 | |||
82 | ### Clone repository with submodule | ||
83 | |||
84 | ```bash | ||
85 | git clone https://github.com/getferdi/server.git | ||
86 | cd server | ||
87 | git submodule update --init --recursive | ||
88 | ``` | ||
89 | |||
90 | It 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 | ||
97 | npm i | ||
98 | ``` | ||
99 | |||
100 | - Copy the `.env.example` file into `.env` and change the values to match your system. | ||
101 | |||
102 | ```bash | ||
103 | cp .env.example .env | ||
104 | ``` | ||
105 | |||
106 | _Note:_ | ||
107 | |||
108 | 1. Have env DB_SSL=true only if your database is postgres and it is hosted online on platforms like GCP, AWS, etc | ||
109 | 2. 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 | ||
114 | mkdir -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 | |||
127 | Ferdi 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 | ||
130 | cd 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 | ||