Project Layout
Project layout, Domain driven development, Single Responsibility Principle
Project structure
application module types
yeti-web-app
yeti web appyeti-web-app-e2e
yeti web app e2e testingyeti-mobile-app
mobile version of yeti appyeti-desktop-app
desktop version of yeti appyeti-api
yeti backend API
library module types
workspace libraries, and package libraries(has package.json)
workspace libraries are used only within the workspace.
package libraries are publishable to NPM and can be used outside its workspace.
Utility libraries contain utilities and services.
Data-access can contain NGXS-related code and services.
Component libraries should contain presentational components and directives.
Feature libraries contain business logic, application screens, routable etc.
scoped library modules
domain
booking/data-access
-- a scoped library used in single domain. containsbooking/shell-<web/mobile...>
-- shell libraries used in a single domain. can have many shell libraries in a single domainbooking/feature-search-<web/mobile...>
-- feature libraries used in single domain. can have many feature modules in a single domainbooking/shared/ui
-- a shared library used by multiple feature modules in a single domain. contains
shared
shared/feature-<something>
-- shared feature modules used in multiple domains. Can have many feature modules inshared
domainshared/data-access
-- a sharedtype=angular
library, contains , used across libsshared/environments
-- a sharedtype=angular
library, contains environments, used across libsshared/scss
-- a sharedtype=universal
library, containsscss
, used across libs and appsshared/assets
-- a sharedtype=universal
library, contains static non-TypeScript assets e.g., , used across libs and appsshared/ui
--a shared UI library used across applicationsshared/utils
--a sharedtype=universal
libraries used across applications. e.g., data structures , algorithms
nestjs - contains
nestjs
shared and feature modulesnestjs/config
-- config modulenestjs/environments
-- a shared universal library, contains environments, used across libs
components
-- publishable component modules, published to NPM via Lerna. to be used by parent project as well as outside projects. modules here containspackage.json
core
-- core library contains used globally, only included in application modules
Rules
Libraries with a broader scope (e.g.,
shared/ui
) should not depend on the libraries with narrower scope (e.g.,booking/shared/ui
).Component libraries should only depend on other component libraries and utility libraries, but should not depend feature libraries.
Info
The shell component is the entry point component of our layout and features. Every additional route is added to the children array of the shell component route. Additional routes will be rendered by the router outlet in the shell component template.
Last updated
Was this helpful?