Fabric is an experimental approach to the secure establishment and execution of
peer-to-peer agreements, up to and including financial transactions. With a
robust library of common components, npm i @fabric/core provides all the tools
one might require during the development of a well-researched application of
decentralization technology.
| 🚨 Heads up! |
|---|
| Use of Fabric in production is not recommended in its current state. Please wait for an official release before deploying to production environments, or proceed at your own risk. |
If you're already familiar with node and have a project already started, try
npm install --save @fabric/core to install Fabric Core,
the primary library used for most Fabric-based applications.
Fork and clone the Fabric GitHub repository and launch a local
web server with npm run examples to view the examples, or npm run docs once
you're ready to integrate Fabric into your application.
npm run cliprovides a direct command-line interface to the Fabric network.npm run devserves a developer interface over localhost HTTP.npm run docscreates a local HTTP server for browsing documentation.npm run examplescreates a local HTTP server for interacting with examples.npm startcreates a local Fabric node.
The Fabric reference implementation exposes a simple message-passing interface using the actor model, enabling your downstream applications to subscribe to simple events for rapid prototyping of distributed applications.
Using the EventEmitter pattern, you can create an instance of Fabric to use
it as an event source.
const Fabric = require('@fabric/core');
const fabric = new Fabric();
fabric.on('message', function (message) {
console.log('Received message from Fabric:', message);
});
fabric.start();service now contains a full instance of Fabric, including SET and GET
methods for publishing and retrieving documents. Use npm run examples to see
more.
Message types are as follows:
The generic message event.
Properties:
@typename of the event type.@datathe content of the event, if any.
Fabric generates a fabric.min.js bundle, which can be included with any HTML
document to expose the API in a browser.
Several other projects have used the name Fabric, as it's a great way to describe a network of things, conjuring feelings of nets and webs. Here are some links to them, as they offer some interesting things completely unrelated to our goals.
- Fabric python project (#fabric on Freenode)
- Fabric application framework by Twitter
- HyperLedger Fabric, by IBM
Fabric is an extensible framework, supporting a variety of plugins.
| Package | Description | Status |
|---|---|---|
@fabric/http |
serve Fabric apps to the legacy web (HTTP) | |
@fabric/doorman |
an artificially intelligent assistant | |
@fabric/soundtrack |
collaborative jukebox |
Several successful projects are built with or are running on Fabric, including:
- soundtrack.io, Internet jukebox
- Doorman, an artificially intelligent assistant
- IdleRPG, a simple RPG game which rewards you for remaining idle
- Verse, a virtual universe simulator
To add your project to the list, read the API docs, create a public repository for the source code, then edit this file to include a link to your work.
The best place to get started is in the #learning channel, a collection of empassioned educators eager to help you.
Fabric on Twitter: @FabricProtocol