To keep a clean simple organization, the types of libraries should be kept to a minimum.

# libs/page

If there is a route to it, it belongs here

**Dependency Constraints**

A page library can depend on **_any_** type of library.

# libs/feature

A feature library contains a set of files that configure a business use case or a page in an application. Most of the
Feature in such a library are smart Feature that interact with data sources. This type of library also contains most of
the UI logic, form validation code, etc. Feature libraries are almost always app-specific and are often lazy-loaded.

**Dependency Constraints**

A feature library can depend on **_any_** type of library.

# libs/ui

A UI library is a collection of related presentational Feature.

**_There are generally no services injected into these Feature (all of the data they need should come from Inputs)._**

**Dependency Constraints**

A ui library can depend on ui and util libraries.

A ui library should **_not_** depend on feature or data-access libraries.

# libs/data-access

Data-access libraries contain code that function as client-side delegate layers to server tier APIs.

All files related to **_state management_** also reside in a data-access folder (by convention, they can be grouped
under a +state folder under src/lib).

**Dependency Constraints**

A data-access library can depend on data-access and util libraries.

A data-access library should **_not_** depend on feature or ui libraries.

# libs/shared

A shared library contains netfoundry code used by many features.

**Dependency Constraints**

A shared library can depend **_only_** on shared libraries or util libraries.

A utility library should **_not_** depend on feature, ui, or data-access libraries.

**_a shared library can be angular specific. If it does not, consider libs/util instead_**

# libs/util

A utility library contains low level code used by many libraries. Often there is no framework-specific code and the
library is simply a collection of utilities or pure functions.

**Dependency Constraints**
A utility library can depend **_only_** on utility libraries.

A utility library should **_not_** depend feature, ui, or data-access libraries.

# Summary

You will probably come up with other library types that make sense for your organization. That's fine. Just keep a few
things in mind:

Keep the number of library types low.

Clearly document what each type of library means.
