Git Product home page Git Product logo

microchain's Introduction

MicroChain — simple blockchain prototype with API

Universal React starter kit (Work In Progress).

Main goal is to use best available technologies to create fast and stable web-sites for reasonable time.

Features

  • Swagger/OpenAPI 2.0 is used for API
  • Interactive API docs is built with swagger-ui
  • Docker is used for development, staging and production
  • Separate docker images are used for API server and frontend, communication via CORS
  • Next.js and React are used for frontend
  • Enabled server-side rendering of universal React components (great for SEO)
  • Enabled code-splitting (for every web page is loaded only javascript and css code used on this page)
  • For state management is used fast-redux — an improved version of Redux but still compatible with Redux DevTools
  • UI is done with Material-UI and JSS
  • Web application uses Flow static type checking (WIP)
  • Shared javascript code and settings are stored in parent shared Docker image
  • During development are used node_modules from Docker images, nothing is need to be installed on host system (greatly unifies development, staging and production environments and speedups development if different operation systems are used by team)
  • Blocks with transactions are stored in MongoDB

Installation and usage

Checkout the repository and then either build Docker images locally or pull them from Docker hub.

To build Docker images locally:

npm run build

Then to start servers in development mode:

npm run dev

Please use http://localhost:3000 to access development server.

To pull images from hub.docker.com and start servers in production mode:

npm run start

Then you should be able to open QA server on http://localhost:3001.

Different ports are used to allow running of both production and development servers on same machine without reverse proxy. In development mode data is stored in ./data/ directory inside project. In production mode /data/microchain/{qa,staging,prod}/ is used.

To run unit tests, rebuild Docker images and restart servers in production mode:

npm run qa

To bump package and build version and tag repo with new npm package version:

npm run version x.y.z

Execute npm run to see more commands.

Based on Tiniest Blockchain idea

https://medium.com/crypto-currently/lets-build-the-tiniest-blockchain-e70965a248b

https://medium.com/crypto-currently/lets-make-the-tiniest-blockchain-bigger-ac360a328f4d

License

MIT

Disclaimer

Please don't tell about MicroChain to non-developers. We don't have enough MicroChain coins to satisfy current demand on the market ;)

microchain's People

Contributors

dogada avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.