This document describes a comprehensive database structure for the project, including collections, fields, types, indexes, and relationships.
Database Type: MongoDB (document collections)
Primary Keys: _id (ObjectId) for each document
Field Types: ObjectId, String, Date, Boolean, Number, Array, Object
Stores user accounts and public profile data.
| Field | Type | Required | Description |
|---|---|---|---|
| --- | ---: | :---: | --- |
_id |
ObjectId |
Yes | Primary key |
email |
String |
Yes (unique) | Login email, unique index |
passwordHash |
String |
Yes | Hashed password (not returned to client) |
displayName |
String |
Yes | Public name |
bio |
String |
No | Short biography |
avatarUrl |
String |
No | Link to avatar image |
roles |
Array<String> |
No | e.g. ['admin','moderator'] |
createdAt |
Date |
Yes | Document creation time, index |
lastActiveAt |
Date |
No | Last activity timestamp |
preferences |
Object |
No | Preferences JSON (notifications, theme, etc.) |
Indexes & Notes:
emailcreatedAt and lastActiveAt for queriesGroups or organizations around which meetings and discussions happen.
| Field | Type | Required | Description |
|---|---|---|---|
| --- | ---: | :---: | --- |
_id |
ObjectId |
Yes | Primary key |
name |
String |
Yes | Committee name, indexed |
slug |
String |
Yes (unique) | URL-friendly identifier |
description |
String |
No | Committee description |
visibility |
String |
Yes | public / private / restricted |
ownerId |
ObjectId (Profiles._id) |
Yes | Creator / primary owner reference |
settings |
Object |
No | Committee-level settings (voting rules, etc.) |
createdAt |
Date |
Yes | Creation time |
metadata |
Object |
No | Additional metadata or counts |
Indexes & Notes:
slug and index on nameownerId is a foreign reference to Profiles._id