I will review the current understanding of collisionless shock structure and particle acceleration based on ab-initio kinetic simulations. These simulations allow to trace the regimes of acceleration of electrons and ions depending on shock Mach number and magnetic orientation. Generally, quasi-parallel shocks seem to efficiently accelerate both electrons and ions, while quasi-perpendicular shocks preferentially accelerate electrons. I will describe the implications of these findings to SNR modeling.