The invention is directed to a treatment of diabetes, a scaffold and a method of preparing a scaffold. In a first aspect, this object is met by providing a scaffold comprising beta cell aggregates, wherein the aggregates are distributed over the scaffold in a predetermined pattern.