diff --git a/README.md b/README.md index 1a78e81a..3109d182 100644 --- a/README.md +++ b/README.md @@ -1,49 +1,108 @@ -# Practice-OS +
-Aeon is an open-source AI co-owner for independently licensed mental health clinicians (LCSW, LCPC, LMFT, psychologist) running their own private practice in any US state (Illinois rules ship verified; other states are researched and confirmed by the clinician). It helps them get clients faster and takes the business admin off their plate. +# Aeon · Practice-OS -It is practice operations software, not clinical care. It never gives medical or mental health advice, and nothing is sent, posted or booked until the clinician approves it. +**An open-source AI co-owner for solo therapists: find referral partners, draft the outreach, plan the meetings — nothing goes out without your OK.** -**The pitch:** what therapist marketing agencies and practice coaches sell as a monthly service (a new website, ads, search rankings, a plan to move from insurance to private pay), plus the paperwork, as a free AI co-owner that runs on her own computer. She owns all of it. +[![Built with Meta Muse](https://img.shields.io/badge/Built%20with-Meta%20Muse-5B47C9?style=flat-square)](lib/meta.ts) +[![Next.js](https://img.shields.io/badge/Next.js-16-1F1E1D?style=flat-square&logo=nextdotjs)](package.json) +[![Postgres](https://img.shields.io/badge/Postgres-built--in-336791?style=flat-square&logo=postgresql&logoColor=white)](lib/local-db.ts) +[![Hackathon: Meta Global AI Developer Hackathon](https://img.shields.io/badge/Hackathon-Meta%20Global%20AI%20Developer%20Hackathon-2F7A55?style=flat-square)](#built-for-the-meta-global-ai-developer-hackathon) -Practice-OS is built by **Caseload** (a sole proprietorship). +The Referrals page: four tiles (15 partners, 8 to reach out to this week, 1 letter waiting, 2 referrals this month) over a table of [Sample] partners with kind, email, phone, stage and last contact -## Text messages +Every name on screen is fictional [Sample] data for the demo practice, Dana Reyes, LCPC (fictional demo practice). -(The Front Desk helper is paused and hidden in the app for now.) The Front Desk helper texts people who call a practice line and leave a voicemail, to offer times for a free consultation. Scheduling only, never marketing. Reply STOP to opt out, HELP for help. Message and data rates may apply. During the demo, the practice (Reyes Counseling) is fictional and texts go only to the developer's own phone. +
-- [Privacy Policy](docs/privacy-policy.md) -- [Terms & Conditions](docs/terms.md) -- [How SMS opt-in works](docs/sms-opt-in.md) +## Why + +A new private practice fills its caseload through referral relationships: the oncologist down the street, the hospice social worker, the pediatrician, the pastor. Building those means finding the right people, writing to them, calling, meeting for coffee, remembering what they said and following up. A solo therapist has no one to do that work, so it rarely happens. + +Aeon does it with her, on her own computer. It finds the partners, ranks them for her niche with the reasons shown, writes the letters and call scripts, keeps the board and the calendar, and turns a spoken coffee debrief into notes and a follow-up. She approves every outgoing word and sends it herself. + +It is practice operations software, not clinical care. It never gives medical or mental health advice. + +
+Moving through the Referrals tabs: Partners table, then the Board with Found, Reached out, Met and Referring columns, then the Calendar week with a planned coffee +
-## The hackathon demo: Referrals +## What it does -The demo shows one helper end to end: **Referrals**, a relationship engine for the professionals who send a therapist clients (oncologists, hospice and palliative teams, funeral homes, clergy, cancer nonprofits and more). It finds them from public sources, ranks them for her niche with the reasons shown, drafts intro letters she copies and sends herself, and turns a spoken coffee-meeting debrief into a partner profile and a follow-up. Turn it on with `REFERRALS_ONLY_DEMO` in `lib/features.ts`; turn it off to get the full app. The walk-through is in [docs/demo-script.md](docs/demo-script.md). +The hackathon demo runs one helper end to end: **Referrals**, a small CRM for the professionals who send a therapist clients. -## Three helpers +| | | +|---|---| +| **Partners** | One table with stage, email, phone and last contact; tiles for partners, who to reach out to this week, letters waiting and referrals this month. Partners come from public sources (the free NPPES NPI Registry, Medicare's Provider Data Catalog, OpenStreetMap), each with a "Confirmed by" source and the reasons for its tier. | +| **Find email** | Reads the practice's own website for a public address (respects robots.txt, skips directories and social sites, only an address on the practice's own domain, never a guess). Refused for sensitive organizations and anyone on her do-not-contact list. | +| **Call scripts** | Front desk, provider and voicemail scripts built from her practice facts, with Log this call and Draft follow-up email. | +| **Letters** | Intro and follow-up letters drafted for her niche, waiting in Approvals. She approves, copies and sends from her own email; Aeon never sends. | +| **Board** | Found, Reached out, Met, Referring and Not a fit, with the next step on each card. | +| **Calendar** | Day, week and month views to plan coffees, calls and talks with partners. | +| **Overview** | Where referrals come from (dates and counts only, never who), this week's follow-ups and the partners on a map. | +| **Coffee debrief** | She talks for up to three minutes after a meeting. The audio is transcribed in memory, anything about a patient is dropped before the model hears it, and she reviews the partner profile, a suggested new contact and a follow-up email before anything is saved. | +| **Ask Aeon** | A chat on every page ("Who should I reach out to this week?", "Draft a letter to my top 3"). The same tools are exposed through an MCP server (`npm run mcp`), so any agent can use them. | -- **Admin**: everything in one place. A compliance calendar with sourced rules, practice settings she changes by talking to Aeon, client forms, Good Faith Estimates, superbills, an insurance hub by license, credentialing prep, and a Files page with every upload and every document Aeon made. -- **Media**: getting her in front of people. The Grow tab works out how many private-pay clients replace each insurance panel, drafts Google and Facebook/Instagram ads that pass a health-ad policy check, and writes a one-page website she owns. Also her Psychology Today profile and Instagram posts about practice logistics. Nothing is spent or published: she approves, downloads and launches it herself. -- **Referrals**: local referral sources from the NPPES NPI Registry and other public sources, on a map and a ranked list, with outreach letters she copies and sends from her own email. +## Screenshots -## Why not just use a chatbot? +| | | +|---|---| +| Board tab: [Sample] partner cards in Found, Reached out, Met, Referring and Not a fit columns Board | Calendar tab, week of Nov 2 to 8, 2026, with a planned coffee on Thursday Calendar week | +| Overview tab: where referrals come from by partner, this week's follow-ups and a small partner map Overview: where referrals come from | Call script panel for [Sample] Quillmere Oncology Group, front desk script with Log this call and Draft follow-up email Call script | +| Approvals: a [Sample] intro letter waiting, with Approve, Edit then approve and Decline A drafted letter waiting for her OK | Home: Aeon's orb, Good afternoon Dana, the message box with suggestion tiles and today's follow-ups Ask Aeon | +| Map tab: a street map of the North Side of Chicago beside the list of [Sample] partners; the samples have no street address so they show as Chicago only Map (the [Sample] partners have no street address, so they list as "Chicago only") | Onboarding: Aeon's orb and speech bubble on the left, the question What's your name? on the right Onboarding | -A chatbot gives advice. Aeon runs the business side of the practice. +Dark mode versions of each are in [docs/screenshots/readme](docs/screenshots/readme). -- **It works while she's away.** Deadlines are tracked and follow-ups are lined up without anyone asking. -- **It remembers her practice.** Her fees, hours, payers and decisions carry over from one day to the next. -- **Its rules have sources.** Every deadline carries the official link, the quoted rule and the date it was last checked. -- **Its safety is built for therapy.** A plain-code crisis check runs before the model on every message, and Aeon never gives therapy advice. -- **It finishes the paperwork.** Good Faith Estimates, superbills and credentialing forms come out filled in, ready for her to check and submit. -- **It runs on her own computer.** Her records stay in one folder on her machine, with her own accounts and keys. +## Safety by design -## Install +These are plain code, not prompts, and they run whether or not the model behaves. + +- **Approval gate.** Agents and tools only add rows to `approvals`. Nothing is sent, posted or booked until she approves it, and executors (`lib/executors/`) are the only code that acts. Every decision is written to `audit_log`. +- **Crisis check before every model call.** `lib/safety.ts` runs on every message and every debrief transcript. Any mention of self-harm, suicide or danger gets a fixed reply (call or text 988; 911 for emergencies) and an urgent alert, before the model sees anything. +- **Local privacy guard.** `lib/aeon/guard.ts` checks her messages, each tool result, each memory and Aeon's reply: plain-code rules plus a small name-finding model (`lib/aeon/phi-classifier.ts`, bert-base-NER) that runs on her machine. Text is never sent anywhere to be checked, and if the model can't load the text is refused. Until there is a BAA, no client names or details reach the model. +- **No fees or gifts for referrals.** Letters, scripts and debrief notes are checked in plain code (`lib/referrals/value-check.ts`) so nothing of value is ever tied to a referral. +- **`DRY_RUN=true`** makes executors log instead of act. + +This is not a claim of HIPAA compliance. It is a design that keeps client details away from the model and keeps her records on her own computer. + +## How it uses Meta's models + +All calls go through `lib/meta.ts` (base URL `https://api.meta.ai/v1`, her own key), and each one writes a row to `practice_os.model_calls`. + +| Model | What it does here | +|---|---| +| `muse-spark-1.3` | Aeon's chat and tool calls (`lib/aeon/agent.ts`), drafting outreach letters (`lib/referrals/outreach.ts`), filling the partner profile from a cleaned debrief through one tool call (`lib/referrals/debrief.ts`) and the memory reflection pass (`lib/aeon/reflect.ts`). The partner ranking and the call scripts are plain code. | +| `muse-voice-transcribe-1.0` | Transcribes the coffee debrief (`lib/referrals/debrief.ts`) and the dictation mic in the message box. | +| `muse-image-1.0` | Images for the Media helper (`lib/growth/image.ts`, `lib/instagram/graphic.ts`), which is switched off in this demo. | + +## Architecture + +```mermaid +flowchart LR + C[Clinician in the browser] --> UI[Next.js app
Referrals, Approvals, chat] + Agent[Any MCP agent] --> MCP[mcp/server.ts] + UI --> Tools[Aeon tool registry
lib/aeon] + MCP --> Tools + Tools --> Crisis[Crisis check
lib/safety.ts] + Crisis --> Guard[Local privacy guard
rules + on-device NER] + Guard --> Muse[Meta Muse API
lib/meta.ts] + Tools --> DB[(Postgres
built-in or Supabase)] + Tools --> Q[approvals: pending] + Q -->|she approves| Exec[lib/executors] + Exec --> Audit[audit_log] + Tools --> Public[Public sources
NPPES, CMS, OpenStreetMap] +``` -Practice-OS is free and open source, and each practice hosts its own copy. There is no central service. +One npm package: a Next.js App Router app, shared code in `lib/`, and an MCP server that imports the same tools. Without `DATABASE_URL` it runs its own built-in Postgres in `.data/`, listening only on 127.0.0.1. + +## Quick start + +Practice-OS is free and each practice hosts its own copy. There is no central service. Tell any AI coding agent: "install Practice-OS from this repo". It follows [INSTALL.md](INSTALL.md), asks for each account in plain words, and opens the app at http://localhost:3000. Step-by-step guides for each service are in [docs/self-hosting](docs/self-hosting/README.md). -By hand: Node 20 or newer, then +By hand, with Node 20 or newer: ```bash npm install @@ -51,16 +110,34 @@ cp .env.example .env npm run dev ``` -`npm run doctor` says what is set up and what is next. The MCP server: `npm run mcp`. Tests: `npm test`. +`npm run doctor` says what is set up and what is next. Fictional demo data: `npm run db:reset`. MCP server: `npm run mcp`. Tests: `npm test`. -## Roadmap +### The demo + +The walk-through for the video is in [docs/demo-script.md](docs/demo-script.md). The demo practice is fictional: Dana Reyes, LCPC, Reyes Counseling PLLC, Lincoln Park, Chicago. All sample data is labeled [Sample], and letters for the demo go only to the developer's own test inbox, never to real providers. -- Aeon plugs into the business tools you already use (bookkeeping, payroll, storage) through MCP. +## Roadmap -## Demo data +Referrals is the first helper. **Admin** (license and CE calendar, credentialing, Good Faith Estimates, superbills, client forms) and **Media** (Psychology Today profile, a one-page website, practice-logistics posts) are built and switched off for this demo by `REFERRALS_ONLY_DEMO` in [lib/features.ts](lib/features.ts). Set it to `false` to get the full app. -The demo practice is fictional: Dana Reyes, LCPC, Reyes Counseling PLLC, Lincoln Park, Chicago. All sample data is labeled [Sample]. +- Admin's compliance rules each carry a jurisdiction, an official source URL, a quote and a last-checked date. Federal and Illinois rules ship verified; other states are researched by Aeon and marked "Aeon researched, please confirm" until she confirms them. +- Front Desk (practice phone line, voicemail, consult booking) is paused behind `FRONT_DESK_ENABLED`. +- Next: Aeon plugs into the business tools she already uses (bookkeeping, payroll, storage) through MCP. -## Built during the hackathon (Oct 26 - Nov 4, 2026) +## Built for the Meta Global AI Developer Hackathon Everything in this repository was built from scratch during the Meta Global AI Developer Hackathon (Indie track, theme: Build for Your World), October 26 to November 4, 2026. The day-by-day record is in [docs/BUILD_LOG.md](docs/BUILD_LOG.md). + +Practice-OS is built by **Caseload** (a sole proprietorship). + +## Text messages + +The Front Desk helper is paused and hidden in the app for now. When on, it texts people who call a practice line and leave a voicemail, to offer times for a free consultation. Scheduling only, never marketing. Reply STOP to opt out, HELP for help. Message and data rates may apply. During the demo, the practice (Reyes Counseling) is fictional and texts go only to the developer's own phone. + +- [Privacy Policy](docs/privacy-policy.md) +- [Terms & Conditions](docs/terms.md) +- [How SMS opt-in works](docs/sms-opt-in.md) + +## License + +License: to be added. diff --git a/docs/BUILD_LOG.md b/docs/BUILD_LOG.md index f45ef7a9..dfca5901 100644 --- a/docs/BUILD_LOG.md +++ b/docs/BUILD_LOG.md @@ -291,3 +291,4 @@ PTSD") is read joined; "identifying" now needs two details (age, job, place) or - 2026-11-03: Fixed a rare false privacy block on Aeon's own meeting results: about 1 in 200 random approval ids has hex digits that read as a phone number ("...-e18592619355"), so the meeting tool's answer was held back now and then. Ids are now read as "[id]" by the privacy check. The business-only rules for partners named by first name also apply only to her own words (message, memory), never to results the code builds. - 2026-11-03: Weekdays and months are never read as names: a meeting time like "Tue Apr 15, 1:00 pm" in Aeon's answer is no longer blanked to "[name withheld] Apr 15" on machines where the name-finder reads "Tue" as a name. Months that are also first names (May, June, April, Jan) count as dates only next to a day number. - 2026-11-03: Month first names. The name-finder misses a bare "June", "May" or "April" used as a name, so "June no-showed again" and "April's PTSD is worse" passed. Now a capitalized month that is not a date (no day number beside it, no weekday or "in/until/next" before it) in a client or personal sentence refuses, in her message and in memory. "meet in May", "follow up May 5" and a board partner named June Park still pass. +- 2026-11-04: README rewritten as a showcase, following the layout of this week's trending GitHub repos: hero with pitch and badges, why, what it does, screenshots, safety by design, how Meta's models are used (checked against the code), an architecture diagram, quick start, roadmap and the hackathon. New light and dark screenshots of the Referrals tabs, a call script, a drafted letter, the chat and onboarding (fictional [Sample] data only) in docs/screenshots/readme, plus a short Partners, Board, Calendar GIF. diff --git a/docs/screenshots/readme/approval-letter-dark.webp b/docs/screenshots/readme/approval-letter-dark.webp new file mode 100644 index 00000000..5eb430d4 Binary files /dev/null and b/docs/screenshots/readme/approval-letter-dark.webp differ diff --git a/docs/screenshots/readme/approval-letter-light.webp b/docs/screenshots/readme/approval-letter-light.webp new file mode 100644 index 00000000..7f4a6b77 Binary files /dev/null and b/docs/screenshots/readme/approval-letter-light.webp differ diff --git a/docs/screenshots/readme/ask-aeon-dark.webp b/docs/screenshots/readme/ask-aeon-dark.webp new file mode 100644 index 00000000..ef7c12f0 Binary files /dev/null and b/docs/screenshots/readme/ask-aeon-dark.webp differ diff --git a/docs/screenshots/readme/ask-aeon-light.webp b/docs/screenshots/readme/ask-aeon-light.webp new file mode 100644 index 00000000..54f00611 Binary files /dev/null and b/docs/screenshots/readme/ask-aeon-light.webp differ diff --git a/docs/screenshots/readme/board-dark.webp b/docs/screenshots/readme/board-dark.webp new file mode 100644 index 00000000..17a717aa Binary files /dev/null and b/docs/screenshots/readme/board-dark.webp differ diff --git a/docs/screenshots/readme/board-light.webp b/docs/screenshots/readme/board-light.webp new file mode 100644 index 00000000..2b14cf1b Binary files /dev/null and b/docs/screenshots/readme/board-light.webp differ diff --git a/docs/screenshots/readme/calendar-dark.webp b/docs/screenshots/readme/calendar-dark.webp new file mode 100644 index 00000000..d06a24c1 Binary files /dev/null and b/docs/screenshots/readme/calendar-dark.webp differ diff --git a/docs/screenshots/readme/calendar-light.webp b/docs/screenshots/readme/calendar-light.webp new file mode 100644 index 00000000..f94eecc4 Binary files /dev/null and b/docs/screenshots/readme/calendar-light.webp differ diff --git a/docs/screenshots/readme/call-script-dark.webp b/docs/screenshots/readme/call-script-dark.webp new file mode 100644 index 00000000..c9e931fe Binary files /dev/null and b/docs/screenshots/readme/call-script-dark.webp differ diff --git a/docs/screenshots/readme/call-script-light.webp b/docs/screenshots/readme/call-script-light.webp new file mode 100644 index 00000000..cf61b830 Binary files /dev/null and b/docs/screenshots/readme/call-script-light.webp differ diff --git a/docs/screenshots/readme/map-dark.webp b/docs/screenshots/readme/map-dark.webp new file mode 100644 index 00000000..209773f4 Binary files /dev/null and b/docs/screenshots/readme/map-dark.webp differ diff --git a/docs/screenshots/readme/map-light.webp b/docs/screenshots/readme/map-light.webp new file mode 100644 index 00000000..530b42de Binary files /dev/null and b/docs/screenshots/readme/map-light.webp differ diff --git a/docs/screenshots/readme/onboarding-dark.webp b/docs/screenshots/readme/onboarding-dark.webp new file mode 100644 index 00000000..376b5468 Binary files /dev/null and b/docs/screenshots/readme/onboarding-dark.webp differ diff --git a/docs/screenshots/readme/onboarding-light.webp b/docs/screenshots/readme/onboarding-light.webp new file mode 100644 index 00000000..3513b8ce Binary files /dev/null and b/docs/screenshots/readme/onboarding-light.webp differ diff --git a/docs/screenshots/readme/overview-dark.webp b/docs/screenshots/readme/overview-dark.webp new file mode 100644 index 00000000..8ae44199 Binary files /dev/null and b/docs/screenshots/readme/overview-dark.webp differ diff --git a/docs/screenshots/readme/overview-light.webp b/docs/screenshots/readme/overview-light.webp new file mode 100644 index 00000000..37e8e3b1 Binary files /dev/null and b/docs/screenshots/readme/overview-light.webp differ diff --git a/docs/screenshots/readme/partners-dark.webp b/docs/screenshots/readme/partners-dark.webp new file mode 100644 index 00000000..988d7167 Binary files /dev/null and b/docs/screenshots/readme/partners-dark.webp differ diff --git a/docs/screenshots/readme/partners-light.webp b/docs/screenshots/readme/partners-light.webp new file mode 100644 index 00000000..9758f2f6 Binary files /dev/null and b/docs/screenshots/readme/partners-light.webp differ diff --git a/docs/screenshots/readme/referrals-flow.gif b/docs/screenshots/readme/referrals-flow.gif new file mode 100644 index 00000000..8871587a Binary files /dev/null and b/docs/screenshots/readme/referrals-flow.gif differ