Diabetic kidney disease (DKD), the leading cause of kidney failure, is marked by clinical and molecular heterogeneity, making therapeutic development exceedingly difficult1. Here we used Xenium and CosMx single-cell spatial transcriptomics, integrated with single-nucleus RNA sequencing, to build a cross-platform kidney atlas that makes tissue architecture computable for prognosis, non-invasive detection and patient selection. Using this atlas, we defined reproducible tissue niches and injury-linked microenvironments and uncovered a profibrotic context that expands with disease and tracks with worse kidney function. Within this architecture, we identified a B cell-predominant, tertiary lymphoid structure-like immune microenvironment that defines a distinct DKD subset with accelerated progression to renal end-points. We developed tissue biomarkers and a matched plasma protein panel that capture this biology, stratify patients in a population biobank and improve risk prediction beyond clinical models—supporting their potential for biomarker-guided selection in future B cell-targeted DKD trials.