Task lists (Firestore) database schema
Workspaces, their projects and tasks, with due-date queries indexed and finished tasks expiring.
3 collections, 0 references
Opens as a new diagram you can change. Free.
Collections
workspaces
A team's space; roles map user ids to their role.
- idstring not null
- namestring not null
- rolesmap not null
- createdAttimestamp not null
workspaces/projects
Projects inside a workspace.
- idstring not null
- namestring not null
- colourstring
- archivedboolean not null
workspaces/projects/tasks
Tasks; done ones are deleted by a TTL policy a month after.
- idstring not null
- titlestring not null
- assigneeIdstring
- doneboolean not null
- dueAttimestamp
- labelsarray
- purgeAttimestamp
As firestore.indexes.json
The diagram also exports firestore.rules skeleton, TypeScript types and converters, Zod schemas, Sample documents (JSON).
{
"indexes": [
{
"collectionGroup": "tasks",
"queryScope": "COLLECTION_GROUP",
"fields": [
{
"fieldPath": "assigneeId",
"order": "ASCENDING"
},
{
"fieldPath": "done",
"order": "ASCENDING"
},
{
"fieldPath": "dueAt",
"order": "ASCENDING"
}
]
},
{
"collectionGroup": "tasks",
"queryScope": "COLLECTION",
"fields": [
{
"fieldPath": "done",
"order": "ASCENDING"
},
{
"fieldPath": "dueAt",
"order": "ASCENDING"
}
]
}
],
"fieldOverrides": [
{
"collectionGroup": "tasks",
"fieldPath": "purgeAt",
"ttl": true,
"indexes": []
}
]
}
More Work & productivity templates
- Projects & tasksWorkspaces, projects and tasks with assignees, labels and comments.
- Kanban boardBoards with columns of cards, members and checklists.
- CRMCompanies, contacts, deals moving through pipeline stages, and activities.
- Help deskCustomer tickets, threaded messages, agents, SLA policies and tags.
- HR & peopleEmployees in departments and positions, reporting lines, leave and salary history.
- Applicant trackingJob openings, candidates, applications through stages, interviews and scorecards.
- Time trackingClients, projects and tasks with time entries that bill into invoices.
- Calendar & schedulingCalendars, events with attendees, recurrence rules and reminders.
- OKRs & goalsTeams set objectives with measurable key results and regular check-ins.
- Document e-signatureDocuments sent to signers, signature fields, signatures and an audit trail.
Start with one diagram, free
One diagram with two branches, no card needed. Upgrade when your team needs more.