Search + navigation
Find domains, tables, workflows, APIs, files, and guardrails.
This is a local structured index. It is intentionally small and implementation-focused so developers can quickly jump from a concept to the right diagram and source files.
Identity / tenancy / auth
Cognito identities are resolved into app users, tenant memberships, roles, teams, and platform access before any protected API route runs.
Portfolios / workspaces
Workspace portfolios are the operating context for deals, config, maps, documents, CRM views, and analysis.
Pipeline configuration
Portfolio-scoped pipelines, stages, deal types, and metadata shape deal workflows without hard-coded global enums.
Deals
Deals are the central business object: they sit inside a workspace, carry workflow state, link to properties, documents, CRM, tasks, maps, and analysis.
Properties
Reusable tenant property/location records can be linked to deals or grouped in property lists.
Documents / extraction
Documents have versions, generic links to resources, and queued extraction jobs that can be reviewed and applied.
CRM
Tenant CRM companies and contacts are reusable and can be linked to deals with roles such as sponsor, broker, lender, or counsel.
Tasks / comments / activity
Execution work and timeline events are deal-centered today and form the future notifications/inbox backbone.
Maps / explore / analysis
Maps combine app-owned deals/properties with read-only public geospatial/demographic/POI datasets for portfolio maps, deal analysis, and broad market exploration.
Comps
Comps are persisted Dealflow-owned market evidence records, with manual entry, source snapshots, private/workspace visibility, lists, and deal selections.
Sharing / permissions
Resource sharing overlays owner/visibility with explicit grants to users, roles, teams, or tenant-wide principals.
users
App-local identity resolved from Cognito.
tenants
Top-level customer/security boundary.
tenant_users
Active user membership in a tenant.
portfolios
Workspace portfolio container for deals and configuration.
resource_shares
Explicit grants to users, roles, teams, or tenant principals.
pipelines
Portfolio workflow container.
pipeline_stages
Workflow stage definitions and current deal state targets.
deals
Central deal record.
properties
Reusable property/location record with geocode fields.
documents
Document catalog record.
document_extractions
Queued/executing/reviewed extraction job record.
crm_companies
Tenant company/organization CRM record.
tasks
Assignable work item.
comps
Persisted manual comps and source snapshots.
comp_lists
Named private/workspace comp collections.
comp_list_items
Many-to-many comp list membership.
deal_comp_selections
Deal-specific comp review and inclusion state.
public.poi_chain_locations
Large chain POI source used for explore and analysis.
Cognito login -> tenant resolution -> portfolio loading
Browser obtains Cognito ID token; API verifies it, syncs membership, then portfolio APIs return accessible workspace portfolios.
Deal creation -> property linking -> activity
New deal uses portfolio config defaults, optionally creates/links a property, writes stage history, then logs activity.
OM upload -> extraction -> review -> apply
Uploaded PDF becomes a document/version/link; extraction worker processes queued job; reviewed data applies back to deal/property records.
Explore map -> viewport POIs -> vector tiles
Explore uses a list API for the sidebar and authenticated MVT tile APIs for POI and demographic map rendering.
Source comp discovery -> Dealflow snapshot -> deal selection
Deal comp discovery reads public source tables inside a radius or Mapbox isochrone, then saves selected records into dealflow.comps before adding deal-specific selection status.
apps/api/src/app.ts
Hono API mount point and auth boundary.
apps/web/src/components/app-shell.tsx
Main product shell and workspace navigation.
AGENTS.md
Database and agent operating guardrails.