├── q2-dev-outline ├── README.md ├── q2-api.md ├── q2-ds.md └── q2-webapp.md ├── outline-and-goals └── goals-and-product-build │ ├── q2-product-dev-outline │ ├── q2-api.md │ ├── q2-webapp.md │ ├── README.md │ └── q2-ds.md │ ├── q1-product-dev-outline │ ├── q1-webapp.md │ ├── q1-webapp │ │ ├── db-schema.md │ │ ├── README.md │ │ ├── project-profile-fields.md │ │ ├── roles-permissions-acl.md │ │ └── recommendations-display.md │ ├── q1-ds.md │ ├── q1-api.md │ └── README.md │ └── README.md ├── .gitbook └── assets │ ├── image.png │ ├── image (1).png │ ├── image (2).png │ ├── image (3).png │ ├── image (4).png │ ├── osiapproved_1.png │ ├── beta-webapp-flow.png │ ├── banner-superpowers.png │ └── vsc-keyboard-shortcuts-macos.pdf ├── base-functional-specs ├── db-schema.md ├── product-outline.md ├── project-profile-fields.md ├── roles-permissions-acl.md └── recommendations-display.md ├── .gitignore ├── q1-dev-outline ├── README.md ├── q1-ds.md └── q1-webapp.md ├── getting-started ├── README.md ├── gotchas-and-faqs.md └── vs-code-helpers.md ├── getting-started.md ├── SUMMARY.md ├── README.md ├── api-and-data-specs ├── json-and-function-prototypes.md ├── mapping-data-geojson.md └── open-api.md ├── community ├── goals-and-product-build.md ├── code-of-conduct.md └── contributing.md └── LICENSE /q2-dev-outline/README.md: -------------------------------------------------------------------------------- 1 | # Q2 Dev Outline 2 | 3 | -------------------------------------------------------------------------------- /q2-dev-outline/q2-api.md: -------------------------------------------------------------------------------- 1 | # Q2 API 'n Infra 2 | 3 | -------------------------------------------------------------------------------- /outline-and-goals/goals-and-product-build/q2-product-dev-outline/q2-api.md: -------------------------------------------------------------------------------- 1 | # Q2 API 2 | 3 | -------------------------------------------------------------------------------- /outline-and-goals/goals-and-product-build/q1-product-dev-outline/q1-webapp.md: -------------------------------------------------------------------------------- 1 | # Q1 WebApp 2 | 3 | -------------------------------------------------------------------------------- /outline-and-goals/goals-and-product-build/q2-product-dev-outline/q2-webapp.md: -------------------------------------------------------------------------------- 1 | # Q2 WebApp 2 | 3 | -------------------------------------------------------------------------------- /.gitbook/assets/image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patterns/webapp-docs/main/.gitbook/assets/image.png -------------------------------------------------------------------------------- /outline-and-goals/goals-and-product-build/q2-product-dev-outline/README.md: -------------------------------------------------------------------------------- 1 | # Q2 Product Dev Outline 2 | 3 | -------------------------------------------------------------------------------- /.gitbook/assets/image (1).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patterns/webapp-docs/main/.gitbook/assets/image (1).png -------------------------------------------------------------------------------- /.gitbook/assets/image (2).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patterns/webapp-docs/main/.gitbook/assets/image (2).png -------------------------------------------------------------------------------- /.gitbook/assets/image (3).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patterns/webapp-docs/main/.gitbook/assets/image (3).png -------------------------------------------------------------------------------- /.gitbook/assets/image (4).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patterns/webapp-docs/main/.gitbook/assets/image (4).png -------------------------------------------------------------------------------- /.gitbook/assets/osiapproved_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patterns/webapp-docs/main/.gitbook/assets/osiapproved_1.png -------------------------------------------------------------------------------- /.gitbook/assets/beta-webapp-flow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patterns/webapp-docs/main/.gitbook/assets/beta-webapp-flow.png -------------------------------------------------------------------------------- /.gitbook/assets/banner-superpowers.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patterns/webapp-docs/main/.gitbook/assets/banner-superpowers.png -------------------------------------------------------------------------------- /outline-and-goals/goals-and-product-build/q1-product-dev-outline/q1-webapp/db-schema.md: -------------------------------------------------------------------------------- 1 | # DB Schema 2 | 3 | To be updated .... 4 | 5 | -------------------------------------------------------------------------------- /.gitbook/assets/vsc-keyboard-shortcuts-macos.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patterns/webapp-docs/main/.gitbook/assets/vsc-keyboard-shortcuts-macos.pdf -------------------------------------------------------------------------------- /q2-dev-outline/q2-ds.md: -------------------------------------------------------------------------------- 1 | --- 2 | description: >- 3 | Please note that scripts and specification of the underlying DS platform are 4 | not yet public. 5 | --- 6 | 7 | # Q2 DS 8 | 9 | -------------------------------------------------------------------------------- /outline-and-goals/goals-and-product-build/q2-product-dev-outline/q2-ds.md: -------------------------------------------------------------------------------- 1 | --- 2 | description: >- 3 | Please note that scripts and specification of the underlying DS platform are 4 | not yet public. 5 | --- 6 | 7 | # Q2 DS 8 | 9 | -------------------------------------------------------------------------------- /q2-dev-outline/q2-webapp.md: -------------------------------------------------------------------------------- 1 | # Q2 WebApp 2 | 3 | 4 | 5 | 6 | 7 | ## Reference Links for Q2 Dev 8 | 9 | * [Blitzjs Dashboard app example with vida.js visualisations](https://blog.vida.io/2020-create-a-dashboard-app-with-vidajs-and-blitzjs/) _\(need to check accessibility\)_ 10 | * 11 | -------------------------------------------------------------------------------- /base-functional-specs/db-schema.md: -------------------------------------------------------------------------------- 1 | --- 2 | description: 'Postgres Ref: https://www.postgresql.org/docs/current/datatype.html' 3 | --- 4 | 5 | # DB Schema 6 | 7 | {% hint style="info" %} 8 | Postgres ref: [https://www.postgresql.org/docs/current/datatype.html](https://www.postgresql.org/docs/current/datatype.html) 9 | {% endhint %} 10 | 11 | To be updated .... but as per all DB, is postgresDB. 12 | 13 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Node rules: 2 | ## Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) 3 | .grunt 4 | 5 | ## Dependency directory 6 | ## Commenting this out is preferred by some people, see 7 | ## https://docs.npmjs.com/misc/faq#should-i-check-my-node_modules-folder-into-git 8 | node_modules 9 | 10 | # Book build output 11 | _book 12 | 13 | # eBook build output 14 | *.epub 15 | *.mobi 16 | *.pdf 17 | -------------------------------------------------------------------------------- /q1-dev-outline/README.md: -------------------------------------------------------------------------------- 1 | # Q1 Dev Outline 2 | 3 | ### 2021 - Q1 Objective   4 | 5 | Have a usable indicator recommendation WebAapp. 6 | 7 | ### 2021 - Q1 Key Results   8 | 9 | * Base scaffold and functionality for fairly standard WebApp. 10 | * Mapper global\_text can process basic project information and return recommended indicators \(mapper script\). 11 | * summary screen of recommendations returned. 12 | 13 | ## Y-Combinator Build Sprint Participants - Winter 2021 14 | 15 | This phase of our build is in combination with the YC Build Sprint. 16 | 17 | > \*\*\*\*🏆 **Our Goal: Launch First Public Release of isgood.ai App \(with working platform integration\)** 18 | 19 | Let's make sure we hit our goals 🎯 ... read more on the [ycombinator site](https://blog.ycombinator.com/yc-build-sprint-winter-2021/). 20 | 21 | -------------------------------------------------------------------------------- /getting-started/README.md: -------------------------------------------------------------------------------- 1 | --- 2 | description: Devs guide to getting your code and local set up. 3 | --- 4 | 5 | # Getting Started 6 | 7 | {% hint style="warning" %} 8 | Make sure you have read about our [code base](../community/contributing.md#overview-of-our-codebase), and [how to contribute](../community/contributing.md#first-things-first). 9 | {% endhint %} 10 | 11 | ## Quick Start 12 | 13 | Please view github repo for latest readme on the code base. 14 | 15 | * [https://github.com/for-good/isgood-frontend](https://github.com/for-good/isgood-frontend) 16 | * [https://github.com/for-good/isgood.ai-backend](https://github.com/for-good/isgood.ai-backend) 17 | 18 | ## Need Help? 19 | 20 | If you are an active contributor, please discuss in the \#func-developers [Slack](https://isgood.slack.com/archives/C01APTAPVT7) channel. 21 | 22 | -------------------------------------------------------------------------------- /q1-dev-outline/q1-ds.md: -------------------------------------------------------------------------------- 1 | --- 2 | description: >- 3 | Please note that scripts and specification of the underlying DS platform are 4 | not yet public. 5 | --- 6 | 7 | # Q1 DS 8 | 9 | {% hint style="info" %} 10 | Data-Science docs at [ds-docs.isgood.ai](https://ds-docs.isgood.ai) _\(private\)_ 11 | {% endhint %} 12 | 13 | ## Base initial DS functionality 14 | 15 | "[minimal mapper](https://app.clickup.com/6902024/v/li/13327305)" 16 | 17 | For DS contributors, please collab with team through the following channels: 18 | 19 | * [ClickUp](https://app.clickup.com/6902024/v/li/13327305) 20 | * [Slack](https://isgood.slack.com/archives/C01AZ6BTL12) 21 | * [GitHub](https://github.com/for-good/internal-scripts) 22 | 23 | ## Looking to get involved with isgood.ai? 24 | 25 | Apply to get involved via [isgood.ai/get-involved/](https://isgood.ai/get-involved/) 26 | 27 | -------------------------------------------------------------------------------- /outline-and-goals/goals-and-product-build/q1-product-dev-outline/q1-ds.md: -------------------------------------------------------------------------------- 1 | --- 2 | description: >- 3 | Please note that scripts and specification of the underlying DS platform are 4 | not yet public. 5 | --- 6 | 7 | # Q1 DS 8 | 9 | {% hint style="info" %} 10 | Data-Science docs at [ds-docs.isgood.ai](https://ds-docs.isgood.ai) _\(private\)_ 11 | {% endhint %} 12 | 13 | ## Base initial DS functionality 14 | 15 | "[minimal mapper](https://app.clickup.com/6902024/v/li/13327305)" 16 | 17 | For DS contributors, please collab with team through the following channels: 18 | 19 | * [ClickUp](https://app.clickup.com/6902024/v/li/13327305) 20 | * [Slack](https://isgood.slack.com/archives/C01AZ6BTL12) 21 | * [GitHub](https://github.com/for-good/internal-scripts) 22 | 23 | ## Looking to get involved with isgood.ai? 24 | 25 | Apply to get involved via [isgood.ai/get-involved/](https://isgood.ai/get-involved/) 26 | 27 | -------------------------------------------------------------------------------- /base-functional-specs/product-outline.md: -------------------------------------------------------------------------------- 1 | --- 2 | description: 'Basic product outline, to understand the high-level concept.' 3 | --- 4 | 5 | # Product Outline 6 | 7 | ## Layered and modular Platform and App Approach 8 | 9 | 1. The WebApp, which contains the information specific to users, and the views and functionalities of the WebApp itself. 10 | 2. There is a middle layer API and functions that support the movement and access of data. 11 | 3. The base data/AI brain is to be able to be plugged into by MANY apps ... that focus on enabling people and planet to thrive in balance with prosperity. 12 | 13 | There are more modules being built into the [isgood.ai](http://isgood.ai) webapp once we've got this initial functionality built, but this basic system design holds true. 14 | 15 | ## **Platform Layers** _**\(needs update\)**_ 16 | 17 | ![The areas in green, are the touchpoints for the Q1 and Q2 Releases](https://t6902024.p.clickup-attachments.com/t6902024/5bc106b1-70c8-4293-bb13-b43653cca1f7/image.png) 18 | 19 | ## 20 | 21 | -------------------------------------------------------------------------------- /outline-and-goals/goals-and-product-build/q1-product-dev-outline/q1-api.md: -------------------------------------------------------------------------------- 1 | # Q1 API 2 | 3 | For this stage of the project we have pretty minimal requirements for the API; however, we DO need to setup the foundation of the API layer, for us to have initial code and API service available to communicate between the isgood.ai webapp, and the isgood.ai platform \(DS data brain\). 4 | 5 | ## Base API Service 6 | 7 | Default communication for webapp and platform is JSON, so looking at options we can start looking at the following around easy to manage, deploy and contribute Open-API frameworks: 8 | 9 | * [https://jsonapi.org/](https://jsonapi.org/) 10 | * [https://swagger.io/specification/](https://swagger.io/specification/) 11 | * [https://cube.dev/](https://cube.dev/) 12 | 13 | ## Functionality for Q1 Release 14 | 15 | 1. WebApp sends first four fields of project profile info to the API. 16 | 2. Platform receives the JSON text and processes it. 17 | 3. Returns list of platform indicatorIDs to WebApp and is stored as recommended indicatorIDs against the project. 18 | 19 | -------------------------------------------------------------------------------- /getting-started/gotchas-and-faqs.md: -------------------------------------------------------------------------------- 1 | --- 2 | description: >- 3 | Everyone's local machine is different ... here's some issues we've come across 4 | when getting started. 5 | --- 6 | 7 | # Gotchas & FAQs 8 | 9 | ## Headaches we've had when getting started 10 | 11 | ![RTFM, google, ask :\)](../.gitbook/assets/image%20%282%29.png) 12 | 13 | _**Gotcha from team:**_ 14 | run `npm install` 15 | and then `npm i react@latest` 16 | immediately after cloning the repo and switching to your local branch 17 | 18 | ### I tried to run x, but says requires y 19 | 20 | * Please check [t](https://docs.isgood.ai/getting-started)he [code readme](https://github.com/for-good/), and getting started [docs](https://docs.isgood.ai/getting-started) for dependencies. 21 | * Use existing/recommended approaches in the stack we use, don't do from scratch. 22 | 23 | ### Not sure about my SQL and Postgres Field Types 24 | 25 | What not to do in Postgres: [https://wiki.postgresql.org/wiki/Don't\_Do\_This](https://wiki.postgresql.org/wiki/Don't_Do_This) 26 | 27 | 28 | 29 | ### more topics ....... 30 | 31 | 32 | 33 | ... help for common issues when we've been setting up, etc. 34 | 35 | -------------------------------------------------------------------------------- /q1-dev-outline/q1-webapp.md: -------------------------------------------------------------------------------- 1 | # Q1 WebApp 2 | 3 | ## Basic Workflow 4 | 5 | 1. enable user account rego 6 | 2. if no org, setup org \(workspace billing account "owner", like redcross australia\) 7 | 3. if no project, setup a project \(like a folder in google drive, that sits under the parent/org, can have secondary billing to be inherited\) 8 | 4. is has access to org and projects, user sees list of projects they have access to 9 | 5. when setting up/edit project, enter project profile info \(people, place, problem\) 10 | 6. once project info entered, AI returns recommendation of project indicators \(minimal-mapper\), top results displayed on project profile to user. 11 | 12 | ![Basic WebApp Flow for Beta-Release](../.gitbook/assets/beta-webapp-flow.png) 13 | 14 | ## For recommendations to work: 15 | 16 | * inputs are the project fields 17 | * outputs are the recommended indicator IDs returned by mapper script vectors -> full info from global\_text 18 | 19 | ## Mock and User Flow 20 | 21 | #### 22 | 23 | The mock and user flow has been collated via our [Miro Board](https://miro.com/app/board/o9J_kyYfLV0=/?moveToWidget=3074457356090860580&cot=10). 24 | 25 | ## 26 | 27 | -------------------------------------------------------------------------------- /getting-started.md: -------------------------------------------------------------------------------- 1 | --- 2 | description: Devs guide to getting your code and local set up. 3 | --- 4 | 5 | # Getting Started 6 | 7 | {% hint style="warning" %} 8 | Make sure you have read about our [code base](community/contributing.md#overview-of-our-codebase), and [how to contribute](community/contributing.md#first-things-first). 9 | {% endhint %} 10 | 11 | ## Quick Start 12 | 13 | You need Node.js 12 or newer. 14 | 15 | To start the project: 16 | 17 | 1. To create node\_modules run: `npm install` 18 | 2. Create .env.local file and add 19 | 20 | ```bash 21 | DATABASE_USERNAME = "postgres" 22 | DATABASE_DIALECT = "postgres" 23 | DATABASE_PASSWORD = "postgres" 24 | DATABASE_DATABASE = "bla bla" 25 | DATABASE_HOST = "localhost" 26 | DATABASE_LOGGING = "true" 27 | DATABASE_URL=postgresql://DATABASE_USERNAME:DATABASE_PASSWORD@localhost:5432/DATABASE_DATABASE 28 | ``` 29 | 30 | To start the project run: `blitz start` 31 | 32 | ## No Blitz? 33 | 34 | In case your device didn't recognize blitz, run this command: 35 | `npm install -g blitz` or `yarn global add blitz` 36 | 37 | We're built on Blitz.js ... check their docs: [https://blitzjs.com/docs/getting-started](https://blitzjs.com/docs/getting-started) 38 | 39 | ## Need Help? 40 | 41 | If you are an active contributor, please discuss in the \#func-developers [Slack](https://isgood.slack.com/archives/C01APTAPVT7) channel. 42 | 43 | -------------------------------------------------------------------------------- /outline-and-goals/goals-and-product-build/q1-product-dev-outline/q1-webapp/README.md: -------------------------------------------------------------------------------- 1 | # Q1 WebApp 2 | 3 | 4 | 5 | ## Basic Workflow 6 | 7 | 1. enable user account rego 8 | 2. if no org, setup org \(workspace billing account "owner", like redcross australia\) 9 | 3. if no project, setup a project \(like a folder in google drive, that sits under the parent/org, can have secondary billing to be inherited\) 10 | 4. is has access to org and projects, user sees list of projects they have access to 11 | 5. when setting up/edit project, enter project profile info \(people, place, problem\) 12 | 6. once project info entered, AI returns recommendation of project indicators \(minimal-mapper\), top results displayed on project profile to user. 13 | 14 | ## For recommendations to work: 15 | 16 | * inputs are the project fields 17 | * outputs are the recommended indicator IDs returned by mapper script vectors -> full info from global\_text 18 | 19 | ## Mock and User Flow 20 | 21 | The mock and user flow has been collated via our [Miro Board](https://miro.com/app/board/o9J_kyYfLV0=/?moveToWidget=3074457354464890435&cot=10). 22 | 23 | note: the mocks have not been done with the [recently chosen](https://www.loomio.org/s/as3HMDBN) Material-UI front-end UI framework, and styles, so while it may look a little different from our [starter](https://github.com/creativetimofficial/material-dashboard-react), the functionality and concepts remain. 24 | 25 | ## 26 | 27 | -------------------------------------------------------------------------------- /SUMMARY.md: -------------------------------------------------------------------------------- 1 | # Table of contents 2 | 3 | * [isgood.ai Dev Docs](README.md) 4 | * [Getting Started](getting-started/README.md) 5 | * [Gotchas & FAQs](getting-started/gotchas-and-faqs.md) 6 | * [VS Code Helpers](getting-started/vs-code-helpers.md) 7 | 8 | ## Community 9 | 10 | * [How to Contribute](community/contributing.md) 11 | * [Code of Conduct](community/code-of-conduct.md) 12 | * [Goals & Release Targets](community/goals-and-product-build.md) 13 | 14 | ## WebApp Specs 15 | 16 | * [Product Outline](base-functional-specs/product-outline.md) 17 | * [Roles, Permissions, ACL](base-functional-specs/roles-permissions-acl.md) 18 | * [Project Profile Fields](base-functional-specs/project-profile-fields.md) 19 | * [Project Profile Display](base-functional-specs/project-profile-display.md) 20 | * [Recommendations Display](base-functional-specs/recommendations-display.md) 21 | * [DB Schema](base-functional-specs/db-schema.md) 22 | 23 | ## API & Data Specs 24 | 25 | * [Open API Gateway](api-and-data-specs/open-api.md) 26 | * [JSON & Function Prototypes](api-and-data-specs/json-and-function-prototypes.md) 27 | * [Mapping Data \(geoJSON\)](api-and-data-specs/mapping-data-geojson.md) 28 | 29 | ## Release Outline 30 | 31 | --- 32 | 33 | * [Q1 Dev Outline](q1-dev-outline/README.md) 34 | * [Q1 WebApp](q1-dev-outline/q1-webapp.md) 35 | * [Q1 DS](q1-dev-outline/q1-ds.md) 36 | * [Q2 Dev Outline](q2-dev-outline/README.md) 37 | * [Q2 WebApp](q2-dev-outline/q2-webapp.md) 38 | * [Q2 API 'n Infra](q2-dev-outline/q2-api.md) 39 | * [Q2 DS](q2-dev-outline/q2-ds.md) 40 | 41 | -------------------------------------------------------------------------------- /outline-and-goals/goals-and-product-build/q1-product-dev-outline/README.md: -------------------------------------------------------------------------------- 1 | # Q1 Product Dev Outline 2 | 3 | ### Objective   4 | 5 | Have a usable indicator recommendation WebAapp. 6 | 7 | ### Key Results   8 | 9 | * Base scaffold and functionality for fairly standard WebApp. 10 | * Mapper global\_text can process basic project information and return recommended indicators \(mapper script\). 11 | * summary screen of recommendations returned. 12 | 13 | ## Layered and modular Platform and App Approach 14 | 15 | 1. The WebApp, which contains the information specific to users, and the views and functionalities of the WebApp itself. 16 | 2. There is a middle layer API and functions that support the movement and access of data. 17 | 3. The base data/AI brain is to be able to be plugged into by MANY apps ... that focus on enabling people and planet to thrive in balance with prosperity. 18 | 19 | There are more modules being built into the [isgood.ai](http://isgood.ai) webapp once we've got this initial functionality built, but this basic system design holds true. 20 | 21 | ## **Platform Layers** _**\(needs update\)**_ 22 | 23 | ![The areas in green, are the touchpoints for this OKR](https://t6902024.p.clickup-attachments.com/t6902024/5bc106b1-70c8-4293-bb13-b43653cca1f7/image.png) 24 | 25 | ## Y-Combinator Build Sprint Participants - Winter 2021 26 | 27 | This phase of our build is in combination with the YC Build Sprint. 28 | 29 | > \*\*\*\*🏆 **Our Goal: Launch First Public Release of isgood.ai App \(with working platform integration\)** 30 | 31 | Let's make sure we hit our goals 🎯 ... read more on the [ycombinator site](https://blog.ycombinator.com/yc-build-sprint-winter-2021/). 32 | 33 | -------------------------------------------------------------------------------- /getting-started/vs-code-helpers.md: -------------------------------------------------------------------------------- 1 | # VS Code Helpers 2 | 3 | VS Code seems to be the default most people use for their dev ... and here's some useful resources for working with it 😊 4 | 5 | ## Extensions 6 | 7 | ```text 8 | ## HTML CSS 9 | https://marketplace.visualstudio.com/items?itemName=ecmel.vscode-html-css#review-details 10 | https://marketplace.visualstudio.com/items?itemName=Zignd.html-css-class-completion 11 | https://marketplace.visualstudio.com/items?itemName=mrmlnc.vscode-autoprefixer 12 | https://marketplace.visualstudio.com/items?itemName=pranaygp.vscode-css-peek 13 | https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode 14 | https://marketplace.visualstudio.com/items?itemName=xabikos.JavaScriptSnippets 15 | https://marketplace.visualstudio.com/items?itemName=jmsv.JavaScriptSnippetsStandard 16 | https://marketplace.visualstudio.com/items?itemName=formulahendry.auto-close-tag 17 | ## React + Node 18 | https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint 19 | https://marketplace.visualstudio.com/itemdetails?itemName=dsznajder.es7-react-js-snippets 20 | https://marketplace.visualstudio.com/items?itemName=CoenraadS.bracket-pair-colorizer-2 21 | https://marketplace.visualstudio.com/items?itemName=eg2.vscode-npm-script 22 | https://marketplace.visualstudio.com/items?itemName=christian-kohler.npm-intellisense 23 | https://marketplace.visualstudio.com/items?itemName=streetsidesoftware.code-spell-checker 24 | 25 | ``` 26 | 27 | ## VS Code Keyboard Shortcuts 28 | 29 | ![get more @ http://aka.ms/vscodekeybindings](../.gitbook/assets/image%20%284%29.png) 30 | 31 | {% file src="../.gitbook/assets/vsc-keyboard-shortcuts-macos.pdf" caption="VS Code keyboard Shortcuts for macOS" %} 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | --- 2 | description: 'Always iterating & in development, creating Solutions for Humanity ;)' 3 | --- 4 | 5 | # isgood.ai Dev Docs 6 | 7 | 8 | 9 | ![Join us -> https://isgood.ai/get-involved/](.gitbook/assets/banner-superpowers.png) 10 | 11 | ## Got _\#techforgood_ Super-Powers? 12 | 13 | If you are not yet part of our team of super-heroes changing the world with their tech super-powers, _**find out more about us**_ at these locations: 14 | 15 | * [forhumanity.org.au](https://forhumanity.org.au) 16 | * [isgood.ai](https://isgood.ai) 17 | 18 | {% page-ref page="community/contributing.md" %} 19 | 20 | {% page-ref page="getting-started/" %} 21 | 22 | ## **Got suggestions, or want to contribute?** 23 | 24 | * _Contribute directly via docs repo on_ [_GitHub_](https://github.com/for-good/webapp-docs)_._ 25 | * _DM your team lead in_ [_Slack_](https://isgood.slack.com) _to directly access gitbook editor._ 26 | 27 | {% hint style="success" %} 28 | Join us -> [https://isgood.ai/get-involved/](https://isgood.ai/get-involved/) 29 | {% endhint %} 30 | 31 | ## Historical docs 32 | 33 | To get consolidated and updated into this dedicated dev docs location: 34 | 35 | * [Mod 1 OKR & Spt Docs](https://app.clickup.com/6902024/v/dc/6jm88-3292) _\(mostly already here\)_ 36 | * [Task Specs, Diagrams, etc](https://app.clickup.com/6902024/v/li/13327306) 37 | * [The isgood.ai WebApp Github Repo](https://github.com/for-good/isgood-webapp) 38 | * [Archive devdocs](https://app.clickup.com/6902024/docs/6jm88-2067/) _\(foundations, probably need updating to use\)_ 39 | * Google Drive -> "Product & Dev" folder 40 | * Old [Clubhouse PM System](https://app.clubhouse.io/isgood/stories/), with lots of the foundational tasks. 41 | 42 | _This documentation, like our products and community, are always a work in progress ;\)_ 43 | 44 | -------------------------------------------------------------------------------- /outline-and-goals/goals-and-product-build/q1-product-dev-outline/q1-webapp/project-profile-fields.md: -------------------------------------------------------------------------------- 1 | # Project Profile Fields 2 | 3 | ## Initial Project Entry Fields 4 | 5 | **3 Step Form in UI** - ref [from mock](https://www.figma.com/proto/N9yF8ph0Ie3lOtFjgxryaM/v5-WebApp?kind=&node-id=262%3A5388&scaling=min-zoom). 6 | 7 | | Label | Type | Req'd | 8 | | :--- | :--- | :--- | 9 | | Project Name | text | \* | 10 | | Description | text area | \* | 11 | | Project Impacts | entered as list items \(json list\), or multiple as per below | \* | 12 | | Desired Outcomes | entered as list items \(json list\), or multiple as per below | \* | 13 | | Beneficiary Group Name \([multiple](https://www.figma.com/proto/N9yF8ph0Ie3lOtFjgxryaM/v5-WebApp?kind=&node-id=262%3A5388&scaling=min-zoom)\) | \(project one to many\) | | 14 | | - Beneficiary Group Change \([multiple](https://www.figma.com/proto/N9yF8ph0Ie3lOtFjgxryaM/v5-WebApp?kind=&node-id=262%3A6047&scaling=min-zoom)\) | \(beneficiary one to many\) | | 15 | | - Demographic\|Operator\|Value | \(beneficiary one to many\) [choice from global demographic variables](https://www.figma.com/proto/N9yF8ph0Ie3lOtFjgxryaM/v5-WebApp?kind=&node-id=262%3A5926&scaling=min-zoom) | | 16 | | Geolocation | lat / long / geocode \(ref: [https://app.clickup.com/t/2ay5dk](https://app.clickup.com/t/2ay5dk)\) | | 17 | | Start Date \(UI select\) | Unix TIMESTAMP | | 18 | | End Date \(UI select\) | Unix TIMESTAMP | | 19 | 20 | note: there are more fields coming for entry into the Project Profile in future releases, but these are the only ones being implemented now. 21 | 22 | ## Extra Fields for UI / Data Elements 23 | 24 | | Label | Type | 25 | | :--- | :--- | 26 | | Project Logo | image/ | 27 | | Project Banner | image/ | 28 | | projectIndicatorIDs | json string | 29 | | ? owner/users ? | | 30 | | | | 31 | 32 | -------------------------------------------------------------------------------- /base-functional-specs/project-profile-fields.md: -------------------------------------------------------------------------------- 1 | # Project Profile Fields 2 | 3 | ## Initial Project Entry Fields 4 | 5 | **3 Step Form in UI** - ref [from mock](https://www.figma.com/proto/N9yF8ph0Ie3lOtFjgxryaM/v5-WebApp?kind=&node-id=262%3A5388&scaling=min-zoom) -->> See [Miro Flow](https://miro.com/app/board/o9J_kyYfLV0=/?moveToWidget=3074457354464890435&cot=10) 6 | 7 | | Label | Type | Req'd | 8 | | :--- | :--- | :--- | 9 | | Project Name | text | \* | 10 | | Description | text area | \* | 11 | | Project Impacts | entered as list items \(json list\), or multiple as per below | \* | 12 | | Desired Outcomes | entered as list items \(json list\), or multiple as per below | \* | 13 | | Beneficiary Group Name \([multiple](https://www.figma.com/proto/N9yF8ph0Ie3lOtFjgxryaM/v5-WebApp?kind=&node-id=262%3A5388&scaling=min-zoom)\) | \(project one to many\) | | 14 | | - Beneficiary Group Change \([multiple](https://www.figma.com/proto/N9yF8ph0Ie3lOtFjgxryaM/v5-WebApp?kind=&node-id=262%3A6047&scaling=min-zoom)\) | \(beneficiary one to many\) | | 15 | | - Demographic\|Operator\|Value | \(beneficiary one to many\) [choice from global demographic variables](https://www.figma.com/proto/N9yF8ph0Ie3lOtFjgxryaM/v5-WebApp?kind=&node-id=262%3A5926&scaling=min-zoom) | | 16 | | Geolocation | lat / long / geocode \(ref: [https://app.clickup.com/t/2ay5dk](https://app.clickup.com/t/2ay5dk)\) | | 17 | | Start Date \(UI select\) | Unix TIMESTAMP | | 18 | | End Date \(UI select\) | Unix TIMESTAMP | | 19 | 20 | note: there are more fields coming for entry into the Project Profile in future releases, but these are the only ones being implemented now. 21 | 22 | ## Extra Fields for UI / Data Elements 23 | 24 | | Label | Type | 25 | | :--- | :--- | 26 | | Project Logo | image/ | 27 | | Project Banner | image/ | 28 | | projectIndicatorIDs | json string | 29 | | ? owner/users ? | | 30 | | | | 31 | 32 | -------------------------------------------------------------------------------- /api-and-data-specs/json-and-function-prototypes.md: -------------------------------------------------------------------------------- 1 | --- 2 | description: To ensure all parts of the app maintain consistent JSON objects 3 | --- 4 | 5 | # JSON & Function Prototypes 6 | 7 | Here are are formats we will use. 8 | 9 | ### **Returning JSON from ANY function** 10 | 11 | **Failure** 12 | 13 | ```text 14 | { 15 | "success": False, 16 | "reason": "Somethong that can be displayed to the user if need be", 17 | "error": "Meaningful error details useful to a dev to debug" 18 | } 19 | ``` 20 | 21 | **Success** 22 | 23 | ```text 24 | { 25 | "success": True, 26 | "data": { 27 | "key1": "data", 28 | "key2": "data" 29 | } 30 | 31 | 32 | } 33 | ``` 34 | 35 | ### Receiving JSON into a Function 36 | 37 | All data passed into a function should be of a standardized format, we want certain identifying data to be in the same place all the time, allowing us to use shared functionality more efficientlyIf an elemnet specified here is not available it must be included with a null valueIf the function does not need a specific element, it should be included, it may be required in the future, we want to minimise code refactoring for future enhancements**We are highly likely to provide wrapper functions to handle the formatting of the Json so its consistent, when these are available, details will be posted here** 38 | 39 | ```text 40 | { 41 | "userid": 1, 42 | "projectid": 2, 43 | "connectorid": 3, 44 | "dashboardid": 4, 45 | "userData": { 46 | "key1": "data", 47 | "key2": "data" 48 | }, 49 | "projectData": { 50 | "key1": "data", 51 | "key2": "data" 52 | }, 53 | "connectorData": { 54 | "key1": "data", 55 | "key2": "data" 56 | }, 57 | "dashboardData": { 58 | "key1": "data", 59 | "key2": "data" 60 | }, 61 | "data": { 62 | "key1": "data", 63 | "key2": "data" 64 | } 65 | } 66 | ``` 67 | 68 | ### Function Prototypes 69 | 70 | As a rule, we want most functions to follow certain standards 71 | 72 | ```text 73 | def myFunction ( request, dataJSON, db = None, logger = None ) 74 | ``` 75 | 76 | where: 77 | 78 | * `request` is the request object 79 | * `dataJson` is Json as specified above 80 | * `db` is an object pointing to an already open instance of a isgood\_database connection 81 | * `logger` is an object pointing to an already open instance of an isgood\_logger 82 | 83 | -------------------------------------------------------------------------------- /outline-and-goals/goals-and-product-build/README.md: -------------------------------------------------------------------------------- 1 | # Goals & Product Build 2 | 3 | We are a community of purpose-driven super-heros, focussed on solving wicked systemic humanitarian and social problems at global scale. Using evolutionary frontier technology, we are creating the levers to help make this happen. 4 | 5 | Isgood.ai si the first product from Solutions for Humanity, and is being developed first; as we need to know what actually works, so we can dedicate resources and efforts towards the initiatives and areas of work that are going to have the greatest positive impact, end-beneficiary outcomes and change. 6 | 7 | {% hint style="success" %} 8 | **Once we have insights from isgood.ai 9 | -> then we start work on other solutions, knowing what is good.** 10 | {% endhint %} 11 | 12 | The record of our 2021 Community All-Hands kickoff is in our [Loomio](https://www.loomio.org/d/1c0GpyAr/20210202-feb-isgood-ai-all-hands). 13 | 14 | ## 2021 Goals 15 | 16 | ![2021 Goals](../../.gitbook/assets/image.png) 17 | 18 | ## 2021 Q1 & Q2 Objectives 📌 19 | 20 | 1. **Q1** -> Have deployed and usable the "Module One" Indicator recommendation **WebApp** and supporting underlying platform and API functionality. 21 | 2. **Q2** -> Have deployed and usable the Core Functionality of the **WebApp** and supporting underlying platform and API functionality. 22 | 23 | {% hint style="danger" %} 24 | **PLEASE NOTE**: The way isgood.ai has been designed, built and released follows a mashup of [Open](https://en.wikipedia.org/wiki/Open-design_movement) [Modular](https://en.wikipedia.org/wiki/Modularity) [Integrated](https://en.wikipedia.org/wiki/System_integration) [Systems Design](https://en.wikipedia.org/wiki/Systems_design) principles, enabling best purpose for global good. 25 | _**Every release will extend further beyond current available understandings and insights.**_ 26 | {% endhint %} 27 | 28 | ## Release Targets 29 | 30 | * 2021-Q1: Beta-Release, indicators and evidence \(data\) to solve problems \(SGD, GRI, IRIS, etc\). 31 | * 2021-Q2: General Availability of isgood.ai WebApp, Dashboards, Data-Connectors, AI-Assistant. 32 | * 2021-Q3: Consolidate from Q1 & Q2, based on user feedback, extend data-connecters & scripts. 33 | * 2021-Q4: Prioritise features and enhancements from platform design, extend AI-assistant. 34 | * 2022: All currently scoped features will be released, along with platform-API, field-apps, predictive and prescriptive modelling, as well as cross-organisation collaboration & resource matching. 35 | 36 | -------------------------------------------------------------------------------- /community/goals-and-product-build.md: -------------------------------------------------------------------------------- 1 | # Goals & Release Targets 2 | 3 | We are a community of purpose-driven super-heros, focussed on solving wicked systemic humanitarian and social problems at global scale. Using evolutionary frontier technology, we are creating the levers to help make this happen. 4 | 5 | Isgood.ai is the first product from Solutions for Humanity, and is being developed first; as we need to know what actually works, so we can dedicate resources and efforts towards the initiatives and areas of work that are going to have the greatest positive impact, end-beneficiary outcomes and change. 6 | 7 | {% hint style="success" %} 8 | **Once we have insights from isgood.ai 9 | -> then we start work on other solutions, knowing what is good.** 10 | {% endhint %} 11 | 12 | The record of our 2021 Community All-Hands kickoff is in our [Loomio](https://www.loomio.org/d/1c0GpyAr/20210202-feb-isgood-ai-all-hands). 13 | 14 | ## 2021 Goals 15 | 16 | ![2021 Goals](../.gitbook/assets/image.png) 17 | 18 | ## 2021 Q1 & Q2 Objectives 📌 19 | 20 | 1. **Q1** -> Have deployed and usable the "Module One" Indicator recommendation **WebApp** and supporting underlying platform and API functionality. 21 | 2. **Q2** -> Have deployed and usable the Core Functionality of the **WebApp** and supporting underlying platform and API functionality. 22 | 23 | {% hint style="danger" %} 24 | **PLEASE NOTE**: The way isgood.ai has been designed, built and released follows a mashup of [Open](https://en.wikipedia.org/wiki/Open-design_movement) [Modular](https://en.wikipedia.org/wiki/Modularity) [Integrated](https://en.wikipedia.org/wiki/System_integration) [Systems Design](https://en.wikipedia.org/wiki/Systems_design) principles, enabling best purpose for global good. 25 | _**Every release will extend further beyond current available understandings and insights.**_ 26 | {% endhint %} 27 | 28 | ## Release Targets 29 | 30 | Main functionalities we're working on each quarter, to be released as soon as possible after \(or during\) each quarter: 31 | 32 | * 2021-Q1: Beta-Release, indicators and evidence \(data\) to solve problems \(SGD, GRI, IRIS, etc\). 33 | * 2021-Q2: General Availability of isgood.ai WebApp, Dashboards, Data-Connectors, AI-Assistant. 34 | * 2021-Q3: Consolidate from Q1 & Q2, based on user feedback, extend data-connecters & scripts. 35 | * 2021-Q4: Prioritise features and enhancements from platform design, extend AI-assistant. 36 | * 2022: All currently scoped features will be released, along with platform-API, field-apps, predictive and prescriptive modelling, as well as cross-organisation collaboration & resource matching. 37 | 38 | -------------------------------------------------------------------------------- /outline-and-goals/goals-and-product-build/q1-product-dev-outline/q1-webapp/roles-permissions-acl.md: -------------------------------------------------------------------------------- 1 | # Roles, Permissions, ACL 2 | 3 | ## Relationship Fundamentals 4 | 5 | * permissions and access is very similar to the way google drive works 6 | * users - they can access what has been shared with them \(ACL user levels, and per user share\) 7 | * organisation is the primary “account holder” 8 | * projects belong to an organisation 9 | * projects have info about the people, problem, place 10 | * ownership and access of assets, data, etc in the webapp by user 11 | * user-groups and sharing groups \(eg. share with everyone in org\) will come later. 12 | * project partner/child relations, similar to folder structure in google drive \(and sharing similar too\) 13 | * VERY hierarchical \(think of how intl aid orgs, military, etc type structures work\) 14 | * permissions are inherited, but do not over-ride protections on individual assets if restricted, etc. 15 | 16 | ## How's it Work? 17 | 18 | **User**: is a global entity, they have access to whatever is created/shared with them, at the access level/role shared. 19 | 20 | **Organisation**: is the top-level asset in the webapp, like a G-Suite organisation. 21 | 22 | * An **organisation owner** is the user that created the org. 23 | * Access to the org can be shared, with edit permissions to an **organisation manager**, who can manage the org on behalf of the owner. 24 | * They can share and invite other users to the organisation, with specific permissions \(see below table\). 25 | * An org will be the top-level billing entity \(after we integrate billing\). 26 | 27 | **Project**: projects sit under organisations, and have hierarchy like folders in google drive. 28 | 29 | * A **project owner** is the user that created the project. 30 | * Access to the project can be shared, with edit permissions to a **project manager**, who can manage the project on behalf of the owner. 31 | * They can share and invite other users to the projects, with specific permissions \(see below table\). 32 | * Projects will be hierarchical billing entities, paying for their owned/child projects \(after we integrate billing\). 33 | 34 | There are other entities where permissions apply, and gets quite complex once data-sources and such come into play; but, for now we just want the above basics. 35 | 36 | ## Permissions Specification Table 37 | 38 | ![Permission only to PROJECT LEVEL during this release](https://t6902024.p.clickup-attachments.com/t6902024/023d3400-3cec-4f36-9289-0317baaf4ff6/image.png) 39 | 40 | NOTE: 41 | 42 | * Overall access is based on sharing with users, similar to how it works in Google. drive, Clickup, Slack, AirTable, Miro, etc 43 | * Spreadsheet source -> [https://docs.google.com/spreadsheets/d/15eKNQurjpG-gUrt\_bcD32ltuZaLsBZGciqIcQOUaXCQ/edit?usp=sharing](https://docs.google.com/spreadsheets/d/15eKNQurjpG-gUrt_bcD32ltuZaLsBZGciqIcQOUaXCQ/edit?usp=sharing) 44 | 45 | ## Progress 46 | 47 | There has been work done by Matt and Hamid on this ... but, not sure it seems aligned ??!?!?!?! 48 | 49 | Hamid is doing via the ground up via Prisma, while Matt is approaching DBschema first ... maybe a mix of both will end up being the result ??? 50 | 51 | Approach suggested from Max, is via Role and attribute based approach, via plugin like: 52 | [https://www.npmjs.com/package/@superawesome/permissions](https://www.npmjs.com/package/@superawesome/permissions) 53 | 54 | -------------------------------------------------------------------------------- /api-and-data-specs/mapping-data-geojson.md: -------------------------------------------------------------------------------- 1 | # Mapping Data \(geoJSON\) 2 | 3 | ## isgood.ai Maps 4 | 5 | Maps use [Leaflet.js](https://docs.github.com/en/github/managing-files-in-a-repository/mapping-geojson-files-on-github) and support all the geometry types outlined in [the geoJSON spec](http://www.geojson.org/geojson-spec.html) \(Point, LineString, Polygon, MultiPoint, MultiLineString, MultiPolygon, and GeometryCollection\). TopoJSON files should be type "Topology" and adhere to the [topoJSON spec](https://github.com/mbostock/topojson/wiki/Specification). 6 | 7 | [Leaflet.js](https://docs.github.com/en/github/managing-files-in-a-repository/mapping-geojson-files-on-github) will be used as a base for all geo-based visualisations, including in dashboards. The underlying data is via [OpenStreetMap](http://www.openstreetmap.org/), and OSM is also used for location and GIS lookups and such, where it is used throughout the webapp and platform. 8 | 9 | ## Specifications 10 | 11 | We follow the [same guidelines as github for the basics of how we work with geo,](https://docs.github.com/en/github/managing-files-in-a-repository/mapping-geojson-files-on-github) as we are default JSON for all data in our app, ad therefor geoJSON and OSM for how we work with this. Please review the [Github Guidelines](https://docs.github.com/en/github/managing-files-in-a-repository/mapping-geojson-files-on-github), as it will help you work with this. 12 | 13 | **Please note that our default DB store everywhere is Postgres, and therefore the DB fields storing geo data must be the right Postgres field formats for working with GIS data.** 14 | 15 | Note that the data-format is to be STANDARDISED and normalised throughout the WebApp and the platform, so this needs to be enforced in the platform DBs, inbound and connected data DBs, as well as in the webapp DBs ... to ensure all data is comparable with all data, within our platform and with the right DB-field types. 16 | 17 | ## Ref: Geo Data-type Definitions 18 | 19 | {% hint style="info" %} 20 | Postgres ref: [https://www.postgresql.org/docs/current/datatype.html](https://www.postgresql.org/docs/current/datatype.html) 21 | {% endhint %} 22 | 23 | ```text 24 | 11,POINT(lat, lon),Geolocation (lat,lon),Address,true, (SRID: 4326) 25 | 12,double,Geolocation (Longitude),Address,true, (convert internally to a point) 26 | 13,double,Geolocation (Latitude),Address,true, (convert internally to a point) 27 | 14,single,Geolocation (Altitude),Address,true, (mysql doesnt handle x,y,z points sadly) 28 | ``` 29 | 30 | ```text 31 | 32 | latitude double COMMENT 'Number representing Latitude of a point', 33 | longitude double COMMENT 'Number representing Longitude of a Point', 34 | geo_point point not null COMMENT 'gis point field that represents lat/lon', 35 | geo_zone varchar(100) COMMENT 'a defined area, as opposed to exact location, how do we process or extrapolate this for analysis?', 36 | geo_zone_point point not null COMMENT 'a GIS point representation of geo_zone for use in GIS Spatial functions', 37 | geo_polygon polygon not null COMMENT 'GIS Polygon Describing a specific Area', 38 | geo_line linestring not null COMMENT 'everything the other side of something (like road, etc)', 39 | geo_radius int COMMENT 'distance from defined geo_zone always in meters', 40 | geo_range varchar(10) COMMENT 'textural representation of distance form the geo_zone eg: close, near, far, or whatever', 41 | address varchar(50) COMMENT 'Contains the value of Unit No., Street Name.', 42 | suburb varchar(30) COMMENT 'Holds the value of suburb or city,', 43 | state varchar(5) COMMENT 'Holds the value state.', 44 | country varchar(3) COMMENT 'Holds the value of country. ISO Code', 45 | postcode varchar(8) COMMENT 'Holds the value of postcode.', 46 | ``` 47 | 48 | {% hint style="danger" %} 49 | _A **BIG Gotcha**, for some unknown reason, MySQL user POINT\(lat, lon\) whereas the rest of the world uses POINT \( lon, lat\) ... YOU HAVE BEEN WARNED !_ 50 | {% endhint %} 51 | 52 | -------------------------------------------------------------------------------- /base-functional-specs/roles-permissions-acl.md: -------------------------------------------------------------------------------- 1 | # Roles, Permissions, ACL 2 | 3 | ## Current Status 4 | 5 | Technically, our approach appears to be a **hybrid of RBAC and ABAC policies** \(thx @Ilias for defining this 🙏 \) 6 | 7 | We are currently investigating the following libraries to support our complex permissions requirements, which seem to solidly support our approach: 8 | 9 | * [https://casbin.org/](https://casbin.org/) \(Ilias leading investigation of this\) 10 | * [https://www.osohq.com/](https://www.osohq.com/) \(Matt leading investigation of this\) 11 | 12 | {% hint style="success" %} 13 | To help ensure security, we are looking at utilising [Auth0](https://auth0.com/). 14 | {% endhint %} 15 | 16 | ## Relationship Fundamentals 17 | 18 | * permissions and access is very similar to the way google drive works 19 | * users - they can access what has been shared with them \(ACL user levels, and per user share\) 20 | * _**User are the one global entity in the isgood.ai app, everything else in there are just assets, to which users do or do not have access, and have certain permissions or roles for.**_ 21 | * organisation is the top level hierarchical asset 22 | * projects belong to an organisation 23 | * projects have info about the project/initiative being run \(people, problem, place\). 24 | * ownership and access of assets, data, etc in the webapp by user 25 | * user-groups and sharing groups \(eg. share with everyone in org\) will come later. 26 | * project partner/child relations, similar to folder structure in google drive \(and sharing similar too\) 27 | * VERY hierarchical \(think of how intl aid orgs, military, etc type structures work\) 28 | * permissions are inherited, but do not over-ride protections on individual assets if restricted, etc. 29 | 30 | ## How's it Work? 31 | 32 | **User**: is a global entity, they have access to whatever is created/shared with them, at the access level permissions/role shared. 33 | All of the elements within the app are ASSETS, to which a user is shared access and assigned a certain role for that asset \(like in google drive\). 34 | 35 | **Organisation**: is the top-level asset in the webapp, like a G-Suite organisation. 36 | 37 | * An **organisation owner** permission is given to the user that created the org. 38 | * Access to the org can be shared, with edit permissions to an **organisation manager**, who can manage the org on behalf of the owner. 39 | * They can share and invite other users to the organisation, with specific permissions \(see below table\). 40 | * An org will be the top-level billing entity \(after we integrate billing\). 41 | 42 | **Project**: projects sit under organisations, and have hierarchy like folders in google drive. 43 | 44 | * The **project owner** permission is given to the user that created the project. 45 | * Access to the project can be shared, with edit permissions to a **project manager**, who can manage the project on behalf of the owner. 46 | * They can share and invite other users to the projects, with specific permissions \(see below table\). 47 | * Projects will be hierarchical billing entities, paying for their owned/child projects \(after we integrate billing\). 48 | 49 | There are other entities where permissions apply, and gets quite complex once data-sources and such come into play; but, for now we just want the above basics. 50 | 51 | ## Permissions Specification Table 52 | 53 | **All permissions are just based off the following:** 54 | 55 | -> **assetID** \(org, project, dash, tile, data, group, etc\) 56 | 57 | * if this doesn't exist, they have no access to the asset with that assetID 58 | * check in hierarchical order for user, to filter at highest level 59 | 60 | -> **Permission** \(owner, manager, contributor, guest edit, guest view, etc\) 61 | 62 | * for an asset where the assetID is given to a user, then what is the permissions level 63 | * can always view as have access, but extra functionality may be restricted, per access level 64 | 65 | _As permissions are inherited, an org owner would be able to have permissions on everything in an org, unless it was expressly set as not being able to access \(private\), would be visible as existing, but would need to request to view/edit._ 66 | 67 | ![Permission only to PROJECT LEVEL during this release](https://t6902024.p.clickup-attachments.com/t6902024/023d3400-3cec-4f36-9289-0317baaf4ff6/image.png) 68 | 69 | NOTE: 70 | 71 | * Overall access is based on sharing with users, similar to how it works in Google. drive, Clickup, Slack, AirTable, Miro, etc 72 | * Spreadsheet source -> [https://docs.google.com/spreadsheets/d/15eKNQurjpG-gUrt\_bcD32ltuZaLsBZGciqIcQOUaXCQ/edit?usp=sharing](https://docs.google.com/spreadsheets/d/15eKNQurjpG-gUrt_bcD32ltuZaLsBZGciqIcQOUaXCQ/edit?usp=sharing) 73 | 74 | ## Historical 75 | 76 | ~~There has been work done by Matt and Hamid on this ... but, not sure it seems aligned ??!?!?!?!~~ 77 | 78 | ~~Hamid is doing via the ground up via Prisma, while Matt is approaching DBschema first ... maybe a mix of both will end up being the result ???~~ 79 | 80 | ~~Approach suggested from Max, is via Role and attribute based approach, via plugin like:~~ 81 | 82 | * ~~~~[~~https://www.npmjs.com/package/@superawesome/permissions~~](https://www.npmjs.com/package/@superawesome/permissions)~~~~ 83 | * ~~~~[~~https://github.com/ntgussoni/blitz-guard~~](https://github.com/ntgussoni/blitz-guard) ~~\(official blitzjs permissions package/library\)~~ 84 | 85 | -------------------------------------------------------------------------------- /community/code-of-conduct.md: -------------------------------------------------------------------------------- 1 | # Code of Conduct 2 | 3 | ### Community Code of Conduct 4 | 5 | The Solutions for Humanity and isgood.ai core members take this CoC very serious. All members, contributors and volunteers in this community are required to act according to the following Code of Conduct to provide and ensure a safe environment for everyone. 6 | 7 | In addition to this CoC, everything we do at isgood.ai is also guided by our broader community obligations, underpinned by the [Solutions for Humanity In Handbook](https://handbook.forhumanity.org.au) and the [isgood.ai Manifesto](https://isgood.ai/manifesto/). 8 | 9 | ### When Something Happens 10 | 11 | If you see a Code of Conduct violation, follow these steps: 12 | 13 | 1. Let the person know that what they did is not appropriate and ask them to stop and/or edit their message\(s\). 14 | 2. That person should immediately stop the behavior and correct the issue. 15 | 3. If this doesn’t happen, or if you’re uncomfortable speaking up, contact Max Lynam \([LinkedIn](https://www.linkedin.com/in/maxlynam/)\), or our community leads via Solutions for Humanity \(Judith, Penelope, Gareth, Simon, Sanee\). 16 | 17 | When reporting, please include any relevant details, links, screenshots, context, or other information that may be used to better understand and resolve the situation. 18 | 19 | The core members will prioritize the well-being and comfort of the recipients of the violation over the comfort of the violator. 20 | 21 | ### What We Believe and How We Act 22 | 23 | * We are committed to providing a friendly, safe and welcoming environment for everyone, regardless of age, body size, culture, ethnicity, gender expression, gender identity, level of experience, nationality, personal ability or disability, physical appearance, physical or mental difference, race, religion, set of skills, sexual orientation, socio-economic status, and subculture. We welcome people regardless of these or other attributes. 24 | * We are better together. We are more alike than different. 25 | * Our community is based on mutual respect, tolerance, and encouragement. 26 | * We believe that a diverse community where people treat each other with respect is stronger, more vibrant and has more potential contributors and more sources for ideas. We aim for more diversity. 27 | * We are kind, welcoming and courteous to everyone. 28 | * We’re respectful of others, their positions, their skills, their commitments and their efforts. 29 | * We’re attentive in our communications, whether in person or online, and we’re tactful when approaching differing views. 30 | * We are aware that language shapes reality. Thus, we use inclusive, gender-neutral language in the documents we provide and when we talk to people. When referring to a group of people, we aim to use gender-neutral terms like “team”, “folks”, “everyone”. \(For details, we recommend [this post](https://modelviewculture.com/pieces/gendered-language-feature-or-bug-in-software-documentation)\). 31 | * We respect that people have differences of opinion and criticize constructively. 32 | * We value people over code. 33 | 34 | ### Don'ts 35 | 36 | * Don’t discriminate against anyone. 37 | * Sexism and racism of any kind \(including sexist and racist “jokes”\), demeaning or insulting behaviour and harassment are seen as direct violations to this Code of Conduct. Harassment includes offensive verbal comments related to age, body size, culture, ethnicity, gender expression, gender identity, level of experience, nationality, personal ability or disability, physical appearance, physical or mental difference, race, religion, set of skills, sexual orientation, socio-economic status, and subculture. Harassment also includes sexual images in public spaces, deliberate intimidation, stalking, following, harassing photography or recording, inappropriate physical contact, and unwelcome sexual attention. 38 | * On Discord and other online or offline communications channels, don't use overtly sexual nicknames or other nicknames that might detract from a friendly, safe and welcoming environment for all. 39 | * Don’t be mean or rude. 40 | * Respect that some individuals and cultures consider the casual use of profanity offensive and off-putting. 41 | * Unwelcome / non-consensual sexual advances over Discord or any other channels related with this community are not okay. 42 | * Derailing, tone arguments and otherwise playing on people’s desires to be nice are not welcome, especially in discussions about violations to this Code of Conduct. 43 | * Please avoid unstructured critique. 44 | * Likewise any spamming, trolling, flaming, baiting or other attention-stealing behavior is not welcome. 45 | * Sponsors of Blitz are also subject to this Code of Conduct. In particular, sponsors are required to not use sexualized images, activities, or other material which is not according to this Code of Conduct. 46 | 47 | ### Consequences for Violations to this Code of Conduct 48 | 49 | If a participant engages in any behavior violating this Code of Conduct, the core members of this community will take any action they deem appropriate, starting with a gentle warning and then escalating as needed to expulsion from the community, exclusion from any interaction and loss of all rights in this community. 50 | 51 | ### Decisions About Consequences of Violations 52 | 53 | Decisions about consequences of violations of this Code of Conduct are made by this community’s core members and may not be discussed with the person responsible for the violation. 54 | 55 | ### For Questions or Feedback 56 | 57 | If you have any questions or feedback on this Code of Conduct, we’re happy to hear from you. 58 | 59 | ### Thanks for Inspiration 60 | 61 | * [Blitzjs](https://blitzjs.com) 62 | * [Hood.ie](http://hood.ie/code-of-conduct/) 63 | * [WeAllJS](https://wealljs.org/code-of-conduct) 64 | 65 | -------------------------------------------------------------------------------- /community/contributing.md: -------------------------------------------------------------------------------- 1 | --- 2 | description: "\U0001F44B We're so excited you're interested in helping with isgood.ai! We are happy to help you get started, even if you don't have any previous #techforgood or open-source experience :)" 3 | --- 4 | 5 | # How to Contribute 6 | 7 | ## First Things First 8 | 9 | 1. New to \#techforgood projects? take a look at the [Solutions for Humanity website](https://forhumanity.org.au). 10 | 2. New to open source? take a look at [How to Contribute to an Open Source Project on GitHub](https://egghead.io/courses/how-to-contribute-to-an-open-source-project-on-github) 11 | 3. Familiarize yourself with the [isgood.ai Code of Conduct](code-of-conduct.md) 12 | 4. Learn [how the community operates](https://isgood.ai/toolbox/) 13 | 14 | ## Overview of our Codebase 15 | 16 | The greater isgood.ai project has 3 layers: 17 | 18 | 1. WebApp Presentation Layer. 19 | 2. API and Data-Service Layer. 20 | 3. AI & Data-Platform Layer. 21 | 22 | Layer 1 defaults to javascript, while layer 3 defaults to python. Layer 2 is a combination of open-api standards . 23 | 24 | {% hint style="info" %} 25 | Tech stack on Stackshare -> [https://stackshare.io/isgood-ai/beta](https://stackshare.io/isgood-ai/beta) 26 | {% endhint %} 27 | 28 | Collaborative decision making about tech stack decisions made on our [Loomio](https://www.loomio.org/sfh-isgood-ai-product/). 29 | 30 | As general outline, our contributors spend most time with [Express](http://expressjs.com/) \([Node](https://nodejs.org/)\), [React.js](https://reactjs.org/) & [Python](https://www.python.org/) coding languages, [PostgerSQL](https://www.postgresql.org/). 31 | 32 | 33 | 💡 Please see the [Github repositories](https://github.com/for-good) for the latest dependencies being used. 34 | 35 | ## Open-Source Public-Good Principles 36 | 37 | As a \#techforgood project, we have agreed to the [Digital Development Principles and Open-Source Licensing](https://www.loomio.org/d/C2gOcrqu/digital-development-principles-and-licensing), at all times when it is in the public interest and for the public good. In effect, this means by default all of our code and scripts are [open-source by default](https://www.loomio.org/p/Kr1SHvs5/open-community-licence-where-applicable)![](../.gitbook/assets/osiapproved_1.png) , with a review of any private-repo scripts every 6 months to enable them to become open-source where public benefit outweighs risk.🎯 _isgood.ai risk work-group will be publish more info on isgood.ai website._ 38 | 39 | ## Code Management Best Practices 40 | 41 | ### Coding Style & Commenting 42 | 43 | We encourage you to follow the following general guidelines to help you team mates and leave behind code that can be worked with in the future by other developers. 44 | 45 | * Do not write excessively long lines of complex code. Split them out into multiple lines. Today's compilers do not benefit much from dumping everything in one long line of code 46 | * Remember that the people coming behind you also need to understand your code, they may not necessarily be at the same level as you so keep complexity to a case where it absolutely demonstrates tangible benefits. 47 | * **Comment. Comment. Comment.** Explain why you did something and any other options you may have considered. Do this in an obvious comment block that stands out. It will likely help solve a future bug or a feature enhancement. 48 | * We use an automatic code formatter called [Prettier](https://prettier.io/). Run `yarn prettier` after making any changes to the code. You can check the status of your code styling by simply running `yarn linc`. If you are unsure about something, looking at [Airbnb’s Style Guide](https://github.com/airbnb/javascript) will guide you in the right direction. 49 | 50 | ## Making a Contribution 51 | 52 | When you are making a contribution, it will normally be done as a pull-request from a branch that contains your edits \([see github's docs](https://opensource.guide/how-to-contribute/#opening-a-pull-request)\). 53 | 54 | A pull request doesn’t have to represent finished work. It’s usually better to open a pull request early on, so others can watch or give feedback on your progress. Just mark it as a “WIP” \(Work in Progress\) in the subject line. You can always add more commits later. 55 | 56 | 💡 Here’s how to contribute code and submit a pull request: 57 | 58 | * [**Fork the repository**](https://guides.github.com/activities/forking/) and clone it locally. Connect your local to the original “upstream” repository by adding it as a remote. Pull in changes from “upstream” often so that you stay up to date so that when you submit your pull request, merge conflicts will be less likely. \(See more detailed instructions [here](https://help.github.com/articles/syncing-a-fork/).\) 59 | * [**Create a branch**](https://guides.github.com/introduction/flow/) for your edits. 60 | * **Reference any relevant issues** or supporting documentation in your PR \(for example, “Closes \#37.”\) 61 | * **Include screenshots of the before and after** if your changes include differences in HTML/CSS. Drag and drop the images into the body of your pull request. 62 | * **Test your changes!** Run your changes against any existing tests if they exist and create new ones when needed. Whether tests exist or not, make sure your changes don’t break the existing project. We highly recommend peer-review of your code and contributions ... we're a super-welcoming community, and love to help each other out 😍 63 | * **Contribute in the style of the project** to the best of your abilities. This may mean using indents, semi-colons or comments differently than you would in your own repository, but makes it easier for the maintainer to merge, others to understand and maintain in the future. 64 | 65 | If this is your first pull request, check out [Make a Pull Request](http://makeapullrequest.com/), which [@kentcdodds](https://github.com/kentcdodds) created as a walkthrough video tutorial. You can also practice making a pull request in the [First Contributions](https://github.com/Roshanjossey/first-contributions) repository, created by [@Roshanjossey](https://github.com/Roshanjossey). 66 | 67 | -------------------------------------------------------------------------------- /base-functional-specs/recommendations-display.md: -------------------------------------------------------------------------------- 1 | # Recommendations Display 2 | 3 | ## Functionality 4 | 5 | Based on what the user enters when setting up the project information, a script analyses this text and information and return 'n' number of recommend indicators, that are the most likely to enable the right data is available to what is or is not working, where there's gaps, what is affecting the ability to create the change required, etc. 6 | 7 | To start with, the indicators the system and scripts have been tested against is the SDG, GRI and IRIS standards/frameworks, and gives better than human recommendations. 8 | 9 | ## Example Recommendations Display 10 | 11 | ![Mock Concept for Recommended Indicators in project tab](../.gitbook/assets/image%20%281%29.png) 12 | 13 | ![Future Version advanced indicators selections functionality \(and BYO\)](https://t6902024.p.clickup-attachments.com/t6902024/c594b114-0600-4424-a673-c8ab7c3651af/image.png) 14 | 15 | _-> ref to research the future functions as per lower image via_ [_Miro_](https://miro.com/app/board/o9J_kyYfLV0=/?moveToWidget=3074457354464890435&cot=10)_._ 16 | 17 | For the **initial release we are limiting the number of indicators returned to 12**, and just having them returned as a list from the frameworks, standards and tools made available via the platform. 18 | More detail and extra features to be added after the Q1 release. 19 | 20 | ## Sample Data in Global Text, to Display in Recommendation List 21 | 22 | ### Collation Of SDG, GRI, IRIS in Drive \(google sheet format\) 23 | 24 | [https://drive.google.com/drive/folders/102kyvkUSabsy9Z\_uvwk\_bxmmAKOeh8Dn?usp=sharing](https://drive.google.com/drive/folders/102kyvkUSabsy9Z_uvwk_bxmmAKOeh8Dn?usp=sharing) **\(this will be out of date, speak to DS Sherpas for current version\)** 25 | 26 | > In the drive repo above, there are sheets with the collated "global\_text" records, that have the structure and detail of the indicators information, that would be available to display in the recommendations output. 27 | 28 | > Display is essentially a pretty data-table type display. Imagery that could be included is something like the SDG goal tile aligned with the with the indicator area - open to suggestions. 29 | 30 | #### example of SINGLE indicator \(SDG 1.1.1a\) from collated global\_text google sheet \(linked above\) 31 | 32 | ```text 33 | ind_id ind_name ind_std_id_text ind_def ind_theme ind_calc ind_ref_data ind_text ind_parent_id_text ind_sub_level 34 | SDG-1.1.1a Proportion of population below the international poverty line, by sex, age, employment status and geographical location (urban/rural) SDG The indicator Proportion of population below the international poverty line is defined as the percentage of the population living on less than $1.90 a day at 2011 international prices. The 'international poverty line' is currently set at $1.90 a day at 2011 international prices. No Poverty "To measure poverty across countries consistently, the World Bank’s international measures apply a 35 | common standard, anchored to what “poverty” means in the world’s poorest countries. The original “$1- a-day” line was based on a compilation of national lines for only 22 developing countries, mostly from academic studies in the 1980s (Ravallion, et al., 1991). While this was the best that could be done at the time, the sample was hardly representative of developing countries even in the 1980s. Since then, national poverty lines have been developed for many other countries. Based on a new compilation of national lines for 75 developing countries, Ravallion, Chen and Sangraula (RCS) (2009) proposed a new international poverty line of $1.25 a day. This is the average poverty line for the poorest 15 countries in their data set. 36 | The current extreme poverty line is set at $1.90 a day in 2011 PPP terms, which represents the mean of the national poverty lines found in the same poorest 15 countries ranked by per capita consumption. The new poverty line maintains the same standard for extreme poverty - the poverty line typical of the poorest countries in the world - but updates it using the latest information on the cost of living in developing countries. 37 | When measuring international poverty of a country, the international poverty line at PPP is converted to local currencies in 2011 price and is then converted to the prices prevailing at the time of the relevant household survey using the best available Consumer Price Index (CPI). (Equivalently, the survey data on household consumption or income for the survey year are expressed in the prices of the ICP base year, and then converted to PPP $’s.) Then the poverty rate is calculated from that survey. All inter-temporal comparisons are real, as assessed using the country-specific CPI. Interpolation/extrapolation methods are used to line up the survey-based estimates with these reference years." "World Bank 38 | The World Bank typically receives data from National Statistical Offices (NSOs) directly. In other cases it uses NSO data received indirectly. For example, it receives data from Eurostat and from LIS (Luxemburg Income Study), who provide the World Bank NSO data they have received / harmonized. The Universidad Nacional de La Plata, Argentina and the World Bank jointly maintain the SEDLAC (Socio-Economic Database for Latin American and Caribbean) database that includes harmonized statistics on poverty and other distributional and social variables from 24 Latin American and Caribbean countries, based on microdata from household surveys conducted by NSOs. 39 | Data is obtained through country specific programs, including technical assistance programs and joint analytical and capacity building activities. The World Bank has relationships with NSOs on work programs involving statistical systems and data analysis. Poverty economists from the World Bank typically engage with NSOs broadly on poverty measurement and analysis as part of technical assistance activities. 40 | Within the World Bank, the Global Poverty Working Group (GPWG) is in charge of the collection, 41 | validation and estimation of poverty estimates. GPWG archives the datasets obtained from NSOs and then harmonizes them, applying common methodologies. The objective of the GPWG is to ensure that poverty and inequality data generated, curated, and disseminated by the World Bank are up to date, meet high-quality standards, and are well documented and consistent across dissemination channels. Members of GPWG generate and update the estimates for the proportion of population below the international poverty line using raw data typically provided by country governments. The raw data are obtained by poverty economists through their contacts in the NSOs, and checked for quality before being submitted for further analysis. The raw data can be unit-record survey data, or grouped data, depending on the agreements with the country governments. In most cases, the welfare aggregate, the essential element for poverty estimation, is generated by the country governments. Sometimes, the World Bank has to construct the welfare aggregate or adjust the aggregate provided by the country." "Rationale; 42 | Monitoring poverty is important on the global development agenda as well as on the national development agenda of many countries. The World Bank produced its first global poverty estimates for developing countries for World Development Report 1990: Poverty (World Bank 1990) using household survey data for 22 countries (Ravallion, Datt, and van de Walle 1991). Since then there has been considerable expansion in the number of countries that field household income and expenditure surveys. The World Bank's Development Research Group maintains a database that is updated annually as new survey data become available (and thus may contain more recent data or revisions) and conducts a major reassessment of progress against poverty every year. PovcalNet is an interactive computational tool that 43 | allows users to replicate these internationally comparable $1.90 and $3.10 a day global, regional and country-level poverty estimates and to compute poverty measures for custom country groupings and for different poverty lines. 44 | The Poverty and Equity Data portal provides access to the database and user-friendly dashboards with graphs and interactive maps that visualize trends in key poverty and inequality indicators for different regions and countries. The country dashboards display trends in poverty measures based on the national poverty lines alongside the internationally comparable estimates, produced from and consistent with PovcalNet. 45 | Concepts: 46 | In assessing poverty in a given country, and how best to reduce poverty, one naturally focuses on a poverty line that is considered appropriate for that country. But how do we talk meaningfully about 47 | Last updated: 19 July 2016 48 | “global poverty?” Poverty lines across countries vary in terms of their purchasing power, and they have a strong economic gradient, such that richer countries tend to adopt higher standards of living in defining poverty. But to consistently measure global absolute poverty in terms of consumption we need to treat two people with the same purchasing power over commodities the same way—both are either poor or not poor—even if they live in different countries. 49 | Since World Development Report 1990, the World Bank has aimed to apply a common standard in measuring extreme poverty, anchored to what poverty means in the world's poorest countries. The welfare of people living in different countries can be measured on a common scale by adjusting for differences in the purchasing power of currencies. The commonly used $1 a day standard, measured in 1985 international prices and adjusted to local currency using PPPs, was chosen for World Development 50 | Report 1990 because it was typical of the poverty lines in low-income countries at the time. As differences in the cost of living across the world evolve, the international poverty line has to be periodically updated using new PPP price data to reflect these changes. The last change was in October 2015, when the World Bank adopted $1.90 as the international poverty line using the 2011 PPP. Prior to that, the 2008 update set the international poverty line at $1.25 using the 2005 PPP. Poverty measures based on international poverty lines attempt to hold the real value of the poverty line constant across countries, as is done when making comparisons over time. Early editions of the World Bank’s World Development Indicators (WDI) used PPPs from the Penn World Tables to convert values in local currency to equivalent purchasing power measured in U.S dollars. Later editions used 1993, 2005, and 2011 consumption PPP estimates produced by the World Bank’s International Comparison Program (ICP)." SDG-1.1 3 51 | ``` 52 | 53 | #### SDG Indicators Raw \(2019\) 54 | 55 | ```text 56 | "indicator_id","description","indicator_level","parent_indicator_id","source_id" 57 | "SDG-1","End poverty in all its forms everywhere",1,"","SDG" 58 | "SDG-1.1","By 2030, eradicate extreme poverty for all people everywhere, currently measured as people living on less than $1.25 a day",2,"SDG-1","SDG" 59 | "SDG-1.1.1","Proportion of population below the international poverty line, by sex, age, employment status and geographical location (urban/rural)",3,"SDG-1.1","SDG" 60 | "SDG-1.2","By 2030, reduce at least by half the proportion of men, women and children of all ages living in poverty in all its dimensions according to national definitions",2,"SDG-1","SDG" 61 | "SDG-1.2.1","Proportion of population living below the national poverty line, by sex and age",3,"SDG-1.2","SDG" 62 | "SDG-1.2.2","Proportion of men, women and children of all ages living in poverty in all its dimensions according to national definitions",3,"SDG-1.2","SDG" 63 | "SDG-1.3","Implement nationally appropriate social protection systems and measures for all, including floors, and by 2030 achieve substantial coverage of the poor and the vulnerable",2,"SDG-1","SDG" 64 | "SDG-1.3.1","Proportion of population covered by social protection floors/systems, by sex, distinguishing children, unemployed persons, older persons, persons with disabilities, pregnant women, newborns, work-injury victims and the poor and the vulnerable",3,"SDG-1.3","SDG" 65 | "SDG-1.4","By 2030, ensure that all men and women, in particular the poor and the vulnerable, have equal rights to economic resources, as well as access to basic services, ownership and control over land and other forms of property, inheritance, natural resources, appropriate new technology and financial services, including microfinance",2,"SDG-1","SDG" 66 | "SDG-1.4.1","Proportion of population living in households with access to basic services",3,"SDG-1.4","SDG" 67 | "SDG-1.4.2","Proportion of total adult population with secure tenure rights to land, (a) with legally recognized documentation, and (b) who perceive their rights to land as secure, by sex and type of tenure",3,"SDG-1.4","SDG" 68 | "SDG-1.5","By 2030, build the resilience of the poor and those in vulnerable situations and reduce their exposure and vulnerability to climate-related extreme events and other economic, social and environmental shocks and disasters",2,"SDG-1","SDG" 69 | ``` 70 | 71 | -------------------------------------------------------------------------------- /outline-and-goals/goals-and-product-build/q1-product-dev-outline/q1-webapp/recommendations-display.md: -------------------------------------------------------------------------------- 1 | # Recommendations Display 2 | 3 | ## Functionality 4 | 5 | Based on what the user enters when setting up the project information, a script analyses this text and information and return 'n' number of recommend indicators, that are the most likely to enable the right data is available to what is or is not working, where there's gaps, what is affecting the ability to create the change required, etc. 6 | 7 | To start with, the indicators the system and scripts have been tested against is the SDG, GRI and IRIS standards/frameworks, and gives better than human recommendations. 8 | 9 | ## Example Recommendations Display 10 | 11 | ![Mock Concept for Recommended Indicators in project tab](../../../../.gitbook/assets/image%20%281%29.png) 12 | 13 | ![Future Version advanced indicators selections functionality \(and BYO\)](https://t6902024.p.clickup-attachments.com/t6902024/c594b114-0600-4424-a673-c8ab7c3651af/image.png) 14 | 15 | _-> ref to research the future functions as per lower image via_ [_Miro_](https://miro.com/app/board/o9J_kyYfLV0=/?moveToWidget=3074457354464890435&cot=10)_._ 16 | 17 | For the **initial release we are limiting the number of indicators returned to 12**, and just having them returned as a list from the frameworks, standards and tools made available via the platform. 18 | More detail and extra features to be added after the Q1 release. 19 | 20 | ## Sample Data in Global Text, to Display in Recommendation List 21 | 22 | ### Collation Of SDG, GRI, IRIS in Drive \(google sheet format\) 23 | 24 | [https://drive.google.com/drive/folders/102kyvkUSabsy9Z\_uvwk\_bxmmAKOeh8Dn?usp=sharing](https://drive.google.com/drive/folders/102kyvkUSabsy9Z_uvwk_bxmmAKOeh8Dn?usp=sharing) **\(this will be out of date, speak to DS Sherpas for current version\)** 25 | 26 | > In the drive repo above, there are sheets with the collated "global\_text" records, that have the structure and detail of the indicators information, that would be available to display in the recommendations output. 27 | 28 | > 29 | 30 | > There is NOT a pretty display mock of a recommendations screen \(or PDF download\), as it is a recent deliverable/output ... but is essentially a pretty data-table type display. Imagery that could be included is something like the SDG goal tile aligned with the iwith the indicator area - open to suggestions. 31 | 32 | #### example of SINGLE indicator \(SDG 1.1.1a\) from collated global\_text google sheet \(linked above\) 33 | 34 | ```text 35 | ind_id ind_name ind_std_id_text ind_def ind_theme ind_calc ind_ref_data ind_text ind_parent_id_text ind_sub_level 36 | SDG-1.1.1a Proportion of population below the international poverty line, by sex, age, employment status and geographical location (urban/rural) SDG The indicator Proportion of population below the international poverty line is defined as the percentage of the population living on less than $1.90 a day at 2011 international prices. The 'international poverty line' is currently set at $1.90 a day at 2011 international prices. No Poverty "To measure poverty across countries consistently, the World Bank’s international measures apply a 37 | common standard, anchored to what “poverty” means in the world’s poorest countries. The original “$1- a-day” line was based on a compilation of national lines for only 22 developing countries, mostly from academic studies in the 1980s (Ravallion, et al., 1991). While this was the best that could be done at the time, the sample was hardly representative of developing countries even in the 1980s. Since then, national poverty lines have been developed for many other countries. Based on a new compilation of national lines for 75 developing countries, Ravallion, Chen and Sangraula (RCS) (2009) proposed a new international poverty line of $1.25 a day. This is the average poverty line for the poorest 15 countries in their data set. 38 | The current extreme poverty line is set at $1.90 a day in 2011 PPP terms, which represents the mean of the national poverty lines found in the same poorest 15 countries ranked by per capita consumption. The new poverty line maintains the same standard for extreme poverty - the poverty line typical of the poorest countries in the world - but updates it using the latest information on the cost of living in developing countries. 39 | When measuring international poverty of a country, the international poverty line at PPP is converted to local currencies in 2011 price and is then converted to the prices prevailing at the time of the relevant household survey using the best available Consumer Price Index (CPI). (Equivalently, the survey data on household consumption or income for the survey year are expressed in the prices of the ICP base year, and then converted to PPP $’s.) Then the poverty rate is calculated from that survey. All inter-temporal comparisons are real, as assessed using the country-specific CPI. Interpolation/extrapolation methods are used to line up the survey-based estimates with these reference years." "World Bank 40 | The World Bank typically receives data from National Statistical Offices (NSOs) directly. In other cases it uses NSO data received indirectly. For example, it receives data from Eurostat and from LIS (Luxemburg Income Study), who provide the World Bank NSO data they have received / harmonized. The Universidad Nacional de La Plata, Argentina and the World Bank jointly maintain the SEDLAC (Socio-Economic Database for Latin American and Caribbean) database that includes harmonized statistics on poverty and other distributional and social variables from 24 Latin American and Caribbean countries, based on microdata from household surveys conducted by NSOs. 41 | Data is obtained through country specific programs, including technical assistance programs and joint analytical and capacity building activities. The World Bank has relationships with NSOs on work programs involving statistical systems and data analysis. Poverty economists from the World Bank typically engage with NSOs broadly on poverty measurement and analysis as part of technical assistance activities. 42 | Within the World Bank, the Global Poverty Working Group (GPWG) is in charge of the collection, 43 | validation and estimation of poverty estimates. GPWG archives the datasets obtained from NSOs and then harmonizes them, applying common methodologies. The objective of the GPWG is to ensure that poverty and inequality data generated, curated, and disseminated by the World Bank are up to date, meet high-quality standards, and are well documented and consistent across dissemination channels. Members of GPWG generate and update the estimates for the proportion of population below the international poverty line using raw data typically provided by country governments. The raw data are obtained by poverty economists through their contacts in the NSOs, and checked for quality before being submitted for further analysis. The raw data can be unit-record survey data, or grouped data, depending on the agreements with the country governments. In most cases, the welfare aggregate, the essential element for poverty estimation, is generated by the country governments. Sometimes, the World Bank has to construct the welfare aggregate or adjust the aggregate provided by the country." "Rationale; 44 | Monitoring poverty is important on the global development agenda as well as on the national development agenda of many countries. The World Bank produced its first global poverty estimates for developing countries for World Development Report 1990: Poverty (World Bank 1990) using household survey data for 22 countries (Ravallion, Datt, and van de Walle 1991). Since then there has been considerable expansion in the number of countries that field household income and expenditure surveys. The World Bank's Development Research Group maintains a database that is updated annually as new survey data become available (and thus may contain more recent data or revisions) and conducts a major reassessment of progress against poverty every year. PovcalNet is an interactive computational tool that 45 | allows users to replicate these internationally comparable $1.90 and $3.10 a day global, regional and country-level poverty estimates and to compute poverty measures for custom country groupings and for different poverty lines. 46 | The Poverty and Equity Data portal provides access to the database and user-friendly dashboards with graphs and interactive maps that visualize trends in key poverty and inequality indicators for different regions and countries. The country dashboards display trends in poverty measures based on the national poverty lines alongside the internationally comparable estimates, produced from and consistent with PovcalNet. 47 | Concepts: 48 | In assessing poverty in a given country, and how best to reduce poverty, one naturally focuses on a poverty line that is considered appropriate for that country. But how do we talk meaningfully about 49 | Last updated: 19 July 2016 50 | “global poverty?” Poverty lines across countries vary in terms of their purchasing power, and they have a strong economic gradient, such that richer countries tend to adopt higher standards of living in defining poverty. But to consistently measure global absolute poverty in terms of consumption we need to treat two people with the same purchasing power over commodities the same way—both are either poor or not poor—even if they live in different countries. 51 | Since World Development Report 1990, the World Bank has aimed to apply a common standard in measuring extreme poverty, anchored to what poverty means in the world's poorest countries. The welfare of people living in different countries can be measured on a common scale by adjusting for differences in the purchasing power of currencies. The commonly used $1 a day standard, measured in 1985 international prices and adjusted to local currency using PPPs, was chosen for World Development 52 | Report 1990 because it was typical of the poverty lines in low-income countries at the time. As differences in the cost of living across the world evolve, the international poverty line has to be periodically updated using new PPP price data to reflect these changes. The last change was in October 2015, when the World Bank adopted $1.90 as the international poverty line using the 2011 PPP. Prior to that, the 2008 update set the international poverty line at $1.25 using the 2005 PPP. Poverty measures based on international poverty lines attempt to hold the real value of the poverty line constant across countries, as is done when making comparisons over time. Early editions of the World Bank’s World Development Indicators (WDI) used PPPs from the Penn World Tables to convert values in local currency to equivalent purchasing power measured in U.S dollars. Later editions used 1993, 2005, and 2011 consumption PPP estimates produced by the World Bank’s International Comparison Program (ICP)." SDG-1.1 3 53 | ``` 54 | 55 | #### SDG Indicators Raw \(2019\) 56 | 57 | ```text 58 | "indicator_id","description","indicator_level","parent_indicator_id","source_id" 59 | "SDG-1","End poverty in all its forms everywhere",1,"","SDG" 60 | "SDG-1.1","By 2030, eradicate extreme poverty for all people everywhere, currently measured as people living on less than $1.25 a day",2,"SDG-1","SDG" 61 | "SDG-1.1.1","Proportion of population below the international poverty line, by sex, age, employment status and geographical location (urban/rural)",3,"SDG-1.1","SDG" 62 | "SDG-1.2","By 2030, reduce at least by half the proportion of men, women and children of all ages living in poverty in all its dimensions according to national definitions",2,"SDG-1","SDG" 63 | "SDG-1.2.1","Proportion of population living below the national poverty line, by sex and age",3,"SDG-1.2","SDG" 64 | "SDG-1.2.2","Proportion of men, women and children of all ages living in poverty in all its dimensions according to national definitions",3,"SDG-1.2","SDG" 65 | "SDG-1.3","Implement nationally appropriate social protection systems and measures for all, including floors, and by 2030 achieve substantial coverage of the poor and the vulnerable",2,"SDG-1","SDG" 66 | "SDG-1.3.1","Proportion of population covered by social protection floors/systems, by sex, distinguishing children, unemployed persons, older persons, persons with disabilities, pregnant women, newborns, work-injury victims and the poor and the vulnerable",3,"SDG-1.3","SDG" 67 | "SDG-1.4","By 2030, ensure that all men and women, in particular the poor and the vulnerable, have equal rights to economic resources, as well as access to basic services, ownership and control over land and other forms of property, inheritance, natural resources, appropriate new technology and financial services, including microfinance",2,"SDG-1","SDG" 68 | "SDG-1.4.1","Proportion of population living in households with access to basic services",3,"SDG-1.4","SDG" 69 | "SDG-1.4.2","Proportion of total adult population with secure tenure rights to land, (a) with legally recognized documentation, and (b) who perceive their rights to land as secure, by sex and type of tenure",3,"SDG-1.4","SDG" 70 | "SDG-1.5","By 2030, build the resilience of the poor and those in vulnerable situations and reduce their exposure and vulnerability to climate-related extreme events and other economic, social and environmental shocks and disasters",2,"SDG-1","SDG" 71 | ``` 72 | 73 | -------------------------------------------------------------------------------- /api-and-data-specs/open-api.md: -------------------------------------------------------------------------------- 1 | # Open API Gateway 2 | 3 | For this stage of the project we have pretty minimal requirements for the API; however, we DO need to setup the foundation of the API layer, for us to have initial code and API service available to communicate between the isgood.ai webapp, and the isgood.ai platform \(DS data brain\). 4 | 5 | Those involved in the server infrastructure, ci/cd and DevOps, will be integral in the overall API and communications layer - incl. infra for WebApp, API and platform services and infrastructure. 6 | 7 | Open does NOT mean insecure, it means that we intend it to be able to connect to a very open number of AUTHORISED apps and systems. 8 | 9 | ## Base API Service 10 | 11 | Default communication for WebApp and platform is JSON, so looking at options we can start looking at the following around easy to manage, deploy and contribute Open-API frameworks: 12 | 13 | * [https://jsonapi.org/](https://jsonapi.org/) 14 | * [https://swagger.io/specification/](https://swagger.io/specification/) 15 | * ... other options to look at for base ... want open, not lock-in ??? 16 | 17 | {% hint style="danger" %} 18 | NOTE: Complex access filters & permissions via API, will need to be handled and reflected via [WebApp](../base-functional-specs/roles-permissions-acl.md) interface for data/platform permissions, as well as hierarchy/group permissions. 19 | {% endhint %} 20 | 21 | ## API Functionality for 2021 Q1 Release 22 | 23 | 1. WebApp sends first four fields of project profile info to the API. 24 | 2. Platform receives the JSON text and processes it. 25 | 3. Returns list of platform indicatorIDs to WebApp and is stored as recommended indicatorIDs against the project. 26 | 27 | ## Initial API between WebApp & DS Functions 28 | 29 | Would have also multiple beneficiary groups, with multiples of demographics for each beneficiary group, with multiple indicators for the project \(default 5\). 30 | 31 | ### Sending Project info to DS Brain, via API Gateway 32 | 33 | ```text 34 | { 35 | projectId: 1234567890, 36 | name: "test", 37 | description: "string", 38 | projectImpacts: ["string", "string", "string"], 39 | outcomesDesired: ["string", "string", "string"], 40 | beneficiaries: [ 41 | { 42 | name: "string", 43 | change: "string", 44 | demographics: [ 45 | { 46 | type: "string", 47 | operator: "string", 48 | value: integer 49 | }, 50 | ] 51 | }, 52 | ], 53 | geolocation: [lat, lng], 54 | startDate: "timestamp", 55 | endDate: "timestamp" 56 | } 57 | ``` 58 | 59 | .... and for now it is just: 60 | 61 | ```text 62 | { 63 | projectId: 1234567890, 64 | name: "string", 65 | description: "string", 66 | projectImpacts: ["string", "string", "string"], 67 | outcomesDesired: ["string", "string", "string"], 68 | } 69 | ``` 70 | 71 | ### Response back from the DS Mapper function \(via Gateway\) 72 | 73 | ```text 74 | { 75 | projectId: 1234567890, 76 | indicators: [ 77 | { 78 | indicatorID: uidOfIndicatorxxx, 79 | alignedStrength: 0.937465873983, //I am the vector of strength? 80 | }, 81 | { 82 | indicatorID: uidOfIndicatorxxx, 83 | alignedStrength: 0.837465873983, //I am the vector of strength? 84 | }, 85 | { 86 | indicatorID: uidOfIndicatorxxx, 87 | alignedStrength: 0.737465873983, //I am the vector of strength? 88 | } 89 | ] 90 | } 91 | ``` 92 | 93 | #### Notes from DS Side 94 | 95 | * Project ID \(object ID for DS side\) must also be sent to the back end with the text input as well as the number of recommendations 96 | * API Call will give us Client ID, object Id, user input \(First 4 fields\), number of indicators to be returned 97 | * Client ID will be the UID of Client sending us the input. 98 | * Object ID will be the UID associated with the text input. 99 | * User input will be the input . 100 | * And the number of indicators to be returned. 101 | * We will be returning the indicator UID and the strengthIng our table we will have Recommendation ID, ClientID, Object ID, text, Text\_Vector 102 | 103 | **Clarifications:** 104 | 105 | * Keep the option to be able to request more indicators to be returned - default is 5. 106 | * just return the asset-id \(ID\) fir the recommended indicators with strength. The detail is requested from the global-text as the record of the details, and is on cache in the app. 107 | * Yes for the extra into to be saved in the DS DB 108 | 109 | ## API Infra as Code 110 | 111 | Hsin and Tim have been working on [Terraform](https://www.hashicorp.com/products/terraform) for the management and deploy of the API Gateway on AWS. 112 | 113 | ## 20210303 - Meeting to Discuss 114 | 115 | {% embed url="https://youtu.be/Zodq9h1vDjY" %} 116 | 117 | ### Support 202 Response for WebApp 118 | {% hint style="info" %} 119 | **DRAFT** 120 | {% endhint %} 121 | 122 | | route | behavior | 123 | | -- | -- | 124 | | `/echo` | HTTP integration w/ fake data | 125 | | `/echo/foxtrot` | HTTP integration detail w/ fake data | 126 | | `/lambda` | Lambda integration w/ fake data | 127 | | `/lambda/mu` | Lambda integration detail w/ fake data | 128 | | `/lambda/x` | **202 Response** w/ placeholders | 129 | 130 | With the new `/lambda/x` route, we remove Cognito and switch to API keys for controlling access. One API key is generated with the Terraform deployment and is named *demo-api-key* when viewed in the AWS management console. It should be the same as manually generating keys and usage plans within the console. So the WebApp can be assigned any API key after deployment, by going to the console and using the UI (as described in [AWS doc](https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-api-usage-plans.html)). 131 | 132 | We used a guide to configure the `202` response behavior which is more clear than I can write. See [Lambda destinations](https://aws.amazon.com/blogs/compute/introducing-aws-lambda-destinations/) to get the general idea of the request-response flow. To adapt this guide for our infra, the steps were converted into Terraform HCL. 133 | 134 | | git | module | 135 | | -- | -- | 136 | | [tf/modules/rest](https://github.com/for-good/isgood-api/tree/main/tf/modules/rest) | REST configuration | 137 | | [tf/modules/lambda](https://github.com/for-good/isgood-api/tree/main/tf/modules/lambda) | Lambda functions | 138 | 139 | **tf/modules/rest/oas3.json** 140 | The new route (`/lambda/x`) is added on line #10. It has a security scheme that we name DemoRegisteredKeys. The `uri` field is a parameter that is bound to the event-invoke Lambda's ARN. 141 | ``` 142 | "paths": { 143 | "/lambda/x": { 144 | "post": { 145 | "security": [{"DemoRegisteredKeys": []}], 146 | "x-amazon-apigateway-integration": { 147 | "uri": "${event_invoke_uri}", 148 | "httpMethod": "POST", 149 | "responses": { 150 | "default": { 151 | "statusCode": "202" 152 | } 153 | }, 154 | "passthroughBehavior": "when_no_match", 155 | "type": "aws_proxy" 156 | } 157 | } 158 | }, 159 | ``` 160 | The DemoRegisteredKeys security scheme replaces the ExampleRegisteredKeys and specifies X-API-KEY as the header for the API key value. 161 | ``` 162 | "components": { 163 | "securitySchemes": { 164 | "DemoRegisteredKeys": { 165 | "type": "apiKey", 166 | "name": "x-api-key", 167 | "in": "header" 168 | } 169 | } 170 | } 171 | ``` 172 | **tf/modules/rest/rest-api-key.tf** 173 | The *demo-api-key* is defined with the HCL inside the rest-api-key.tf file. These steps can be applied manually from the AWS management console. This HCL and the *demo-api-key* is for convenience, and to help in adhoc/automation when we want to test against a gateway after deployment. It will be removed when the automation can create its test key within the test framework. 174 | 175 | 176 | **tf/modules/lambda/event-invoke-step.tf** 177 | The backend-Lambda is encapsulated inside the *event-invoke-step* configuration. The Python file `event-invoke-step.py` is a placeholder. When the backend-Lambda is ready, this `aws_lambda_function.event_invoke_step_lambda` will be removed, and the ARN from the backend-Lambda will supercede. This means there will be some adjustment at the interface between the backend-Lambda and the invoke. 178 | 179 | Also, notice the configuration for retries and destination. Until we make the Python logic idempotent, this disables the automatic retries. AND we will want to add the dead letter queue to track errors. 180 | ``` 181 | resource "aws_lambda_function_event_invoke_config" "event_invoke_step_config" { 182 | function_name = aws_lambda_function.event_invoke_step_lambda.function_name 183 | # Do not retry when error occurs (until we have re-entrant handling) 184 | maximum_retry_attempts = 0 185 | # Final step after subprocess ends 186 | destination_config { 187 | # Move forward when function is successful 188 | # by sending invocation record to destination child Lambda 189 | on_success { 190 | destination = aws_lambda_function.event_invoke_final_lambda.arn 191 | } 192 | } 193 | } 194 | ``` 195 | The destination config is how we chain a final step. When the `event-invoke-step` function is finished, the destination Lambda will then be called. 196 | 197 | **tf/modules/lambda/functions/event-invoke.py** 198 | The `FunctionName` (line #58) will need to be replaced by the backend-Lambda's ARN when it is ready. 199 | ``` 200 | def invoke_subprocess(data): 201 | # Make payload passed to subprocess 202 | subproc_payload = json.dumps({ 203 | PROJECT_ID_STRING: data 204 | }) 205 | 206 | # Invoking subprocess asynchronously by using InvocationType='Event' 207 | sdk = boto3.client('lambda') 208 | response = sdk.invoke( 209 | FunctionName='event-invoke-step', 210 | InvocationType='Event', 211 | Payload=subproc_payload 212 | ) 213 | 214 | # returns 202 on success 215 | return response 216 | ``` 217 | The `Payload` data currently contains the *PROJECT_ID_STRING* field (line #52). After the backend-Lambda is ready, it may be necessary to adjust this payload. That way we can make sure we are passing the expected fields to the production backend-Lambda. 218 | 219 | **tf/modules/lambda/functions/event-invoke-step.py** 220 | This Python file is a placeholder for the backend-Lambda. It demonstrates how a Lambda function can be called asynchronously. Currently, it generates fake indicators data and returns response 200. 221 | 222 | **tf/modules/lambda/functions/event-invoke-final.py** 223 | This Python file is executed when the `event-invoke-step` function is done. Currently, it sends a request to Auth0 to obtain the JWT, and then makes a POST to the *echo* service that we host on Netlify. The *WEBAPP_HOST* and *WEBAPP_HOST* parameters will need to be changed when the webapp backend endpoint is ready. This interface which includes the request headers and payload will need to be adjusted too. 224 | ``` 225 | def send_post_to_known_webconsumer(req): 226 | # Get the webapp backend endpoint from environment variables 227 | web_host = os.environ['WEBAPP_HOST'] 228 | web_path = os.environ['WEBAPP_PATH'] 229 | 230 | logger.info("## starting to send post...") 231 | logger.info(req) 232 | 233 | # Make the POST request to the webapp backend 234 | conn = http.client.HTTPSConnection(web_host) 235 | conn.request("POST", web_path, req['payload'], req['headers']) 236 | res = conn.getresponse() 237 | data = res.read() 238 | 239 | return data.decode("utf-8") 240 | ``` 241 | For debugging, it's necessary to go to the Cloudwatch logs. Each Lambda function has its own set of logs. The logs can be delayed, but eventually appear. Looking for the log entries from the `event-invoke-final` function will confirm whether the asynchronous invocation triggered because the chain can fail at two steps prior to reaching the final funcion. 242 | 243 | 244 | | infrastructure | role | 245 | | -- | -- | 246 | | Github | source control repo | 247 | | Github actions | Continuous Integration | 248 | | Terraform Cloud | Terraform remote state | 249 | | Terraform Vault | temporary AWS credentials | 250 | | AWS | API gateway | 251 | 252 | How to deploy the API gateway for development: 253 | 1. `aws configure` 254 | 2. sign-up at app.terraform.io 255 | 3. `git clone https://github.com/for-good/isgood-api.git` 256 | 4. `cd isgood-api && git checkout -b` *gh-issue-NNN* 257 | 5. `terraform init` 258 | 6. edit `tf/remote-backend.tf` with values from step #2 259 | 7. edit `env/dev.tfvars` 260 | 8. apply fix for *gh-issue-NNN* 261 | 9. `terraform validate` 262 | 10. `AWS_REGION=us-east-2 terraform apply -var-file=env/dev.tfvars` 263 | 264 | 265 | 266 | 267 | **TODO and backlog items** 268 | When you read the AWS documentation about `InvocationType=Event`, it mentions retries and potential lost events. To manage these edge cases, there is more to think about. 269 | -[] Configure dead letter queue to track lost/retries and help determine when to redesign for scale (which may mean researching EventBridge, Step Functions) 270 | -[] Somewhat related to retries, the Lambda functions would need to handle; reentrant, idempotent 271 | -[] Limit the scope of the IAM roles in the Lambda functions and refactor out the wildcards (`resources = ["*"]`) 272 | -[] Adjust interface after backend-Lambda is ready 273 | -[] Adjust interface after webapp backend endpoint is ready 274 | -[] Test the failure behavior in the invocation chain 275 | 276 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 3, 29 June 2007 3 | 4 | Copyright (C) 2007 Free Software Foundation, Inc. 5 | Everyone is permitted to copy and distribute verbatim copies 6 | of this license document, but changing it is not allowed. 7 | 8 | Preamble 9 | 10 | The GNU General Public License is a free, copyleft license for 11 | software and other kinds of works. 12 | 13 | The licenses for most software and other practical works are designed 14 | to take away your freedom to share and change the works. By contrast, 15 | the GNU General Public License is intended to guarantee your freedom to 16 | share and change all versions of a program--to make sure it remains free 17 | software for all its users. We, the Free Software Foundation, use the 18 | GNU General Public License for most of our software; it applies also to 19 | any other work released this way by its authors. You can apply it to 20 | your programs, too. 21 | 22 | When we speak of free software, we are referring to freedom, not 23 | price. Our General Public Licenses are designed to make sure that you 24 | have the freedom to distribute copies of free software (and charge for 25 | them if you wish), that you receive source code or can get it if you 26 | want it, that you can change the software or use pieces of it in new 27 | free programs, and that you know you can do these things. 28 | 29 | To protect your rights, we need to prevent others from denying you 30 | these rights or asking you to surrender the rights. Therefore, you have 31 | certain responsibilities if you distribute copies of the software, or if 32 | you modify it: responsibilities to respect the freedom of others. 33 | 34 | For example, if you distribute copies of such a program, whether 35 | gratis or for a fee, you must pass on to the recipients the same 36 | freedoms that you received. You must make sure that they, too, receive 37 | or can get the source code. And you must show them these terms so they 38 | know their rights. 39 | 40 | Developers that use the GNU GPL protect your rights with two steps: 41 | (1) assert copyright on the software, and (2) offer you this License 42 | giving you legal permission to copy, distribute and/or modify it. 43 | 44 | For the developers' and authors' protection, the GPL clearly explains 45 | that there is no warranty for this free software. For both users' and 46 | authors' sake, the GPL requires that modified versions be marked as 47 | changed, so that their problems will not be attributed erroneously to 48 | authors of previous versions. 49 | 50 | Some devices are designed to deny users access to install or run 51 | modified versions of the software inside them, although the manufacturer 52 | can do so. This is fundamentally incompatible with the aim of 53 | protecting users' freedom to change the software. The systematic 54 | pattern of such abuse occurs in the area of products for individuals to 55 | use, which is precisely where it is most unacceptable. Therefore, we 56 | have designed this version of the GPL to prohibit the practice for those 57 | products. If such problems arise substantially in other domains, we 58 | stand ready to extend this provision to those domains in future versions 59 | of the GPL, as needed to protect the freedom of users. 60 | 61 | Finally, every program is threatened constantly by software patents. 62 | States should not allow patents to restrict development and use of 63 | software on general-purpose computers, but in those that do, we wish to 64 | avoid the special danger that patents applied to a free program could 65 | make it effectively proprietary. To prevent this, the GPL assures that 66 | patents cannot be used to render the program non-free. 67 | 68 | The precise terms and conditions for copying, distribution and 69 | modification follow. 70 | 71 | TERMS AND CONDITIONS 72 | 73 | 0. Definitions. 74 | 75 | "This License" refers to version 3 of the GNU General Public License. 76 | 77 | "Copyright" also means copyright-like laws that apply to other kinds of 78 | works, such as semiconductor masks. 79 | 80 | "The Program" refers to any copyrightable work licensed under this 81 | License. Each licensee is addressed as "you". "Licensees" and 82 | "recipients" may be individuals or organizations. 83 | 84 | To "modify" a work means to copy from or adapt all or part of the work 85 | in a fashion requiring copyright permission, other than the making of an 86 | exact copy. The resulting work is called a "modified version" of the 87 | earlier work or a work "based on" the earlier work. 88 | 89 | A "covered work" means either the unmodified Program or a work based 90 | on the Program. 91 | 92 | To "propagate" a work means to do anything with it that, without 93 | permission, would make you directly or secondarily liable for 94 | infringement under applicable copyright law, except executing it on a 95 | computer or modifying a private copy. Propagation includes copying, 96 | distribution (with or without modification), making available to the 97 | public, and in some countries other activities as well. 98 | 99 | To "convey" a work means any kind of propagation that enables other 100 | parties to make or receive copies. Mere interaction with a user through 101 | a computer network, with no transfer of a copy, is not conveying. 102 | 103 | An interactive user interface displays "Appropriate Legal Notices" 104 | to the extent that it includes a convenient and prominently visible 105 | feature that (1) displays an appropriate copyright notice, and (2) 106 | tells the user that there is no warranty for the work (except to the 107 | extent that warranties are provided), that licensees may convey the 108 | work under this License, and how to view a copy of this License. If 109 | the interface presents a list of user commands or options, such as a 110 | menu, a prominent item in the list meets this criterion. 111 | 112 | 1. Source Code. 113 | 114 | The "source code" for a work means the preferred form of the work 115 | for making modifications to it. "Object code" means any non-source 116 | form of a work. 117 | 118 | A "Standard Interface" means an interface that either is an official 119 | standard defined by a recognized standards body, or, in the case of 120 | interfaces specified for a particular programming language, one that 121 | is widely used among developers working in that language. 122 | 123 | The "System Libraries" of an executable work include anything, other 124 | than the work as a whole, that (a) is included in the normal form of 125 | packaging a Major Component, but which is not part of that Major 126 | Component, and (b) serves only to enable use of the work with that 127 | Major Component, or to implement a Standard Interface for which an 128 | implementation is available to the public in source code form. A 129 | "Major Component", in this context, means a major essential component 130 | (kernel, window system, and so on) of the specific operating system 131 | (if any) on which the executable work runs, or a compiler used to 132 | produce the work, or an object code interpreter used to run it. 133 | 134 | The "Corresponding Source" for a work in object code form means all 135 | the source code needed to generate, install, and (for an executable 136 | work) run the object code and to modify the work, including scripts to 137 | control those activities. However, it does not include the work's 138 | System Libraries, or general-purpose tools or generally available free 139 | programs which are used unmodified in performing those activities but 140 | which are not part of the work. For example, Corresponding Source 141 | includes interface definition files associated with source files for 142 | the work, and the source code for shared libraries and dynamically 143 | linked subprograms that the work is specifically designed to require, 144 | such as by intimate data communication or control flow between those 145 | subprograms and other parts of the work. 146 | 147 | The Corresponding Source need not include anything that users 148 | can regenerate automatically from other parts of the Corresponding 149 | Source. 150 | 151 | The Corresponding Source for a work in source code form is that 152 | same work. 153 | 154 | 2. Basic Permissions. 155 | 156 | All rights granted under this License are granted for the term of 157 | copyright on the Program, and are irrevocable provided the stated 158 | conditions are met. This License explicitly affirms your unlimited 159 | permission to run the unmodified Program. The output from running a 160 | covered work is covered by this License only if the output, given its 161 | content, constitutes a covered work. This License acknowledges your 162 | rights of fair use or other equivalent, as provided by copyright law. 163 | 164 | You may make, run and propagate covered works that you do not 165 | convey, without conditions so long as your license otherwise remains 166 | in force. You may convey covered works to others for the sole purpose 167 | of having them make modifications exclusively for you, or provide you 168 | with facilities for running those works, provided that you comply with 169 | the terms of this License in conveying all material for which you do 170 | not control copyright. Those thus making or running the covered works 171 | for you must do so exclusively on your behalf, under your direction 172 | and control, on terms that prohibit them from making any copies of 173 | your copyrighted material outside their relationship with you. 174 | 175 | Conveying under any other circumstances is permitted solely under 176 | the conditions stated below. Sublicensing is not allowed; section 10 177 | makes it unnecessary. 178 | 179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law. 180 | 181 | No covered work shall be deemed part of an effective technological 182 | measure under any applicable law fulfilling obligations under article 183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or 184 | similar laws prohibiting or restricting circumvention of such 185 | measures. 186 | 187 | When you convey a covered work, you waive any legal power to forbid 188 | circumvention of technological measures to the extent such circumvention 189 | is effected by exercising rights under this License with respect to 190 | the covered work, and you disclaim any intention to limit operation or 191 | modification of the work as a means of enforcing, against the work's 192 | users, your or third parties' legal rights to forbid circumvention of 193 | technological measures. 194 | 195 | 4. Conveying Verbatim Copies. 196 | 197 | You may convey verbatim copies of the Program's source code as you 198 | receive it, in any medium, provided that you conspicuously and 199 | appropriately publish on each copy an appropriate copyright notice; 200 | keep intact all notices stating that this License and any 201 | non-permissive terms added in accord with section 7 apply to the code; 202 | keep intact all notices of the absence of any warranty; and give all 203 | recipients a copy of this License along with the Program. 204 | 205 | You may charge any price or no price for each copy that you convey, 206 | and you may offer support or warranty protection for a fee. 207 | 208 | 5. Conveying Modified Source Versions. 209 | 210 | You may convey a work based on the Program, or the modifications to 211 | produce it from the Program, in the form of source code under the 212 | terms of section 4, provided that you also meet all of these conditions: 213 | 214 | a) The work must carry prominent notices stating that you modified 215 | it, and giving a relevant date. 216 | 217 | b) The work must carry prominent notices stating that it is 218 | released under this License and any conditions added under section 219 | 7. This requirement modifies the requirement in section 4 to 220 | "keep intact all notices". 221 | 222 | c) You must license the entire work, as a whole, under this 223 | License to anyone who comes into possession of a copy. This 224 | License will therefore apply, along with any applicable section 7 225 | additional terms, to the whole of the work, and all its parts, 226 | regardless of how they are packaged. This License gives no 227 | permission to license the work in any other way, but it does not 228 | invalidate such permission if you have separately received it. 229 | 230 | d) If the work has interactive user interfaces, each must display 231 | Appropriate Legal Notices; however, if the Program has interactive 232 | interfaces that do not display Appropriate Legal Notices, your 233 | work need not make them do so. 234 | 235 | A compilation of a covered work with other separate and independent 236 | works, which are not by their nature extensions of the covered work, 237 | and which are not combined with it such as to form a larger program, 238 | in or on a volume of a storage or distribution medium, is called an 239 | "aggregate" if the compilation and its resulting copyright are not 240 | used to limit the access or legal rights of the compilation's users 241 | beyond what the individual works permit. Inclusion of a covered work 242 | in an aggregate does not cause this License to apply to the other 243 | parts of the aggregate. 244 | 245 | 6. Conveying Non-Source Forms. 246 | 247 | You may convey a covered work in object code form under the terms 248 | of sections 4 and 5, provided that you also convey the 249 | machine-readable Corresponding Source under the terms of this License, 250 | in one of these ways: 251 | 252 | a) Convey the object code in, or embodied in, a physical product 253 | (including a physical distribution medium), accompanied by the 254 | Corresponding Source fixed on a durable physical medium 255 | customarily used for software interchange. 256 | 257 | b) Convey the object code in, or embodied in, a physical product 258 | (including a physical distribution medium), accompanied by a 259 | written offer, valid for at least three years and valid for as 260 | long as you offer spare parts or customer support for that product 261 | model, to give anyone who possesses the object code either (1) a 262 | copy of the Corresponding Source for all the software in the 263 | product that is covered by this License, on a durable physical 264 | medium customarily used for software interchange, for a price no 265 | more than your reasonable cost of physically performing this 266 | conveying of source, or (2) access to copy the 267 | Corresponding Source from a network server at no charge. 268 | 269 | c) Convey individual copies of the object code with a copy of the 270 | written offer to provide the Corresponding Source. This 271 | alternative is allowed only occasionally and noncommercially, and 272 | only if you received the object code with such an offer, in accord 273 | with subsection 6b. 274 | 275 | d) Convey the object code by offering access from a designated 276 | place (gratis or for a charge), and offer equivalent access to the 277 | Corresponding Source in the same way through the same place at no 278 | further charge. You need not require recipients to copy the 279 | Corresponding Source along with the object code. If the place to 280 | copy the object code is a network server, the Corresponding Source 281 | may be on a different server (operated by you or a third party) 282 | that supports equivalent copying facilities, provided you maintain 283 | clear directions next to the object code saying where to find the 284 | Corresponding Source. Regardless of what server hosts the 285 | Corresponding Source, you remain obligated to ensure that it is 286 | available for as long as needed to satisfy these requirements. 287 | 288 | e) Convey the object code using peer-to-peer transmission, provided 289 | you inform other peers where the object code and Corresponding 290 | Source of the work are being offered to the general public at no 291 | charge under subsection 6d. 292 | 293 | A separable portion of the object code, whose source code is excluded 294 | from the Corresponding Source as a System Library, need not be 295 | included in conveying the object code work. 296 | 297 | A "User Product" is either (1) a "consumer product", which means any 298 | tangible personal property which is normally used for personal, family, 299 | or household purposes, or (2) anything designed or sold for incorporation 300 | into a dwelling. In determining whether a product is a consumer product, 301 | doubtful cases shall be resolved in favor of coverage. For a particular 302 | product received by a particular user, "normally used" refers to a 303 | typical or common use of that class of product, regardless of the status 304 | of the particular user or of the way in which the particular user 305 | actually uses, or expects or is expected to use, the product. A product 306 | is a consumer product regardless of whether the product has substantial 307 | commercial, industrial or non-consumer uses, unless such uses represent 308 | the only significant mode of use of the product. 309 | 310 | "Installation Information" for a User Product means any methods, 311 | procedures, authorization keys, or other information required to install 312 | and execute modified versions of a covered work in that User Product from 313 | a modified version of its Corresponding Source. The information must 314 | suffice to ensure that the continued functioning of the modified object 315 | code is in no case prevented or interfered with solely because 316 | modification has been made. 317 | 318 | If you convey an object code work under this section in, or with, or 319 | specifically for use in, a User Product, and the conveying occurs as 320 | part of a transaction in which the right of possession and use of the 321 | User Product is transferred to the recipient in perpetuity or for a 322 | fixed term (regardless of how the transaction is characterized), the 323 | Corresponding Source conveyed under this section must be accompanied 324 | by the Installation Information. But this requirement does not apply 325 | if neither you nor any third party retains the ability to install 326 | modified object code on the User Product (for example, the work has 327 | been installed in ROM). 328 | 329 | The requirement to provide Installation Information does not include a 330 | requirement to continue to provide support service, warranty, or updates 331 | for a work that has been modified or installed by the recipient, or for 332 | the User Product in which it has been modified or installed. Access to a 333 | network may be denied when the modification itself materially and 334 | adversely affects the operation of the network or violates the rules and 335 | protocols for communication across the network. 336 | 337 | Corresponding Source conveyed, and Installation Information provided, 338 | in accord with this section must be in a format that is publicly 339 | documented (and with an implementation available to the public in 340 | source code form), and must require no special password or key for 341 | unpacking, reading or copying. 342 | 343 | 7. Additional Terms. 344 | 345 | "Additional permissions" are terms that supplement the terms of this 346 | License by making exceptions from one or more of its conditions. 347 | Additional permissions that are applicable to the entire Program shall 348 | be treated as though they were included in this License, to the extent 349 | that they are valid under applicable law. If additional permissions 350 | apply only to part of the Program, that part may be used separately 351 | under those permissions, but the entire Program remains governed by 352 | this License without regard to the additional permissions. 353 | 354 | When you convey a copy of a covered work, you may at your option 355 | remove any additional permissions from that copy, or from any part of 356 | it. (Additional permissions may be written to require their own 357 | removal in certain cases when you modify the work.) You may place 358 | additional permissions on material, added by you to a covered work, 359 | for which you have or can give appropriate copyright permission. 360 | 361 | Notwithstanding any other provision of this License, for material you 362 | add to a covered work, you may (if authorized by the copyright holders of 363 | that material) supplement the terms of this License with terms: 364 | 365 | a) Disclaiming warranty or limiting liability differently from the 366 | terms of sections 15 and 16 of this License; or 367 | 368 | b) Requiring preservation of specified reasonable legal notices or 369 | author attributions in that material or in the Appropriate Legal 370 | Notices displayed by works containing it; or 371 | 372 | c) Prohibiting misrepresentation of the origin of that material, or 373 | requiring that modified versions of such material be marked in 374 | reasonable ways as different from the original version; or 375 | 376 | d) Limiting the use for publicity purposes of names of licensors or 377 | authors of the material; or 378 | 379 | e) Declining to grant rights under trademark law for use of some 380 | trade names, trademarks, or service marks; or 381 | 382 | f) Requiring indemnification of licensors and authors of that 383 | material by anyone who conveys the material (or modified versions of 384 | it) with contractual assumptions of liability to the recipient, for 385 | any liability that these contractual assumptions directly impose on 386 | those licensors and authors. 387 | 388 | All other non-permissive additional terms are considered "further 389 | restrictions" within the meaning of section 10. If the Program as you 390 | received it, or any part of it, contains a notice stating that it is 391 | governed by this License along with a term that is a further 392 | restriction, you may remove that term. If a license document contains 393 | a further restriction but permits relicensing or conveying under this 394 | License, you may add to a covered work material governed by the terms 395 | of that license document, provided that the further restriction does 396 | not survive such relicensing or conveying. 397 | 398 | If you add terms to a covered work in accord with this section, you 399 | must place, in the relevant source files, a statement of the 400 | additional terms that apply to those files, or a notice indicating 401 | where to find the applicable terms. 402 | 403 | Additional terms, permissive or non-permissive, may be stated in the 404 | form of a separately written license, or stated as exceptions; 405 | the above requirements apply either way. 406 | 407 | 8. Termination. 408 | 409 | You may not propagate or modify a covered work except as expressly 410 | provided under this License. Any attempt otherwise to propagate or 411 | modify it is void, and will automatically terminate your rights under 412 | this License (including any patent licenses granted under the third 413 | paragraph of section 11). 414 | 415 | However, if you cease all violation of this License, then your 416 | license from a particular copyright holder is reinstated (a) 417 | provisionally, unless and until the copyright holder explicitly and 418 | finally terminates your license, and (b) permanently, if the copyright 419 | holder fails to notify you of the violation by some reasonable means 420 | prior to 60 days after the cessation. 421 | 422 | Moreover, your license from a particular copyright holder is 423 | reinstated permanently if the copyright holder notifies you of the 424 | violation by some reasonable means, this is the first time you have 425 | received notice of violation of this License (for any work) from that 426 | copyright holder, and you cure the violation prior to 30 days after 427 | your receipt of the notice. 428 | 429 | Termination of your rights under this section does not terminate the 430 | licenses of parties who have received copies or rights from you under 431 | this License. If your rights have been terminated and not permanently 432 | reinstated, you do not qualify to receive new licenses for the same 433 | material under section 10. 434 | 435 | 9. Acceptance Not Required for Having Copies. 436 | 437 | You are not required to accept this License in order to receive or 438 | run a copy of the Program. Ancillary propagation of a covered work 439 | occurring solely as a consequence of using peer-to-peer transmission 440 | to receive a copy likewise does not require acceptance. However, 441 | nothing other than this License grants you permission to propagate or 442 | modify any covered work. These actions infringe copyright if you do 443 | not accept this License. Therefore, by modifying or propagating a 444 | covered work, you indicate your acceptance of this License to do so. 445 | 446 | 10. Automatic Licensing of Downstream Recipients. 447 | 448 | Each time you convey a covered work, the recipient automatically 449 | receives a license from the original licensors, to run, modify and 450 | propagate that work, subject to this License. You are not responsible 451 | for enforcing compliance by third parties with this License. 452 | 453 | An "entity transaction" is a transaction transferring control of an 454 | organization, or substantially all assets of one, or subdividing an 455 | organization, or merging organizations. If propagation of a covered 456 | work results from an entity transaction, each party to that 457 | transaction who receives a copy of the work also receives whatever 458 | licenses to the work the party's predecessor in interest had or could 459 | give under the previous paragraph, plus a right to possession of the 460 | Corresponding Source of the work from the predecessor in interest, if 461 | the predecessor has it or can get it with reasonable efforts. 462 | 463 | You may not impose any further restrictions on the exercise of the 464 | rights granted or affirmed under this License. For example, you may 465 | not impose a license fee, royalty, or other charge for exercise of 466 | rights granted under this License, and you may not initiate litigation 467 | (including a cross-claim or counterclaim in a lawsuit) alleging that 468 | any patent claim is infringed by making, using, selling, offering for 469 | sale, or importing the Program or any portion of it. 470 | 471 | 11. Patents. 472 | 473 | A "contributor" is a copyright holder who authorizes use under this 474 | License of the Program or a work on which the Program is based. The 475 | work thus licensed is called the contributor's "contributor version". 476 | 477 | A contributor's "essential patent claims" are all patent claims 478 | owned or controlled by the contributor, whether already acquired or 479 | hereafter acquired, that would be infringed by some manner, permitted 480 | by this License, of making, using, or selling its contributor version, 481 | but do not include claims that would be infringed only as a 482 | consequence of further modification of the contributor version. For 483 | purposes of this definition, "control" includes the right to grant 484 | patent sublicenses in a manner consistent with the requirements of 485 | this License. 486 | 487 | Each contributor grants you a non-exclusive, worldwide, royalty-free 488 | patent license under the contributor's essential patent claims, to 489 | make, use, sell, offer for sale, import and otherwise run, modify and 490 | propagate the contents of its contributor version. 491 | 492 | In the following three paragraphs, a "patent license" is any express 493 | agreement or commitment, however denominated, not to enforce a patent 494 | (such as an express permission to practice a patent or covenant not to 495 | sue for patent infringement). To "grant" such a patent license to a 496 | party means to make such an agreement or commitment not to enforce a 497 | patent against the party. 498 | 499 | If you convey a covered work, knowingly relying on a patent license, 500 | and the Corresponding Source of the work is not available for anyone 501 | to copy, free of charge and under the terms of this License, through a 502 | publicly available network server or other readily accessible means, 503 | then you must either (1) cause the Corresponding Source to be so 504 | available, or (2) arrange to deprive yourself of the benefit of the 505 | patent license for this particular work, or (3) arrange, in a manner 506 | consistent with the requirements of this License, to extend the patent 507 | license to downstream recipients. "Knowingly relying" means you have 508 | actual knowledge that, but for the patent license, your conveying the 509 | covered work in a country, or your recipient's use of the covered work 510 | in a country, would infringe one or more identifiable patents in that 511 | country that you have reason to believe are valid. 512 | 513 | If, pursuant to or in connection with a single transaction or 514 | arrangement, you convey, or propagate by procuring conveyance of, a 515 | covered work, and grant a patent license to some of the parties 516 | receiving the covered work authorizing them to use, propagate, modify 517 | or convey a specific copy of the covered work, then the patent license 518 | you grant is automatically extended to all recipients of the covered 519 | work and works based on it. 520 | 521 | A patent license is "discriminatory" if it does not include within 522 | the scope of its coverage, prohibits the exercise of, or is 523 | conditioned on the non-exercise of one or more of the rights that are 524 | specifically granted under this License. You may not convey a covered 525 | work if you are a party to an arrangement with a third party that is 526 | in the business of distributing software, under which you make payment 527 | to the third party based on the extent of your activity of conveying 528 | the work, and under which the third party grants, to any of the 529 | parties who would receive the covered work from you, a discriminatory 530 | patent license (a) in connection with copies of the covered work 531 | conveyed by you (or copies made from those copies), or (b) primarily 532 | for and in connection with specific products or compilations that 533 | contain the covered work, unless you entered into that arrangement, 534 | or that patent license was granted, prior to 28 March 2007. 535 | 536 | Nothing in this License shall be construed as excluding or limiting 537 | any implied license or other defenses to infringement that may 538 | otherwise be available to you under applicable patent law. 539 | 540 | 12. No Surrender of Others' Freedom. 541 | 542 | If conditions are imposed on you (whether by court order, agreement or 543 | otherwise) that contradict the conditions of this License, they do not 544 | excuse you from the conditions of this License. If you cannot convey a 545 | covered work so as to satisfy simultaneously your obligations under this 546 | License and any other pertinent obligations, then as a consequence you may 547 | not convey it at all. For example, if you agree to terms that obligate you 548 | to collect a royalty for further conveying from those to whom you convey 549 | the Program, the only way you could satisfy both those terms and this 550 | License would be to refrain entirely from conveying the Program. 551 | 552 | 13. Use with the GNU Affero General Public License. 553 | 554 | Notwithstanding any other provision of this License, you have 555 | permission to link or combine any covered work with a work licensed 556 | under version 3 of the GNU Affero General Public License into a single 557 | combined work, and to convey the resulting work. The terms of this 558 | License will continue to apply to the part which is the covered work, 559 | but the special requirements of the GNU Affero General Public License, 560 | section 13, concerning interaction through a network will apply to the 561 | combination as such. 562 | 563 | 14. Revised Versions of this License. 564 | 565 | The Free Software Foundation may publish revised and/or new versions of 566 | the GNU General Public License from time to time. Such new versions will 567 | be similar in spirit to the present version, but may differ in detail to 568 | address new problems or concerns. 569 | 570 | Each version is given a distinguishing version number. If the 571 | Program specifies that a certain numbered version of the GNU General 572 | Public License "or any later version" applies to it, you have the 573 | option of following the terms and conditions either of that numbered 574 | version or of any later version published by the Free Software 575 | Foundation. If the Program does not specify a version number of the 576 | GNU General Public License, you may choose any version ever published 577 | by the Free Software Foundation. 578 | 579 | If the Program specifies that a proxy can decide which future 580 | versions of the GNU General Public License can be used, that proxy's 581 | public statement of acceptance of a version permanently authorizes you 582 | to choose that version for the Program. 583 | 584 | Later license versions may give you additional or different 585 | permissions. However, no additional obligations are imposed on any 586 | author or copyright holder as a result of your choosing to follow a 587 | later version. 588 | 589 | 15. Disclaimer of Warranty. 590 | 591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY 592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT 593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY 594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, 595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM 597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF 598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 599 | 600 | 16. Limitation of Liability. 601 | 602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY 605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE 606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF 607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD 608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), 609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF 610 | SUCH DAMAGES. 611 | 612 | 17. Interpretation of Sections 15 and 16. 613 | 614 | If the disclaimer of warranty and limitation of liability provided 615 | above cannot be given local legal effect according to their terms, 616 | reviewing courts shall apply local law that most closely approximates 617 | an absolute waiver of all civil liability in connection with the 618 | Program, unless a warranty or assumption of liability accompanies a 619 | copy of the Program in return for a fee. 620 | 621 | END OF TERMS AND CONDITIONS 622 | 623 | How to Apply These Terms to Your New Programs 624 | 625 | If you develop a new program, and you want it to be of the greatest 626 | possible use to the public, the best way to achieve this is to make it 627 | free software which everyone can redistribute and change under these terms. 628 | 629 | To do so, attach the following notices to the program. It is safest 630 | to attach them to the start of each source file to most effectively 631 | state the exclusion of warranty; and each file should have at least 632 | the "copyright" line and a pointer to where the full notice is found. 633 | 634 | 635 | Copyright (C) 636 | 637 | This program is free software: you can redistribute it and/or modify 638 | it under the terms of the GNU General Public License as published by 639 | the Free Software Foundation, either version 3 of the License, or 640 | (at your option) any later version. 641 | 642 | This program is distributed in the hope that it will be useful, 643 | but WITHOUT ANY WARRANTY; without even the implied warranty of 644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 645 | GNU General Public License for more details. 646 | 647 | You should have received a copy of the GNU General Public License 648 | along with this program. If not, see . 649 | 650 | Also add information on how to contact you by electronic and paper mail. 651 | 652 | If the program does terminal interaction, make it output a short 653 | notice like this when it starts in an interactive mode: 654 | 655 | Copyright (C) 656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 657 | This is free software, and you are welcome to redistribute it 658 | under certain conditions; type `show c' for details. 659 | 660 | The hypothetical commands `show w' and `show c' should show the appropriate 661 | parts of the General Public License. Of course, your program's commands 662 | might be different; for a GUI interface, you would use an "about box". 663 | 664 | You should also get your employer (if you work as a programmer) or school, 665 | if any, to sign a "copyright disclaimer" for the program, if necessary. 666 | For more information on this, and how to apply and follow the GNU GPL, see 667 | . 668 | 669 | The GNU General Public License does not permit incorporating your program 670 | into proprietary programs. If your program is a subroutine library, you 671 | may consider it more useful to permit linking proprietary applications with 672 | the library. If this is what you want to do, use the GNU Lesser General 673 | Public License instead of this License. But first, please read 674 | . 675 | --------------------------------------------------------------------------------