Electrochemical activation of dinitrogen (N2) is notoriously challenging, typically yielding very low ammonia (NH3) production rates. In this study, we present a continuous flow plasma-electrochemical reactor system for the direct conversion of nitrogen from air into ammonia. In our system, nitrogen molecules are first converted into a mixture of NOx species in the plasma reactor, which are then fed into an electrochemical reactor. To selectively convert the generated NOx species into NH3, we employed a graph theory approach combined with first-principles calculations to comprehensively enumerate all possible pathways from N2-to-NH3, pinpointing key intermediates (NH2* and NO*). A series of bimetallic catalysts was then designed to target the optimal adsorption and conversion of the limiting intermediate in the NOx-to-NH3 pathway. Using an optimized CuPd foam catalyst, we demonstrated an ammonia production rate of 81.2 mg h-1 cm-2 with stability over 1000 h at an applied current of 2 A.