Skip to content
/ odopt Public

A monorepo containing commits to open source packages living in our private monorepo.

License

Notifications You must be signed in to change notification settings

dopt/odopt

Repository files navigation

odopt: Open Dopt

Welcome to Odopt! A monorepo of Dopt's open source packages.

Disclaimer

The pull requests and commit history for this repository may look a bit odd. The reason is that we are syncing commits to open source packages in our primary/closed-source repository to this repository. While slightly complex to get setup, we love that this approach allows us to easily open source packages we think folks would benefit from while still enjoying the benefits of development in a monorepo. Additionally, we are going to generate quite a few SDKs for working with our APIs - all of which will be open source.

Structure

We use pnpm at Dopt. We switched from yarn to pnpm a year into developing because of how many times we'd been bit by phantom depdencies. We ❤️ the strictness and can't complain about the speed gains.

We utilize pnpm workspaces. The pnpm-workspace.yaml defines the root of our workspace and allows us to define/constrain where packages can live in the monorepo. For odopt it looks something like this

packages:
  - "packages/**/*"

Our package manager (pnpm) and our build tool (turbo) will scan those directories and look for children package.json files. Their dependencies are used to define our workspace's topology.

While our private repository is app-centric in structure e.g.

├── apps          (apps that live on dopt.com)
├── services      (services used by app(s))
└── packages      (packages shared by apps)

this repository will be more package-centric i.e.

└── packages      (packages open sourced from dopt)

Any children directories of the packages directory correspond to package scopes

└── packages
    └── @dopt

and their children correspond to packages themselves

└── packages
    ├── @dopt
    ├─────── react
    ├─────── esbuild-plugins
    ├─────── please
    └─────── ...

Pacakges

Contributing

General Prerequisites

  1. Install make
  2. Install fnm
  3. Install husky https://typicode.github.io/husky/#/
    • pnpm --filter @dopt/cli exec husky install
  4. Install pnpm

General Setup

git clone git@github.com:dopt/odopt.git;
cd odopt;

Development

Node version management

#first time
$ fnm use `cat .nvmrc`

#subsequently
$ fnm use

Install all the dependencies of the monorepo

# install all dependencies in monorepo
$ pnpm i;

# build monorepo
$ make build;

If for any reason you need to start fresh you can run the following

  make clean # remove any build artifacts (e.g. dist/ directories)
  make uninstall # remove all node_modules directories

About

A monorepo containing commits to open source packages living in our private monorepo.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published