Synechococcus elongatus UTEX 2973 can use light and CO2 to produce sucrose, making them promising candidates to construct cocultures with heterotrophic workhorses. This envisioned process is, however, challenging to implement because of photosynthetic oxidative stress, light shading effect by heterotrophic cells, degradation of light sensitive metabolites, and high cost to separate intracellular products. Here, we demonstrated an effective ecosystem, where the sucrose producing cyanobacterium was freely grown in photo-bioreactors (PBRs), while an engineered heterotrophic workhorse (β-carotene producing Yarrowia lipolytica or indigoidine producing Pseudomonas putida) was encapsulated in calcium-alginate hydrogel beads and then placed inside the PBRs. The compartmentalization by hydrogels prevented growth interference so that the cyanobacterial culture could reach high sucrose concentrations, resulting the production of indigoidine (7.5g/L hydrogel) and β-carotene (1.3g/L hydrogel), respectively (i.e., the titers were 15 ~ 22 folds higher than that in the free cell coculture). Moreover, 13C-metabolic analysis indicated that hydrogels provided a favorable microenvironment so that the flux network of cells inside hydrogel was similar to the free culture. Finally, this novel system allowed the heterotroph- containing hydrogel beads to be easily harvested and dissolved by an EDTA solution for product and cell recovery, while the cyanobacterial culture could be continuously used for growing the next batch of immobilized workhorse heterotrophs.