Code Monkey home page Code Monkey logo

sample-monorepo-dcoker's Introduction

FVST Monorepo

Most startups start with a monolithical application and when their business picks up and they outgrow the monolith the migration to microservices starts. This migration is usually painful.

This repositories' goal is to simplify microservices architecture and enable companies to still start with a monolith, but have an easy path to add new services without having to change much.

We use GCP as the cloud provider - it provides an extensive free tier to get started - https://cloud.google.com/free/

Features

  • 100% customizable to your needs - just copy this repository template and make your own changes.
  • Community driven
    • Have an idea to make it better for everyone? Start a discussion or open a PR!
    • Not sure how to achieve something or confused on how something is built? Ask a question and we'll help you out!
  • Monorepo pattern to keep all your code in one place and have your team work on a single source of truth.
    • Easy to add new services without the headache of configuring a new repository
    • Easy to share code between services without having to manage separate NPM libraries
    • Easy to run locally, just start the docker compose file and run npm run dev to bring the entire stack up.
  • CLI baked into the repository to automate complex workflows.
    • Easy to add your own custom commands that your team can utilize.
  • Infrastructure as code, allowing you to easily and quickly set up your environments. We leverage the following in our infrastrucutre:
  • Github Action CI workflows
    • Continuous Delivery
      • Build new docker containers from code
      • Deploy docker containers to google cloud
    • Validate your entire codebase in each pull request
    • Get a terraform plan in each pull request
    • Focus on speed, workflows heavily utilize
      • caches (Utilizes turborepo remote cache and a custom cache server to speed up all CI jobs including docker container builds)
      • geolocation (GitHub Action workers are US based, so artifact registry and cloud storage buckets are US based to reduce latency)
      • docker files are configured for speed and small images
  • Share tooling configuration across services and packages
  • Example services implemented using popular technologies
  • DX
    • We format modified code on each commit, and it's easy to extend this behaviour to add your own pre-commit validation.

Documentation

Folder structure

The root of the Monorepo contains the turborepo configuration files, and the main package.json which defines the directories and scripts used in the Monorepo. The directories set up in the template are following this structural logic.

Directory What goes inside of it
apps All backend and frontend apps
packages Here we keep code that we want to re-use across apps
tooling Here we have all the configuration code for all the tooling we use inside the monorepository
infra Here we have all the infrastructure configuration code to deploy to GCP
docs Documentation

NPM Scripts

Command Description
npm run lint Runs prettier, eslint and tsc (checks types)
npm run format Runs prettier and eslint --fix
npm run dev Starts the dev environment for all apps
npm run build Builds all the apps and packages
npm run test Runs the test suite

sample-monorepo-dcoker's People

Contributors

ismi-abbas 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.