Code Monkey home page Code Monkey logo

proca-server's Introduction


   ,,\\\\\\,,
  ,\\\\\\\\\\\
 ▲▲▲▲▲▲\\\\\\\\  FIX THE STATUS QUO 
▲▲▲▲▲▲▲▲\\\\\\`  PROCA SERVER v3
▼▼▼▼▼▼▼▼\\\\\`   
 ▼▼▼▼▼▼\\\^``    https://proca.app

Proca server & satelite packages

About this repository

the vast majority of this repo is the elixir server. However, we have put as well some client api code that often needs to stay in sync with the server.

  • Monorepo for Proca server

  • SDK libraries in Typescript and Javascript, and common microservices (Managed by Lerna, JS monorepo manager)

  • Included packages:

    • proca - the core proca api server and processing engine
    • sdk/api - thin GraphQL api client
    • sdk/queue - TS library for working with action message queues
    • sdk/crypto - TS library for working with encryption of personal information
    • sdk/cli-py - CLI tool to manage the server
    • service/*-sync - sync-to-CRM tools

To add a new repository into this one, use lerna import tool. It will import all the commit history. Recommended way is:

yarn lerna import --flatten --dest service ../path/to/service-repo-on-disk

Make sure the dir name of repo is the same as one you want to be created under service/

Caveats

  1. Proca server is an Elixir project and tasks for it are run using mix tool. It contains package.json so lerna will treat it as a project; however, it is set to private and will not be published to npm repositories.

  2. You need to use Yarn and not NPM, as this is our choice and Yarn devs did not bother to implement lifecycle events in the same way as NPM ¯\_(ツ)_/¯. We are using yarn.

Available top level commands

Word of warning: NPM 7 changed the lifecycle evens most notably splitting the prepublish into prepare and prepareOnly. However, Yarn and Lerna differ. Lerna uses two lifecycle events: bootstrap and publish. Yarn uses a simpler events model so install runs preinstall, install, postinstall, prepublish, prepare.

  • yarn lerna bootstrap - installs, inter-links and compiles dependencies in all projects
  • yarn lerna publish - publishes all packages (and bumps versions)
  • yarn test runs tests

lifecycle details

  • yarn lerna bootstrap runs
    • npm install all external dependencies of each package.
    • Symlink together all Lerna packages that are dependencies of each other.
    • npm run prepublish in all bootstrapped packages (unless --ignore-prepublish is passed).
    • npm run prepare in all bootstrapped packages.

Build systems

  • lerna manages interdependencies, especially in JS projects
    • yarn (not npm) for individual packages
      • make - used by AWS SAM in lambda projects
    • mix - builder for Elixir

proca-server's People

Contributors

marcinkoziej avatar tttp avatar 1v4n4 avatar dependabot[bot] avatar hiemanshu avatar aaronelliotross avatar

Stargazers

 avatar

Watchers

 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.