Nitrokit Nitrokit - Ship faster with AI - No more heavy lifting, build Angular apps at NITROSPEED!

Documentation

Shell libs

Documentation on shell libs

  • Applications are empty shells
    In Nitrokit, applications are designed to be empty shells. This means they don't contain the core logic but act as containers that call the necessary features.

  • They need an entry-point
    Shell libs provide the entry-point needed for the application to start functioning. These entry points pull in the required features from the workspace.

  • Keeps the app empty
    The benefit of this design is that it keeps the application itself clean and free of unnecessary code. The logic lives elsewhere, keeping the app lightweight and maintainable.

  • Picks the features needed from the workspace
    Instead of embedding all functionality inside the app, the shell lib ensures the app dynamically picks the needed features from the workspace, enhancing flexibility and modularity.

  • Type of the lib: feat
    The type of libraries used within the shell architecture is often classified as feat. These are specific feature libraries that provide discrete functionalities.

  • Example: Log out functionality
    For instance, a feature like log out functionality could be provided as part of a shell lib. The application doesn't need to contain this code; it simply calls it from the workspace.

  • Personal preference
    Using shell libs is largely a personal preference. While they don’t drastically transform architecture, some developers prefer the neatness of having apps completely free of internal logic.

  • When an application becomes huge: Multiple shell libs
    As your application grows larger and more complex, it can be advantageous to use multiple shell libraries to handle different entry points or feature sets, ensuring your architecture remains scalable and easy to manage.


Key Takeaway

Shell libraries offer a way to keep your applications streamlined by separating out the core features, making it easier to scale and manage large applications. This approach provides modularity and keeps the app structure clean, especially in complex, large-scale projects.

Have questions?

Still have questions? Talk to support.