[ADR]: create modularized libraries #94
Labels
backend
Backend related
documentation
Improvements or additions to documentation
enhancement
New feature or request
Problem Statement
We want to implement modularized libraries in a single directory which can be used within all of the apps. Each library within that single directory (packages), will have its own tests, bundler, exports, etc.
Our libraries will also be publishable to NPM registries like npmjs.
That means any other projects can import, for example, our database library
@cuhacking/db
🤩Here is the structure of the packages directory:
2025/
├─ apps/
│ ├─ .../
├─ packages/
│ ├─ api/
│ ├─ auth/
│ ├─ config/
│ ├─ db/
│ ├─ env/
│ ├─ utils/
The benefits of going for this clean modularized approach are:
Goals
packages
directory, such asapi
,db
,env
which may depend on one anotherOut of Scope
db
package instead of theapi
package in the portal. One solution to this restrictions would be with ESLint rules.Solution Summary
History/Context
Initially, we have had our business logic in a single app. We have found that it is best to put this logic on the monorepo level to allow apps to use the logic consistently.
The text was updated successfully, but these errors were encountered: