chore: full technical rename planarchy → capakraken

Complete rename of all technical identifiers across the codebase:

Package names (11 packages):
- @planarchy/* → @capakraken/* in all package.json, tsconfig, imports

Import statements: 277 files, 548 occurrences replaced

Database & Docker:
- PostgreSQL user/db: planarchy → capakraken
- Docker volumes: planarchy_pgdata → capakraken_pgdata
- Connection strings updated in docker-compose, .env, CI

CI/CD:
- GitHub Actions workflow: all filter commands updated
- Test database credentials updated

Infrastructure:
- Redis channel: planarchy:sse → capakraken:sse
- Logger service name: planarchy-api → capakraken-api
- Anonymization seed updated
- Start/stop/restart scripts updated

Test data:
- Seed emails: @planarchy.dev → @capakraken.dev
- E2E test credentials: all 11 spec files updated
- Email defaults: @planarchy.app → @capakraken.app
- localStorage keys: planarchy_* → capakraken_*

Documentation: 30+ .md files updated

Verification:
- pnpm install: workspace resolution works
- TypeScript: only pre-existing TS2589 (no new errors)
- Engine: 310/310 tests pass
- Staffing: 37/37 tests pass

Co-Authored-By: claude-flow <ruv@ruv.net>
This commit is contained in:
2026-03-27 13:18:09 +01:00
parent f46b38f457
commit cd78f72f33
303 changed files with 938 additions and 878 deletions
+16 -16
View File
@@ -35,10 +35,10 @@ PR opened / pushed
| Job | Command | What it catches |
|-----|---------|----------------|
| **typecheck** | `pnpm --filter @planarchy/web exec tsc --noEmit` | Type errors across the full web app |
| **typecheck** | `pnpm --filter @capakraken/web exec tsc --noEmit` | Type errors across the full web app |
| **lint** | `pnpm lint` | Code style violations, unused imports, etc. |
| **test** | `pnpm test:unit` | Unit test failures in engine, staffing, API, shared |
| **build** | `pnpm --filter @planarchy/web exec next build` | SSR errors, dynamic import issues, bundle problems |
| **build** | `pnpm --filter @capakraken/web exec next build` | SSR errors, dynamic import issues, bundle problems |
| **e2e** | `pnpm test:e2e` | End-to-end user flow regressions |
### Required status checks
@@ -63,13 +63,13 @@ Run these before pushing to catch issues early:
```bash
# Quick check (< 2 min)
pnpm --filter @planarchy/web exec tsc --noEmit && pnpm lint
pnpm --filter @capakraken/web exec tsc --noEmit && pnpm lint
# Full check (< 3 min)
pnpm test:unit
# Full check including build (< 5 min)
pnpm --filter @planarchy/web exec next build
pnpm --filter @capakraken/web exec next build
```
### Pre-commit hook (optional)
@@ -78,7 +78,7 @@ You can add a Git pre-commit hook to run the quick check automatically:
```bash
# .husky/pre-commit
pnpm --filter @planarchy/web exec tsc --noEmit
pnpm --filter @capakraken/web exec tsc --noEmit
pnpm lint
```
@@ -184,20 +184,20 @@ docker compose -f docker-compose.prod.yml exec app \
### Manual deployment (current setup)
Since `planarchy.hartmut-noerenberg.com` runs behind nginx:
Since `capakraken.hartmut-noerenberg.com` runs behind nginx:
```bash
# On the server
cd /home/hartmut/Documents/Copilot/planarchy
git pull origin main
pnpm install
pnpm --filter @planarchy/db exec prisma generate
pnpm --filter @planarchy/web exec next build
pnpm --filter @capakraken/db exec prisma generate
pnpm --filter @capakraken/web exec next build
rm -rf apps/web/.next/cache # clear stale cache
# Restart the app (systemd, pm2, or manual)
fuser -k 3100/tcp 2>/dev/null
PORT=3100 pnpm --filter @planarchy/web start &
PORT=3100 pnpm --filter @capakraken/web start &
```
### nginx configuration
@@ -206,7 +206,7 @@ The existing nginx reverse proxy should forward to port 3100:
```nginx
server {
server_name planarchy.hartmut-noerenberg.com;
server_name capakraken.hartmut-noerenberg.com;
location / {
proxy_pass http://127.0.0.1:3100;
@@ -244,7 +244,7 @@ Errors are automatically captured by the Sentry integration in Next.js.
Point an external monitor (UptimeRobot, Better Stack, etc.) at:
```
https://planarchy.hartmut-noerenberg.com/api/health
https://capakraken.hartmut-noerenberg.com/api/health
```
Alert if status code != 200 for more than 2 consecutive checks.
@@ -257,7 +257,7 @@ Alert if status code != 200 for more than 2 consecutive checks.
TypeScript error in the web app. Run locally:
```bash
pnpm --filter @planarchy/web exec tsc --noEmit
pnpm --filter @capakraken/web exec tsc --noEmit
```
### CI job fails: "test:unit"
@@ -271,7 +271,7 @@ pnpm test:unit
Build error (often `ssr: false` in Server Components, missing exports). Run locally:
```bash
pnpm --filter @planarchy/web exec next build
pnpm --filter @capakraken/web exec next build
```
### CI job fails: "e2e"
@@ -296,9 +296,9 @@ pnpm dev & # or pnpm start for production mode
Usually a stale Prisma client after schema changes:
```bash
pnpm --filter @planarchy/db exec prisma generate
pnpm --filter @capakraken/db exec prisma generate
rm -rf apps/web/.next
pnpm --filter @planarchy/web exec next build
pnpm --filter @capakraken/web exec next build
# Restart the server
```
@@ -306,7 +306,7 @@ pnpm --filter @planarchy/web exec next build
Check the `/api/ready` endpoint:
```bash
curl -s https://planarchy.hartmut-noerenberg.com/api/ready | jq .
curl -s https://capakraken.hartmut-noerenberg.com/api/ready | jq .
```
If `postgres: "error"`, verify: