Skip to content

FabricLabs/fabric

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Fabric

Project Status Build Status Coverage Status GitHub contributors Community

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.

Getting Started

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.

You'll also want bitcoind installed, and fully synchronized with your preferred network. You can use scripts/playnet.sh to run a local playnet node, for which you can use the faucet: https://faucet.playnet.fabric.pub

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.

Available Commands

  • npm run cli provides a direct command-line interface to the Fabric network.
  • npm run dev serves a developer interface over localhost HTTP.
  • npm run docs creates a local HTTP server for browsing documentation.
  • npm run examples creates a local HTTP server for interacting with examples.
  • npm start creates a local Fabric node.

API

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 as a Library

Using the EventEmitter pattern, you can create an instance of Fabric to use it as an event source.

Simple Example

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

Message types are as follows:

message

The generic message event.

Properties:

  • @type name of the event type.
  • @data the content of the event, if any.

Using Fabric in the Browser

Fabric generates a fabric.min.js bundle, which can be included with any HTML document to expose the API in a browser.

Other Fabrics

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

Plugins

Fabric is an extensible framework, supporting a variety of plugins.

Package Description Status
@fabric/http serve Fabric apps to the legacy web (HTTP) Build Status Coverage Status
@fabric/matrix connect to Matrix servers Build Status Coverage Status
@fabric/twilio send (and receive) SMS and phone calls Build Status Coverage Status
@fabric/zapier interact with arbitrary zapier triggers Build Status Coverage Status
@fabric/doorman an artificially intelligent assistant Build Status Coverage Status
@fabric/soundtrack collaborative jukebox Build Status Coverage Status

Running on Fabric

Several successful projects are built with or are running on Fabric, including:

  • 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.

Learning More

The best place to get started is in the #learning channel, a collection of empassioned educators eager to help you.

Fabric on Twitter: @FabricProtocol

About

Fabric is an experimental protocol for exchanging information.

Topics

Resources

License

MIT, MIT licenses found

Licenses found

MIT
LICENSE
MIT
COPYING

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published