We present possis , a time-dependent three-dimensional Monte Carlo code for modelling radiation transport in supernovae and kilonovae . The code incorporates wavelength- and time-dependent opacities and predicts viewing-angle dependent spectra , light curves and polarization for both idealized and hydrodynamical explosion models . We apply the code to a kilonova model with two distinct ejecta components , one including lanthanide elements with relatively high opacities and the other devoid of lanthanides and characterized by lower opacities . We find that a model with total ejecta mass M _ { \mathrm { ej } } = 0.04 M _ { \odot } and half-opening angle of the lanthanide-rich component \Phi = 30 ^ { \circ } provides a good match to GW 170817/AT 2017gfo for orientations near the polar axis ( i.e . for a system viewed close to face-on ) . We then show how crucial is the use of self-consistent multi-dimensional models in place of combining one-dimensional models to infer important parameters such as the ejecta masses . We finally explore the impact of M _ { \mathrm { ej } } and \Phi on the synthetic observables and highlight how the relatively fast computation times of possis make it well-suited to perform parameter-space studies and extract key properties of supernovae and kilonovae . Spectra calculated with possis in this and future studies will be made publicly available .