I will start with a motivation. Let $X$ be a compat hausdorff space and let $A$ be the ring ($\mathbb{R}$-algebra) of continuous functions $X\to \mathbb{R}$. We define $Y=MaxSpec(A)$ to be the set of maximal ideals of $A$ and we can endow it with the subspace topology induced from $Spec(A)$ with the usual Zariski topology. Now, for each point $x\in X$ the subset $\mathfrak{m}_x\subseteq A$ of functions vanishing at $x$ is a maximal ideal and therefore we can define a function $\mu:X\to Y$ by $\mu(x)=\mathfrak{m}_x$. It is known that $\mu$ is a homeomorphism (so far, this is an exercise in Atiyah- Macdonald).
Now, $X$ can be turned into a locally-ringed space by taking the structure sheaf $\mathcal{O}_X$ to be the sheaf of continuous real functions. For each point $x\in X$ we can look at the stalk $\mathcal{O}_{X,x}$ at $x$ and it turns out (if I am not mistaken) that it is exactly $A_{\mathfrak{m}_x}$ (there is a canonical isomorphism). So, is it possible to turn $Y$ into a locally ringed space such that the stalk at $\mathfrak{m}$ will be exactly $A_\mathfrak{m}$ (like with the usual $spec$)? and if it is, $\mu$ will be an isomorphism of locally-ringed spaces, right? what will $MaxSpec(A)$ be as a locally-ringed space for general rings?
I am sorry that the formulation of the question is not very sharp, its just an idea I am trying to make sense of.