We began by modeling and conducting a techno-economic analysis (TEA) of the baseline process summarized in Figure . We considered processing 20,800 tonnes/yr of manure at a 1,000 animal unit dairy farm using existing technology (Supp Fig ). This wastewater stream contains 12.7 tonnes/yr of P and 76.4 tonnes/yr of N, though this content can be highly variable by farm and by season. Initial measurements determined that the cyanobacteria strain PCC 7002 has a phosphorus density of 0.017 g P per g biomass, which determines its P-recovery capacity. From this we calculated that processing the available P load in the digestate input stream would require the production of 522 tonnes/yr of cyanobacteria biomass. This product is not only significantly more nutrient-dense than raw manure, but also has a significantly lower N:P ratio of 2.4:1, thus facilitating nutrient balancing. The process was assumed to have a lifetime of 15 years during which it operates 365 days per year at an average daylight intensity of 350 μmol/m 2 /s, and we assumed that biomass is harvested every 3 days. Approximately 644 tonnes/yr of methane are produced from AD, of which 71% is assumed to be exported off-site while the remainder is combusted to generate 821 MWh/yr of on-site electricity. The combustion of methane enables the utilization of generated CO2 to run the cyanobacteria bioreactors, eliminating the need to supply additional CO2. Annualized capital costs were calculated based on a 15% discounted return on investment (DROI) (a typical standard industry benchmark) and a process lifetime of 15 years, with monetary values assigned in terms of USD from the year 2020. The baseline process model and TEA is used as a comparative framework for analyzing how improvements of different aspects of the process impact overall costs and resource use.