Skip to main content
TinySolutions
TinySolutions
Early InterventionHelpDevelopersProduct‹ Back to sign inDeveloper docsInterface vocabularyComprehensive app model

Comprehensive app model

Developer map of the complete Tiny Solutions product, architecture, and domain model.

This is the target-state model of Tiny Solutions for developers: a multi-agency Early Intervention operating system for service coordination, evaluation, provider work, billing, payroll, reporting, and compliance.

This page is intentionally comprehensive. It can mention implementation maturity, code-area boundaries, and source files. It still must not include secrets, credentials, real child data, production environment values, or anything that would weaken HIPAA controls.

Product in one picture

Tiny Solutions is one complete application. Every agency receives every work area. Server-enforced role, relationship, and minimum-necessary access decide what a person may read or change; configurable feature switches do not.

Mermaid diagramMermaid diagram

Current implementation

The product is in active development with synthetic data only. The target model is implemented directly; there is no compatibility layer for earlier schemas or earlier agency configurations. A service agency stores only the authorization facts it needs to deliver, document, staff, and bill its own services for a child.

AreaStatusCurrent route or code surface
Marketing and public docsShippedsrc/app/(marketing), src/app/docs, content/docs
Auth and account recoveryShippedsrc/app/(auth), convex/auth.ts, convex/authOrchestrator.ts, convex/authRecovery.ts
Agency provisioningShippedconvex/lib/tenantProvisioning.ts, convex/agencyConfigs.ts
HomeShipped as onboarding-onlysrc/app/(dashboard)/home/page.tsx
Children listShippedsrc/app/(dashboard)/children/page.tsx, convex/children.ts
Child recordShippedsrc/app/(dashboard)/children/[childId], child tabs for basic info, medical, insurance, documents, notes, activity
New childShipped core flowsrc/app/(dashboard)/children/new/page.tsx, convex/children.ts, convex/drafts.ts
Medical infoShippedconvex/medicalInfo.ts, child Medical Info tab
InsuranceShippedconvex/insurance.ts, convex/childInsurancePolicies.ts, child Insurance tab
Documents and notesShippedconvex/documents.ts, convex/notes.ts, child Documents and Notes tabs
Case activity timelineShippedchild record activity surface backed by audit and domain events
Member rosterShippedsrc/app/(dashboard)/members/page.tsx, convex/members.ts. Settings Members is a next.config door to /members.
SettingsShippedagency, billing, security, sessions, SSO, recovery, audit, document types
Subscription billingShippedconvex/billing.ts, convex/billingActions.ts, Stripe
Audit logShippedconvex/audit.ts, convex/lib/withAudit.ts
Agency service deliveryActive developmentconvex/serviceDelivery.ts, convex/schema/serviceDelivery.ts
Assignment and coordinator designationActive developmentconvex/assignment.ts, convex/schema/children.ts
Schedule, payroll, reportsAvailable and active development/schedule, /payroll, /reports

Architecture model

The app is a full-stack reactive monolith. Next.js owns routes and UI. Convex is the database, server function layer, storage layer, scheduler, and HTTP endpoint host. Better Auth stores identity data in Convex through its adapter. Stripe and Resend are external services with narrow boundaries.

Mermaid diagramMermaid diagram

Route and surface map

Mermaid diagramMermaid diagram

Domain class model

This is UML-style, but encoded as a Mermaid flowchart so it renders in the docs site. Edge labels carry the multiplicities and relationship meaning.

Mermaid diagramMermaid diagram

Child Stage and Referral

A Child has one Stage. Stage is the Agency's word. Tiny never computes it. The generated Case stage machine lives in docs/state-diagrams.md.

A Referral is a record of what the Agency sent. It has no status of its own (ADR-0021). The Child exists from the first keystroke of a Referral. If the Referral comes back, the Agency records the Initial Service Coordinator authorization. Stage may then move by the Agency mapping. If it does not come back, the Agency changes Stage. Nothing on the Referral changes.

Tiny does not copy EI Hub's Open or Closed referral status, and it does not arm the 45-day clock.

Member and access lifecycle

Mermaid diagramMermaid diagram

Document lifecycle

Documents are file-backed records. The final target keeps the same foundation and adds a richer inbox and library for agency-wide filing work.

Mermaid diagramMermaid diagram

Billing lifecycle

Mermaid diagramMermaid diagram

Product dependency map

All work areas share the same agency, child, member, file, and audit foundations.

Mermaid diagramMermaid diagram

Work-area availability

Every work area is part of the product for every agency. Implementation maturity is not an entitlement boundary and must never hide a destination or produce an upgrade state.

Work areaProduct contract
Child and referral operationsReferral intake, child record, notes, documents, transitions, and role-aware work queues.
EvaluationsMDE assignment, scheduling, evaluation documents, outcomes, and evaluator workload.
Agency service deliveryService authorization facts, amendments, staffing, visits, notes, and reports for this agency only.
BillingSubscription management plus EI claims, remittances, denials, and financial work queues.
PayrollPay-rate rules, payable activity, exports, and reconciliation.
ReportsCompliance, operational, billing, payroll, and audit reports.
Directory and documentsShared professional and agency records, filing, verification, and templates.

Developer ownership map

SubsystemPrimary source
Docs sitecontent/docs, src/app/docs, src/components/mdx.tsx, source.config.ts
Navigationsrc/lib/nav-config.ts, src/components/shared/AppSidebar.tsx
App shellsrc/app/(dashboard)/layout.tsx, shared shell components
Authconvex/auth.ts, convex/betterAuth, src/lib/auth.ts, src/lib/authKit.ts
Agency scopeconvex/lib/tenantScope.ts, convex/lib/permissions.ts
Childrenconvex/children.ts, convex/schema/children.ts, src/app/(dashboard)/children
New childconvex/children.ts, convex/drafts.ts, /children/new
Insuranceconvex/insurance.ts, convex/childInsurancePolicies.ts, src/components/insurance
Documentsconvex/documents.ts, convex/files.ts, convex/documentTypes.ts
Notesconvex/notes.ts, convex/notesActions.ts
Medical infoconvex/medicalInfo.ts, child Medical Info components
Agency service deliveryconvex/serviceDelivery.ts, convex/lib/serviceDelivery, convex/schema/serviceDelivery.ts
Assignment and coordinator designationsconvex/assignment.ts, convex/schema/children.ts
Members and rolesconvex/members.ts, src/components/members, members routes
Billingconvex/billing.ts, convex/billingActions.ts, src/components/billing
Auditconvex/audit.ts, convex/lib/withAudit.ts, settings audit route
Security settingssessions, trusted devices, SSO, recovery, assurance, break-glass access
Static guardsscripts/check-*.ts, scripts/guards.ts, docs/enforcement.md

Invariants developers must preserve

  1. Public Convex functions use agency-scoped wrappers. Do not expose raw unscoped database reads from public functions.
  2. Audit logs are append-only. Domain writes log through the established audit helpers and never patch, replace, or delete audit rows.
  3. Email contains no PHI. Resend messages use opaque links and generic text.
  4. Convex is the server state path. Dashboard data uses Convex queries and mutations, not ad hoc REST fetches.
  5. Role and capability checks happen on the server. Browser navigation filtering is only a convenience layer.
  6. Files are private storage objects with agency-scoped metadata and signed access paths.
  7. The product surface is complete for every agency. Role, relationship, and record authorization may restrict an action; feature switches may not.
  8. Public docs can describe architecture and roadmap, but must never publish credentials, secrets, real PHI, or environment-specific private values.

Implementation maturity

Implementation maturity is tracked in Linear, not encoded as agency configuration. An unfinished flow stays an engineering issue against its final workflow contract; it does not become an enable/disable switch, hidden route, upgrade prompt, compatibility mode, or alternate data model.

How to extend this model

When a new concept lands, update this page in the same change set as the implementation. Add it to the domain model and developer ownership map. If it introduces a new lifecycle, add a state diagram. Every agency receives the complete application; do not introduce agency feature switches.

Interface vocabulary

The closed family set, descriptors, shells, and the guards that fail drift.

On this page

Product in one pictureCurrent implementationArchitecture modelRoute and surface mapDomain class modelChild Stage and ReferralMember and access lifecycleDocument lifecycleBilling lifecycleProduct dependency mapWork-area availabilityDeveloper ownership mapInvariants developers must preserveImplementation maturityHow to extend this model