  In this paper, we develop some foundations for a theory of algebraic geometry
of congruences on commutative semirings. By studying the structure of
congruences, firstly, we show that the spectrum $ \text{Spec}^{c}(A) $
consisting of prime congruences on a semirings $ A $ has a Zariski topological
structure; Then, for two semirings $ A \subset B, $ we consider the polynomial
semiring $ S = A[x_{1}, \cdots , x_{n}] $ and the affine $ n-$space $ B^{n}. $
For any congruence $ \sigma $ on $ S $ and congruence $ \rho $ on $ B, $ we
introduce the $ \rho-$algebraic varieties $ Z_{\rho }(\sigma )(B)$ in $ B^{n},
$ which are the set of zeros in $ B^{n} $ of the system of polynomial $
\rho-$congruence equations given by $ \sigma . $ When $ \rho $ is a prime
congruence, we find these varieties satisfying the axiom of closed sets, and
forming a (Zariski) topology on $ B^{n}. $ Some results about their structures
including a version of Nullstellensatz of congruences are obtained.
