Skip to content

Commit bf094e0

Browse files
Merge pull request #138 from appwrite/update-readme
Feat: Update readme and add project health files
2 parents de73c02 + b3a09f9 commit bf094e0

File tree

5 files changed

+283
-130
lines changed

5 files changed

+283
-130
lines changed

CONTRIBUTING.md

Lines changed: 233 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,233 @@
1+
# Contributing
2+
3+
We would ❤️ for you to contribute to Appwrite and help make it better! We want contributing to Appwrite to be fun, enjoyable, and educational for anyone and everyone. All contributions are welcome, including issues, new docs as well as updates and tweaks, blog posts, workshops, and more.
4+
5+
## How to Start?
6+
7+
If you are worried or don’t know where to start, check out our next section explaining what kind of help is needed and where you can get involved. You can reach out with questions on our [Discord](https://appwrite.io/discord) server. You can also submit an issue and a maintainer can guide you!
8+
9+
## Repo Structure
10+
11+
```
12+
├── src
13+
│ ├── lib // All non-route components, accessible over "import ... from '$lib'"
14+
│ │ ├── components // Re-usable components
15+
│ │ ├── elements // Re-usable elements
16+
│ │ ├── layout // Global components for the layout (Nav/Content/Container)
17+
│ │ └── stores // Global stores (state management)
18+
│ └─── routes
19+
│ ├── console // Routes that need authentication
20+
│ │ ├──[project]
21+
│ │ │ ├── database // Database Service
22+
│ │ │ │ ├── [collection] // Nested Route for the collection "/console/[PROJECT_ID]/database/[COLLECTION_ID]"
23+
│ │ │ │ ├── _create.svelte // Component to Create collections
24+
│ │ │ │ └── index.svelte // Entrypoint for "/console/[PROJECT_ID]/database"
25+
│ │ │ ├── storage // Storage Service "/console/[PROJECT]/storage"
26+
│ │ │ └── auth // Users Service "/console/[PROJECT]/auth"
27+
│ │ └──...
28+
│ ├── login.svelte // Component for Login "/console/login"
29+
│ └── register.svelte // Component for Register "/console/register"
30+
├── build // Compiled application
31+
└── static // Static assets
32+
```
33+
34+
## Development
35+
36+
Once you've created a project and installed dependencies with `npm install`, start a development server:
37+
38+
```bash
39+
npm run dev
40+
```
41+
42+
### Build
43+
44+
```bash
45+
npm run build
46+
```
47+
48+
> You can preview the built app with `npm run preview`, regardless of whether you installed an adapter. This should _not_ be used to serve your app in production.
49+
50+
### Tests
51+
52+
```bash
53+
npm test
54+
```
55+
56+
This will run tests in the `tests/` directory.
57+
58+
### Format
59+
60+
Code should like everywhere the same, for this reason a code-formatter is mandatory.
61+
62+
```bash
63+
npm run format
64+
```
65+
66+
### Linter
67+
68+
```bash
69+
npm run lint
70+
```
71+
72+
### Diagnostics
73+
74+
Diagnostic tool that checks for following:
75+
76+
- Unused CSS
77+
- Svelte A11y hints
78+
- TypeScript compiler errors
79+
80+
```bash
81+
npm run check
82+
```
83+
84+
## Submit a Pull Request 🚀
85+
86+
Branch naming convention is as follows
87+
88+
`TYPE-ISSUE_ID-DESCRIPTION`
89+
90+
example:
91+
92+
```
93+
doc-548-submit-a-pull-request-section-to-contribution-guide
94+
```
95+
96+
When `TYPE` can be:
97+
98+
- **feat** - is a new feature
99+
- **doc** - documentation only changes
100+
- **cicd** - changes related to CI/CD system
101+
- **fix** - a bug fix
102+
- **refactor** - code change that neither fixes a bug nor adds a feature
103+
104+
**All PRs must include a commit message with the description of the changes made!**
105+
106+
Start by forking the project and use the `git clone` command to download the repository to your computer. A standard procedure for working on an issue would be to:
107+
108+
1. Before creating a new branch, pull the changes from upstream to make sure your default branch is be up to date.
109+
110+
```
111+
$ git pull
112+
```
113+
114+
2. Create a new branch from the default branch. For example `doc-548-submit-a-pull-request-section-to-contribution-guide`
115+
116+
```
117+
$ git checkout -b [name_of_your_new_branch]
118+
```
119+
120+
3. Work - commit - repeat ( be sure to be in your branch )
121+
4. Push changes to GitHub
122+
123+
```
124+
$ git push origin [name_of_your_new_branch]
125+
```
126+
127+
6. Submit your changes for review. If you go to your repository on GitHub, you'll see a `Compare & pull request` button. Click on that button.
128+
7. Start a Pull Request (PR) by clicking on `Create pull request`. Make sure to update the PR description following the template provided.
129+
8. Wait for a code review.
130+
9. If you need to make changes based on feedback, make sure to re-request a review from your reviewer after you've made the necessary changes.
131+
132+
![Re-Request a Review](https://docs.github.com/assets/cb-4714/images/help/pull_requests/request-re-review.png)
133+
134+
10. After approval, your PR will be merged.
135+
11. You can delete your branch after it has been merged.
136+
137+
## Guidelines
138+
139+
### Consistency
140+
141+
Before commiting always make sure to run all available tools to improve the codebase:
142+
143+
- Formatter
144+
- `npm run format`
145+
- Tests
146+
- `npm test`
147+
- Diagnostics
148+
- `npm run check`
149+
150+
### Performance
151+
152+
Page load times are a key consideration for users of all browsers and device types.
153+
154+
There are some general things we can do in front-end development:
155+
156+
- Minimise HTTP requests
157+
- Minimise blocking – content should be readable before client side processing
158+
- Lazy load 'supplementary' content (especially images)
159+
160+
### Don't Repeat Yourself (DRY)
161+
162+
If you repeat anything that has already been defined in code, refactor it so that it only ever has one representation in the codebase.
163+
164+
If you stick to this principle, you will ensure that you will only ever need to change one implementation of a feature without worrying about needing to change any other part of the code.
165+
166+
### Separation of concerns
167+
168+
Separate _structure_ from _presentation_ from _behaviour_ to aid maintainability and understanding.
169+
170+
- Keep CSS (presentation), JS (behaviour) and HTML (structure) in the same respective Svelte component
171+
- Avoid writing inline CSS or Javascript in HTML
172+
- Avoid writing CSS or HTML in Javascript
173+
- Don't choose HTML elements to imply style
174+
- Where appropriate, use CSS or Svelte rather than Javascript for animations and transitions
175+
- Try to use templates when defining markup in Javascript
176+
177+
### Write code to be read
178+
179+
Follow the principles of ['Keep It Simple, Stupid'](http://en.wikipedia.org/wiki/KISS_principle) (KISS); hard to read or obfuscated code is difficult to maintain and debug. Don't be too clever; write code to be read.
180+
181+
### Identify technical debt
182+
183+
Use code comment annotations (`@todo`) to mark parts of your code that require further work. This will allow the measurement and management of technical debt.
184+
185+
Don't use `@fixme` (which defines things that are broken) - you shouldn't be committing broken code to the repo.
186+
187+
### Dependencies
188+
189+
Please avoid introducing new dependencies to Appwrite without consulting the team. New dependencies can be very helpful but also introduce new security and privacy issues, complexity, and impact total docker image size.
190+
191+
Adding a new dependency should have vital value on the product with minimum possible risk.
192+
193+
## Introducing New Features
194+
195+
We would 💖 you to contribute to Appwrite, but we would also like to make sure Appwrite is as great as possible and loyal to its vision and mission statement 🙏.
196+
197+
For us to find the right balance, please open an issue explaining your ideas before introducing a new pull request.
198+
199+
This will allow the Appwrite community to have sufficient discussion about the new feature value and how it fits in the product roadmap and vision.
200+
201+
This is also important for Appwrite maintainers to discuss the feature's design and architecture to help the contribution fit in organically in the Appwrite codebase. Some bigger features might need to go through our [RFC process](https://github.com/appwrite/rfc).
202+
203+
## Other Ways to Help
204+
205+
Pull requests are great, but there are many other areas where you can help Appwrite.
206+
207+
### Blogging & Speaking
208+
209+
Blogging, speaking about, or creating tutorials about one of Appwrite’s many features. Mention [@appwrite](https://twitter.com/appwrite) on Twitter and/or email [[email protected]](mailto:[email protected]) so we can give pointers and tips and help you spread the word by promoting your content on the different Appwrite communication channels. Please add your blog posts and videos of talks to our [Awesome Appwrite](https://github.com/appwrite/awesome-appwrite) repo on GitHub.
210+
211+
### Presenting at Meetups
212+
213+
Presenting at meetups and conferences about your Appwrite projects. Your unique challenges and successes in building things with Appwrite can provide great speaking material. We’d love to review your talk abstract/CFP, so get in touch with us if you’d like some help!
214+
215+
### Sending Feedbacks & Reporting Bugs
216+
217+
Sending feedback is a great way for us to understand your different use cases of Appwrite better. If you had any issues, bugs, or want to share about your experience, feel free to do so on our GitHub issues page or at our [Discord channel](https://discord.gg/GSeTUeA).
218+
219+
### Submitting New Ideas
220+
221+
If you think Appwrite could use a new feature, please open an issue on our GitHub repository, stating as much information as you can think about your new idea and it's implications. We would also use this issue to gather more information, get more feedback from the community, and have a proper discussion about the new feature.
222+
223+
### Improving Documentation
224+
225+
Submitting documentation updates, enhancements, designs, or bug fixes. Spelling or grammar fixes will be very much appreciated.
226+
227+
### Helping Someone
228+
229+
Searching for Appwrite on Discord, GitHub, or StackOverflow and helping someone else who needs help. You can also help by teaching others how to contribute to Appwrite's repo!
230+
231+
## Code of Conduct
232+
233+
Help us keep Appwrite open and inclusive. Please read and follow our [Code of Conduct](https://github.com/appwrite/.github/blob/main/CODE_OF_CONDUCT.md).

LICENSE

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
Copyright (c) 2019 Appwrite (https://appwrite.io) and individual contributors.
2+
All rights reserved.
3+
4+
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
5+
6+
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
7+
8+
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
9+
10+
3. Neither the name Appwrite nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
11+
12+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

0 commit comments

Comments
 (0)