Skip to content
Guillem Córdoba edited this page Nov 1, 2019 · 15 revisions

Welcome to the js-uprtcl developer guide!

_Prtcl resources: Overview, Spec, Dev guide, API reference

Overview

This repo contains tools to help you integrate _Prtcl inside your app.

There are two ways of integrating _Prtcl in your app and start working with Evees:

  1. Reusing/adapting existing open-source drop-in _prtcl-compatible web-components to your app.
  2. Creating new web-components specific to your app structure.

Drop-in web-components:

You can reuse or adapt _prtcl-compatible web-components in your app and let your users create, branch and reorganize the content from your app as Evees. This is a list of the web-components that (will soon be) available:

  • GenericPost: Bundles of text and images, similar to a Tweet or a Facebook post.
  • SimpleEditor: Simple editor to write blog-posts or documents that can scale.
  • KanbanBoard: Kanban board to organize cards in columns.
  • Calendar: Calendar board to crate and display events.
  • Drawer: A drawer to organize and store Evees.

This is how the web components listed above might look like:

js-uprtcl provides you with:

  • the web-components code.
  • support functions to connect them with the rest of your frontend app (redux module).
  • multiple service providers to store the data (NodeJS, Ethereum, IPFS, OrbitDb, ...).

Drop in a Web 3.0 app

Integrating a _Prtcl web-component in a Web 3.0 application should be simpler since the data is stored on a decentralized storage solution (IPFS, SWARM, ...) and the user identity is given by its private key (or DID), instead of by the backend.

Drop in a Web 2.0 app

Integrating a _Prtcl web-component in a Web 2.0 application requires more work from the application developer in order to link the _Prtcl Evees with the rest of the app business logic.

  • Use open-source code from _Prtcl to deploy on your backend a Service Provider. Then link it with the rest of your app (including authentication) using micro-services.

  • Use a third-party server to store the Evees and interact with it instead of your backend. This works if your business logic can be decoupled from the Evees and it will require the users to be authenticated both with your backend and with the 'third-party' _Prtcl Service Provider.

Create new _prtcl-compatible web-components

Making your app compatible with the _Prtcl and, thus, working with Evees instead of ephemeral objects has the immediate advantage of making your app compatible with other apps that are already working with Evees and thus, will reduce the cost and risks for users that want to try your app.

There are different degrees in which you can make your app _prtcl-compatible:

Create Standard Evees

Adopt the _Prtcl data structures (Perspective, Commit and Data) and their canonical hashing rules to create and store your app objects. Make your objects compatible as many widely used _prtcl-patterns as possible so that you don't need to create a custom cortex module. Then make your backend a read-only _Prtcl Service Provider.

js-uprtcl provides you with:

  • functions for creating and validating _prtcl-compatible objects and their hashes/ids
  • cortex modules for handling widely used patterns.
  • frontend components that can be extended and adapted to your custom Evee structures.

Consume Evees

Besides creating Evees, enable your app to show, create, store and merge new perspectives of Evees that were created in other apps.

js-uprtcl provides you with:

  • Frontend modules to connect with different service providers (ETH, IPFS, OrbitDB, Holochain, CollectiveOne,...)
  • cortex modules to render and merge commonly used data structures.

Create new types of Evees

If you need to work with Evees that are not compatible with existing patterns, develop a cortex module to manipulate the Evees your app creates. This will enable other apps to work with the Evees created in your app.

js-uprtcl provides you with:

  • Existing cortex modules that can be used as templates and extended.

Developer guide

1 - Installing the tools

2 - Looking around

3 - Cortex modules

4 - Configuring service providers

5 - Configuring modules

6 - Loading modules with micro-orchestrator

7 - Displaying an entity

8 - Adding the Evees module

9 - Adding multiple backends

[TBD]10 - adding lens selection

[TBD] Using Cortex without modules

[TBD] Building a pattern

[TBD] Building a lens

[TBD] Building a service provider

[TBD] Building a Cortex module

[TBD] Customizing the lenses module

[TBD] Building a plugin for the lenses module

Clone this wiki locally