I noticed the following strange (to me) fact. If $M$ is a real manifold (smooth or not) and $R = C(X, \mathbb{R})$ is the ring of real functions (smooth functions in the smooth case) then the affine scheme $X = \mathrm{Spec}(R)$ has a natural map $M \to X$ which is a homeomorphism on real points i.e. $M \to X(\mathbb{R})$ is a homeomorphism. Even better, in the smooth case, we can identify $M$ with the ringed space $(X(\mathbb{R}), \mathcal{O}_X)$. Even more better, the functor $M \mapsto \mathrm{Spec}(C(M, \mathbb{R}))$ from the category of smooth manifolds to the category of affine schemes is fully faithful.

Add to this the Serre-Swan theorem which states that there is an equivalence between the category of vector bundles on $M$ and the category of finite projective $R$-modules i.e. vector bundles on $X$.

These facts seem to imply that smooth manifolds may be thought of "as" affine schemes. This observation leads me to ask the following questions:

(1) Do you know of any fruitful consequences or applications of looking at manifolds in this light?

(2) Is there anywhere this identification fundamentally fails?

(3) Is there an algebraic classification for what these rings look like? In particular, if $A$ is an $\mathbb{R}$-algebra then when is $X(\mathbb{R})$ a topological manifold and when can $X(\mathbb{R})$ be given a smooth structure compatible with $\mathcal{O}_{X}$?

(4) What do the "extra" points of $X$ look like? Is there a use for these extra points in manifold theory, the way that generic points have become important in algebraic geometry?

For question (4), I believe that maximal ideals of $R$ should correspond to ultrafilters on $M$ identifying the closed points of $X$ with the Stone-Cech compactification of $M$. What about the other prime ideals?

Many thanks.