The thylakoid is the structural unit of photosynthesis. Both photosynthetic prokaryotes and eukaryotes have these flattened sacs/vesicles containing photosynthetic chemicals. Only eukaryotes have chloroplasts with a surrounding membrane.
Thylakoids are stacked like pancakes in stacks known collectively as grana. The areas between grana are referred to as stroma. While the mitochondrion has two membrane systems, the chloroplast has three, forming three compartments.