Getting started
Introduction
OCA is a pattern (architecture) that defines a new representation of data semantics. Official OCA documentation is under development hosted by Human Colossus Foundation. For years concept of OCA was incubated within communities like Inputs and Semantics Working Group at Trust over IP. And Hyperledger Aries RFC-0014.
Developers can follow current specification work in the official repository.
Due to a rapidly-evolving OCA core specification, future implementations may differ somewhat. The most up to date implementation is Rust, which would provide bindings to other languages.
- Rust with compile targets to other languages like JavaScript, Python and more planed.
- Deprecated:
Kotlin with compile target to JavaScript - Deprecated:
Ruby
Those core libraries allow the creation, parsing and management of OCA objects.
Quick Start
Pre-requisites
- Install docker and docker-compose
To serve OCA ecosystem on your machine, run the following commands in your command line:
curl https://raw.githubusercontent.com/THCLab/oca-ecosystem/main/docker-compose.yml > docker-compose.yml
docker-compose up
This command will serve OCA Browser on port 8000 by default.
with default layouts
- Download XLS example or create one based on template
- Go to
Develop -> XLS to OCA Converter
and select XLS inSelect OCA File
field - Click
Convert
button and download generated file (OCA Bundle) - Download entries files and upload them to data-vault with listed command:
for f in examples/swiss_passport/entries/*; do;
curl -X POST "http://localhost:9293/api/v1/files" -H "accept: */*" -H "Content-Type: multipart/form-data" -F "file=@$f";
done;
- Go to
Preview
and select OCA Bundle file - As a result OCA Form and Credential are rendered with default layouts
custom layouts
- Download layouts files
- Download assets files and upload then to data-vault with listed command:
for f in examples/swiss_passport/assets/*; do;
curl -X POST "http://localhost:9293/api/v1/files" -H "accept: */*" -H "Content-Type: multipart/form-data" -F "file=@$f";
done;
- In
Develop -> XLS to OCA Converter
select XLS file as before - In
Select Credential Layout file
andSelect Form Layout file
fields select downloaded layouts files - Click
Convert
button and download generated file (OCA Bundle) - Download entries files and upload them to data-vault with listed command:
for f in examples/swiss_passport/entries/*; do;
curl -X POST "http://localhost:9293/api/v1/files" -H "accept: */*" -H "Content-Type: multipart/form-data" -F "file=@$f";
done;
- Go to
Preview
and select OCA Bundle file - As a result OCA Form and Credential are rendered with custom defined layouts
TODO: creating layouts tutorial