Modeling the whole cardiac function involves several complex multi-physics and multi-scale phenomena that are highly computationally demanding, which makes calling for simpler yet accurate, high-performance computational tools still a paramount challenge to be addressed. Despite all the efforts made by several research groups worldwide, no software has progressed as a standard reference tool for whole-heart fully-coupled cardiac simulations in the scientific community yet. In this work we present the first publicly released package of the heart module of lifex, a high-performance solver for multi-physics and multi-scale problems, aimed at cardiac applications. The goal of lifex is twofold. On the one side, it aims at making in silico experiments easily reproducible and accessible to the wider public, targeting also users with a background in medicine or bio-engineering, thanks to an extensive documentation and user guide. On the other hand, being conceived as an academic research library, lifex can be exploited by scientific computing experts to explore new modeling and numerical methodologies within a robust development framework. lifex has been developed with a modular structure and will be released bundled in different modules/packages. This initial release includes a generator for myocardial fibers based on Laplace-Dirichlet-Rule-Based-Methods (LDRBMs). This report comes with an extensive technical and mathematical documentation to welcome new users to the core structure of a prototypical lifexx application and to provide them a possible pipeline to include the generated cardiac fibers into more sophisticated computational pipelines.