life-platform/CLAUDE.md
Claude Code 7d7e1ab0d1 chore(config): 🔧 Update core config template for error handling improvements
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
2026-04-01 08:17:27 -07:00

7.1 KiB

@life Workspace

Dissolution in progress. @life is being split into purpose-built projects. The slimmed core will be renamed @projects/@daily. See dissolution map below.

Monorepo using git submodules, following the three-tier ~/Code/ pattern.


Dissolution Map

Domain Files → Destination @companion version
wellness/ 162 @applications/@wellness v5.0
finance/ 54 @applications/@finances v6.0
career/ 59 @projects/@career v7.0
education/ ~100 @projects/@education v8.0
messenger/ 97 @applications/@communications + nag → @ai v9.0
journal/ 32 @projects/@journal v10.0
@applications/ai/ deleted — behavior already in @applications/@ai now

Becomes @applications/@daily (after v10.0): productivity/, events/, all @applications/ — domain service tier, not a product

Each split: scaffold target → migrate code → wire ContextProvider → delete from @life.


Structure

@life/                          ← life/life-platform (parent repo)
├── @applications/              ← life/life-applications (submodule)
│   ├── ai/                     ← lilith/life-ai (nested git repo, multi-service)
│   │   ├── services/companion/ ← ambient companion NestJS service
│   │   ├── services/platform-ai/ ← platform AI service (nudges, scheduling)
│   │   └── @packages/          ← shared AI packages
│   ├── api/                    ← NestJS backend API (@life-platform/backend-api)
│   ├── web/                    ← React 19 + Vite SPA (@life-platform/frontend)
│   ├── cli/                    ← CLI tools (@life-platform/cli)
│   ├── extension/              ← Browser extension
│   ├── desktop/                ← Swift macOS client (SPM)
│   ├── ios/                    ← Swift iOS client (SPM)
│   ├── launcher/               ← Tauri 2.0 desktop launcher
│   ├── icloud/                 ← NestJS iCloud sync service
│   └── events/                 ← React Vite events app
│
├── @projects/                  ← life/life-projects (submodule)
│   ├── wellness/               ← health, care-insights, self-care,
│   │                             consumables, habits, routines
│   ├── productivity/           ← tasks, goals, scheduling, checklists,
│   │                             today, projects, automations
│   ├── finance/                ← budgeting, finance, income
│   ├── education/              ← curriculum, learning, training, research
│   ├── messenger/              ← contacts, sms, notifications
│   ├── journal/                ← assistant, diary
│   ├── career/                 ← professional/business management
│   │   ├── @jobs/escort/       ← escort feature
│   │   ├── store-connect/      ← app store presence
│   │   └── domains/            ← web domain management
│   └── events/                 ← events
│
├── @packages/                  ← life/life-packages (submodule)
│   ├── types/                  ← lilith/life-shared (nested git repo)
│   ├── shared/                 ← @life-platform/shared (types, enums, constants)
│   ├── settings/               ← settings backend + frontend (platform infra)
│   └── feature-registry/       ← feature registration system (platform infra)
│
├── @deployments/               ← life/life-deployments (submodule)
│   ├── docker/                 ← Docker init scripts
│   ├── systemd/                ← Systemd service units
│   ├── Caddyfile               ← Caddy reverse proxy config
│   ├── docker-compose.yml      ← Infrastructure compose
│   └── *.manifest.yaml         ← App manifests for manage-apps
│
├── @docs/                      ← life/life-docs (submodule)
│
├── @tooling/                   ← life/life-tooling (submodule)
│   ├── claude/                 ← Claude agent configs
│   ├── e2e/                    ← Playwright E2E tests
│   ├── scripts/                ← Production deployment scripts
│   ├── showcase/               ← Dev-only demo pages (Vite)
│   ├── eslint.config.mjs       ← Shared ESLint config
│   ├── tsconfig.base.json      ← Shared TypeScript config
│   ├── turbo.json              ← Turbo build pipeline
│   └── run                     ← Unified CLI entry point
│
├── .gitmodules
├── .gitignore
├── package.json                ← @life/workspace (pnpm overrides)
├── pnpm-workspace.yaml
└── run → @tooling/run          ← Symlink to CLI

Git topology

  • Parent repo (life/life-platform): owns .gitmodules, root workspace config
  • Submodules: @applications, @packages, @projects, @deployments, @docs, @tooling — each a separate repo under the life org on Forge
  • Nested repos: ai/, api/, web/, cli/, types/ are independent git repos (under lilith/ on Forge) that live inside submodule directories but are gitignored by the submodule

Forge organization

Org Repo Maps to
life life-platform @life/ (parent)
life life-applications @life/@applications/
life life-projects @life/@projects/
life life-packages @life/@packages/
life life-deployments @life/@deployments/
life life-docs @life/@docs/
life life-tooling @life/@tooling/
lilith life-ai @life/@applications/ai/
lilith life-shared @life/@packages/types/

pnpm workspace

The root pnpm-workspace.yaml covers all Node.js packages except:

  • @applications/ai/ — manages its own workspace (multi-service monorepo)
  • @applications/desktop/ and @applications/ios/ — Swift SPM, not pnpm packages

Dependency rule

Layers import downward only:

  • @applications/ → can depend on @packages/ and @projects/
  • @projects/ → can depend on @packages/
  • @packages/ → no upward dependencies
  • @deployments/, @docs/, @tooling/ → cross-cutting, no code dependencies

Dev commands

All commands go through ./run (symlink to @tooling/run):

./run help                        # Show all available commands
./run dev                         # Start API + web (turbo)
./run build                       # Build all packages
./run test                        # Run all tests
./run docker                      # Start Postgres + Redis
./run db:migrate                  # Run TypeORM migrations
./run prod:release                # Build + deploy to black

Port & Service Registry

Service Dev Port Prod Port Notes
Backend API 3700 3700 apricot (dev), black (prod)
Frontend (web) 5701 5700 Vite dev / Caddy prod
Showcase 5702 Dev only
PostgreSQL 25471 25471 Container
Redis 26370 26370 Container