ThreadCount Community edition

Uniform stock management for healthcare linen rooms: the coordinator app, the phone counter and the staff app, for your own server. Built from 2d04e45 on 2026-09-15. Licensed under the Functional Source License (FSL-1.1-ALv2).
This commit is contained in:
ThreadCount
2026-09-16 04:04:31 +10:00
commit 8c86c988c1
424 changed files with 53598 additions and 0 deletions
+20
View File
@@ -0,0 +1,20 @@
/* Community edition: there is no billing, so there is no billing mail. The sign-up route still
* calls this when a facility starts a trial, which never happens off the hosted service; every
* function here answers as if nothing was sent. */
import { PRICES } from "@/lib/plan";
export type Rendered = { subject: string; text: string; html: string };
export type FacilityCtx = { facility: string; contact: string };
export type Card = { brand: string; last4: string } | null;
export const PRICE_CENTS = { monthly: PRICES.hostedMonthly * 100, annual: PRICES.hostedAnnual * 100 } as const;
export async function billingRecipients(_facilityId: string): Promise<{ to: string[]; ctx: FacilityCtx }> {
return { to: [], ctx: { facility: "", contact: "" } };
}
export async function sendBillingMail(_facilityId: string, _render: (ctx: FacilityCtx) => Rendered): Promise<number> {
return 0;
}
const empty = (): Rendered => ({ subject: "", text: "", html: "" });
/** Every template name resolves to a renderer that produces an empty message. */
// eslint-disable-next-line @typescript-eslint/no-explicit-any
export const templates: Record<string, (...args: any[]) => Rendered> = new Proxy({}, { get: () => empty });