Files
Nexus/samples/Dispov2/plan-overview.md
T
Hartmut 4a5edeef3e
CI / Unit Tests (pull_request) Successful in 5m46s
CI / Lint (pull_request) Failing after 3m49s
CI / E2E Tests (pull_request) Has been skipped
CI / Fresh-Linux Docker Deploy (pull_request) Has been skipped
CI / Assistant Split Regression (pull_request) Failing after 35s
CI / Architecture Guardrails (pull_request) Failing after 2m14s
CI / Typecheck (pull_request) Successful in 4m22s
CI / Build (pull_request) Has been skipped
CI / Release Images (pull_request) Has been skipped
rename(phase 1): CapaKraken → Nexus across code, UI, docs, CI
- @capakraken/* → @nexus/* across 12 packages (root + 11 workspaces),
  1551 import lines migrated via codemod
- User-visible brand strings renamed (emails, page titles, PWA
  manifest, mobile header, MFA backup-codes header, tooltips, signin
  page, invite page, weekly digest, install prompt)
- TOTP issuer "CapaKraken" → "Nexus" (existing secrets still valid;
  re-enrollment relabels them in users' authenticator apps)
- Function rename: assertCapaKrakenDbTarget → assertNexusDbTarget
- LocalStorage migration shim in apps/web/src/app/layout.tsx copies
  capakraken_* → nexus_* on first load (guarded by nexus_migrated_v1
  sentinel; runs once per browser, then never again)
- Service-worker cache name capakraken-v2 → nexus-v2 with one-time
  caches.delete('capakraken-v2') from the same shim
- Email-domain fixtures @capakraken.{dev,app} → @nexus.{dev,app} in
  seed data, e2e specs, SMTP default fallback
- Dockerfile.dev / Dockerfile.prod / all .github/workflows/*.yml
  pnpm --filter @capakraken/* → @nexus/*
- README, CLAUDE.md, LEARNINGS.md, all docs/*.md, .env.example,
  tooling/deploy/.env.production.example brand sweep

Phase 1 deliberately leaves untouched (handled in Phase 3 cutover):
- PostgreSQL DB name "capakraken" and POSTGRES_USER "capakraken"
- Volume names capakraken_pgdata etc.
- Compose project name "capakraken" / "capakraken-prod"
- db-target-guard default expectedDatabase
- env-var CAPAKRAKEN_EXPECTED_DB_NAME
- Container DNS names in docker-compose.ci.yml

Quality gates green: pnpm typecheck (7/7), pnpm test:unit (7/7),
pnpm lint (0 errors), check:exports/imports/architecture all pass.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-21 15:10:44 +02:00

5.8 KiB

Dispo v2 Implementation Plan — Overview

Date: 2026-03-13 Status: Draft Source: MandatoryDispoCategories_V3.xlsx + 20260309_Bi-Weekly_Chargeability_Reporting_Content_Production_V0.943_4Hartmut.xlsx

Goal

Extend Nexus to support chargeability reporting with country-specific SAH (Standard Available Hours), FTE-based capacity, organizational hierarchy, utilization categories, client/WBS management, and a native chargeability report replacing the current Excel workflow.

Plan Documents

# Plan File Core Deliverable
1 Country, SAH & FTE plan-country-sah-fte.md Country/MetroCity models, SAH calculator, FTE-scaled daily hours
2 Org Unit Hierarchy plan-org-unit-hierarchy.md 3-level OrgUnit tree (L5→L6→L7), resource assignment, admin UI
3 Utilization Categories plan-utilization-categories.md UtilizationCategory model on projects (Chg, BD, MD&I, M&O, PD&R, Absence)
4 Client & WBS plan-client-wbs-model.md Client tree (Master→Entity), project-client linking
5 Resource Extensions plan-resource-extensions.md EID attributes, ManagementLevel, ResourceType, Chg Responsibility, derivation rules
6 Chargeability Report plan-chargeability-report.md Native report replacing Excel, forecast from assignments + SAH, SAP import for actuals

Key Design Decisions

SAH as capacity basis

Standard Available Hours = (dailyHours * FTE) * (workingDays - publicHolidays - absence). Country drives daily hours (8h most, 9h India, variable Spain). FTE reduces proportionally.

Resource Type derivation (Option A)

Store only 5 base types in DB: Employee, Freelancer, Apprentice, Intern, Student. Derive reporting types at query time:

  • Production Studios = chgResponsibility = true AND country = Germany
  • Near&Offshore = country NOT Germany AND type = Employee/Freelancer
  • Accenture = chgResponsibility = false
  • Long-term absence = derived from absence system

Derivation rules are configurable in admin (which countries map to which reporting type).

Utilization on projects, not allocations

Each project carries a utilization category (Chg, BD, MD&I, etc.). Hours assigned to a project inherit its category for reporting. Unassigned hours = SAH minus all categorized hours.

Forecast chargeability = derived metric

forecastChg = hours on Chg projects / SAH. No manual chargeability entry — it comes from what Nexus already knows about assignments.

Dependency Order

1. Country/SAH ─────────────────┐
2. OrgUnit Hierarchy ───────────┤
3. Utilization Categories ──────┼──→ 5. Resource Extensions ──→ 6. Chargeability Report
4. Client/WBS ──────────────────┘

Plans 1-4 are independent and can be implemented in parallel. Plan 5 (Resource Extensions) depends on 1-4 for the FK targets. Plan 6 (Chargeability Report) depends on all others.

New Prisma Models Summary

Model Purpose
Country Country with daily working hours and schedule rules
MetroCity City within a country (for public holidays)
OrgUnit Self-referencing 3-level org hierarchy
UtilizationCategory Project classification for hour bucketing
Client Self-referencing client hierarchy (Master → Entity)
ManagementLevelGroup Career level grouping with target chargeability %
ManagementLevel Specific level within a group
ChargeabilitySnapshot Imported SAP actuals for historical reporting

Resource Model Changes Summary

New fields on Resource:

  • enterpriseId (String, unique)
  • countryId → Country
  • metroCityId → MetroCity
  • orgUnitId → OrgUnit (L7)
  • managementLevelGroupId → ManagementLevelGroup
  • managementLevelId → ManagementLevel
  • resourceType (enum: EMPLOYEE, FREELANCER, APPRENTICE, INTERN, STUDENT)
  • chgResponsibility (Boolean, default true)
  • rolledOff (Boolean)
  • departed (Boolean)
  • clientUnitId → Client (primary client for reporting)
  • lcrCents, ucrCents (Int, placeholder for cost rates)

Project Model Changes Summary

New fields on Project:

  • utilizationCategoryId → UtilizationCategory
  • clientId → Client (WBS Client Name)

Open Questions

  1. Resource Type derivation rules: The country→reporting-type mapping should be admin-configurable. Exact admin UI TBD.
  2. Win Probability: The Dispo file mentions it "should contain the value from MMS". Is this relevant for Nexus? If so, it's a field on Project.
  3. LCR/UCR: Cost rate definitions are not yet available. Placeholder fields are included.
  4. SAP import format: What format do SAP period exports come in? CSV? API? Needs clarification for the import mechanism.
  5. FTE history: Currently single fte field. Monthly FTE tracking may be needed if contract changes happen mid-month.