Documentation Index
Fetch the complete documentation index at: https://docs.encoreos.io/llms.txt
Use this file to discover all available pages before exploring further.
Last Updated: 2026-01-11
Total Tables: 433
Modules: 9
Overview
This directory contains Entity Relationship Diagrams (ERDs) for all Encore Health OS Platform database modules. Each diagram shows table relationships, foreign keys, and RLS policy coverage.High-Level Architecture
Module ERDs
| Module | Prefix | Tables | ERD Document | Description |
|---|---|---|---|---|
| Platform Foundation | pf_ | 73 | View | Core tenancy, auth, organizations |
| Human Resources | hr_ | 75 | View | Employees, positions, leave, payroll |
| Finance & Accounting | fa_ | 45 | View | GL, invoices, payments, budgets |
| Forms & Workflow | fw_ | 54 | View | Forms, submissions, automations |
| Recovery Housing | rh_ | 51 | View | Residents, beds, episodes, billing |
| Facilities Management | fm_ | 22 | View | Assets, work orders, inventory |
| Governance & Risk | gr_ | 49 | View | Policies, audits, compliance |
| Leadership OS | lo_ | 29 | View | Meetings, goals, KPIs |
| IT Service Management | it_ | 35 | View | Tickets, SLAs, knowledge base |
Cross-Module Dependencies
All modules depend on Platform Foundation (PF) for:- Organization context (
pf_organizations) - User identity (
pf_profiles,pf_user_roles) - Site/location (
pf_sites) - Audit tracking (
pf_audit_logs)
RLS Policy Coverage Summary
| Module | Tables | Full Coverage | Partial | Special |
|---|---|---|---|---|
| PF | 73 | 68 | 3 | 2 |
| HR | 75 | 70 | 4 | 1 |
| FA | 45 | 43 | 2 | 0 |
| FW | 54 | 48 | 4 | 2 |
| RH | 51 | 49 | 2 | 0 |
| FM | 22 | 21 | 1 | 0 |
| GR | 49 | 47 | 2 | 0 |
| LO | 29 | 28 | 1 | 0 |
| IT | 35 | 34 | 1 | 0 |
| Total | 433 | 408 | 20 | 5 |
- Full Coverage: 4 policies (SELECT, INSERT, UPDATE, DELETE)
- Partial: Intentional < 4 policies (audit/version tables)
- Special: Custom access patterns (deny-all, public read, etc.)