Skip to content

Commit

Permalink
feat: update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
pranavkparti committed Jul 31, 2023
1 parent 8193683 commit 2009220
Show file tree
Hide file tree
Showing 3 changed files with 247 additions and 36 deletions.
61 changes: 61 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# Contributor Covenant Code of Conduct

## Our Pledge

In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making
participation in our project and our community a harassment-free experience for everyone, regardless of age, body size,
disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race,
religion, or sexual identity and orientation.

## Our Standards

Examples of behavior that contributes to creating a positive environment include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a professional setting

## Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take
appropriate and fair corrective action in response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits,
issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any
contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.

## Scope

This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the
project or its community. Examples of representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed representative at an online or offline
event. Representation of a project may be further defined and clarified by project maintainers.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at
info@Greenstand.org. The project team will review and investigate all complaints, and will respond in a way that it
deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the
reporter of an incident. Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent
repercussions as determined by other members of the project's leadership.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available
at [http://contributor-covenant.org/version/1/4][version]

[homepage]: http://contributor-covenant.org

[version]: http://contributor-covenant.org/version/1/4/
159 changes: 159 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,159 @@
# Contributing

Thank you for taking the time and effort to contribute to Greenstand!

See the [Table of Contents](#table-of-contents) for different ways to help and details about how this project handles
them.
Please make sure to read the relevant section before making your contribution.
It will make project maintenance a lot easier and smooths out the experience for all involved.
The community looks forward to your contributions.

### Note

Contributing to this project can sometimes involve a steep learning curve. Please do not give up and come and find us on
Slack to get support setting you up. This is a fun project with an amazing potential to disrupt untransparent practices
and open reforestation to the digital world.

## Table of Contents

- [Code of Conduct](#code-of-conduct)
- [Getting an issue assigned](#getting-an-issue-assigned)
- [Working on an issue](#working-on-an-issue)
- [Keeping your fork in sync](#keeping-your-fork-in-sync)
- [Code style guide](#code-style-guide)
- [Connect with Us](#connect-with-us)

## Code of Conduct

This project and everyone participating in it is governed by the
[Code of Conduct](./CODE_OF_CONDUCT.md).
By participating, you are expected to uphold this code.

## Getting an issue assigned

- Look through the [open issues](https://github.com/Greenstand/treetracker-wallet-admin-client/issues) for one that
looks interesting.
- Use the labels to help you find an issue:
- `good first issue`: easy and good for getting started.
- `medium`: medium difficulty or needs more work.
- `challenge`: hardest or big tasks, or needs some special skill or tricky or even hack in some way.
- `documentation`: writing job, sometimes it's good for new dev to learn and do some simple job.
- `bug`: just bug.
- `wontfix`: some issue still in discussion, or can not be implemented at current stage, or just outdated problem.
- `high-priority`: urgent problem, like some crucial bug or feature.
- We also tag issue with other aspects like the skill needed, the device related and so on.

- If you're not sure what to work on, ask in the `#wallet-admin-client channel`
on [Slack](https://greenstand.slack.com/)
and we'll find a good issue for
you.
- Add a comment to the selected issue to say you'd like to work on it, and ask for any clarification you need. Some of
the info you need to solve the problem may be missing from the description of the issue.
- One of the Greenstand leads will then assign it to you and try to help with any questions.

There are lots of opportunities to offer ideas and take ownership of larger pieces of work, so don't be afraid to ask!

## Working on an issue

- Create a branch for the issue in your local repo
- Make your changes and test everything works locally
- Push your changes to your fork on GitHub and create a pull request into Greenstand/main
- Fill in as much info as you can in the PR, including screenshots or videos of the change to help the reviewer
understand what you've done
- A member of the review team will review your changes and may request changes
- Make the requested changes, asking for clarification in the PR if necessary, and push the updated code
- After the code review and all code changes are done, the reviewer will approve and merge your changes

You can work one more than one issue at a time, while you wait for your PR to be reviewed or questions to be answered,
but remember to keep each issue on a separate branch.

## Keeping your fork in sync

Your forked repo won't automatically stay in sync with Greenstand, so you'll need to occasionally sync manually (
typically before starting work on a new feature).

```
git checkout master
git pull upstream master --rebase
git push origin master
```

If there are merge conflicts in your PR, you may need to rebase your branch. Ask a member of the team if you need help
with this.

```
git checkout <feature_branch>
git pull upstream master --rebase
git push origin <feature_branch> --force
```

## Code style guide

### Rules

**Indention** 2 Spaces for indentation

**Semicolon** Use semicolons at the end of each line

**Characters** 80 characters per line

**Quotes** Use single quotes unless you are writing JSON

```js
const foo = 'bar';
```

**Braces** Opening braces go on the same line as the statement

```js
if (true) {
console.log('here');
}
```

**Variable declaration** Declare one Variable per statement

```js
const dog = ['bark', 'woof'];
let cat = ['meow', 'sleep'];
```

**Variable, properties and function names** Use lowerCamelCase for variables, properties and function names

```js
const adminUser = db.query('SELECT * From users ...');
```

**Class names** Use UpperCamelCase for class names

```js
class Dog {
bark() {
console.log('woof');
}
}
```

**Descriptive conditions** Make sure to have a descriptive name that tells the use and meaning of the code

```js
const isValidPassword =
password.length >= 4 && /^(?=.*\d).{4,}$/.test(password);
```

**Object/Array creation** Use trailing commas and put short declarations on a single line. Only quote keys when your
interpreter complains:

```js
var a = ['hello', 'world'];
var b = {
good: 'code',
'is generally': 'pretty',
};
```

## Connect with Us

If you have any questions, comments, suggestions, of any sort, please join our community!
We collaborate primarily through [Slack](https://greenstand.slack.com).
The corresponding channel `#wallet-admin-client` is a good place to find additional support.
63 changes: 27 additions & 36 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,28 @@
# Greenstand Treetracker Wallet Admin Client
# Greenstand Treetracker Wallet Admin Client

The admin panel for accessing wallets and execute all known API calls for the wallet API

# Context
The admin panel for accessing wallets and execute all known API calls for
the [wallet API](https://github.com/Greenstand/treetracker-wallet-api)

## Background

The wallet admin panel is used by wallet owners to display, transfer token and transactions, create sub wallets and configure their appearance.
The wallet admin panel is used by wallet owners to display, transfer token and transactions, create sub wallets and
configure their appearance.

## Use case

A green marketing company is utilizing the treetracker platform to plant/maintain one or more trees by attaching the impact donation in form of one or many tokens to a product. CompanyA is selling hand made leather boots and communicates to their clients that with every pair of boots sold the company is going to pay planters to grow trees. To manage the creation of wallets and adding tokens into the end consumer clients wallet the treetracker-wallet-admin-client is used to interact with the wallet-api.
A green marketing company is utilizing the Treetracker platform to plant/maintain one or more trees by attaching the
impact donation in form of one or many tokens to a product. CompanyA is selling hand made leather boots and communicates
to their clients that with every pair of boots sold the company is going to pay planters to grow trees. To manage the
creation of wallets and adding tokens into the end consumer clients wallet the `treetracker-wallet-admin-client` is used
to interact with the `treetracker-wallet-api`.

## UX / UI Design
## UX / UI Design

can be found in thie figma file https://www.figma.com/file/kXhFReuUVcqQonIgl59On3/Wallet-admin-module-UX?node-id=4%3A21&t=rLUiYOgkuHix3Z5B-1
Can be found in this figma
file https://www.figma.com/file/kXhFReuUVcqQonIgl59On3/Wallet-admin-module-UX?node-id=4%3A21&t=rLUiYOgkuHix3Z5B-1

## User Stories

https://docs.google.com/document/d/1IF4fe4_BC319aoBKBW5LV2pypyDTy4K8qe1qqHexQ1Y/

## Development Environment Setup
Expand All @@ -28,20 +34,23 @@ See https://git-scm.com/downloads for instructions.
### Step 2: Install Node.js

You can install Node.js directly from https://nodejs.org/dist/latest-v18.x/ OR
Use nvm to install and manage your Node.js instances. More details here: https://www.sitepoint.com/quick-tip-multiple-versions-node-nvm/
Use nvm to install and manage your Node.js instances. More details
here: https://www.sitepoint.com/quick-tip-multiple-versions-node-nvm/

1. Make sure a profile exists for your terminal, run touch ~/.profile; touch ~/.zshrc
2. Install nvm: curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash
3. Install the latest version of Node.js 18: nvm install 18
4. Use the installed Node.js: nvm use 18

_On MacOS, you can alleviate the need to run as sudo by using nvm or by [following John Papa's instructions](http://jpapa.me/nomoresudo)._
_On MacOS, you can alleviate the need to run as sudo by using nvm or
by [following John Papa's instructions](http://jpapa.me/nomoresudo)._

### Step 3: Fork and clone this repository

1. Click _Fork_ on this GitHub repo and follow the steps to fork the repo to your account
1. Open terminal
1. Go to a folder where you would like to install the project. Then type the following, replacing `<username>` with your GitHub username:
1. Go to a folder where you would like to install the project. Then type the following, replacing `<username>` with your
GitHub username:

```
git clone https://github.com/<username>/treetracker-wallet-admin-client
Expand Down Expand Up @@ -70,33 +79,15 @@ npm start

Visit http://localhost:3000

## Getting an Issue Assigned

1. Look through the [open issues](https://github.com/Greenstand/treetracker-wallet-admin-client/issues) for one that looks interesting.
Use labels to look for [good first issues](https://github.com/Greenstand/treetracker-wallet-admin-client/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22). This lable indicates issues good to start with, but you are welcome to pick anything you like.
2. If you're not sure what to work on, ask in the #wallet-admin-client channel on Slack and we'll find a good issue for you.
3. Add a comment to the selected issue to say you'd like to work on it, and ask for any clarification you need.
4. When the issue is assigned to you, you are good to start.

There are lots of opportunities to offer ideas and take ownership of larger pieces of work, so don't be afraid to ask!

## Working on an Issue

1. Create a branch for the issue in your local repo
2. Make your changes and test everything works locally
3. Push your changes to your fork on GitHub and create a pull request into Greenstand/master
4. Fill in as much info as you can in the PR, including screenshots or videos of the change to help the reviewer understand what you've done
5. A member of the review team will review your changes and may request changes
6. Make the requested changes, asking for clarification in the PR if necessary, and push the updated code
7. After the code review and all code changes are done, the reviewer will approve and merge your changes

You can work one more than one issue at a time, while you wait for your PR to be reviewed or questions to be answered, but remember to keep each issue on a separate branch.

## Slack
## Contributing

the corresponding channel #wallet-admin-client can be found in our slack community. Here there will be additional support for you.
For details on how to contribute to the project, such as getting an issue assigned, working on an issue, where to get
support and collaborate etc., please see our [Contribution Guidelines](./CONTRIBUTING.md).

## Note

Contributing to this project can sometimes involve a steep learning curve. Please do not give up and come and find us on slack to get support setting you up. This is a fun project with an amazing potential to disrupt untransparent practices and open reforestation to the digital world.
Contributing to this project can sometimes involve a steep learning curve. Please do not give up and come and find us on
slack to get support setting you up. This is a fun project with an amazing potential to disrupt non-transparent
practices
and open reforestation to the digital world.

0 comments on commit 2009220

Please sign in to comment.