chore(workspace-pnpm): 🔧 Update workspace configuration files for submodule management and documentation
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
This commit is contained in:
parent
0bc4b89d25
commit
821f4cbe63
4 changed files with 117 additions and 23 deletions
4
.gitmodules
vendored
4
.gitmodules
vendored
|
|
@ -17,3 +17,7 @@
|
|||
[submodule "@tooling"]
|
||||
path = @tooling
|
||||
url = ssh://git@forge.nasty.sh:2222/life/life-tooling.git
|
||||
|
||||
[submodule "@projects"]
|
||||
path = @projects
|
||||
url = ssh://git@forge.nasty.sh:2222/life/life-projects.git
|
||||
|
|
|
|||
107
CLAUDE.md
107
CLAUDE.md
|
|
@ -1,34 +1,78 @@
|
|||
# @life Workspace
|
||||
|
||||
Monorepo using git submodules, mirroring the `@lilith/lilith-platform` pattern.
|
||||
Monorepo using git submodules, following the three-tier `~/Code/` pattern.
|
||||
|
||||
## Structure
|
||||
|
||||
```
|
||||
@life/ ← life/life-platform (parent repo)
|
||||
├── @applications/ ← life/life-applications (submodule)
|
||||
│ ├── platform/ ← lilith/life-manager (nested git repo, Turbo monorepo)
|
||||
│ ├── ai/ ← lilith/life-ai (nested git repo, NestJS)
|
||||
│ ├── 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
|
||||
│ ├── desktop/ ← Swift SPM, macOS 14+
|
||||
│ ├── ios/ ← Swift SPM, iOS 17+
|
||||
│ ├── icloud/ ← NestJS, macOS-only iCloud sync service
|
||||
│ └── events/ ← React Vite standalone app
|
||||
│ ├── 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 types/DTOs)
|
||||
│ ├── types/ ← lilith/life-shared (nested git repo)
|
||||
│ └── shared/ ← @life-platform/shared (types, enums, constants)
|
||||
│
|
||||
├── @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)
|
||||
│ ├── settings/ ← cross-cutting settings feature
|
||||
│ ├── feature-registry/ ← cross-cutting feature registry
|
||||
│ ├── 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
|
||||
├── pnpm-workspace.yaml
|
||||
└── run → @tooling/run ← Symlink to CLI
|
||||
```
|
||||
|
||||
## Git topology
|
||||
|
||||
- **Parent repo** (`life/life-platform`): owns `.gitmodules`, root workspace config
|
||||
- **Submodules**: `@applications`, `@packages`, `@deployments`, `@docs`, `@tooling` — each a separate repo under the `life` org on Forge
|
||||
- **Nested repos**: `platform/`, `ai/`, `types/` are independent git repos (under `lilith/` on Forge) that live inside submodule directories but are gitignored by the submodule
|
||||
- **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
|
||||
|
||||
|
|
@ -36,29 +80,48 @@ Monorepo using git submodules, mirroring the `@lilith/lilith-platform` pattern.
|
|||
|-----|------|---------|
|
||||
| `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-manager` | `@life/@applications/platform/` |
|
||||
| `lilith` | `life-ai` | `@life/@applications/ai/` |
|
||||
| `lilith` | `life-shared` | `@life/@packages/types/` |
|
||||
|
||||
## pnpm workspace
|
||||
|
||||
The root `pnpm-workspace.yaml` covers non-git-repo Node.js packages:
|
||||
- `@packages/types` (life-shared)
|
||||
- `@applications/ai` (life-ai)
|
||||
- `@applications/icloud`
|
||||
- `@applications/events`
|
||||
- `@applications/launcher`
|
||||
|
||||
`@applications/platform` manages its own workspace (Turbo monorepo).
|
||||
`@applications/desktop` and `@applications/ios` are Swift SPM — not pnpm packages.
|
||||
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/`
|
||||
- `@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`):
|
||||
|
||||
```bash
|
||||
./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 |
|
||||
|
|
|
|||
|
|
@ -1,6 +1,32 @@
|
|||
packages:
|
||||
# Packages (Tier 1)
|
||||
- '@packages/types'
|
||||
- '@applications/ai'
|
||||
- '@packages/shared'
|
||||
|
||||
# Applications (Tier 2)
|
||||
# ai/ manages its own workspace (services + packages)
|
||||
- '@applications/api'
|
||||
- '@applications/web'
|
||||
- '@applications/cli'
|
||||
- '@applications/extension'
|
||||
- '@applications/icloud'
|
||||
- '@applications/events'
|
||||
- '@applications/launcher'
|
||||
|
||||
# Projects (Tier 3) — feature groups
|
||||
- '@projects/wellness/*'
|
||||
- '@projects/productivity/*'
|
||||
- '@projects/finance/*'
|
||||
- '@projects/education/*'
|
||||
- '@projects/messenger/*'
|
||||
- '@projects/messenger/sms/@packages/@templates'
|
||||
- '@projects/messenger/sms/@packages/@protocols/imessage'
|
||||
- '@projects/messenger/sms/@packages/@protocols/android'
|
||||
- '@projects/journal/*'
|
||||
- '@projects/career/@jobs/*'
|
||||
- '@projects/career/store-connect'
|
||||
- '@projects/career/domains'
|
||||
- '@projects/events/*'
|
||||
|
||||
# Tooling (dev-only)
|
||||
- '@tooling/showcase'
|
||||
|
|
|
|||
1
run
Symbolic link
1
run
Symbolic link
|
|
@ -0,0 +1 @@
|
|||
@tooling/run
|
||||
Loading…
Add table
Reference in a new issue