Skip to content

Commit

Permalink
refactor: Large cleanup and project files refactor
Browse files Browse the repository at this point in the history
This big refactor intends to prepare for eventual OE integration of the
app and makes the project production ready
  • Loading branch information
ottodevs committed Jan 10, 2020
1 parent 8cc1081 commit 75932ac
Show file tree
Hide file tree
Showing 90 changed files with 1,669 additions and 720 deletions.
10 changes: 10 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"presets": [
["@babel/preset-env", { "modules": false, "useBuiltIns": false }]
],
"plugins": [
["styled-components", { "displayName": true }],
"@babel/plugin-proposal-class-properties",
"react-hot-loader/babel"
]
}
1 change: 0 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
node_modules
app/node_modules
build
.cache
dist
Expand Down
63 changes: 63 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
module.exports = {
env: {
browser: true,
es6: true,
node: true,
commonjs: true,
},
extends: [
'eslint:recommended',
'plugin:import/errors',
'plugin:react/recommended',
'plugin:jsx-a11y/recommended',
],
parser: 'babel-eslint',
parserOptions: {
ecmaFeatures: {
jsx: true
},
ecmaVersion: 2018,
sourceType: 'module'
},
plugins: ['react'],
rules: {
indent: ['error', 2],
'linebreak-style': ['error', 'unix'],
quotes: ['error', 'single'],
'react/no-typos': 1,
semi: ['error', 'never'],
'array-bracket-spacing': [
'error',
'always',
{
objectsInArrays: false,
arraysInArrays: false,
singleValue: false
}
],
'func-style': ["warn", "declaration", { "allowArrowFunctions": true }],
'object-curly-spacing': ['error', 'always'],
// "import/no-unused-modules": [
// "warn",
// {
// unusedExports: true,
// missingExports: true,
// ignoreExports: [],
// }
// ],
"no-undef": "error",
"no-unused-vars": ["warn", { "vars": "all", "args": "after-used", "ignoreRestSiblings": false }],
'no-console': ['warn', { allow: ['warn', 'error'] }],
"react/jsx-uses-react": "warn",
"react/jsx-uses-vars": "warn",
"react/jsx-filename-extension": "off",
"react/no-unused-prop-types": "warn",
"sort-imports": ["warn", { "ignoreDeclarationSort": true }]
},
settings: {
react: {
version: 'detect',
}
}
}

36 changes: 0 additions & 36 deletions .eslintrc.json

This file was deleted.

1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.sol linguist-language=Solidity
46 changes: 46 additions & 0 deletions .github/CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# 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 [email protected]. 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/
139 changes: 139 additions & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,139 @@
# Contributing

🦄🚀Welcome to the space unicorn party🚀🦄

Contributions to Open Enterprise include code, documentation, answering user questions, running the project's infrastructure, and advocating for all types of DAO´s.

This guide explains the process for contributing to the Open Enterprise project's core `open-enterprise/apps` GitHub Repository and describes what to expect at each step.

## Contents

- [Code of Conduct](#code-of-conduct)
- [Issues](#issues)
- [Pull Requests](#pull-requests)

## [Code of Conduct](./CODE_OF_CONDUCT.md)

The Open Enterprise project has a
[Code of Conduct](./CODE_OF_CONDUCT.md)
that _all_ contributors are expected to follow. This code describes the
_minimum_ behavior expectations for all contributors.

## Issues

### How to Contribute to Issues

For bug related issues, there are fundamentally three ways an individual can
contribute:

1. **Symptoms** - If you believe that you have uncovered a bug, open a [new issue](https://github.com/AutarkLabs/planning-suite/issues/new) labeled `bug`. Title the issue after the error message, or your best description of the _symptoms_ you've encountered, and provide detailed steps, with any additional context, for attempting to replicate the issue.
2. **Diagnosis** Provide a hypothesis as to what could be causing an issue, by commenting on the issue and suggesting procedures for testing that hypothesis.
3. **Treatment** - Provide suggestions on how to triage an issue.

## Pull Requests

There are two fundamental components of the Pull Request process: one technical, and one process-oriented. The technical component involves the specific details of setting up your local environment so that you can make the actual changes. This is where we will start.

## Environment Setup

We still need to document a comprehensive wiki on setting up the dev environment (want to help?), but this is what we have so far:

### Linux (Ubuntu/Debian)

#### 1. Dependencies

First things first, update and upgrade your system
`sudo apt-get update && sudo apt-get upgrade`

then Install the dependencies
`sudo apt install build-essential git python`

#### 2. Install NVM

While you can install node manually, NVM makes managing your node installation much easier. Furthermore, you can have more than one version installed at the same time.

**Note:** if you use another shell, zsh for example, replace `bash` with your shell
`curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.34.0/install.sh | bash`

this will install `nvm` and place it in your path.

Open a new terminal window and install node

`nvm install 10.15.3`

**Warning:** `node` version 12 is not compatible with Aragon Cli, `10.15.3` works well but the latest LTS version should work.

#### 3. Install Aragon CLI

`npm i -g @aragon/cli`

Since version 6.0.0 ipfs is not included with the cli so install it with

`aragon ipfs install`

#### 4. Configure the CLI

Finally, if you are not using frame as you signing provider (frame is highly recommended) you need to set up a private key for use with the CLI.

Create a new key and get some testnet ETH from the Rinkeby faucet

Sometimes the ~/.aragon folder is not included in the installation, which is a problem because that's where your private key goes.

`cd ~/.aragon`

If you get file not found run the devchain first,

`aragon devchain`

and try again.

Once you're in the `~/.aragon` folder you need to create a file that holds your private key.

Create a new file for your rinkeby key

`nano ~/.aragon/rinkeby_key.json`

This will open a blank file, copy and paste the following replacing the text with your private key

```json
{
"rpc": "https://rinkeby.aragon.network",
"keys": [
"put-your-priv-key-here"
]
}
```

now test out your configuration by launching a DAO on Rinkeby.

`dao new --environment aragon:rinkeby`

### Main Aragon documents/resources

- <https://wiki.aragon.org/>
- <https://hack.aragon.org/>
- <https://hack.aragon.org/docs/aragonos-intro.html>
- <https://hack.aragon.org/docs/tutorial>
- <https://github.com/aragon/aragon.js/blob/master/docs/APP.md>
- <https://github.com/aragon/aragon.js/blob/master/docs/WRAPPER.md>

The [Aragon App tutorial](https://hack.aragon.org/docs/tutorial) is probably the most helpful. As far as design, the app.md and wrapper.md are the most helpful for the front end and the hack gives the best overview. The aragonOS.md details the solidity code and how the core of their system works.

### Asking for General Help

Please feel free to direct questions or requests for general help in the [Aragon Planning riot channel](https://riot.im/app/#/room/#aragon-planning:matrix.org).

### Pull Request Process

Install the [ZenHub for Github](https://chrome.google.com/webstore/detail/zenhub-for-github/ogcgkffhplmphkaahpmffcafajaocjbd?hl=en-US) chrome extension.

After installing the extension:

- Navigate to the "Zenhub" tab within Github
- Self-assign yourself to an issue in the "Backlog"

1. Be in a branch that followings the naming convention [*issue id*]-[*issue description*] i.e. 1-contributing-instructions
2. Have a clearly documented solution that addresses the issue.
3. Have full test coverage for all new code (with some exceptions for front-end code)
4. Get reviewed by at least 1 core contributor (2 for first issues)
5. Pass all integration tests (code tests, and linting)
42 changes: 42 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**Mainnet or testnet?**
Which network you are using the app with.

**Organization**
Enter the URL or ENS name of your organization here.

**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**
- OS and OS version: [e.g. Linux Mint 18.0]
- Browser and browser version: [e.g. Firefox 64.0]

**Smartphone (please complete the following information):**
- Device: [e.g. Fairphone 2]
- OS and OS version: [e.g. Android 8.0.0]
- Browser and browser version: [e.g. Firefox 64.0.1]

**Additional context**
Add any other context about the problem here.
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
10 changes: 10 additions & 0 deletions .github/ISSUE_TEMPLATE/miscellaneous.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
name: Miscellaneous
about: Issues that don't fit into another category
title: ''
labels: ''
assignees: ''

---


Loading

0 comments on commit 75932ac

Please sign in to comment.