The atmospheres of rocky exoplanets are secondary in nature and thought to be regulated by geochemical volatile cycles. Earth scientists have studied in detail the long-term inorganic carbon cycle (also known as the carbonate-silicate cycle) acting on timescales of hundreds of thousands of years. This cycle provides essential negative feedback to maintain temperate climates on Earth. With the discovery of about a thousand rocky exoplanets and ongoing hunts for an Earth-twin, it is imperative to understand the factors affecting the stability of the carbon cycle. These factors could be dependent on the orbital and stellar parameters such as planet-star separation and stellar radiation as well as planet-surface properties such as rock composition, land and ocean area fractions. On Earth, continental silicate weathering and seafloor basalt weathering act as sinks for the atmospheric carbon dioxide. In this study, we develop a novel framework to model both the weathering processes. We focus on modeling the chemistry of rock-water interaction for different rock types at a given temperature and partial pressure of carbon dioxide. The weathering rates are calculated from the equilibrium solute concentrations and the independently computed fluid discharge rates. We also model the attenuation effect of high discharge rates on equilibrium solute concentrations. We quantify the effects of fresh rock availability for the continental weathering and land area fractions for the seafloor weathering. We find that the weathering rates depend mainly on the partial pressure of carbon dioxide, surface temperature and lithology, and other factors are secondary in nature. This approach allows possessing a theoretical method to determine both continental and seafloor weathering rates on temperate exoplanets that depend little on present-day Earth calibrations. Our study gives a strong control over the connection between atmospheric observables and the carbon cycle. The ultimate goal is to provide an abiotic library of geological false positives of biosignatures.