In silico reproductions of clinical exams represent an alternative strategy in the research and development of medical devices, which permit to avoid issues and costs related to clinical trials on patient population. In this work, we present a platform for virtual clinical trials in 2D and 3D x-ray breast imaging. The platform, developed by the medical physics team at University of Naples, Italy, permits to simulate digital mammography (DM), digital breast tomosynthesis (DBT) and CT dedicated to the breast (BCT) examinations. It relies on Monte Carlo simulations based on Geant4 toolkit and adopts digital models of patients derived from high-resolution 3D clinical breast images acquired at UC Davis, USA. Uncompressed digital breast models for BCT exam simulations were produced by means of a tissue classification algorithm; the compressed digital breast models for simulating DM and DBT are derived by the uncompressed ones via a simulated tissue compression. For a selected exam, specifications and digital patient, the platform computes breast image projections and glandular dose maps within the organ. Energy integrating a well as photon counting and spectral imaging detection scheme have been simulated. The current version of the software uses the Geant4 standard physics list Option4 and simulates and tracks <105 photons/s, when run on a 16-core CPU at 3.0 GHz. The developed platform will be an invaluable tool for R and D of apparatuses, and it will permit the access to clinical-like data to a broad research community. Digital patient exposures with the available phantom dataset will be possible for the same patient-derived phantom in uncompressed or compressed format, in DM, DBT and BCT modalities.