Anvil2 is broken down into a few packages that are built for different use cases, product areas, and platforms. All of the source code for Anvil2 is available in the Hammer monorepo.
Core Web Library
@servicetitan/anvil2
React components and utilities for building ServiceTitan web experiences.
Anvil2 Figma Library
Figma components for building ServiceTitan web experiences, which match the React components in
@servicetitan/anvil2.Extended Libraries
Extended libraries are libraries that extend the core web library with additional components and utilities for specific use cases. These libraries are owned by both product teams and the Anvil team. Each library has a dedicated purpose, usually tied to a specific product area, and it’s own set of documentation.Atlas
Components and utilities for building the Atlas chat experience.
Mobile Web View (MWV)
Components and utilities themed for the mobile web view, integrated with
Ionic.
Common
Components and utilities for building common use cases in the ServiceTitan app monolith and MFEs.
Charts
Components and utilities for building data visualization experiences.
Extended libraries FAQ
What belongs in an extended library?
- Components built as composites of Anvil2 core components to cover specific use cases.
- Components and utilities that are specific to a product area, either due to tailored use cases or integrations.
- Components and utilities that could be migrated to the core web library, but still need further validation or testing, or only have one known use case.
- Potential contributions to the core web library. Starting with the extended library lowers the barrier to entry for contributing.
Can components be migrated from an extended library to the core web library?
In some cases, a component or utility may be migrated from an extended library to the core web library. This is typically done if multiple use cases arise, or if the component or utility is used in multiple product areas. The Anvil team will monitor usage and look for opportunities to migrate components to the core web library when it makes sense.Why should you contribute to an extended library, rather than building it in your product area’s codebase?
Oftentimes, it may seem easier or faster to build directly in your product area’s codebase. Ultimately it is up to you and your team to decide, but here are the advantages of contributing to an extended library:- The extended libraries directly consume the Anvil2 core web library, and always stay up-to-date.
- The Anvil team manages all of the tooling and infrastructure for the extended libraries, so you can focus on building your product.
- The Anvil team has better visibility into what is being built in the extended libraries, and can help with feedback, guidance, and connecting teams with similar use cases.
- The extended libraries have Storybook and Chromatic built-in for isolated development and automated visual regression testing.
- The more active our community is, the more likely we are to build components and utilities that are useful to other teams.