Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

space-mvc

Package Overview
Dependencies
Maintainers
1
Versions
39
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

space-mvc

TypeScript toolset to simplify building peer-to-peer applications using IPFS, Ethereum, and OrbitDb

  • 0.0.7-beta
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

Space MVC

A TypeScript toolset to simplify building peer-to-peer applications using IPFS, Ethereum, and OrbitDb.

Our primary goals

  • Provide a radically faster getting started experience for P2P app development.
  • Make opinionated decisions to reduce boilerplate code.
  • Implements simple, familiar MVC pattern.
  • Serverless. In the real sense. There's no server.
  • Easy to swap out new crypto technology. It changes so quickly.
  • Apps work offline by default. Data is primarily stored in the user's browser.

SpaceMVC provides a pre-configured development environment with reasonable defaults. Start building real apps immediately.

Maintainable and Testable

  • Object-oriented design and Inversify dependency injection helps you decouple your business logic and your UI to write maintainable and testable code.
  • SpaceMVC relies heavily on Framework7 and the answers to many questions can be found in their excellent documentation. You can use it to build full featured iOS, Android & Desktop apps that look and feel native. It uses nothing but HTML, CSS, and Javascript.

Important Technology

  • Typescript - TypeScript is a typed superset of JavaScript that compiles to plain JavaScript.
  • Framework7 - Build full featured iOS, Android & Desktop apps with HTML, CSS, and Javascript
  • IPFS - A peer-to-peer hypermedia protocol designed to make the web faster, safer, and more open.
  • OrbitDB - OrbitDB is a serverless, distributed, peer-to-peer database
  • The Ethers Project - A complete Ethereum wallet implementation and utilities in JavaScript (and TypeScript).
  • Inversify - IoC container Inversify.

Getting Started

The fastest way to create a project is to clone the Space MVC Example project. //TODO: this will become a truffle box or similar

Installation

Add the following to your package.json

  "dependencies": {
    "space-mvc": "0.0.3-beta"
  }

Important Files

  • package.json - dependencies
  • tsconfig.json - TypeScript build info
  • webpack.config.ts - Webpack configuration
  • src/index.ts - Your app
  • src/inversify.config.ts - Bind Inverisfy classes

Initialization

  • Create Framework 7 parameters.
  • Define OrbitDb data storage schema.
  • Set up Inversify container with dependencies.

    import "core-js/stable"
    import "regenerator-runtime/runtime"

    import SpaceMVC from "space-mvc";

    import { container } from "./inversify.config"

    let f7Params = {
        root: '#app', // App root element
        id: 'example', // App bundle ID
        name: 'SpaceMVC Example', // App name
        theme: 'auto', // Automatic theme detection
    }

    let schema = [{
        name: "person", type: "mfsstore", load: 100, schema: {
            id: { unique: true },
            firstName: { unique: false },
            lastName: { unique: false }
        }
    }]

    await SpaceMVC.init( container, f7Params, "0x88bfEE1f69e83aa5F146B2B6F527878866D39fE9", schema)

API

Keywords

FAQs

Package last updated on 12 Sep 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc