A childcare / nanny business management app. Lil Sprouts helps an in-home caregiver (or small childcare business) manage client families, schedule and track care sessions, log daily reports and incidents, and keep records of payments and expenses for tax time. It is built as an installable PWA so it works well on a phone in the field.
- Families & contacts – manage client families, their children (allergies, medications, special needs, school info), and additional family members with pickup authorization.
- Services – configurable service types (e.g. Childcare, Piano Lesson) with per-service default hourly rates and pricing modes (flat or per-child).
- Care schedules – recurring schedule templates (weekly, biweekly, monthly, or one-time) that generate care sessions.
- Care sessions – scheduled vs. actual times, drop-off/pickup tracking, per-meal counts, status (scheduled → in progress → completed / cancelled), and confirmation flags.
- Session reports – log incidents, accidents, behavior notes, meals, naps, activities, medication, milestones, and general updates, with severity levels and follow-up flags.
- Payments – track amounts, status (pending/paid/overdue), method, invoice numbers, and tax year for income reporting.
- Expenses – standalone business expenses and per-session expenses, with optional categories.
- Reports – dashboards plus income, calendar, and year-end tax views.
- Dashboard – upcoming sessions, recent incidents, hours/earnings widgets (week / month / YTD), and a quick-add session modal.
- Accounts & auth – session-based login for the owner and (optionally) invited family members.
- PWA – installable, with offline app-shell behavior via a service worker.
- SolidStart (Solid + Vinxi) for the full-stack app
- Prisma 7 ORM with the
@prisma/adapter-pgdriver adapter - PostgreSQL database
vite-plugin-pwa/ Workbox for the PWA service worker- TypeScript
- Node.js >= 22
- A PostgreSQL database
- pnpm (this repo uses a
pnpm-lock.yaml/ workspace)
-
Install dependencies
pnpm install
-
Configure environment variables
Create a
.envfile in the project root (it is git-ignored):# PostgreSQL connection string DATABASE_URL="postgresql://user:password@localhost:5432/lilsprouts?schema=public" # Secret used to sign session cookies — set a long random value in production SESSION_SECRET="replace-with-a-long-random-string" # Public origin used to build absolute redirect URLs (production) PUBLIC_ORIGIN="https://your-domain.example"
See Environment variables below for the full list.
-
Set up the database
Generate the Prisma client and run migrations:
pnpm prisma:generate pnpm prisma:migrate
-
Run the dev server
pnpm dev
The app runs at http://localhost:3000. Create the first account via the Register option on the login page.
| Script | Description |
|---|---|
pnpm dev |
Start the Vinxi dev server |
pnpm build |
Generate the Prisma client and build for production |
pnpm start |
Run the built production server |
pnpm prisma:generate |
Generate the Prisma client into src/generated/prisma-client |
pnpm prisma:migrate |
Create/apply a dev migration (prisma migrate dev) |
pnpm prisma:migrate:deploy |
Apply migrations in production (scripts/migrate.js deploy) |
pnpm prisma:migrate:status |
Show migration status (scripts/migrate.js status) |
| Variable | Required | Description |
|---|---|---|
DATABASE_URL |
Yes | PostgreSQL connection string. Supports optional SSL cert params (sslcert=, sslrootcert=, sslkey=), which are resolved to absolute paths at startup. |
SESSION_SECRET |
Yes (prod) | Secret for signing session cookies. A weak default is used if unset — always set this in production. |
PUBLIC_ORIGIN |
Recommended | Absolute public origin used to build redirect URLs. APP_ORIGIN, SITE_URL, and URL are also accepted, as are host-only platform vars (VERCEL_URL, RENDER_EXTERNAL_HOSTNAME, RAILWAY_PUBLIC_DOMAIN). |
NODE_ENV |
No | Set to production in production builds. |
prisma/
schema.prisma # Data model (families, children, sessions, payments, …)
src/
app.tsx # Root component / router shell
middleware/ # Request middleware (URL normalization for Nitro/Vinxi)
components/ # Shared UI (Topbar, ClientTime, …)
routes/ # File-based routes (families, schedule, payments, …)
lib/ # Server data layer (queries/actions) + helpers
db.ts # Prisma client + pg pool setup
server.ts # Auth helpers (login/register/session)
money.ts # Precise currency math (cents-based)
...
generated/prisma-client/ # Generated Prisma client (built artifact)
styles/ # Responsive CSS
public/
manifest.json # PWA manifest
icons/ # PWA icons
app.config.ts # SolidStart + PWA + Prisma externalization config
prisma.config.ts # Prisma datasource/migrations config
ecosystem.config.js # PM2 process config for production
The schema (prisma/schema.prisma) centers on a Family and its related
records:
Family→Child,FamilyMember,CareSchedule,CareSession,Payment,Expense,Document, and assignedServices (viaFamilyService).CareScheduleis a recurring template that producesCareSessions.CareSessionlinks aFamily, aService, optional children, and hasSessionReports,SessionExpenses, andPayments.Useraccounts back the owner login and optional family-member access;Unavailabilityrecords block out the caregiver's calendar.
The default build target is a Node server.
pnpm build
pnpm startA PM2 config is included for running the built server in production:
pm2 start ecosystem.config.jsecosystem.config.js loads environment variables from .env and runs
.output/server/index.mjs. Apply pending migrations on deploy with
pnpm prisma:migrate:deploy.
Security note: This app currently stores user passwords in plaintext and only enforces authentication at the route/UI level (server data functions are not individually gated). Review and harden authentication, password hashing, and
SESSION_SECRETbefore exposing it to real client data.
Private project. All rights reserved unless stated otherwise.