We present a new framework for the efficient simulation of the dynamics of active fluids in complex two- and three-dimensional microfluidic geometries. Focusing on the case of a suspension of microswimmers such as motile bacteria, we adopt a continuum mean-field model based on partial differential equations for the evolution of the concentration, polarization and nematic tensor fields, which are nonlinearly coupled to the Navier-Stokes equations for the fluid flow driven by internal active stresses. A level set method combined with an adaptive mesh refinement scheme on Quad-/Octree grids is used to capture complex domain shapes while refining the solution near boundaries or in the neighborhood of sharp gradients. A hybrid finite volumes/finite differences method is implemented in which the concentration field is treated using finite volumes to ensure mass conservation, while the polarization and nematic alignment fields are treated using a combination of finite differences and finite volumes for enhanced accuracy. The governing equations for these fields are solved along with the Navier-Stokes equations, which are evolved using an unconditionally stable projection solver. We illustrate the versatility and robustness of our method by analyzing spontaneous active flows in various two- and three-dimensional systems. Our results show excellent agreement with previous models and experiments and pave the way for further developments in active microfluidics.