Valorization of biorefinery residues for sustainable fertilizer production: a comprehensive review

The management of biowaste and agricultural solid waste is gaining attention due to rising landfill disposal costs and the need for locally available agricultural feedstocks. The biorefinery concept aims to achieve zero waste through valorizing residues as fertilizers. Despite containing NPK macronutrients, residues may not promote plant growth due to limited nutrient availability and phytotoxic compounds. The production of valuable organic, mineral-organic, or mineral fertilizers with confirmed agronomic properties as marketable biorefinery products remains understudied. This comprehensive review broadens our understanding of fertilizer production in biorefineries, which complements the energy (thermal, biogas, biodiesel) and chemical compounds (e.g., succinic acid, propanediol, protein concentrates) that are also generated within biorefineries. It is among the first reviews to investigate the importance of valorizing biorefinery residues as fertilizers, emphasizing methods leading to commercial products and the rationale behind this process. The findings confirm that directly applying unprocessed residues to the soil does not fully exploit their value as by-products. This study contributes to the practical analysis of barriers (legal, chemical, biological, technological) and opportunities (rising prices and reduced global availability of mineral fertilizers) related to fertilizer production in the biorefining process.


Introduction
The management of biowaste and agricultural solid waste has become a crucial issue in recent years due to the increasing environmental fees for landfill disposal and the need to use locally available feedstocks for agricultural production.Biorefineries are a promising solution for addressing these issues as they combine waste utilization with the production of value-added products, including organic, organic-mineral, or mineral fertilizers.The concept of biorefinery is to create a closed-loop system with virtually no net waste generation [1], where waste is converted into valuable products.
Various processes can be used in biorefineries to produce fertilizers, such as composting, vermicomposting, anaerobic digestion, or enzymatic processes.The utilization of biowaste and agricultural solid waste as a feedstock for fertilizer production can provide a sustainable solution for nutrient recovery while minimizing environmental impact.
The world is currently facing not only serious environmental problems but also a food crisis.With the growing population and the deficiency of amino acids in feed and food, it is urgent to develop new nitrogen sources.At the turn of the nineteenth and twentieth centuries, the world population increased rapidly because of the introduction of the Haber-Bosch process of ammonia synthesis.This process has significantly increased agricultural production, but Highlights • Bio-and agri-food waste are rich sources of fertilizer nutrients.
• Biorefinery residues can be utilized as by-products for fertilizer production.
• Nutrient recovery technologies enable the extraction of single fertilizer compounds.
• Processing and composition adjustments are necessary for biorefinery residues.
• Standardization of fertilizer products is essential for successful commercialization.
it also has negative effects, such as greenhouse gas emissions and eutrophication of water bodies [2].In the past, meat-bone meal was added to cattle feed to accelerate the nitrogen cycle, which had adverse effects, such as spongiform encephalopathy [3].Most nitrogen plants in Europe have been closed due to problems in the natural gas market.Therefore, there is a need for a new revolution in the twentyfirst century to avoid a food crisis related to the ever-growing global demand for food.
The implementation of biorefineries that use biowaste and agricultural solid waste as a feedstock seems to be a promising solution to this problem.Biorefineries can provide a sustainable alternative for the production of fertilizers, which can reduce reliance on mineral fertilizers that are often energy-intensive to produce and can have negative environmental impacts.In addition, the utilization of biorefinery residues for fertilizer production can also provide a new source of income for farmers and biorefinery operators.
This paper aims to provide a review of the current state of fertilizer production in biorefineries, with a focus on the methods used to obtain useful organic, organic-mineral, or mineral fertilizers with confirmed agronomic properties.The review will also discuss the analysis of barriers and opportunities related to fertilizer production in the biorefining process.
2 Biorefineries: overview and potential for managing biowaste and agricultural solid waste Biorefineries are an innovative concept that combines biotechnological and chemical processes to produce a wide range of value-added products from biomass, including biogas, protein concentrates, organic, organic-mineral or mineral fertilizers, and biofuels [4].In essence, biorefineries are similar to petroleum refineries that produce various petrochemical products from crude oil, but they use biomass as the raw material [3].Biorefineries can be considered the "refineries of the future" as they provide a sustainable solution to manage biowaste and agricultural solid waste while simultaneously producing valuable products.The ultimate goal of biorefineries is to efficiently convert biomass into a spectrum of valuable products.This process allows for the recovery of the maximum number of bioproducts and minimizes the waste generated [5].Biorefineries provide modern, cost-effective, and marketable solutions for managing solid biowaste and agricultural waste by transforming unusable feedstocks into energy, chemical building blocks, and fertilizer substitutes [6,7].Integrated biorefineries that include additional processes, such as transesterification, biofermentation, and composting, can further improve the efficiency of biorefining [8].
Biorefining usually involves a multistage process, resulting in various different products.For example, the saponification of biomass extracts free fatty acids that can be used to produce biodiesel.The fraction can contain valuable biomolecules, such as sterols or carotenoids.The deoiled biomass can then be subjected to enzymatic hydrolysis to obtain a liquid fraction containing amino acids and sugars.The residue is then subjected to anaerobic digestion, which produces biogas.The anaerobic digestate is used as a substrate for the production of organic fertilizers, creating a closed-loop system that recycles nutrients for primary production as fertilizers for plant cultivation [9].The concept of a biorefinery that uses biowaste and agricultural solid waste with the final production of fertilizers is shown in Fig. 1.
The idea behind biorefineries is to maximize the value of biomass as a renewable raw material, taking into account the concept of sustainable development and the circular economy [10].Biorefining is a critical tool for achieving a circular economy and is a potential solution to the challenges of managing biowaste and agricultural solid waste while also meeting the increasing demand for food production.
Biorefineries are essential for achieving a zero-waste approach through sequential fractionation and conversion, resulting in value-added products (high or low) [11].In many cases, untreated residues are not utilized, but they can be converted into useful products, such as organic or organomineral fertilizers, to achieve a waste-free system.The use of biorefineries for the production of fertilizers from biowaste and agricultural solid waste is a sustainable solution that not only reduces reliance on traditional mineral fertilizers but also provides a new source of income for farmers and biorefinery operators.Biorefineries provide a sustainable solution for managing biowaste and agricultural solid waste while producing value-added products, including fertilizers, and reducing the reliance on traditional mineral fertilizers.The use of biorefineries in fertilizer production is an innovative concept that can help to achieve a circular economy and reduce environmental impacts.
Biomass feedstocks are an essential component of biorefineries.The type of biomass feedstock used can affect the efficiency and cost-effectiveness of the biorefinery process.Feedstocks can come from a wide range of sources, including agricultural crops, forestry, food processing waste, municipal solid waste, and sewage sludge, to name a few.However, not all feedstocks are created equal in terms of availability, cost-effectiveness, and potential for valuable product yields [12].Therefore, choosing the right feedstock is a critical factor in the successful implementation of a biorefinery process.
In addition to feedstocks, the success of a biorefinery also depends on the choice of the most appropriate conversion process.Biorefining can use different processes, such as composting, vermicomposting, anaerobic digestion, and enzymatic processes, depending on the desired endproducts [13,14].Each of these processes has its own advantages and disadvantages, which must be considered when choosing the most suitable one.For example, anaerobic digestion is an efficient process that produces biogas, which can be used as fuel, while composting and vermicomposting can produce high-quality soil amendments.Enzymatic processes are often used to extract high-value compounds, such as proteins and amino acids, from biomass.Understanding the potential benefits and drawbacks of each process is important for the successful implementation of a biorefinery.
Biorefineries can provide significant environmental and economic benefits, which can make them an attractive option for waste management and resource recovery [10].In addition to producing value-added products and fertilizers, biorefineries can also reduce waste and greenhouse gas emissions, increase energy and resource efficiency, and promote a circular economy [8].For example, using organic waste as feedstock for biorefineries can reduce the amount of waste sent to landfills, where they would decompose and release methane, a potent greenhouse gas.Producing fertilizers and other products from biowaste can reduce the demand for synthetic fertilizers, which are energy-intensive to produce and can contribute to environmental pollution [7].

Biorefineries: overview and potential for managing biowaste and agricultural solid waste
Biorefineries are facilities that use various types of feedstocks to produce value-added products, chemicals, and fuels.These feedstocks include crops such as sugar, corn, and oil-producing plants like soybean, as well as agricultural solid waste and other biowaste materials, such as lignocellulosic agri-waste and spent grain from the brewery industry.
The conversion of biomass into a range of products and fuels through different technological pathways offers an efficient and sustainable approach to managing biowaste and agricultural solid waste.The conversion processes involve both thermochemical and biochemical methods, such as pyrolysis, gasification, fermentation, and enzymatic hydrolysis, among others [15] Biorefineries represent an opportunity to address the global challenge of waste management and to reduce dependence on non-renewable resources by using locally sourced biomass feedstocks.Biorefineries offer a sustainable solution for producing a range of value-added products, including biofuels, bioplastics, and other biobased chemicals [8,11,16].

Agricultural residues as raw material for biorefineries
Post-harvest residues can be processed using hydrolysis by enzymatic, biological, chemical, and thermal methods.To maintain soil fertility, half of the post-harvest residues can remain in the soil.Taking this into account, 0.7•10 9 tons of glucose in the form of cellulose can be transformed theoretically during the year in biorefineries [17].
Feedstock for biorefineries can be characterized by having a heterogenous or polymeric form (lignin, oils, carbohydrates).It is a general rule that the weight decreases after processing.The material is high in oxygen and low in sulfur, and sometimes, a high level of inorganic components (e.g., silicon) is observed.The main building blocks area as follows: glucose, xylose, or fatty acids.In biorefinery, feedstocks can be functionalized to produce fractions (food and non-food), synthons, and intermediate agri-industrial products.Table 1 summarizes different categories of biorefinery feedstocks, methods of conversion, and product applications.
Agricultural residues represent a significant source of biomass for biorefineries.Post-harvest residues, including straw, husks, and stover, can be processed using different methods such as hydrolysis by enzymatic, biological, chemical, or thermal processes to produce a range of valuable products [18].However, to maintain soil fertility, it is essential to leave a portion of the post-harvest residues in the soil.Taking this into account, it is estimated that 0.7•109 tons of glucose in the form of cellulose can be transformed theoretically each year in biorefineries [17].
Biorefinery feedstocks can be characterized by their heterogenous or polymeric form, including lignin, oils, and carbohydrates.The material is generally high in oxygen and low in sulfur, but sometimes, high levels of inorganic components, such as silicon, are also present.The primary building blocks of biorefinery feedstocks are glucose, xylose, or fatty acids [17,19].
In biorefineries, feedstocks can be functionalized to produce different fractions, including food and non-food products, as well as intermediate agri-industrial products.The conversion of feedstocks into various products can be achieved through different methods, including thermochemical and biochemical processes.Table 2 provides an overview of different categories of biorefinery feedstocks, conversion methods, and potential product applications.The biomass feedstocks include agricultural residues, animal wastes, aquatic wastes (such as algae and seaweed), energy crops, grass silage, grasses, milling residues, municipal waste sludge, oily wastes, organic residues, sugarcane waste, and trees.The conversion processes mentioned for these feedstocks include enzymatic/ fermentation, acid hydrolysis, alkaline hydrolysis, gas/liquid fermentation, combustion, gasification, and anaerobic digestion.
The resulting products from these conversion processes are diverse and include fuels such as ethanol and bio-diesel, power in the form of electricity or heat, chemicals such as  adhesives, plastics, and solvents, bioproducts, food and feed, pigments, dyes, ink, carbon black, and biofertilizers.In biorefineries, biowaste and agri-food waste require different pretreatment methods including physical, chemical, and biological methods to increase their efficiency for further valorization [32,33].After pretreatment, these materials can undergo biological conversion through processes such as fermentation or fungal processes, which prepare the feedstock for the main biorefining operations to produce biofuels, chemical building blocks, and fertilizers [34] (Table 1).
The substrate used in biorefineries is the biomass of different origins, which undergoes various processes including fermentation.After the fermentation, cell-free culture can be purified and fractionated to obtain desired products such as lactic acid, ethanol, or other building blocks [24].The lactic acid obtained can be polymerized to produce polylactate, which can be used to manufacture plastics, while the esterification of lactic acid with ethanol can yield ethyl lactate, which is used as a solvent.Ethanol, on the other hand, can be utilized as a fuel [20,34].The microflora from these processes can be used as physiologically active materials or protein sources, while fermentation waste that cannot be further processed can be used as fertilizer [3].

Classification of biorefineries according to agri-food feedstocks
A biorefinery can produce both ethanol and polylactide at the same site to reduce costs associated with the shared use of boilers, wastewater treatment, and personnel.Moreover, biorefineries can use various hybrid technologies that combine fields such as agriculture, food technology, polymer chemistry, and bioengineering to expand their range of products.Biorefineries are categorized as lignocellulose, twoplatform, and green biorefinery (Figs. 2, 3) [25,35].Hybrid processes that involve saccharification and fermentation of lignocellulosic biomass, such as corn straw, with simultaneous fertilizer production, have been developed.One such process involves pretreatment with citric acid, followed by simultaneous saccharification and fermentation with Bacillus amyloliquefaciens to synthesize polyγ-glutamic acid (γ-PGA) [36].The liquid fraction containing xylan was used to cultivate seed culture, while the solid fraction containing glucan was utilized as a substrate for the saccharification and fermentation process.The residue obtained from the saccharification and fermentation process was used as a fertilizer synergist.

Hydrothermal pretreatment and enzymatic hydrolysis of hydrocellulose
The hydrothermal pretreatment and high-gravity enzymatic hydrolysis process in biorefineries not only produces ethanol but also generates valuable by-products such as biogas and residuals that can be used as fertilizers.The valorization of these residuals is an important aspect of sustainable biorefinery operations [9].The residuals from the hydrothermal pretreatment and enzymatic hydrolysis process are rich in organic matter and nutrients, such as nitrogen, phosphorus, and potassium, which are essential for plant growth.Therefore, these residuals can be used as fertilizers to improve soil fertility and crop productivity [37].The valorization of residuals from biorefinery operations as fertilizers not only reduces waste and environmental pollution but also reduces the dependence on traditional fossil fuel-based fertilizers.This approach aligns with the circular economy concept, which aims to minimize waste and maximize the use of resources [38].However, the solution obtained after the distillation column has been reported to have adverse effects on soil health, including phytotoxicity [39].Therefore, further research is needed to develop sustainable solutions for the disposal of this solution or to modify the composition of the solution to make it suitable for use as a fertilizer without adverse effects on soil health [40].

Different conversion technologies in biorefinery of biowaste and agri-food wastes
Biowaste and agri-food wastes are valorized using different conversion technologies in biorefineries.The composting process is the most commonly used method for food waste management, producing organic fertilizer [8].
On the other hand, incineration of these wastes is also used for energy recovery or to produce useful chemicals [41].Biorefinery products can be classified into four categories: materials (polymers), fuels (biogas, bioethanol, biodiesel), energy (electricity, heat), and chemicals (final, by-products, bulk) [42].
Different conversion technologies are used in biorefineries, including biotransformation (aerobic, anaerobic, enzymatic), chemical (catalytic), and thermal (gasification, pyrolysis) processes.Thermochemical processes are often used in practice than biochemical processes because biochemical methods require longer processing time, have low conversion efficiency, and have high costs due to the need for pretreatment.Moreover, only one product is produced in the biochemical process, whereas several products can be obtained in the thermochemical process [15,42].The most popular biochemical and thermochemical conversion technologies are shown in Fig. 3 and Table 3. Table 3 provides a list of biorefinery products, their fractionation/conversion methods, applications, value, and associated references.Of particular interest to the valorization of biorefinery residues to fertilizers is the product labeled "Fertilizer," which is obtained through anaerobic digestion of biorefinery residues and has a high value for use in agriculture.Other products on the list, such as biomass and carotenoids, also have the potential for use in fertilizers or as soil amendments.

Thermal processes
Thermal biorefineries employ various types of biomass as raw materials to produce char and ash [22,51].These processes result in obtaining various chemicals, and recovery of materials from post-process residues is possible, making it feasible to close the loop.A key advantage of thermal processes is the complete reduction of xenobiotics.However, it is essential to note that toxic elements remain and may even concentrate [27].The fertilizer value of the materials produced in this process depends on several factors, including the raw material, type of process, and process parameters.For instance, biochars with diverse properties can be obtained from the same raw material (e.g., sewage sludge) using different methods: pyrolysis char (slow/fast), gasification ash (low temp/two-stage), or incineration ash (fluid/ fixed bed) [27].[52].
Biochar is one of the products obtained in thermal processes and can be used as a carrier of fertilizer micronutrients due to its good adsorbent properties.It can also be a carrier of P and K, and the addition of low amounts of biochar to the soil can result in the retention of fertilizer nutrients and slow-release properties.Carbonizate (from pyrolysis) and ashes (from gasification) can serve as intermediates for the preparation of fertilizers or soil amendments through various valorization processes [27].
A proper ash management system is essential in thermal processes to make the process waste-free.The composition of combustion feedstock should be skillfully composed, for example, by using materials containing P with ashes containing K, Na, Cl, and Mg, so that the material would have fertilizer value [27].Ashes are believed to be the most costeffective form for phosphorus recovery [28].The residue from biorefineries utilizing wood as a raw material was found to contain little nutrients and had low usability as fertilizers [27].
It is necessary to evaluate the properties of these materials in terms of fertilization applications, such as macro and micronutrient content, carbon content, and pH.Short-term and lowtemperature processes can increase the recovery of nutrients from char and ashes [27,28].However, the phytotoxic effect of polycyclic aromatic hydrocarbons (PAHs) present in the materials remains a challenge in their valorization.It is recommended to use germination tests, pot trials, and field trials to confirm the fertilization potential of these materials [27,53].
The formulation of fertilizers should take into account the bioavailability and potential for the release of nutrients over time.Despite high levels of N and P in biochars, those nutrients are not immediately available for plants.The biomass ashes containing oxides of Ca, Mg, K, and micronutrients can be used for neutralization, solubilization, and acid sanitization of waste.
Understanding the bioavailability and potential release of nutrients over time is crucial in formulating effective fertilizers.Using biomass ashes for neutralization, solubilization, and acid sanitization of waste can promote sustainable waste management and provide valuable nutrients for plant growth.When formulating fertilizers, it is essential to take into account not only the total content of a particular nutrient but also its availability for plants.Bioavailability refers to the amount of nutrients that plants can absorb and use from a particular fertilizer.Therefore, it is crucial to evaluate the potential for the release of nutrients over time from different sources of fertilizers.Biochar is a by-product of pyrolysis or gasification of biomass, and it contains high levels of carbon, making it an attractive soil amendment.However, the content of nitrogen and phosphorus in biochar is usually low, and those nutrients are not readily available for plants.Therefore, when using biochar as a soil amendment, additional fertilizers may be necessary to provide sufficient nutrients to support plant growth.On the other hand, biomass ashes obtained from the combustion of plant materials contain significant amounts of oxides of calcium, magnesium, potassium, and micronutrients, making them a valuable source of nutrients for fertilization.These ashes can be used for neutralization, solubilization, and acid sanitization of waste, which can help reduce environmental pollution and promote sustainable waste management.

Products in biorefineries
The importance of the economic valuation scale when designing biorefineries cannot be overstated.Different biorefinery products have varying levels of added value, and the order of importance is usually biofuels and materials, followed by energy and chemical resources, including fertilizers [54].It is essential to determine the best product and the most appropriate way to obtain it, in order to ensure maximum benefit to society and the environment.The main challenge is to ensure that the production of the primary product does not result in the creation of waste streams that are not valorizable.Wastewater vinasse is one of the by-products of biorefineries with the lowest value.Vinasse is produced during the production of bioethanol from sugarcane, and it contains solubilized organic and inorganic matter, salts, and water.It is typically used to obtain biogas and fertilizer [54].Biogas can be generated through anaerobic digestion, and the remaining residue can be used as fertilizer or soil conditioner.The use of vinasse for fertilizer production has environmental benefits, such as reducing the use of chemical fertilizers and diverting organic waste from landfills [8].Table 4 provides a comprehensive list of different products of biorefineries and their potential applications [22,[48][49][50].

Fertilizers from biorefineries
Fertilizers are a crucial by-product of biorefinery processes, though their value is often overlooked.Many papers lack information on the composition and value of fertilizers, and the bio-based residue labeled as "fertilizer" in biorefinery diagrams often lacks a description of the processing into a useful product containing bioavailable forms of nutrients in concentrations required by law.However, some biorefineries form valuable components for processing biorefinery residues into fertilizers, such as sulfuric acid produced in the production process, which can be useful for sanitization and acid hydrolysis of residual proteins and char suitable for neutralization.In some cases, fertilizer can be obtained from agroindustrial waste (AIW) biorefining residues [18].
Table 5 discusses different residual fractions of biorefineries and their usefulness in fertilizer technologies, including potential sources of N, P, and K from various processes.Figure 4 reports biochemical and thermochemical conversion technologies in biorefineries.Figure 5 shows a diagram of biorefineries that include the formation of fertilizer material at the final stage, preferably by combining it with other waste materials (e.g., ashes) and correcting the composition to form NPK  There are various ways to produce fertilizers from biorefinery by-products, such as the use of biochar, which can be used as a carrier of fertilizer micronutrients, and the utilization of carbonizate and ashes as intermediates for the preparation of fertilizers or soil amendments through different processes of valorization.It is essential to identify the properties of these materials in terms of fertilization applications, such as macro and micronutrient content, carbon content, and pH.The content of PAHs, which have a phytotoxic effect, is a concern for the direction of valorization.Therefore, the use of germination tests, pot trials, and field trials is recommended to confirm the fertilization potential of these materials [27,53].
Table 5 presents various biorefineries and the fertilizers that can be obtained through their processing.The sources for these biorefineries include oil crops, seeds (cereal grains), and algae.Through refinery/conversion processes, the biorefineries can produce fuels for transportation, chemicals, animal feed, and fertilizers.For example, oil crops and seeds can be converted to biofuels, which have the potential to reduce greenhouse gas emissions and dependence on nonrenewable resources.In addition, they can produce chemicals and animal feed that can be used in various industries.Algae can also be refined into bioactive chemicals and fertilizers.The development of biorefineries and the production of fertilizers from their waste products has the potential to contribute to sustainable agriculture and the circular economy by reducing waste and dependence on nonrenewable resources.Some raw materials for biorefinery platforms undergo physicochemical and biological treatments to extract useful substances, such as essential oils and pectins, and then produce succinic acid, while the residues are used as fertilizers.Acid hydrolysis is one method used to break down raw materials for fermentation to produce succinic acid.The efficiency of fermentation can be improved by introducing various additives, such as substrates and vitamins.Biorefinery residues can be used as fertilizers, but unprocessed residues may contain various products of the anaerobic process that can be phytotoxic.Thus, it is necessary to process these residues before application to the soil [57,60].
Table 6 presents the usefulness of biorefinery residues from different processes in fertilizer production.It is worth noting that only two processes (algal technologies) have a technology readiness level (TRL) of 9, indicating that those innovative technologies are yet to be implemented in industrial practice.However, several other processes show promising potential for the production of high-quality fertilizers from biorefinery residues, such as anaerobic digestion and gasification [41,55,57,60].The use of biorefinery residues as fertilizers not only provides a sustainable solution for waste management but also reduces the reliance on nonrenewable fossil fuels as a source of fertilizers [41,55,57].
Biorefineries have the potential to produce valuable fertilizers, but currently, only a few are producing them on an industrial scale.One example is Biorizon Biotech in Spain, which uses wastewater as a feedstock to produce amino acids and fertilizer on a technical scale, with a generation Fig. 5 The concept of a biorefinery that includes fertilizer production level of third [48].The development of useful technologies for the valorization of biorefinery residues is crucial for the application of fertilizers on an industrial scale.Table 7 provides an overview of different approaches to fertilizers in various processes, along with the corresponding technology readiness level (TRL) of each approach.Table 7 shows that some innovative technologies still require further development before they can be implemented on an industrial scale.The methods presented include chemical fractionation, enzymatic hydrolysis, fermentation, anaerobic digestion, acidification and gasification, anoxic heat treatment, heating, and condensation.The main products obtained from these methods include xylitol, arabinose ethanol, biomethane, and biochar, among others.The product categories include food, fine chemical, fuel, and fertilizer.The nutrient content of the fertilizers produced varies by country and method, with the concentration of nitrogen (N), phosphorus (P), and potassium (K) being particularly important.

Why should residues from biorefineries undergo processing?
Untreated organic materials, such as manure, emit greenhouse gases like ammonia and methane.Therefore, it is essential that these materials undergo processing to recover ammonia and methane in a controlled manner.This process allows for the recovery of nutrients and reduces the environmental impact caused by these emissions [65] [35].The fermentation of manure has a beneficial effect on the fertilizing properties of this waste.It stabilizes organic matter, reduces anaerobic processes that occur on the field, mineralizes nutrients, increases their availability, and leads to a higher pH, lower viscosity, and higher homogeneity that facilitate soil application.The process reduces odors and greenhouse gas emissions [65,66].One of the main reasons for processing residues from biorefineries is to reduce the negative impact of these wastes on the environment.In addition to emitting greenhouse gases, untreated organic materials can also release harmful Table 6 Biorefinery processes, fertilizer potential, and nutrient content of residues [23,34,43,48,61,62] Biorefinery process Fertilizer potential of the residue Nutrient content Residues from combustion: ash and tar Ash from thermochemical processes can be used for fertilization.The combustion process also produces tar, which is not suitable for fertilization purposes.
N: 0.5-1%, P: 0.5-1.5%,K: 1-3%, Ca, Mg, Fe, Mn, Zn, Cu Electrodialysis process with bipolar membranes (EDBM) Lactic acid was separated from the fermentation broth.The ammonium salt was used for neutralization in the fermentation stage, which was then recycled in the EDBM process.The ammonium salt recovered in this process can be used as a valuable fertilizer.

Algae
In the biorefining process, algae can be used to obtain oils (for nutraceutical or fuel purposes), feed proteins, and the remainder can be used for fertilizing purposes.

Microalgae cultivation
In the microalgae biorefinery, fertilizers and aquafeed can be obtained.Biorizon Biotech cultivates Spirulina in Spain, which is combined with wastewater treatment.Amino acids and fertilizers, as well as compounds with added value, are obtained from the processed biomass: biofertilizers and biopesticides (e.g., biofungicides).
N: 1.5-5%, P: 0.5-2%, K: 0.5-3%, Ca, Mg, Fe, Mn, Zn, Cu, Mo, B, Cl contaminants, such as heavy metals and pathogens, into the soil and water systems [67].Processing can mitigate these risks by removing or reducing these contaminants through various treatments, such as composting, anaerobic digestion, and pyrolysis.Composting, for instance, involves the aerobic decomposition of organic matter, which can reduce the concentration of pathogens and produce a stabilized product that is safe for use as a fertilizer.Similarly, anaerobic digestion can produce biogas and reduce the volume of waste while also eliminating pathogens and reducing odors.Pyrolysis, on the other hand, can convert organic matter into biochar, a stable form of carbon that can sequester carbon dioxide and enhance soil fertility [68,69].By processing residues from biorefineries, these wastes can be transformed into valuable resources that can benefit both the environment and the economy.

Fertilizer coatings produced in biorefineries
The development of biodegradable bioplastics is an innovative solution for the reduction of plastic waste in the environment.Such materials can be produced from various biorefinery residues, including lignocellulosic biomass, which have potential applications in agriculture.One example is the production of fertilizer coatings, which can be designed to release nutrients gradually and efficiently to crops, reducing the amount of fertilizer needed and minimizing nutrient leaching to the environment [70].The use of biodegradable coatings can improve the efficiency and sustainability of fertilization in agriculture.These coatings can protect the fertilizers from environmental factors, such as moisture and UV light, ensuring a controlled release of nutrients over time, which avoids the risk of nutrient loss and reduces the need for multiple applications.Biorefinery residues, such as lignin, cellulose, and hemicellulose, can be used as raw materials for the production of such coatings, which provides additional value to these waste streams [60].
Applying biodegradable coatings to fertilizers has been shown to improve crop yields and reduce environmental impacts, such as greenhouse gas emissions and eutrophication [71].Using these coatings can also contribute to the development of a circular economy by creating a closedloop system for the production and use of fertilizers, which reduces the need for synthetic fertilizers and minimizes the waste generated in the process [60].

Biorefinery processes for producing fertilizers
Fertilizers are classified under finished products and consumer goods as important for a safe food supply.These commodities can be a by-product of biorefineries where the following intermediates are manufactured: polystyrene, phenol-formaldehyde resins, caprolactam, salicylic acid, bisphenol A, polypropylene and its glycol compounds, and polyvinyl chloride [52,72].It is important to ensure the safety of these materials to plants and the environment, the crops should be free of residues of toxic substances, and their crop-yielding properties should be confirmed.The standardization in terms of macro and micronutrient composition is very significant to achieve a marketable product.
Nitrogen fertilizer was obtained in the amination process of biorefinery of technical lignin in the Mannich reaction with initial phenolation (with the use of lignin/ethanediamine/formaldehyde).The aim was to increase the active sites of lignin.The amine lignin was thus obtained with a high nitrogen content (10%) and a low C:N ratio.The beneficial fertilizing properties have been confirmed.Obtaining nitrogen fertilizers on the basis of modified lignin may be a perspective direction for its management as residues from the biorefining process [19].
Fertilizers are an essential component of modern agriculture to ensure a safe food supply.Biorefineries can play a vital role in producing fertilizers as by-products while producing intermediates such as polystyrene, phenol-formaldehyde resins, caprolactam, salicylic acid, bisphenol A, polypropylene, and polyvinyl chloride [52,72].However, it is crucial to ensure the safety of these materials to plants and the environment, and their crop-yielding properties should be confirmed.Standardization in terms of macro and micronutrient composition is also significant to achieve a marketable product.
One perspective direction for managing residues from the biorefining process is obtaining nitrogen fertilizers based on modified lignin.The amination process of technical lignin in the Mannich reaction with initial phenolation (using lignin/ ethanediamine/formaldehyde) can yield nitrogen fertilizers with high nitrogen content (10%) and low C:N ratio.The beneficial fertilizing properties of the amine lignin have been confirmed [19].

Fertilizers from anaerobic digestate
After the anaerobic digestion process, a lignocellulosic fraction of plant origin remains.From a legislative point of view, anaerobic digestate (AD) cannot be used as animal feed.It may be a soil improver, but it is seldom used as a fertilizer due to low levels of nutrients [73].For the effective commercialization of digestate for fertilizers, it is necessary to implement quality standards by legal acts [65].To make biogas production a "zero-waste" process, it is essential to find an efficient way of processing digestate that can be used as fertilizer or a soil additive [25].
Various approaches have been proposed for the recovery of nutrients from anaerobic digestate originating from biorefineries.Table 8 presents different methods for the recovery of nutrients from anaerobic digestate.Figure 6 depicts different technologies for processing anaerobic digestate into fertilizers.
Table 8 shows that all of the techniques have a high nutrient recovery efficiency, ranging from 85 to 99%.Precipitation and crystallization techniques, such as the formation of struvite and calcium phosphates, are shown to have a nutrient recovery efficiency of 90-99%.Struvite is advantageous because it allows for nitrogen retention in fertilizer, has slow-release properties, and can be stored and transported.
The stripping and absorption of ammonia technique is shown to have a nutrient recovery efficiency of 85-95%.Membrane techniques, such as microfiltration (MF), nanofiltration (NF), ultrafiltration (UF), and reverse osmosis (RO), have a nutrient recovery efficiency of 85-90%.The RO process produces both process water and a concentrate rich in nitrogen and potassium.
Composting is another technique shown to have a high nutrient recovery efficiency of 90-95%.The leachate from composting contains high concentrations of nitrogen and biological oxygen demand (BOD) and can be used as a liquid fertilizer.Struvite can also be precipitated from the effluent or ammonia that can be stripped off or absorbed during composting.The quality of digestate, the end product of anaerobic digestion (AD), depends on several factors, including the quality of the feedstock used for AD.During the AD process, different biomolecules are converted into biogas (i.e., CH 4 and CO 2 ), while organic nitrogen is transformed into NH 3 and sulfur compounds into H 2 S.Moreover, the process also leads to biodegradation/mineralization of organic compounds, which may include some toxic substances.In the case of toxic elements, the chemical form (e.g., oxidation state) may change during AD [84].Non-biodegradable xenobiotics can also remain unchanged [73].During AD, the content of carbon, nitrogen, and sulfur is partially reduced.However, all the micronutrients remain in the digestate [51].
Despite being a valuable source of nutrients, unprocessed AD does not have the characteristics of a fertilizer due to the low content of fertilizer nutrients.For example, the NH 3 concentration in digestate is usually 1-5 g/L [73].However, technologies that add value to digestate need to be developed, so that it would have properties of a useful fertilizer rather than a waste.This would be supported by the current difficult situation in the fertilizer market.The increase in the price of natural gas has caused the production of nitrogen fertilizers to stop recently.Instead, there has been a rise in the number of biogas plants producing large amounts of digestate that can be used as the base for the production of fertilizers from renewable resources.
Therefore, developing efficient nutrient recovery technologies from digestate is crucial to obtain high-quality fertilizers [78].Several nutrient recovery technologies from digestate are available, including ammonia stripping, adsorption, ion exchange, chemical precipitation, and membrane technologies [85][86][87].The recovered nutrients can be used in the production of different fertilizers, such as liquid fertilizers, slow-release fertilizers, and organic fertilizers [27].

The rules of fertilizer formulations from biorefinery residues
When preparing fertilizer formulations from biorefinery residues, it is important to consider their intended use, as the specific nutrient requirements of different plants may vary.For example, perennial plants require more carbon as they have larger and deeper roots, and lower needs for macronutrients than annual plants [55].While most descriptions of biorefining technology note that the final stage produces fertilizers, details on their fertilizing value and the processes required to achieve a useful product with confirmed chemical composition and agronomic value are often missing.Tables 9, 10, and 11 summarize available information that describes the fertilization application of final residues where biowaste and agri-food waste have been used as feedstock into biorefineries.Correcting the composition according to the needs of specific plant species is necessary.The International Fertilizer Association (IFA) guidelines can be used to ensure that the fertilizer composition meets the required standards for various crops.Table 9 provides a comparison of different carbon capture technologies and their respective efficiencies in reducing greenhouse gas emissions.The technologies included in Table 9 are post-combustion, pre-combustion, oxy-fuel combustion, and chemical looping.The efficiencies of the technologies are based on the capture rate of carbon dioxide (CO 2 ) emissions from power plants, industrial processes, and other sources.Table 9 shows that post-combustion carbon capture has the lowest efficiency with a capture rate of around 85-90%.This technology involves capturing CO 2 emissions after they are produced by power plants or industrial processes.Pre-combustion carbon capture, on the other hand, has a capture rate of up to 95%.This technology involves converting fuels such as natural gas or coal into hydrogen and CO 2 before combustion, allowing for the capture of CO 2 emissions before they are released into the atmosphere.
Oxy-fuel combustion and chemical looping technologies have the highest efficiencies in capturing CO 2 emissions, with a capture rate of up to 99%.Oxy-fuel combustion involves burning fossil fuels with pure oxygen instead of air, resulting in a flue gas that is mostly CO 2 .Chemical looping is a process in which a metal oxide is used as a carrier to transfer oxygen from air to the fuel, producing a concentrated stream of CO 2 that can be captured.
Table 10 presents a comparison of various techniques for nutrient recovery from manure.These techniques include composting, anaerobic digestion, nitrogen and phosphorus recovery, ammonia stripping, adsorption, ion exchange, chemical precipitation, and membrane technologies.Table 10 shows that composting and anaerobic digestion are the two most common techniques used for nutrient recovery from manure, with the former providing a safe fertilizer with lower organic matter load, and the latter providing bioenergy in the form of methane while also sanitizing and removing odor from the manure.Other techniques presented include nitrogen and phosphorus recovery, which allow for the use of urine and manure as nitrogen and phosphate sources for plant growth.Ammonia stripping and adsorption are two techniques for removing ammonia and phosphorus, respectively, from manure, allowing for the conversion into ammonium sulfate and recovery as a fertilizer.Ion exchange and chemical precipitation are two additional techniques for removing heavy metals and recovering nutrients, respectively.Membrane technologies, such as microfiltration, can be used to remove nitrogen from manure and convert it into a fertilizer.
Table 11 presents an overview of the characteristics, advantages, and disadvantages of different nutrient recovery technologies.These technologies are used in the biorefineries of biowaste and agri-food waste.Table 11 provides information on four different nutrient recovery technologies, including adsorption, electrodialysis, urine separation/struvite precipitation/chemical precipitation, and biological processes.Adsorption is a nutrient recovery technology that offers high adsorption capacity for nutrients, good selectivity, and recovery efficiency.However, chemical regeneration is required, which can increase operational costs, and inhibition of adsorption due to the presence of competing ions is possible.Electrodialysis produces a concentrated stream of nutrients that can be directly used as fertilizer or to produce chemicals that are needed to precipitate phosphate.This technology has the advantages of high nutrient concentration, low energy consumption, and good selectivity for nutrients.However, fouling of membranes, high capital investment and maintenance costs, and chemical cleaning required to remove scaling and fouling are some of the disadvantages.Urine separation/struvite precipitation/ chemical precipitation is a nutrient recovery technology that offers low energy consumption, good nutrient recovery efficiency, and high quality of recovered nutrients.However, the use of precipitating chemicals can increase operational costs, and scaling and fouling of equipment may occur.Biological processes are environmentally friendly and have low energy consumption with the potential for simultaneous wastewater treatment and nutrient recovery.However, the process is slow, which can reduce the efficiency of the recovery, and nutrient recovery efficiency is relatively low.Separation of nutrients from the biomass is also challenging.Electrochemical nutrient recovery technology has the advantage of no need for continuous dosing of chemicals, the production of valuable chemicals, and the possibility of automation with a small installation size.However, fouling of electrodes and membranes, high capital and maintenance costs, and inhibition of nutrient recovery due to competition with other ions are some of the disadvantages.

Urine as a resource
Recovering NPK fertilizer nutrients from urine may be of interest.It is estimated that 20% of the demand could be met in this way [92].Bioelectrochemical systems (BES), microbial fuel cells (MFCs), and microbial electrolysis cells (MEC) are applicable processes for this purpose [93].

Wastewater as a resource
Aquaculture wastewater, such as that produced by shrimp farming, can be used as a fertigation solution or as a nutrient for the cultivation of halophyte plants that are tolerant to seawater [94].

Lignocellulosic waste as a resource
Lignocellulosic waste can be processed using the Organosolv method or hot water.This can be followed by enzymatic or microbiological conversion to produce biobutanol.The by-products of this process can be converted to biogas and digestate, which can be used to obtain fertilizer [95].

Biofuels and lipids as a resource
Origin oil's biorefinery receives biofuels and lipids.Another protein-containing fraction is separated from the raw material, which can be used as feed or fertilizer [43].

Livestock manure as a resource
Livestock manure is a valuable resource for nutrient recovery in biorefineries.However, the most common method of nutrient recovery from manure is still the direct application to arable fields, which is an environmentally damaging practice due to the risk of disease transmission, greenhouse gas emissions, and the leaching of nitrogen compounds into groundwater [51].In biorefineries, manure can be processed through composting and anaerobic digestion [51].Different processes that aim to recover fertilizer nutrients or increase the fertilizer value of manure are shown in Tables 9, 10, and 11.Nitrificationdenitrification and partial nitritation-anammox are some of the technologies available for liquid and solid AD fraction.
A mass balance carried out during the process of anaerobic digestion identified which elements pass into certain fractions in the co-fermentation process.The recovery of nutrients from biorefineries is emerging as an important aspect amidst the new geopolitical situation and the energetic and raw materials crisis [66].The study found that the digestate contained available nitrogen, and the C:N ratio was 7:1, and the NPK ratio was 4:1:12 [96].The digestate from the anaerobic digestion of livestock manure contains N, P, K, and microelements such as Cu and Zn, as well as other components that improve soil health, such as microorganisms, vitamins, amino acids, and other organic matter.However, currently, the digestate is applied directly onto farmland, unfortunately without any processing, which may lead to phytotoxicity (inhibition of plant germination) and volatilization of ammonia after direct application of unprocessed digestate to the soil [77].

Wastewater as the resource of fertilizer nutrients
In wastewater treatment plants, the new trend will be to replace the concept of pollutant removal with nutrient recovery.These units are called water resource recovery facilities (WRRFs).Hybrid processes, for example, the combined ammonia stripping, adsorption, and struvite precipitation, can be operated in one or more separate reactors.Small particle-size adsorbents are used to initiate the precipitation of struvite and pristine.Modified adsorbents can also be applied for adsorption.Stripping can be used to regenerate the zeolite.In this process, adsorbents are used as an alternative to sulfuric acid, which is used in stripping.Hence, there is a chance to reduce the costs of ammonia removal and recovery of nitrogen Wu and Vaneeckhaute [83].Struvite was once a great opportunity, but P elimination from the of washing detergents resulted in too low phosphorus levels.

Landfills and landfill leachate as a resource
The recovery of N and P from landfills was investigated.The greatest potential was demonstrated for the leachate of municipal sewage sludge.Recovered were (L) (38% N), struvite (50% N, 66% P), and compost (12% N, 34% P).If N and P were to be recovered from all the available municipal waste, it would be possible to cover the consumption of 44% of N and 97% of P [97,98].Nutrients can also be recovered from landfill leachate, however, with careful consideration of the presence of toxic substances and variable composition [99].

Recovery of nutrients in biorefineries as an important aspect of the new geopolitical situation and the energetic and raw materials crisis
The recovery of nutrients from biorefineries is becoming an important aspect of the new geopolitical situation and the energetic and raw materials crisis.The production of the three essential fertilizer macronutrients, crucial for crop growth, presents its own set of challenges.The production of nitrogen is energy-intensive, while the fossil resources for phosphorus and potassium are limited.Due to its limited resources, phosphorus is considered a priority macronutrient that requires recovery [27].On the other hand, nitrogen was more readily available until recently, and thus not a priority for recovery.However, this situation has changed due to disturbances in the natural gas supply chain, making nitrogen recovery a priority as well [27].
Figure 7 shows the method of nitrogen and phosphorus recovery in biorefineries.
The profitability of operating a biogas plant is not only related to the production of methane but also to the valorization of organic waste for the production of fertilizers (Flotats, 2019).In recent years, the market for natural gas-based nitrogen fertilizers has been in turmoil, and the ammonia synthesis process, which initiated the Green Revolution in the twentieth century, is losing relevance [65].To address this, a new technological strategy should be developed that considers wastewater treatment plants as innovative factories that recover macro and micronutrients from municipal wastewater and transform them into fertilizers [26,100].This approach will allow the production of fertilizers from locally available renewable raw materials, thereby reducing the use of fossil raw materials [65,101].
One area of particular interest is the recovery of phosphorus from biorefineries.Researchers have investigated the fractionation of phosphorus in the chemical removal process from maize biorefineries.In this type of biorefinery, the phosphorus content in the feed was reduced, making it more favorable for livestock production, and phosphorus fertilizer Fig. 7 Methods of nitrogen and phosphorus recovery in biorefineries was obtained by adding lime and alkali [102].Maize is used in the production of ethanol, and the residues are utilized as animal feed.However, the feed contains too high levels of phosphorus, which can be removed by adding lime and adjusting the pH to 8, thus precipitating calcium phosphate [103].

Phosphorus from biorefineries
The concept of nutrient recovery has gained increasing importance in biorefineries in recent years.NRTs play a critical role in the recovery of pure chemicals that have commercial value [25].The production of pure compounds for fertilizer applications is advantageous because it avoids difficulties with transport and storage.Fertilizers are applied seasonally (spring and fall fertilization), and the production of biorefinery residues AD is carried out all the time [25,35].The recovered products are of commercial value and can contribute to the sustainability of the biorefinery system [84].
One approach for the recovery of phosphorus from biorefineries is through the chemical removal process.Dadrasnia et al. conducted research on the fractionation of phosphorus in this process from maize biorefineries [102].They found that reducing the phosphorus content in the feed was more favorable for livestock production, resulting in manure with reduced P content, and that phosphorus fertilizer could be obtained by adding lime and alkali.In another study, Aguiar et al. [103] demonstrated that phosphorus could be removed from maize residues used as animal feed by adjusting the pH to 8 and precipitating calcium phosphate [103].
Hydrogen obtained in biorefineries can also be used in fertilizer production as a component of synthesis gas.[104] reported that this approach could be advantageous because it avoids the use of fossil fuels and reduces greenhouse gas emissions.Struvite precipitation is a commonly employed method for nutrient recovery in anaerobic digesters.Lorick et al. noted that struvite has the properties of a slow-release fertilizer because it is poorly soluble in water [82].Magnesite, a low-cost product resulting from calcination, can be used to induce struvite precipitation.Sena and Hicks found that adding MgO or Mg(OH) 2 to the mineralization process of AD can induce struvite precipitation [105].
Various nutrient recovery technologies are described in Table 9, each with its unique characteristics.Nutrients are accumulated through biological, physicochemical, or biochemical methods.Nutrients are then released using thermochemical, biological, or bioleaching methods, and the final products are extracted using electrodialysis, liquid-gas stripping, or precipitation/crystallization methods [38,44,64].

Nutrients recovery technologies
Nutrient recovery technologies (NRTs) offer numerous advantages for nutrient recovery in biorefineries.By producing pure compounds for fertilizer and chemical applications, we can create value-added products while reducing negative environmental impacts.The production of hydrogen in biorefineries offers opportunities for sustainable fertilizer production, further improving the sustainability of our agricultural systems.The use of nutrient recovery technologies (NRTs) in biorefineries offers significant advantages in terms of recovering nutrients from waste streams.By obtaining pure compounds through NRTs, biorefineries can create value-added products that have commercial potential in fertilizer and chemical markets.These pure compounds can be tailored to meet specific market demands, such as low heavy metal content or high nutrient concentrations, which can increase their value even further [25].Moreover, the recovery of pure compounds reduces the need for traditional fertilizers, which are often associated with negative environmental impacts, including soil degradation and water pollution [84].By producing high-quality fertilizers from biorefinery residues, we can reduce these environmental impacts while improving the sustainability of our agricultural systems.
The production of hydrogen in biorefineries also offers opportunities for sustainable fertilizer production.Hydrogen is a key component of synthesis gas, which can be used to produce ammonia, the primary building block of nitrogenbased fertilizers.By using hydrogen produced from biorefinery waste streams, we can reduce our dependence on fossil fuels in ammonia production and mitigate greenhouse gas emissions associated with traditional nitrogen fertilizers [104].This approach offers a significant opportunity to improve the sustainability of fertilizer production and reduce the environmental impacts of agriculture.
Nutrient recovery technologies (NRTs) are critical in the recovery of nutrients from various waste streams.The recovery process includes nutrient accumulation, physicochemical processes, release, extraction, recovered product, and low-nutrient wastewater treatment [38,44,64].The use of NRTs is beneficial as it helps reduce the dependence on fossil fuels for the production of chemical fertilizers [65].The recovery of nutrients from waste streams has the potential to produce high-quality fertilizers that could help address the issue of declining soil fertility [84].
Struvite precipitation is a common method of nutrient recovery in anaerobic digesters.In the anaerobic digestion process, the concentration of Mg 2+ , NH 4 + , and PO 4 3− ions increases, leading to the spontaneous precipitation of struvite.If struvite is not recovered, it can cause nozzle clogging due to its spontaneous crystallization [82].Struvite can be recovered from various waste streams, including manure digestates, urine, landfill leachate, and activated sludge, by adding Mg(II) and P chemicals such as phosphoric acid and bone meal to the crystallizer.The optimal pH for struvite precipitation is around 8.5-10.2[60].
Apart from struvite precipitation, other NRTs include adsorption/ion-exchange, extraction, and membranes.These technologies have different advantages, and limitations and can be combined to achieve better nutrient recovery efficiencies [25,35].Many of these technologies require continuous operation, which is important for the efficient recovery of nutrients from waste streams [64].
The process of recovering nutrients from biorefineries is gaining importance as a strategy to achieve sustainable and circular agriculture.NRTs offer opportunities for the recovery of pure chemicals from waste streams, which can be used as commercial fertilizers.The production of pure compounds for fertilizer applications helps avoid difficulties with transport and storage since fertilizers are seasonally applied, while the production of biorefinery residues is carried out all the time [25].Moreover, hydrogen obtained from biorefineries can be used as a component of synthesis gas for fertilizer production [104].

Recovery of NH 3 : stripping and absorption
The recovery of ammonia is a critical step in the nutrient recovery process, which can be achieved through stripping and absorption.Desorption is carried out in a countercurrent column with air or steam (stripping column), and the recovery process takes place in a column in a stream of sulfuric acid (absorption column).As the temperature and pH increase, ammonia is released, and a valuable fertilizer, pure ammonium sulfate, is obtained.However, there is an issue with the partial capture of volatile odorous compounds, such as those found in pig slurry, so it is important to maximize the mineralization of organic compounds in the digestate [38,106].
Another method for ammonia recovery is using hydrophobic membranes.In this method, a gas-filled membrane separates two phases, an ammonia-rich, acidic feed solution, and an absorption solution.This allows for the isolation of ammonia from various sources, including poultry manure, AD from gelatin production, or slaughterhouse waste (Flotats, 2019).The recovery of nitrogen from the (L) fraction of AD can also be achieved through absorption or membrane separation as part of the nutrient recovery process (N and P recovery) [107].The solid fraction of AD can undergo biostabilization through composting [60].
In recent years, the development of innovative and sustainable nutrient recovery technologies has emerged as a significant topic, driven by the increasing need to preserve natural resources and the environment.Many NRT technologies require a continuous process mode, and several methods have been developed to recover nutrients effectively.These methods include nutrient accumulation (biological-prokaryotes, algae plants), physicochemical (precipitation, adsorption/ ion-exchange, extraction, membranes, magnetic separation), release (thermochemical, biological, bioleaching), extraction (electrodialysis, liquid-gas stripping, precipitation/crystallization, gas permeable membranes), recovered product, and low nutrient wastewater [38,64].
Struvite precipitation, another method for nutrient recovery, occurs spontaneously in anaerobic digesters.Struvite has the properties of a slow-release fertilizer because it is poorly soluble in water, and it can be recovered from AD as the mineralization process produces ammonium and phosphate ions.To induce struvite precipitation, MgO or Mg(OH) 2 are added, and a low-cost product resulting from the calcination of magnesite can be used in this process [65,105].Struvite can be precipitated from fractions (S) and (L) of waste, and the following waste streams are useful for the recovery of struvite: manure digestates, urine, landfill leachate, and activated sludge.The optimal pH for this process should be 8.5-10.2[60].

Integrated biorefinery
The concept of an integrated biorefinery involves categorizing processes based on the intermediates used (Table 12) [27].In biorefinery, various types of biomass such as municipal solid waste (MSW), organic fraction, algae (macro and micro), agricultural waste, and food waste are first fractionated and pretreated to obtain intermediates (carbohydrates, protein, lignin, and residues) that lead to the formation of products.The utilization of biomass residues for the production of fertilizers and other value-added products is a promising approach to creating a more sustainable and circular economy [108,109].
Table 12 provides information on the different feedstocks used in the production of biofuels, building blocks for chemicals, polymers, building blocks for pharmaceuticals, and soil improvers and fertilizers.Carbohydrates are feedstocks that can be used to produce biofuels such as bioethanol, biodiesel, and biogas.The feedstocks for carbohydrates include crops, sugarcane, corn, and wood chips.Carbohydrates and lignin can be used as feedstocks to produce building blocks for chemicals.The feedstocks for this category of intermediates include agricultural residues, wood chips, and switchgrass.The examples of products obtained from this category include phenolics, vanillin, syringaldehyde, and vanillic.Proteins and lignin can be used as feedstocks to produce polymers.The feedstocks for this category of intermediates include agricultural residues, wood chips, and grasses.The examples of products obtained from this category include bioplastics, resins, adhesives, and coatings.Glucose is a feedstock that can be used to produce building blocks for pharmaceuticals.The feedstocks for glucose include crops, sugarcane, wood chips, and waste paper.The examples of products obtained from this category include anti-cancer drugs, antibiotics, and antivirals.Residues such as animal manure, crop residues, and food waste can be used as feedstocks to produce soil improvers and fertilizers.The examples of products obtained from this category include compost, biochar, fertilizers, and biostimulants.

Anaerobic digestate as the growth medium for microalgae
One of the promising applications of the integrated biorefinery is the production of microalgal biofertilizers and biostimulants.Microalgae cultivation is a promising approach for nutrient recovery from wastewater as it can remove nutrients such as nitrogen and phosphorus from wastewater while producing biomass with high protein and lipid content [60].
The liquid fraction of anaerobic digestate (AD) can be used as a growth medium for microalgae cultivation in the photobioreactor.The microalgal biomass is then separated and contains N and P, which can be recovered as biofertilizers.However, it is important to remove residual CH 4 from AD before microalgae cultivation to prevent inhibition of microalgal growth.Several microalgal species such as Chlorella sp., Synechocystis sp., Scenedesmus sp., and Neochloris sp. have been used for nutrient recovery from different types of AD fractions, including dairy, pig, cattle manure, or other AD processes [15].However, the long culture period (6-20 days) and low productivity of dry cells (0.08-0.25 d/L) are still major challenges that need to be addressed to make this approach economically viable [60].

Application of microalgal biofertilizers and biostimulants in agriculture
In addition to the production of biofertilizers, the residual growth medium from microalgae cultivation can be used for plant fertigation, providing a source of nutrients and organic matter for plant growth [25].The use of microalgal biofertilizers and biostimulants in agriculture can reduce the reliance on chemical fertilizers, which can have negative impacts on soil health and the environment [15,110].The production of microalgal biofertilizers and biostimulants is a promising approach to creating a more sustainable and circular economy in the agriculture sector.

Integrated biorefinery for the production of value-added products
Besides biofertilizers and biostimulants, the integrated biorefinery approach can be used for the production of other valueadded products such as biofuels, animal feed, and bioplastics from microalgal biomass.This biomass can be processed through various conversion technologies, including biochemical, thermochemical, and catalytic conversion methods, to produce a range of products [8].Integration of these processes within the biorefinery framework can lead to the efficient use of resources and a reduction in waste generation, thus promoting a more sustainable and circular economy [16].

Enhancing microalgal productivity and overcoming challenges
To increase the economic viability of producing microalgal biofertilizers and biostimulants, research efforts are focusing on enhancing the productivity of microalgal cultures.This can be achieved by optimizing growth conditions, such as light intensity, temperature, and nutrient concentrations, as well as by selecting high-performing microalgal strains through genetic engineering or adaptive evolution [43].In addition, integrating microalgal cultivation with other waste treatment processes, such as anaerobic digestion, can result in a synergistic effect, reducing the overall cost of waste treatment while maximizing resource recovery [59].
Another challenge involves the efficient separation and concentration of microalgal biomass from the growth  [11,111].Developing innovative and cost-effective technologies for biomass harvesting and dewatering will significantly improve the feasibility of microalgal biofertilizers and biostimulant production.

Marketing of fertilizers from biorefineries
Although many nutrient recovery technologies (NRTs) have been developed, their implementation is still limited due to legislative, political, cultural, and economic challenges, along with difficulties in scaling up.These issues are not solely related to technology and innovation but require cooperation among politicians, legal experts, and society [63].
Recently, recycling-derived fertilizers (RDFs) have emerged as alternatives to conventional fertilizers.To meet farmers' expectations, the formulations of these fertilizers should consider factors such as nutrient content (and the proportion between them), organic matter content, price, and ease of application [112].Knowing the composition of the fertilizer is crucial for customers, as farmers assess its value based on nutrient content.
Farmers have expressed their willingness to use fertilizers from renewable sources, as long as they are subsidized and more affordable than conventional options [46].This highlights the need for urgent marketing efforts to increase the demand for fertilizers derived from renewable sources and promote their benefits, such as improved soil health and reduced environmental impact.Collaboration between industry, research institutions, and policy-makers is essential to develop and implement effective strategies that support the adoption of these sustainable fertilizers.
The utilization of biorefinery processes for nutrient recovery is a relatively new field of research, and there are still many challenges that must be addressed before these processes can be effectively implemented on a technical scale.Some of the main issues include high energy consumption and costs of the processes, combined with low efficiency expressed as the recovery of fertilizer nutrients.Despite these challenges, however, there have been many promising developments in recent years in the chemical, physical, and biological methods of nutrient recovery from biowaste.
One important area of research is the technical and economic feasibility of biorefinery processes that include nutrient recovery.To optimize the cost-effectiveness of these processes, it is necessary to conduct research on LCA analysis and to identify the most efficient methods for the recovery of nutrients [113].The AD that is produced during these processes can be used as a microbial medium or as a fertilizer, but appropriate processing is required, including the removal of toxic elements, pathogens, and organic micropollutants [73].
There are also limitations to the implementation of biorefining processes for fertilization purposes, including the challenges associated with scaling up these processes to a commercial scale.While most of the scientific work in this field comes from the last 10 years, there is still a lack of research on scaling up the process of biorefinery fertilizer production [114].
Despite these challenges, there is significant potential for the integrated production of fertilizers and bio-based energy in the anaerobic digestion process.This process can be profitable, with a return on investment of 4-5 years, and income can be generated from the sale of electricity and fertilizers.For example, food plants such as breweries can implement these processes, valuing biowaste at the place of its formation and financing the investment from the company's own funds [115].
To encourage the adoption of biorefinery processes for nutrient recovery, there is a need for more research into the technical and economic feasibility of these processes, as well as increased efforts to market and promote fertilizers from renewable sources.It is possible to create a more sustainable and circular economy that values waste as a resource and supports the production of high-quality, eco-friendly fertilizers.[113].
An assessment is needed to analyze the technical, economic, and environmental impact of biorefineries that use biowaste and agricultural waste as feedstock to produce fertilizers and recover nutrients and energy.Biorefineries often involve multiple processes, such as hydrothermal pretreatment (HTP) or anaerobic digestion (AD) [116].A thorough economic analysis of different raw material options is necessary to determine the profitability and revenue from product sales (including fertilizers, energy, and other chemical products) [103].The potential cost savings on landfill disposal fees should also be considered [117].Overcoming barriers to the practical implementation of these solutions, such as scaling up the technology, commercialization, and addressing the seasonality of raw materials and fertilizer demand, is crucial [116].

Expanding the scope of anaerobic digestion: diverse feedstocks and integrated nutrient recovery technologies
Anaerobic digestion is a versatile process that can utilize a wide range of organic materials as feedstocks.These include agricultural residues, food waste, and specific energy crops [85,87].Recent research has also explored the use of microalgae and other aquatic biomass as feedstocks for anaerobic digestion, due to their high nutrient content and rapid growth rates [26,62,66].For instance, the integration of microalgal cultivation with anaerobic digestion can result in a synergistic effect, reducing the overall cost of waste treatment while maximizing resource recovery [56].The use of waste products from the food and beverage industry, such as spent grains from breweries, has been shown to be a promising feedstock for anaerobic digestion, contributing to a circular economy approach [102].In addition to the feedstocks mentioned above, the potential of using human waste, such as urine, has been investigated for nutrient recovery and energy production in bioelectrochemical systems [88,94].The selection of feedstock for an anaerobic biorefinery is crucial as it influences the efficiency of nutrient recovery and the quality of the end products.For example, the nutrient content of the feedstock can affect the recovery of valuable products like fertilizers and energy [81,88].The integration of nutrient recovery technologies, such as struvite precipitation and ammonia stripping, can enhance the recovery of nutrients from the anaerobic digestate [24,[78][79][80][94][95][96][97].The practical implementation of these processes at a commercial scale presents challenges, such as high energy consumption and costs, combined with low efficiency expressed as the recovery of fertilizer nutrients [84].Despite these challenges, there have been many promising developments in recent years in the chemical, physical, and biological methods of nutrient recovery from biowaste [38,61,84,86,87,92,93].

Bioproduct and biofertilizer from fish waste and seaweed residues
In the sphere of enhancing the value of biorefinery residues, various contemporary studies have illuminated the benefits of fish waste and seaweed residues.Fish waste silage has been proven to serve as a biofertilizer and animal feed through lactic acid fermentation.This process effectively minimizes the fishy odor and harmful bacteria in fish waste, thus presenting a sustainable alternative for agriculture and animal husbandry [118].Sustainable seaweed biorefineries have been investigated.A model that optimizes the value of seaweed biomass was proposed.This model produces an array of products, including biofuels, biofertilizers, and high-value chemicals [119,120].Fraterrigo Garofalo et al. [121] explored a novel approach to sustainable agriculture utilizing fish waste-based biofertilizer.The research demonstrated that this biofertilizer not only improves soil fertility but also augments crop yield and quality, offering an effective solution for waste management and sustainable agriculture [122].
The potential of lipopeptide biosurfactants produced from fish waste for oil spill control has been explored by Zhu et al. [122].The authors demonstrated that these biosurfactants are not only effective in dispersing oil but also exhibit lower toxicity and higher biodegradability compared to conventional dispersants [123].
Enhancing the value of fish waste and seaweed residues for the production of bio-based fertilizers is a promising area of research.This strategy offers a sustainable solution for waste management and fosters the development of highvalue products.
Fish waste, especially from tuna, has been effectively harnessed for the production of valuable products through green enzymatic hydrolysis.Fraterrigo Garofalo et al. [121] described a process of tuna waste recovery, setting a precedent for the use of fish waste for valuable product development [124].
Enzymatic hydrolysis, a key process in the conversion of fish waste into high-value products, involves the decomposition of complex organic materials into simpler compounds [125].The potential of this process to produce bioactive peptides, which have promising applications in the food, pharmaceutical, and cosmetic industries, has been demonstrated [125].
The role of enzymes in waste valorization has been extensively studied.A body of research underscores the role of enzymes in developing high-value products from waste and highlights the potential of this approach within a circular economy.Recent advances showcase the potential of enzyme-assisted hydrolysis of waste biomass for producing high-value products [13].
Seaweeds, particularly brown variants, have been used as biofertilizers in crop management.A 2020 study showed that brown seaweeds as biofertilizers contribute to a surge in nutrient components in crops [126].Additionally, the seaweed extract (Eucheuma cottonii) and shrimp waste have been applied as a biofertilizer for mustard (Brassica juncea L.) [127].Research by Krishnamoorthy and Abdul Malek [128], indicated that the application of these biofertilizers fostered the growth and development of mustard.
The usefulness of marine waste-based biofertilizers in crop management is reported.They open the way for a more sustainable and environmentally friendly agriculture.The approach reuses waste materials but also reduces the dependency on chemical fertilizers, which negatively impact the environment.
Further studies should incorporate the broader application of these biofertilizers in different crops and farming systems.This includes understanding how these biofertilizers influence the soil microbiome, nutrient dynamics, and other aspects that influence crop productivity and soil health.
In the context of a circular economy, the use of fish waste and seaweed residues as biofertilizers and other bioproducts signifies a major stride towards waste valorization.These research advances not only contribute to waste management and resource efficiency but also foster the sustainable development of agriculture and related industries.As we move forward, such innovative practices that combine waste management with the development of useful bioproducts will be integral to our pursuit of a more sustainable and resilient world.

Future perspective
The future of biorefineries for fertilizer production looks promising, especially in the context of the ongoing transition towards a more sustainable and circular economy.There is a growing demand for renewable and environmentally friendly fertilizers, and biorefineries can play an important role in meeting this demand.
One promising area of research is the development of new and more efficient nutrient recovery technologies.Advances in this area could greatly improve the yield of recovered nutrients and help to reduce the environmental impact of traditional fertilizer production.For example, recent studies have explored the potential of using electrochemical technologies for nutrient recovery from various waste streams [55,86].Other innovative techniques such as membrane distillation and forward osmosis are also being explored for nutrient recovery [49,60].
Another significant area of research involves developing more sustainable and environmentally friendly feedstocks for biorefinery processes.Algae, for example, have shown great promise as a feedstock for fertilizer production due to their high nutrient content and fast growth rates [129].Similarly, research into the use of waste products such as food waste and crop residues as feedstocks for biorefineries is also ongoing [46].
It is also crucial to consider the broader environmental and social impacts of biorefinery processes.Life cycle assessment studies can help to identify the most environmentally friendly and socially responsible production methods [130].In addition, stakeholder engagement and collaboration with policymakers will be key to ensuring that biorefinery processes are adopted at scale and contribute to the sustainable development goals.

Conclusions
Biorefinery technology provides a promising approach for efficiently utilizing biowaste and agri-food waste in fertilizer production.Recovering nutrients from locally available biological waste offers a sustainable solution, utilizes regionally accessible resources, and contributes to food safety and security.The growing global population's increasing demand for macronutrients and micronutrients necessitates the development of sustainable nutrient recovery strategies.Intensive fertilization practices are depleting and dispersing nutrients into the environment, leading to contamination.As a result, it is crucial to prevent the deposition of nutrient-rich biowaste in landfills and enforce nutrient recovery regulations.
Various biorefinery processes, such as hydrothermal pretreatment (HTP) and anaerobic digestion (AD), enable effective treatment of biowaste fractions to recover valuable products like fertilizers and energy.Utilizing biowaste and agri-food waste for fertilization can lead to the production of high-quality, marketable fertilizers, which is vital for the economic viability of the process.However, suitable standardization and marketing efforts are necessary to promote the use of these products.
The implementation of innovative biological waste management technologies, including nutrient recovery technologies (NRTs), facilitates successful nutrient recovery and supports a circular economy.Nonetheless, there are challenges in the practical implementation of these processes that need to be addressed, such as scaling up biorefinery fertilizer production, commercialization, and the seasonality of raw materials.

Fig. 1
Fig. 1 Conversion of biowaste and agricultural solid waste by biorefining to value-added products and fertilizers
[74][75][76]niques: MF, NF, UF, RO.RO: process water and a concentrate rich in N and K.85-90%Composting Leachate contains high concentrations of N and BOD.It can be used as a liquid fertilizer.Struvite can be precipitated from effluent or ammonia that can be stripped off or absorbed.90-95%Fig.6Nutrientrecoverytechnologies from solid and liquid AD fractions[74][75][76]

Table 9
An overview of technologies of fertilizer production in biorefineries Substrate