Data model
The main records in Infra and how they relate, at a high level.
Infra keeps its data in one PostgreSQL database, modelled with Prisma. This page names the main records and how they connect. It is not a field-level reference: read prisma/schema.prisma for that.
People and access
- User: a person, with a role, departments, a manager (Reports to) and whether they are a consultant.
- Role page permissions and user page overrides: what each role sees, and per-person additions and removals.
- Infra API key: a personal key, its scopes, optional engagement limit and expiry. Only a hash of the key is stored.
- Engagement membership: a client person's access to one engagement in the client portal.
- User connector: a person's connection to Granola or Microsoft 365.
Delivery
Client engagement
└── Project (kind: Advisory | Implementation | Managed service; may build on another project)
├── Knowledge container → knowledge items (documents, with transcript and digest)
├── SOWs and the BRD (with drafts and amendments)
├── Plan: requirements, deliverables, milestones, decisions, test cases,
│ agreements, RAID items, client contacts, meetings
├── System build: comp plans, components, interfaces, build objects, and the links between them
├── Work: tasks and questions (action items), each optionally filed under a deliverable or milestone
├── Proposals and intake events (the Events review queue)
├── Events, evidence and decision outcomes (history, sources, plan follow-ups)
├── Team (people and planned hours) and time entries
└── Health runs (the weekly data check)- An engagement holds many projects; a project belongs to exactly one engagement.
- A project's kind chooses its playbook. A predecessor link records that one project builds on another (an Implementation on an Advisory, a Managed service on an Implementation).
- Approved items and proposed changes are separate: a proposal is a pending change to an item, applied or rejected as a whole.
- Items carry stable references such as
REQ-012,DEC-015orMS-002, which people, agents and search use. - Evidence links an item to the quote in a knowledge item that supports or contradicts it.
Sales (DLE)
- Methodology → stage definitions → rubric items and stage thresholds, plus loss reasons, custom fields and the catch-up protocol.
- Deal, with its events, rubric completions, readiness reports, mutual action plan and milestones, margin approvals, override requests, catch-up progress and vendor risk.
- Lead and Contact, before a deal exists.
Other areas
- Marketing: campaigns, content assets, webinars.
- Operations: subscriptions and support tickets.
- Knowledge base: staged wiki pages and page revisions (the wiki itself is served by Forge).
- AskBHG and agents: conversations, messages and saved agent chats.
- Notifications and audit log.