Dynamics of fluid transport in ultratight reservoirs such as organic-rich shales differ from those in high-permeable reservoirs due to the complex nature of fluid transport and fluid-solid interaction in nanopores. We present a multiphase multicomponent transport model for primary production and gas injection in shale, considering the dual-scale porosity and intricate fluid-solid interactions. The pore space in the shale matrix is divided into macropores and nanopores based on pore size distribution. We employ density functional theory (DFT) to account for fluid-solid interactions and to compute the inhomogeneous fluid density distribution and phase behavior within a dual-scale matrix. The calculated fluid thermodynamic properties and transmissibility values are then integrated into the multiphase multicomponent transport model grounded in Maxwell-Stefan theory to simulate primary oil production from and gas injection into organic-rich shales. Our findings highlight DFT's adeptness in detailing the complex fluid inhomogeneities within nanopores─a critical concept that a cubic equation of state does not capture. Fluids within pores are categorized into confined and bulk states, restricted by a threshold pore width of 30 nm. Different compositions of fluid mixtures are observed in macropores and nanopores: heavier hydrocarbon components preferentially accumulate in nanopores due to their strong fluid-solid interactions. We utilize the developed model to simulate hydrocarbon production from an organic-rich shale matrix as well as CO2 injection into the matrix. During primary hydrocarbon production, strong fluid-solid interactions in nanopores impede the mobility of heavy components in the near-wall region, leading to their confinement. Consequently, heavy components mostly remain within the nanopores in the shale matrix during primary hydrocarbon production. During the CO2 injection process, the injected CO2 alters fluid composition within macropores and nanopores, promoting fluid redistribution. Injected CO2 engages in competitive fluid-solid interactions against intermediate hydrocarbons, successfully displacing a considerable number of these hydrocarbons from the nanopores.