This is a multi-language, multi-project repository that houses all code, configuration, and tooling. This repository is organized into three main directories:
- apps: Contains full application code for both frontends and backends.
- libs: Contains reusable libraries, grouped by type:
- feature: Components and views specific to a feature or domain.
- data-access: Logic for communicating with backends, APIs, or databases.
- util: Common utilities, helper functions, and shared models.
- ui: Reusable UI components, theming, and styling.
- tools: Contains scripts and configuration for versioning, formatting, Docker orchestration, and CI/CD.
.
├── apps/ # Complete applications
│ ├── angular/ # Grouped by framework / language
│ │ ├── container/ # Specific application
│ │ ├── usersui/
│ │ └── authui/
│ ├── go/
│ │ ├── servicediscovery/
│ │ └── emailsender/
│ └── springboot/
│ └── usersrole/
│
├── libs/ # Reusable libraries
│ ├── angular/ # Grouped by framework
│ │ ├── container/ # App-specific libraries
│ │ │ ├── feature/
│ │ │ └── util/
│ │ ├── usersui/
│ │ │ ├── feature/
│ │ │ ├── data-access/
│ │ │ └── util/
│ │ ├── shared/ # Framework-wide shared
│ │ │ ├── ui/
│ │ │ ├── util/
│ │ │ └── data-access/
│ ├── go/
│ │ ├── shared/
│ │ └── servicediscovery/
│ │ └── util/
│ └── shared/ # Cross-framework shared
│ └── utils/
│
└── tools/ # Monorepo tooling
- Framework/Language Grouping: Top-level organization by technology (Angular, Go, Java).
- App-Specific Isolation: Libraries scoped to specific applications.
- Shared Code Hierarchy:
- App-Scoped: Only used by one application (e.g.,
angular/usersui/*). - Framework-Shared: Shared within a framework (e.g.,
angular/shared/*). - Cross-Framework: Shared across technologies (e.g.,
shared/*).
- App-Scoped: Only used by one application (e.g.,
- Library Types:
feature/: Domain-specific components and logic.data-access/: API/backend communication.util/: Helper functions and utilities.ui/: Reusable UI components.
Execute tasks with Nx using the following syntax:
npx nx <target> <project> [options]Examples:
-
Build the
angular-usersui-data-accesslibrary:npx nx build angular-usersui-data-access
-
Run multiple targets:
npx nx run-many -t <target1> <target2>
-
Filter specific projects:
npx nx run-many -t <target1> <target2> -p <proj1> <proj2>
Learn more at Nx Documentation.
Generate an interactive visualization of the workspace dependencies:
npx nx graphThis graph helps you understand how projects are connected and see which tasks can be executed. See more at NX Explore Graph.
Helm charts and Argo CD configurations for the applications live in:
- Deployments: https://github.com/jdwlabs/deployments
Cluster configuration, Terraform, and tenant definitions live in:
- Infrastructure: https://github.com/jdwlabs/infrastructure
- Platform: https://github.com/jdwlabs/platform
The monorepo organizes libraries by type to encourage reuse and maintainability:
- Feature Libraries: Provide UI components and feature-specific logic (e.g.,
angular-usersui-feature-core). - Data-Access Libraries: Encapsulate API communication and business logic (e.g.,
angular-usersui-data-access). - Util Libraries: Offer shared TypeScript utilities, helper functions, and models (e.g.,
angular-usersui-util,angular-shared-util). - UI Libraries: Supply reusable UI components and theming (e.g.,
angular-shared-ui).
- NX Documentation: https://nx.dev/
- Deployments: https://github.com/jdwlabs/deployments
- Infrastructure: https://github.com/jdwlabs/infrastructure
- Platform: https://github.com/jdwlabs/platform
- Docker Hub Images: https://hub.docker.com/u/jdwlabs
This monorepo leverages Nx for efficient task management and CI/CD across multiple languages and projects, promoting code reuse and maintainability.
- Jake Willmsen