Skip to content

Commit 8532806

Browse files
committed
docs: added win32/linux setup-guide
1 parent fa4bf56 commit 8532806

File tree

7 files changed

+486
-430
lines changed

7 files changed

+486
-430
lines changed

CODE_OF_CONDUCT.md

Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
We as members, contributors, and leaders pledge to make participation in our
6+
community a harassment-free experience for everyone, regardless of age, body
7+
size, visible or invisible disability, ethnicity, sex characteristics, gender
8+
identity and expression, level of experience, education, socio-economic status,
9+
nationality, personal appearance, race, religion, or sexual identity
10+
and orientation.
11+
12+
We pledge to act and interact in ways that contribute to an open, welcoming,
13+
diverse, inclusive, and healthy community.
14+
15+
## Our Standards
16+
17+
Examples of behavior that contributes to a positive environment for our
18+
community include:
19+
20+
* Demonstrating empathy and kindness toward other people
21+
* Being respectful of differing opinions, viewpoints, and experiences
22+
* Giving and gracefully accepting constructive feedback
23+
* Accepting responsibility and apologizing to those affected by our mistakes,
24+
and learning from the experience
25+
* Focusing on what is best not just for us as individuals, but for the
26+
overall community
27+
28+
Examples of unacceptable behavior include:
29+
30+
* The use of sexualized language or imagery, and sexual attention or
31+
advances of any kind
32+
* Trolling, insulting or derogatory comments, and personal or political attacks
33+
* Public or private harassment
34+
* Publishing others' private information, such as a physical or email
35+
address, without their explicit permission
36+
* Other conduct which could reasonably be considered inappropriate in a
37+
professional setting
38+
39+
## Enforcement Responsibilities
40+
41+
Community leaders are responsible for clarifying and enforcing our standards of
42+
acceptable behavior and will take appropriate and fair corrective action in
43+
response to any behavior that they deem inappropriate, threatening, offensive,
44+
or harmful.
45+
46+
Community leaders have the right and responsibility to remove, edit, or reject
47+
comments, commits, code, wiki edits, issues, and other contributions that are
48+
not aligned to this Code of Conduct, and will communicate reasons for moderation
49+
decisions when appropriate.
50+
51+
## Scope
52+
53+
This Code of Conduct applies within all community spaces, and also applies when
54+
an individual is officially representing the community in public spaces.
55+
Examples of representing our community include using an official e-mail address,
56+
posting via an official social media account, or acting as an appointed
57+
representative at an online or offline event.
58+
59+
## Enforcement
60+
61+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
62+
reported to the community leaders responsible for enforcement at
63+
Pooranjoy.
64+
All complaints will be reviewed and investigated promptly and fairly.
65+
66+
All community leaders are obligated to respect the privacy and security of the
67+
reporter of any incident.
68+
69+
## Enforcement Guidelines
70+
71+
Community leaders will follow these Community Impact Guidelines in determining
72+
the consequences for any action they deem in violation of this Code of Conduct:
73+
74+
### 1. Correction
75+
76+
**Community Impact**: Use of inappropriate language or other behavior deemed
77+
unprofessional or unwelcome in the community.
78+
79+
**Consequence**: A private, written warning from community leaders, providing
80+
clarity around the nature of the violation and an explanation of why the
81+
behavior was inappropriate. A public apology may be requested.
82+
83+
### 2. Warning
84+
85+
**Community Impact**: A violation through a single incident or series
86+
of actions.
87+
88+
**Consequence**: A warning with consequences for continued behavior. No
89+
interaction with the people involved, including unsolicited interaction with
90+
those enforcing the Code of Conduct, for a specified period of time. This
91+
includes avoiding interactions in community spaces as well as external channels
92+
like social media. Violating these terms may lead to a temporary or
93+
permanent ban.
94+
95+
### 3. Temporary Ban
96+
97+
**Community Impact**: A serious violation of community standards, including
98+
sustained inappropriate behavior.
99+
100+
**Consequence**: A temporary ban from any sort of interaction or public
101+
communication with the community for a specified period of time. No public or
102+
private interaction with the people involved, including unsolicited interaction
103+
with those enforcing the Code of Conduct, is allowed during this period.
104+
Violating these terms may lead to a permanent ban.
105+
106+
### 4. Permanent Ban
107+
108+
**Community Impact**: Demonstrating a pattern of violation of community
109+
standards, including sustained inappropriate behavior, harassment of an
110+
individual, or aggression toward or disparagement of classes of individuals.
111+
112+
**Consequence**: A permanent ban from any sort of public interaction within
113+
the community.
114+
115+
## Attribution
116+
117+
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
118+
version 2.0, available at
119+
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
120+
121+
Community Impact Guidelines were inspired by [Mozilla's code of conduct
122+
enforcement ladder](https://github.com/mozilla/diversity).
123+
124+
[homepage]: https://www.contributor-covenant.org
125+
126+
For answers to common questions about this code of conduct, see the FAQ at
127+
https://www.contributor-covenant.org/faq. Translations are available at
128+
https://www.contributor-covenant.org/translations.

CONTRIBUTING.md

Lines changed: 106 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,126 @@
1-
## Contributing Steps
1+
## Setup Guide for Windows and Linux
22

3-
- Fork the repository
4-
- Clone your forked repository:
3+
Before getting started, ensure you have:
54

6-
```bash
7-
git clone https://github.com/<your-github-username>/cpp-sdk-appwrite.git
8-
```
5+
- A Windows/Linux system with administrative access
6+
- Internet connectivity
7+
8+
### ⚙️ Steps to setup cpp-sdk-appwrite on Windows
9+
- Install [Chocolatey](https://chocolatey.org/install), a package manager for Windows, as it simplifies software installation process.
10+
- Install **mingw** using chocolatey.
11+
```bash
12+
choco install mingw
13+
```
14+
- This will install and set **mingw** paths in windows system.
15+
- Now, we'll need **Curl**, ofcourse. Go to [Official Curl Website](https://curl.se/windows/) and download the latest binary builds for your desired 64/32bit OS and extract the folder (any location).
16+
17+
- Press **Win + R**, type **sysdm.cpl**, and press Enter to open System Properties.
18+
- Go to the **Advanced** > **Environment Variables**.
19+
20+
_Under System variables_
21+
22+
- Click "New..." to add **CPLUS_INCLUDE_PATH**.
23+
24+
Variable name: CPLUS_INCLUDE_PATH
25+
26+
Variable value: C:\path\to\curl\include (Replace with actual include folder path)
27+
28+
- Click "New..." to add **LIBRARY_PATH**.
29+
30+
Variable name: LIBRARY_PATH
31+
32+
Variable value: C:\path\to\curl\lib (Replace with actual lib folder path)
33+
34+
- Click "New..." to add **CURL_CERT**.
35+
36+
Variable name: CURL_CERT
37+
38+
Variable value: C:\path\to\curl\bin\curl-ca-bundle.crt (Replace with actual bin folder path)
39+
40+
Find the **Path** variable and click "Edit...".
941
42+
Click "New" and add
43+
44+
C:\path\to\curl\bin (Replace with actual bin folder path).
45+
46+
- Ensure it's added as a new, separate entry. Click **"OK"** on all dialogs to save the changes.
47+
48+
#### Important: You might need to restart open command prompts/IDEs for the changes to take effect.
49+
- Go to Github and **Fork** the repository
50+
- Clone your forked repository:
51+
52+
```bash
53+
git clone https://github.com/<your-github-username>/cpp-sdk-appwrite.git
54+
```
1055
- Navigate to the project directory:
56+
```bash
57+
cd cpp-sdk-appwrite
58+
```
59+
- Now let's try compiling an API to check if the setup is ready.
60+
```bash
61+
mingw32-make testSDK
62+
```
63+
- You should see a folder **"/tests"** will be created signalling the successfull setup of the project.
64+
- Execute the compiled binary
65+
```bash
66+
cd tests
67+
./testSDK
68+
```
69+
You should see the output as
70+
```bash
71+
Setup Complete. Welcome to cpp-sdk-appwrite!!!
72+
```
1173
12-
```bash
13-
cd cpp-sdk-appwrite
14-
```
74+
### ⚙️ Steps to setup cpp-sdk-appwrite on Linux
1575
1676
- Install dependencies and build-essentials
17-
```bash
18-
sudo apt-get update
19-
sudo apt-get install build-essential clang-format
20-
pip install pre-commit
21-
pre-commit install
22-
```
77+
```bash
78+
sudo apt-get update
79+
sudo apt-get install build-essential clang-format
80+
pip install pre-commit
81+
pre-commit install
82+
```
83+
- Go to Github and **Fork** the repository
84+
- Clone your forked repository:
85+
```bash
86+
git clone https://github.com/<your-github-username>/cpp-sdk-appwrite.git
87+
```
88+
89+
- Navigate to the project directory:
90+
```bash
91+
cd cpp-sdk-appwrite
92+
```
93+
94+
- Now let's try compiling an API to check if the setup is ready.
95+
```bash
96+
make testSDK
97+
```
98+
- You should see a folder **"/tests"** will be created signalling the successfull setup of the project.
99+
- Execute the compiled binary
100+
```bash
101+
cd tests
102+
./testSDK
103+
```
23104

105+
You should see the output as
106+
```bash
107+
Setup Complete. Welcome to cpp-sdk-appwrite!!!
108+
```
24109
- Create a new branch for your contribution:
25110

111+
## How to Contribute ?
112+
113+
After you're done with setting up **cpp-sdk-appwrite** you can create new APIs in the subsequent classes and raise PR for the feature/bug in **develop** branch.
114+
115+
- Create a new branch for your contribution:
26116
```bash
27117
git checkout -b feat/<feature-name>
28118
```
29119
30120
- Make your changes, squash the commits and commit it with a valid commit message :
31121
32122
```bash
33-
git commit -m "feat:added clang-formatter as a precommit"
123+
git commit -m "feat:added api for sms [messaging]"
34124
```
35125
36126
- Push your changes to your fork:

Makefile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@ SRCS = \
1818
$(SRC_DIR)/Utils.cpp \
1919
$(SRC_DIR)/Validator.cpp \
2020

21+
# TEST
22+
testSDK: $(SRCS) $(EXAMPLES_DIR)/testSDK.cpp
23+
@mkdir -p ./$(TESTS_DIR)
24+
$(CXX) $(CXXFLAGS) -o ./$(TESTS_DIR)/testSDK $(SRCS) $(EXAMPLES_DIR)/testSDK.cpp $(LDFLAGS)
25+
2126
# Account
2227
createAccount: $(SRCS) $(EXAMPLES_DIR)/account/createAccount.cpp
2328
@mkdir -p ./$(TESTS_DIR)

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ This **C++ SDK** is built from scratch as a **prototype** for interacting with A
2020
![Appwrite](https://github.com/appwrite/appwrite/raw/main/public/images/github.png)
2121

2222

23-
## Installation
23+
## Installation (Linux)
2424

2525
### Prerequisites
2626

0 commit comments

Comments
 (0)