Skip to content
This repository has been archived by the owner on Jun 14, 2024. It is now read-only.

Starting repository for all Applied Blockchain's new apps - NodeJS server app (API) + Docker Swarm / Kubernetes Deployment - Ethereum Parity Blockchain Testnet + AB Block Explorer

License

Notifications You must be signed in to change notification settings

appliedblockchain/launchpad.js

Repository files navigation

Launchpad

What is Launchpad?

Launchpad is the ideal scaffolding to start a new project. The repository is a monorepo with an api, contract and placeholder for react (frontend) application. We are required to use this app as starter for any projects as it provides a good default for API, writing Contracts, CI/CD (CircleCI) & deployment.

Features:

  • Contracts and contract deployment
  • Basic api structure to start from
  • A place holder for react app to be added on(with e2e test already setup)
  • Continuous Integration (Full CircleCI configuration to check contract, api and react)
  • Parity backup and restore (uses Amazon S3)
  • Sentry integration for Error Monitoring (Optional)
  • Elasticsearch integration (Optional)
  • CLI to create project
  • Docker for development
  • Docker swarm deployment

Directories

  • Webapp - Placeholder for Front-end React application
  • API - Node.js API
  • Contracts - Ethereum Solidity contracts
  • Docs - Documentation, guides, notes, etc
  • stack - Docker environments - Dev and Swarm --- Dev - Development environment with hot reload for the api and react -- Swarm - Local Staging (no code reloading) and Swarm environment (environment for swarm and kubernetes deployments)
  • CLI - Launchpad CLI to create base app quickly

Stack:

Other than the Dev and Swarm stacks we have:

  • parity - Parity Ethereum - configurations for the Ethereum nodes deployed in the swarm - Remember to regenerate the private keys and to make sure volumes are backed up (private-chain deployments - TODO need a documentation section )
  • backup - Parity S3 Backup cronjob
  • explorer - AB block explorer settings
  • sentry - Sentry - exception notification (see readme)
  • logging - Elasticsearch, Logstash, Kibana enterprise logging stack
  • monitoring - Prometheus / Grafana enterprise monitoring stack

How to develop

Local Setup with Docker (recommended)

To run the project locally you will require docker and docker-compose.

  1. Cd into stack
  2. Run source docker-aliases.sh
  3. Start parity only: launchpad-compose up parity
  4. While parity is running, deploy the contracts(run npm run compile && npm run deploy from the contracts folder, You might need to run npm i && npm run compile if you haven't already).
  5. Run launchpad-compose build to build the images
  6. Stop parity and run launchpad-compose up to start all the services

Local setup without docker

  1. Running Ethereum Blockchain node locally

Options

  1. Compile and deploy Contracts

Solidity Contract required to be compiled and deployed onto blockchain.

  1. Running API

  2. Running react application (WebApp)

Run this app with Docker Staging

docker-compose up --build

Restart API:

docker-compose up --build api (in a separate SH)

Restart API redeploying contracts:

docker-compose down -v api && docker-compose up --build api

For any issue or change request notify @makevoid @remi in the #launchpad AB slack channel.

About

Starting repository for all Applied Blockchain's new apps - NodeJS server app (API) + Docker Swarm / Kubernetes Deployment - Ethereum Parity Blockchain Testnet + AB Block Explorer

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published