Restructure code to new architecture.

The frontend is now only capabable of serving up the frontpage and logging in users, creating a new User in the core database.  This is pretty hacky, but will be cleaned up as part of the AuthUser story.
It's always set by the core module to ensure there's always something to 
use for an avatar icon in the web pages.  If no gravatar_email is set, 
it uses the user.id instead.

On 2014-06-18 18:11, Elsa Balderrama wrote:
>
> In modules/core/lib/db.js:
>
> > +    added_by: { type: ObjectId, required: true, ref: 'User' },
> > +    added_at: { type: Date, default: Date.now },
> > +    updated_by: { type: ObjectId, required: true, ref: 'User' },
> > +    updated_at: { type: Date, default: Date.now },
> > +};
> > +
> > +
> > +// Subdocuments
> > +
> > +var profile = {
> > +    name: 'string',
> > +    email: 'string',
> > +    location: 'string',
> > +    website: 'string',
> > +    gravatar_email: 'string',
> > +    gravatar_hash: { type: 'string', required: true },
>
> not pointing out but asking: why is gravatar_hash required?
>
> —
> Reply to this email directly or view it on GitHub 
> <https://github.com/commonsmachinery/catalog/pull/33/files#r13923922>.
>