Comprehensive app model
Developer map of Tiny Solutions: shipped app, architecture, domain model, deferred surfaces, and final product target.
This is the working model of Tiny Solutions for developers. It names the app we have today, the modules we have partially rebuilt, and the final product target: 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 roadmap, removed surfaces, module boundaries, and implementation files. It still must not include secrets, credentials, real child data, production environment values, or anything that would weaken HIPAA controls.
Status legend
| Status | Meaning |
|---|---|
| Shipped | Present in the app and backed by real code paths. |
| Partial | Real code exists, but the workflow is not yet the full product surface. |
| Removed or deferred | It existed as a direction or partial build and was stripped back or postponed. |
| Final target | Intended end-state capability, not a claim about current availability. |
Product in one picture
Tiny Solutions is one application binary that adapts per agency. Every agency gets the core platform. The modules around it turn on only when the agency does that kind of work.
Current shipped app
The current app is the post-ENG-444 base: authentication, agency setup, minimal child records, members and roles, settings, subscription billing, audit, and security. Some deeper concepts have returned as foundations, especially IFSP plans, authorizations, assignment, care team, document handling, and medical info.
| Area | Status | Current route or code surface |
|---|---|---|
| Marketing and public docs | Shipped | src/app/(marketing), src/app/docs, content/docs |
| Auth and account recovery | Shipped | src/app/(auth), convex/auth.ts, convex/authOrchestrator.ts, convex/authRecovery.ts |
| Agency provisioning | Shipped | convex/lib/tenantProvisioning.ts, convex/agencyConfigs.ts |
| Home | Shipped as onboarding-only | src/app/(dashboard)/home/page.tsx |
| Children list | Shipped | src/app/(dashboard)/children/page.tsx, convex/children.ts |
| Child record | Shipped | src/app/(dashboard)/children/[childId], child tabs for basic info, medical, insurance, documents, notes, activity |
| Referrals | Shipped core flow | src/app/(dashboard)/referrals/new/page.tsx, convex/referrals.ts, convex/referralDrafts.ts |
| Medical info | Shipped | convex/medicalInfo.ts, child Medical Info tab |
| Insurance | Shipped | convex/insurance.ts, convex/childInsurancePolicies.ts, child Insurance tab |
| Documents and notes | Shipped | convex/documents.ts, convex/notes.ts, child Documents and Notes tabs |
| Case activity timeline | Shipped | child record activity surface backed by audit and domain events |
| Members directory | Shipped | src/app/(dashboard)/members/page.tsx, convex/members.ts |
| Admin members console | Shipped | src/app/(dashboard)/settings/members/page.tsx |
| Settings | Shipped | agency, billing, security, sessions, SSO, recovery, audit, document types |
| Subscription billing | Shipped | convex/billing.ts, convex/billingActions.ts, Stripe |
| Audit log | Shipped | convex/audit.ts, convex/lib/withAudit.ts |
| IFSP plans and authorizations | Partial | convex/ifspPlans.ts, convex/authorizations.ts |
| Assignment and care team | Partial | convex/assignment.ts, convex/careTeam.ts |
| Today, payroll, reports | Placeholder or deferred | routes exist, full workflows are not the final product yet |
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.
Route and surface map
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.
Child lifecycle
The current model keeps one child record and changes its posture over time. Referral handling is part of the child lifecycle rather than a separate silo.
Member and access lifecycle
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.
Billing lifecycle
Final product dependency map
The end-state product keeps the current core and adds operational modules around the same agency, child, member, file, and audit foundations.
Module status
| Module | Current status | Final target |
|---|---|---|
| Core | Shipped | Agency, auth, members, child root, storage, audit, billing account, docs, settings. |
| Service coordination | Shipped base, partial full workflow | Referral intake, child record, notes, documents, transition, discharge, SC work queues. |
| Evaluations | Deferred | MDE assignment, scheduling, evaluation documents, outcomes, evaluator workload. |
| Services and providers | Partial foundations | Provider directory, credentials, authorizations, assignments, capacity, service delivery. |
| Billing | Shipped SaaS subscription; claims deferred | Stripe subscription now; final target adds EI claims billing and remittance work. |
| Payroll | Deferred | Pay-rate rules, payable activity, payroll exports, reconciliation. |
| Reports | Deferred | Compliance packets, operational reporting, billing reports, payroll reports. |
| Document operations | Shipped child documents; partial inbox | Final target adds document inbox, library, verification queues, and templates. |
Developer ownership map
| Subsystem | Primary source |
|---|---|
| Docs site | content/docs, src/app/docs, src/components/mdx.tsx, source.config.ts |
| Navigation | src/lib/nav-config.ts, src/components/shared/AppSidebar.tsx |
| App shell | src/app/(dashboard)/layout.tsx, shared shell components |
| Auth | convex/auth.ts, convex/betterAuth, src/lib/auth.ts, src/lib/authKit.ts |
| Agency scope | convex/lib/tenantScope.ts, convex/lib/permissions.ts |
| Children | convex/children.ts, convex/schema/children.ts, src/app/(dashboard)/children |
| Referrals | convex/referrals.ts, convex/referralDrafts.ts, child/referral routes |
| Insurance | convex/insurance.ts, convex/childInsurancePolicies.ts, src/components/insurance |
| Documents | convex/documents.ts, convex/files.ts, convex/documentTypes.ts |
| Notes | convex/notes.ts, convex/notesActions.ts |
| Medical info | convex/medicalInfo.ts, child Medical Info components |
| IFSP and authorizations | convex/ifspPlans.ts, convex/authorizations.ts |
| Assignment and care team | convex/assignment.ts, convex/careTeam.ts |
| Members and roles | convex/members.ts, src/components/members, members routes |
| Billing | convex/billing.ts, convex/billingActions.ts, src/components/billing |
| Audit | convex/audit.ts, convex/lib/withAudit.ts, settings audit route |
| Security settings | sessions, trusted devices, SSO, recovery, assurance, break-glass modules |
| Static guards | scripts/check-*.ts, scripts/guards.ts, docs/enforcement.md |
Invariants developers must preserve
- Public Convex functions use agency-scoped wrappers. Do not expose raw unscoped database reads from public functions.
- Audit logs are append-only. Domain writes log through the established audit helpers and never patch, replace, or delete audit rows.
- Email contains no PHI. Resend messages use opaque links and generic text.
- Convex is the server state path. Dashboard data uses Convex queries and mutations, not ad hoc REST fetches.
- Role and capability checks happen on the server. Browser navigation filtering is only a convenience layer.
- Files are private storage objects with agency-scoped metadata and signed access paths.
- Module visibility is structural. Disabled or deferred modules should be absent or intentionally placeholder-gated, not half-visible as broken workflows.
- Public docs can describe architecture and roadmap, but must never publish credentials, secrets, real PHI, or environment-specific private values.
Removed or deferred surfaces
These are not forgotten. They are named so future rebuilds do not rediscover the same scope accidentally.
| Surface | Current state | Rebuild trigger |
|---|---|---|
| Work queue dashboard | Removed; /home is onboarding-only | Rebuild when daily role-specific work queues are ready. |
| EDI claims billing | Deferred | Rebuild with authorizations, activity, denial handling, and remittance model. |
| Payroll | Deferred | Rebuild after pay-rate and payable-activity concepts are stable. |
| Reports hub | Deferred | Rebuild from audit, billing, payroll, and compliance report requirements. |
| Provider directory | Deferred target | Rebuild when provider agencies or service-delivery workflows need it. |
| Document inbox/library | Partial target | Rebuild when document filing is agency-wide, not only child-local. |
| Verification queue | Deferred target | Rebuild when services, billing, or documents require review workflows. |
| Full clinical tabs | Deferred | Evaluation, follow-ups, flags, meetings, ongoing care, plans, and authorizations return deliberately. |
| Caseload concept | Removed as a standalone concept | Rebuild only if assignment plus child-list views are not enough. |
How to extend this model
When a new module or concept lands, update this page in the same change set as the implementation. Add it to the module status table, the domain model, and the developer ownership map. If it introduces a new lifecycle, add a state diagram. If it introduces a new agency-visible module, update the final product dependency map and the module gates.