Skip to content

Commit

Permalink
Adding Consent manager docs and remove unwanted pages (#13)
Browse files Browse the repository at this point in the history
* [#11] Updating structure as discussed with the team.

* Moving images, Adding konnect overview

* Adding crop loans content

* Adding AgriDex data

* Update crop_loans.md

* Improve structuring to focus on docs

* Fix broken link in UFSI

---------

Co-authored-by: aashutosh-samagra <[email protected]>
  • Loading branch information
karntrehan and aashutosh-samagra authored May 29, 2023
1 parent 90a45b7 commit e081e4f
Show file tree
Hide file tree
Showing 58 changed files with 223 additions and 203 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
# Generated files
.docusaurus
.cache-loader
.idea

# Misc
.DS_Store
Expand Down
9 changes: 0 additions & 9 deletions docs/DevDocs/index.md

This file was deleted.

59 changes: 0 additions & 59 deletions docs/Tech_Stack/agriculture_data_exchange.md

This file was deleted.

10 changes: 0 additions & 10 deletions docs/Tech_Stack/index.md

This file was deleted.

Binary file added docs/images/crop-loans/flow.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/crop-loans/module-comms.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
Binary file added docs/images/konnect-overview.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 4 additions & 4 deletions docs/POC/demo1.md → docs/initiatives/POC/demo1.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ To test the query resolver block, the block receives data query (request) from t

### Demo Setup

![Demo1](./images/image14.png)
![Demo1](../../images/image14.png)

1. **Count of query** - Checks the number of times data is requested, the consent artifact defines a limit to number of times a data consumer can request farmer data based on the farmer’s accorded permissions (currently hard-coded to 2 times)
2. **Bank request** - This collection of fields that a data consumer wants access to for a particular farmer
Expand All @@ -22,13 +22,13 @@ To test the query resolver block, the block receives data query (request) from t

- **Bank request:** Select fields you want to select to request as a data consumer and click submit button bellow bank request section

![Demo1](./images/image11.png)
![Demo1](../../images/image11.png)

- **Farmer consent:** Select fields that you want to mimic as accorded permission given by a farmer and click on submit button below farmer consent

![Demo1](./images/image15.png)
![Demo1](../../images/image15.png)

- **Result:** After clicking on Run Query button, the result gets reflected in the result console

![Demo1](./images/image9.png)
![Demo1](../../images/image9.png)

4 changes: 2 additions & 2 deletions docs/POC/demo2.md → docs/initiatives/POC/demo2.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ sidebar_label: Demo 2
3. Bank

(Search ⇒ A simple search request that returns a catalog as per Beckn core spec for the /on-search route)
![imageN](./images/imageN.png)
![imageN](../../images/imageN.png)
3. Farmer - Selects one of the products shown on the table as per search criterion

(select ⇒ this action/route basically maps to creation of an order, hence an order will be created with the selected loan item)
Expand All @@ -38,6 +38,6 @@ sidebar_label: Demo 2

(confirm ⇒ in our use case this will be mapped to the bank manager (of loan officer) confirming our request has been successfully submitted for verification)

![image](./images/image3.png)
![image](../../images/image3.png)


4 changes: 2 additions & 2 deletions docs/POC/demo3.md → docs/initiatives/POC/demo3.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ sidebar_label: Demo 3

1. Farmer - Logsin into the credit portal and moves to clicks on the track tab to launch the dashboard all the credit application

![Demo3](./images/image5.png)
![Demo3](../../images/image5.png)

2. Bank - Upon receiving application form post init flow, loan officer sends revert and changes that need to be made in the application in the update spec
3. Farmer - Based on the revert comments, the farmer fills the application form again and submits

![Demo3](./images/image2.png)
![Demo3](../../images/image2.png)

4. Farmer - Incase the farmer wants to cancel the application/ loan product he clicks on the cancel button on the track dashboard and the loan officer is notified of the cancellation
5. Farmer - After status updated changes to approved and disbursed, farmer can rate the loan services on the loan product by the specific bank
Expand Down
6 changes: 3 additions & 3 deletions docs/POC/demo4.md → docs/initiatives/POC/demo4.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ To test the entire consent cycle including

### Demo setup

![Demo4](./images/image1.png)
![Demo4](../../images/image1.png)

1. Screens involved
1. Farmer screen - To enable farmer to chose consent for all data field for credit use case
Expand Down Expand Up @@ -45,7 +45,7 @@ To test the entire consent cycle including
3. Button to allow consent for selected fields
4. Button to revoke consent (for all fields)

![Demo4](./images/image4.png)
![Demo4](../../images/image4.png)

2. CA - Render CA on screen 2 to view
1. Test 1 - Is the CA correct (how can we check this? @CG)
Expand All @@ -58,4 +58,4 @@ To test the entire consent cycle including
2. Request button to request for these 4 entries
4. Bank Manager - The application form gets filled or not based on the consent artifact

![Demo4](./images/image8.png)
![Demo4](../../images/image8.png)
12 changes: 6 additions & 6 deletions docs/POC/demo5.md → docs/initiatives/POC/demo5.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ sidebar_label: Demo 5

### Elements of the Demo

![Demo5](./images/image17.png)
![Demo5](../../images/image17.png)

1. UIs
1. Farmer credit portal
Expand All @@ -23,7 +23,7 @@ sidebar_label: Demo 5

4. UFSI BeckN app flow (below is a sample flow for select spec)

![demo5](./images/image3.png)
![demo5](../../images/image3.png)

1. Client - Farmer side application (farmer credit portal) - Here farmer selects any product
2. Proxy - Establish to help route requests from client to the beck-in-a-box block block
Expand Down Expand Up @@ -57,7 +57,7 @@ sidebar_label: Demo 5

(Search ⇒ A simple search request that returns a catalog as per Beckn core spec for the /on-search route)

![Demo5](./images/imageN.png)
![Demo5](../../images/imageN.png)

3. Farmer - Selects one of the products shown on the table as per search criterion

Expand All @@ -79,18 +79,18 @@ sidebar_label: Demo 5

The aadhar of user also gets mapped here to the order ID (to be used in track))

![demo5](./images/image3.png)
![demo5](../../images/image3.png)
6. Farmer - Logsin into the credit portal and moves to clicks on the track tab to launch the dashboard all the credit application

(track ⇒ track spec enables farmer to revert to any application re-submissions that are required by the loan officer)

![demo5](./images/image5.png)
![demo5](../../images/image5.png)

7. Bank - Upon receiving application form post init flow, loan officer sends revert and changes that need to be made in the application in the

( update => update spec enables bank server to trigger a request for updating application form that gets reflected on farmers track flow)

8. Farmer - Based on the revert comments, the farmer fills the application form again and submits

![demo5](./images/image2.png)
![demo5](../../images/image2.png)
9. Farmer - Incase the farmer wants to cancel the application/ loan product he clicks on the cancel button on the track dashboard and the loan officer is notified of the cancellation
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ sidebar_label: Demo Breakup

# Demo Breakup

![Demo Breakup](./images/image6.png)
![Demo Breakup](../../images/image6.png)
2 changes: 1 addition & 1 deletion docs/POC/goal.md → docs/initiatives/POC/goal.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ The vision of the POC is to enable all functions for a credit use case including


**UFSI flow for one sample spec (Search)**
![UFSI flow for one sample spec](./images/image3.png)
![UFSI flow for one sample spec](../../images/image3.png)

1. **Client**- Farmer side application (farmer credit portal) - Here farmer selects any product
2. **Proxy** - Establish to help route requests from client to the beck-in-a-box block
Expand Down
2 changes: 1 addition & 1 deletion docs/POC/index.md → docs/initiatives/POC/index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
sidebar_position: 6
sidebar_position: 7
sidebar_label: Proof of Concept
---

Expand Down
File renamed without changes.
21 changes: 21 additions & 0 deletions docs/initiatives/agridex/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
sidebar_position: 3
sidebar_label: AgriDex
title: Agriculture Data Exchange (AgriDex)
---

Through the [Krushak Odisha](../krushak_odisha/index.md) program we collected the data of almost all farmers in Odisha into a single database. The collection of multiple verified datapoints for every farmer allowed us to build a data exchange platform which shall empower our farmers to share data with entities that can benefit them. For eg: banks, credit lenders, etc.. This led to the formation of the Agricultural Data Exchange (AgriDex) platform.

Using the AgriDex platform entities can take consent from the farmers for accessing their data. The benefits are as follows:

For farmers:
* Granular control of data being shared with external entities
* Digitally share info with entities without having to manage offline / paper documents.

For entities:
* Realtime verified data recieved from farmers

## Use Cases of AgriDex
1. Consent manager block enables data request transactions and provides authorization based on data owner’s consent
2. Data consumers in the ecosystem can request for data owners consent to consume data that exists in Krushak Odisha DB for providing services
3. Stores and updates farmer consent for usage of data attributes by requesting party
45 changes: 45 additions & 0 deletions docs/initiatives/agridex/tech/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
---
sidebar_position: 1
sidebar_label: Tech
title: Technical implementation
---

## Architecture

AgriDex is a Data Empowerment And Protection Architecture [(DEPA)](https://www.niti.gov.in/sites/default/files/2020-09/DEPA-Book.pdf) compliant data fiduciary block that enables farmer consent driven access to data for third-party data requesters.

![Agriculture Data Exchange](../../images/ade1.png)

The consent manager for Konnect program is based off of the Electronic Consent Framework put forth by Ministry of Electronics and Information Technology (MeitY). Documented [here](https://dla.gov.in/sites/default/files/pdf/MeitY-Consent-Tech-Framework%20v1.1.pdf). MeitY describes the framework as `open, secure, user-centric, and application-agnostic`.

### Guiding design principles
1. **User Centricity:** Users should be at the center of any data sharing and should be given adequate control and decision-making power on how data associated with them is shared
2. **Trustable and IT Act Compliant:** Use digital signatures to guarantee integrity of access permissions given by users in consent flows. This avoids security issues faced by existing approaches and also makes the framework fully legal under the IT Act
3. **Universal Identity:** The technical framework should leverage universal, authenticable, non-repudiable, and digital identities to allow interoperability across service providers
4. **Granular Control:** The framework should allow users to set permissions and rights for data access at a granular level
5. **Open Standards Based:** The framework should use open technology and legal standards available in the country. It should be agnostic to applications, programming languages, and platform

### Working

![Agriculture Data Exchange](../../images/ade2.png)

Code: [Konnect-Agri/consent-manager](https://github.com/Konnect-Agri/consent-manager)

#### Block functions
1. **Authentication** - Verifies the authenticity of a data consumer
2. **Consent artifact** - A consent artifact is a machine-readable electronic document that specifies the parameters and scope of data that a user consents to in any data-sharing transaction. In this framework, consent must be digitally signed, either by the user or by the consent collector or both
3. **Authorization (GateKeeper)** - Verifies if the Query requested has the required permisions from the data owner (farmer) (checks if query is a subset of Consent Artifact)
4. **Query Resolver** - Verifies Queries and gets data from external sources/ or state databases
5. **Consent Manager** - Creates and Manages the lifecycle of a Consent Artifact. From request, generation, and revoke/expiry
6. **UI for Consent Manager**
7. **UI for User**

### Consent lifecycle
1. **Consent Approval** - Results in creation of a Consent Artifact
2. **Consent Revocation** - Results in a revoked Consent Artifact
3. **Data Consumption** - Consumer successfully gets data back when sharing a valid consent artifact
4. **Logging and Notification** - All events in the consent flow and data flow must be logged and notified as necessary using Consent Log artifact. A log artifact contains the consent artifact along with information about when and by whom the log was created

### Sample Consent Artifact

![Sample Artifact](../../images/artifect.png)
4 changes: 4 additions & 0 deletions docs/initiatives/akai/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
sidebar_position: 5
sidebar_label: AmakrushAI
---
4 changes: 4 additions & 0 deletions docs/initiatives/akai/tech/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
sidebar_position: 1
sidebar_label: Tech
---
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
4 changes: 4 additions & 0 deletions docs/initiatives/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
sidebar_position: 2
sidebar_label: Initiatives
---
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
---
sidebar_position: 1
sidebar_label: Konnect Stack
title: Konnect Stack
---

---
# Konnect Stack

Expand All @@ -13,8 +16,8 @@ The aim of the Agriculture Stack is to establish an open ecosystem platform that
2. Enable services for farmers across farm inputs, credits, markets, and extension services.
3. Farmer data across KO and other federated data can be consumed in a consented and secure manner.
---
## Archietecture
## Architecture

Konnect embarks on a journey of creating a decentralized network of farm service providers, agricultural data providers, policymakers, and farmers through an interoperable protocol specification to enable the markets to work for the farmers while ensuring farmer data privacy and consent.

![Konnect](./images/konnect.png)
![Konnect](../images/konnect.png)
4 changes: 4 additions & 0 deletions docs/initiatives/konnect_stack/tech/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
sidebar_position: 2
sidebar_label: Tech
---
6 changes: 6 additions & 0 deletions docs/initiatives/krushak_odisha/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
sidebar_position: 2
sidebar_label: Krushak Odisha
title: Krushak Odisha
---

13 changes: 13 additions & 0 deletions docs/initiatives/krushak_odisha/tech/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
sidebar_position: 1
sidebar_label: Tech
---

The consent manager for Konnect program is based off of the Electronic Consent Framework put forth by Ministry of Electronics and Information Technology (MeitY). Documented (here)[https://dla.gov.in/sites/default/files/pdf/MeitY-Consent-Tech-Framework%20v1.1.pdf]. MeitY describes the framework as `open, secure, user-centric, and application-agnostic`.

As part of Krushak Odisha



https://www.niti.gov.in/sites/default/files/2020-09/DEPA-Book.pdf

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
sidebar_position: 4
sidebar_position: 3
sidebar_label: CI/CD Pipeline
---
# Continuous Integration & Deployment
Expand Down
Loading

1 comment on commit e081e4f

@vercel
Copy link

@vercel vercel bot commented on e081e4f May 29, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.