We revisit the problem of constructing explicit pseudorandom generators which output $n$ bits that look random to $n$-variate degree-$d$ polynomials modulo $m$. We give new generators with seed length $2^{O(dm^2)} \log(n/\varepsilon)$, which is optimal for any fixed $m$ and $d$. Along the way, we prove new Fourier growth bounds for polynomial phase functions on the Boolean cube.
Our results simplify previous constructions, improve their parameters, and extend them to composite moduli. The previous best seed length for odd prime $m$ had a tower dependence on the degree (Lovett, Mukhopadhyay, and Shpilka; FOCS 2010); and for general composite $m$ was at least $2^{\sqrt{\log n}}$ even for degree $2$ (Luby, Veli?kovi?, and Wigderson; ISTCS 1993).
As an application, we obtain generators with optimal seed length for branching programs over nilpotent groups, extending recent work (Lee and Viola; CCC 2025). We also obtain new results on the so-called coin problem for polynomials modulo composites.