AMA Session Recap between Mogul Productions and its Lead Blockchain Developer





For the platform side, our platform tech stack is centered on Typescript for both the frontend and backend. We are running a custom NodeJS application that serves our REST API backed by a Postgres Database. All of our frontend and backend code lives in a single monorepo using Yarn 2 workspaces. We are making heavy use of codegen steps in our build process to reduce repetitive tasks and to establish strict static typing between the database and the React UI layer. A change to any of our database models is immediately reflected in the generated react-query hooks we are using to load data in our components.

The frontend portion of our stack is kept really lean using a (non-ejected) Create React App build. We aren’t using a component library or UI framework — the UI is a mix of fully hand-coded (new and “legacy”) React components with custom CSS module styles.
We also have an internal admin app built using Create React App and Material UI. We have re-skinned Material UI with a custom theme, but all of our style customizations are in a central location which helps keep our various component definitions free of any css or visual concerns. This helps us be very fast and responsive to any requests our business team has for internal features.

We test our backend with a local integration test suite using ephemeral database instances. We follow a “testing pyramid” pattern and invest more heavily in fast isolated tests and checks — we use strict TypeScript everywhere and have a very strict eslint config. This really helps diminish the need for more comprehensive testing further down the line and empowers us to be more agile.

We build, test, and deploy continuously with every commit pushed to our monorepo. Each PR spawns a temporary staging instance of the application that we use to review and test changes immediately. We release to production at least
once a week with little fanfare with the batch of incremental changes that we have ready. New features are added in disabled state and “released” to production before the moment we formally launch them. This gives us early feedback on any new issues when the stakes are lower and really cuts down on the pressure of launching new features to the entire user base.

Using Docker we’re able to give developers the experience of a one step dev build which means they can spend more time working on features. This is the first step towards velocity during development.

During the development of a feature we employ strict rules around code review to ensure the whole team is abreast of changes to the codebase & product. We pair programs heavily to increase team awareness of incoming changes, and to generally raise the quality of our changes.

Following basic CI/CD (continuous integration and continuous delivery) principles we are building every commit pushed to Github as well as running a plethora of automated checks & tests using Github Actions against it.

Every frontend commit is deployed automatically thanks to Netlify deploy previews, whereas for the backend it’s up to us to choose when we deploy. All changes are deployed and tested first in a dev environment before we pull the trigger to go to production.

With the automated integration pipeline and one-step production deployments it’s no challenge to do several full production deployments a day.

After each production deployment we use Sentry to monitor error rates in real time, and in the case of any issue we’re able to issue a hotfix within minutes or simply roll back to a known good state.







About Mogul Productions



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store