agentic-dev 0.1.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.agent/prd.json +29 -0
- package/.agent/progress.txt +1 -0
- package/.agent/prompt.md +21 -0
- package/.agent/ralph-loop-state.json +13 -0
- package/.agent/ralph-supervisor-state.json +12 -0
- package/.agent/ralph-supervisor.sh +238 -0
- package/.agent/ralph.sh +305 -0
- package/.agent/runs/README.md +7 -0
- package/.agent/sdd-build-ast-audit.json +13 -0
- package/.claude/CLAUDE.md +44 -0
- package/.claude/agentic-dev.json +3 -0
- package/.claude/agents/ai-dev.md +27 -0
- package/.claude/agents/backend-dev.md +26 -0
- package/.claude/agents/db-dev.md +26 -0
- package/.claude/agents/devops.md +27 -0
- package/.claude/agents/frontend-dev.md +25 -0
- package/.claude/agents/github-ops.md +25 -0
- package/.claude/agents/test-dev.md +26 -0
- package/.claude/agents/uiux-designer.md +25 -0
- package/.claude/settings.json +49 -0
- package/.claude/settings.local.json +8 -0
- package/.claude/skills/commit/SKILL.md +37 -0
- package/.claude/skills/dev-browser/SKILL.md +30 -0
- package/.claude/skills/otro/SKILL.md +43 -0
- package/.claude/skills/planning-with-files/SKILL.md +37 -0
- package/.claude/skills/prd/SKILL.md +27 -0
- package/.claude/skills/ralph-loop/SKILL.md +42 -0
- package/.claude/skills/sdd/SKILL.md +13 -0
- package/.claude/skills/sdd-dev/SKILL.md +71 -0
- package/.claude/skills/sdd-development/SKILL.md +13 -0
- package/.claude/workspace-config.json +3 -0
- package/.codex/agentic-dev.json +3 -0
- package/.codex/agents/README.md +22 -0
- package/.codex/agents/api.toml +11 -0
- package/.codex/agents/architecture.toml +11 -0
- package/.codex/agents/ci.toml +11 -0
- package/.codex/agents/gitops.toml +11 -0
- package/.codex/agents/orchestrator.toml +11 -0
- package/.codex/agents/quality.toml +11 -0
- package/.codex/agents/runtime.toml +11 -0
- package/.codex/agents/security.toml +11 -0
- package/.codex/agents/specs.toml +11 -0
- package/.codex/agents/ui.toml +11 -0
- package/.codex/config.toml +46 -0
- package/.codex/skills/SKILL.md +13 -0
- package/.codex/skills/agents/openai.yaml +4 -0
- package/.codex/skills/commit/SKILL.md +219 -0
- package/.codex/skills/commit/references/commit_examples.md +292 -0
- package/.codex/skills/dev-browser/SKILL.md +211 -0
- package/.codex/skills/dev-browser/bun.lock +443 -0
- package/.codex/skills/dev-browser/package-lock.json +2988 -0
- package/.codex/skills/dev-browser/package.json +31 -0
- package/.codex/skills/dev-browser/references/scraping.md +155 -0
- package/.codex/skills/dev-browser/scripts/start-relay.ts +32 -0
- package/.codex/skills/dev-browser/scripts/start-server.ts +117 -0
- package/.codex/skills/dev-browser/server.sh +24 -0
- package/.codex/skills/dev-browser/src/client.ts +474 -0
- package/.codex/skills/dev-browser/src/index.ts +287 -0
- package/.codex/skills/dev-browser/src/relay.ts +731 -0
- package/.codex/skills/dev-browser/src/snapshot/__tests__/snapshot.test.ts +223 -0
- package/.codex/skills/dev-browser/src/snapshot/browser-script.ts +877 -0
- package/.codex/skills/dev-browser/src/snapshot/index.ts +14 -0
- package/.codex/skills/dev-browser/src/snapshot/inject.ts +13 -0
- package/.codex/skills/dev-browser/src/types.ts +34 -0
- package/.codex/skills/dev-browser/tsconfig.json +36 -0
- package/.codex/skills/dev-browser/vitest.config.ts +12 -0
- package/.codex/skills/otro/SKILL.md +74 -0
- package/.codex/skills/otro/agents/openai.yaml +4 -0
- package/.codex/skills/otro/references/agent-prompts.md +61 -0
- package/.codex/skills/otro/references/contracts.md +146 -0
- package/.codex/skills/otro/references/orchestration-loop.md +51 -0
- package/.codex/skills/otro/references/runtime.md +79 -0
- package/.codex/skills/otro/runs/README.md +11 -0
- package/.codex/skills/otro/schemas/step_plan.schema.json +289 -0
- package/.codex/skills/otro/schemas/task_result.schema.json +142 -0
- package/.codex/skills/otro/schemas/wave_plan.schema.json +4 -0
- package/.codex/skills/otro/scripts/README.md +38 -0
- package/.codex/skills/otro/scripts/bump_validation_header.py +179 -0
- package/.codex/skills/otro/scripts/check_validation_header.py +84 -0
- package/.codex/skills/otro/scripts/common.py +303 -0
- package/.codex/skills/otro/scripts/init_run.sh +68 -0
- package/.codex/skills/otro/scripts/plan_loop.py +8 -0
- package/.codex/skills/otro/scripts/plan_step.py +367 -0
- package/.codex/skills/otro/scripts/plan_wave.py +8 -0
- package/.codex/skills/otro/scripts/reconcile_loop.py +8 -0
- package/.codex/skills/otro/scripts/reconcile_step.py +37 -0
- package/.codex/skills/otro/scripts/reconcile_wave.py +8 -0
- package/.codex/skills/otro/scripts/run_loop.py +300 -0
- package/.codex/skills/otro/scripts/run_loop_step.py +8 -0
- package/.codex/skills/otro/scripts/run_step.py +246 -0
- package/.codex/skills/otro/scripts/run_wave.py +8 -0
- package/.codex/skills/otro/validation/validation.md +15 -0
- package/.codex/skills/planning-with-files/SKILL.md +42 -0
- package/.codex/skills/planning-with-files/agents/openai.yaml +4 -0
- package/.codex/skills/planning-with-files/assets/plan-template.md +37 -0
- package/.codex/skills/planning-with-files/references/plan-rules.md +35 -0
- package/.codex/skills/planning-with-files/scripts/new_plan.sh +65 -0
- package/.codex/skills/prd/SKILL.md +235 -0
- package/.codex/skills/ralph-loop/SKILL.md +46 -0
- package/.codex/skills/ralph-loop/agents/openai.yaml +4 -0
- package/.codex/skills/ralph-loop/references/failure-triage.md +32 -0
- package/.codex/skills/ralph-loop/scripts/loop_until_success.sh +97 -0
- package/.codex/skills/sdd/SKILL.md +184 -0
- package/.codex/skills/sdd/agents/openai.yaml +4 -0
- package/.codex/skills/sdd/references/section-map.md +67 -0
- package/.dockerignore +8 -0
- package/.env.example +50 -0
- package/.gitignore +16 -0
- package/AGENTS.md +78 -0
- package/README.md +83 -47
- package/SDD_SKILL.md +589 -0
- package/bin/agentic-dev.mjs +97 -0
- package/client/admin/.dockerignore +3 -0
- package/client/admin/.env.example +1 -0
- package/client/admin/Dockerfile +16 -0
- package/client/admin/Dockerfile.dev +18 -0
- package/client/admin/README.md +20 -0
- package/client/admin/index.html +12 -0
- package/client/admin/package.json +41 -0
- package/client/admin/postcss.config.js +6 -0
- package/client/admin/scripts/ui-parity-admin-adapter.mjs +65 -0
- package/client/admin/src/api/alerts.ts +33 -0
- package/client/admin/src/api/client.ts +71 -0
- package/client/admin/src/api/orders.ts +33 -0
- package/client/admin/src/api/support.ts +11 -0
- package/client/admin/src/app/App.tsx +23 -0
- package/client/admin/src/auth/AuthProvider.tsx +122 -0
- package/client/admin/src/auth/ProtectedRoute.tsx +22 -0
- package/client/admin/src/auth/auth-client.ts +38 -0
- package/client/admin/src/auth/types.ts +18 -0
- package/client/admin/src/components/AdminNotificationsDrawer.tsx +162 -0
- package/client/admin/src/components/AdminShell.tsx +76 -0
- package/client/admin/src/components/ui/button.tsx +34 -0
- package/client/admin/src/components/ui/input.tsx +21 -0
- package/client/admin/src/lib/cn.ts +6 -0
- package/client/admin/src/lib/specRouteCatalog.json +30 -0
- package/client/admin/src/lib/specScreens.json +22 -0
- package/client/admin/src/main.tsx +17 -0
- package/client/admin/src/pages/AdminDashboardPage.tsx +171 -0
- package/client/admin/src/pages/AdminLoginPage.tsx +75 -0
- package/client/admin/src/pages/AdminQueuePage.tsx +107 -0
- package/client/admin/src/pages/AdminSupportPage.tsx +61 -0
- package/client/admin/src/styles/globals.css +17 -0
- package/client/admin/src/theme-vars.ts +18 -0
- package/client/admin/src/theme.ts +25 -0
- package/client/admin/src/vite-env.d.ts +1 -0
- package/client/admin/tailwind.config.js +8 -0
- package/client/admin/tsconfig.json +25 -0
- package/client/admin/vite.config.ts +12 -0
- package/client/landing/.dockerignore +3 -0
- package/client/landing/.env.example +1 -0
- package/client/landing/Dockerfile +16 -0
- package/client/landing/Dockerfile.dev +18 -0
- package/client/landing/README.md +18 -0
- package/client/landing/index.html +12 -0
- package/client/landing/package.json +41 -0
- package/client/landing/postcss.config.js +6 -0
- package/client/landing/scripts/ui-parity-landing-adapter.mjs +65 -0
- package/client/landing/src/App.tsx +21 -0
- package/client/landing/src/api/catalog.ts +30 -0
- package/client/landing/src/api/client.ts +30 -0
- package/client/landing/src/auth/AuthProvider.tsx +122 -0
- package/client/landing/src/auth/ProtectedRoute.tsx +22 -0
- package/client/landing/src/auth/auth-client.ts +38 -0
- package/client/landing/src/auth/types.ts +18 -0
- package/client/landing/src/components/LandingShell.tsx +34 -0
- package/client/landing/src/lib/specRouteCatalog.json +23 -0
- package/client/landing/src/lib/specScreens.json +17 -0
- package/client/landing/src/main.tsx +17 -0
- package/client/landing/src/pages/LandingHomePage.tsx +215 -0
- package/client/landing/src/pages/LandingLoginPage.tsx +90 -0
- package/client/landing/src/pages/LandingWorkspacePage.tsx +126 -0
- package/client/landing/src/styles/globals.css +17 -0
- package/client/landing/src/theme-vars.ts +16 -0
- package/client/landing/src/theme.ts +21 -0
- package/client/landing/src/vite-env.d.ts +1 -0
- package/client/landing/tailwind.config.js +8 -0
- package/client/landing/tsconfig.json +25 -0
- package/client/landing/vite.config.ts +12 -0
- package/client/mobile/.dockerignore +2 -0
- package/client/mobile/.env.example +1 -0
- package/client/mobile/Dockerfile +16 -0
- package/client/mobile/Dockerfile.dev +18 -0
- package/client/mobile/README.md +19 -0
- package/client/mobile/index.html +12 -0
- package/client/mobile/package.json +42 -0
- package/client/mobile/postcss.config.js +6 -0
- package/client/mobile/scripts/ui-parity-mobile-adapter.mjs +67 -0
- package/client/mobile/src/App.tsx +1 -0
- package/client/mobile/src/api/client.ts +62 -0
- package/client/mobile/src/api/fulfillment.ts +55 -0
- package/client/mobile/src/api/shipping.ts +56 -0
- package/client/mobile/src/app/App.tsx +23 -0
- package/client/mobile/src/auth/AuthProvider.tsx +122 -0
- package/client/mobile/src/auth/ProtectedRoute.tsx +27 -0
- package/client/mobile/src/auth/auth-client.ts +38 -0
- package/client/mobile/src/auth/types.ts +18 -0
- package/client/mobile/src/components/InShell.tsx +74 -0
- package/client/mobile/src/components/ui/button.tsx +35 -0
- package/client/mobile/src/components/ui/card.tsx +15 -0
- package/client/mobile/src/components/ui/input.tsx +21 -0
- package/client/mobile/src/lib/cn.ts +6 -0
- package/client/mobile/src/lib/specRouteCatalog.json +26 -0
- package/client/mobile/src/lib/specScreens.json +22 -0
- package/client/mobile/src/lib/useSpeechRecognitionInput.ts +271 -0
- package/client/mobile/src/main.tsx +17 -0
- package/client/mobile/src/pages/DashboardPage.tsx +172 -0
- package/client/mobile/src/pages/FulfillmentPage.tsx +138 -0
- package/client/mobile/src/pages/LoginPage.tsx +74 -0
- package/client/mobile/src/pages/ShippingPage.tsx +338 -0
- package/client/mobile/src/styles/globals.css +23 -0
- package/client/mobile/src/theme-vars.ts +16 -0
- package/client/mobile/src/theme.ts +21 -0
- package/client/mobile/src/vite-env.d.ts +1 -0
- package/client/mobile/tailwind.config.js +8 -0
- package/client/mobile/tsconfig.json +25 -0
- package/client/mobile/vite.config.ts +12 -0
- package/client/platform/.dockerignore +3 -0
- package/client/platform/.env.example +1 -0
- package/client/platform/Dockerfile +16 -0
- package/client/platform/Dockerfile.dev +18 -0
- package/client/platform/README.md +47 -0
- package/client/platform/index.html +12 -0
- package/client/platform/package.json +42 -0
- package/client/platform/postcss.config.js +6 -0
- package/client/platform/scripts/ui-parity-platform-adapter.mjs +66 -0
- package/client/platform/src/api/client.ts +30 -0
- package/client/platform/src/api/orders.ts +42 -0
- package/client/platform/src/app/App.tsx +21 -0
- package/client/platform/src/auth/AuthProvider.tsx +122 -0
- package/client/platform/src/auth/ProtectedRoute.tsx +22 -0
- package/client/platform/src/auth/auth-client.ts +38 -0
- package/client/platform/src/auth/types.ts +18 -0
- package/client/platform/src/components/AppShell.tsx +59 -0
- package/client/platform/src/components/ui/button.tsx +35 -0
- package/client/platform/src/components/ui/card.tsx +7 -0
- package/client/platform/src/components/ui/input.tsx +21 -0
- package/client/platform/src/lib/cn.ts +6 -0
- package/client/platform/src/lib/specRouteCatalog.json +23 -0
- package/client/platform/src/lib/specScreens.json +17 -0
- package/client/platform/src/main.tsx +17 -0
- package/client/platform/src/pages/DashboardPage.tsx +158 -0
- package/client/platform/src/pages/LoginPage.tsx +72 -0
- package/client/platform/src/pages/OrdersPage.tsx +123 -0
- package/client/platform/src/styles/globals.css +17 -0
- package/client/platform/src/theme-vars.ts +18 -0
- package/client/platform/src/theme.ts +25 -0
- package/client/platform/src/vite-env.d.ts +1 -0
- package/client/platform/tailwind.config.js +8 -0
- package/client/platform/tsconfig.json +25 -0
- package/client/platform/vite.config.ts +12 -0
- package/compose.yml +206 -0
- package/infra/compose/.env.dev.example +28 -0
- package/infra/compose/.env.prod.example +29 -0
- package/infra/compose/README.md +35 -0
- package/infra/compose/dev.yml +125 -0
- package/infra/compose/prod.yml +126 -0
- package/infra/terraform/README.md +34 -0
- package/infra/terraform/aws/data/.terraform.lock.hcl +25 -0
- package/infra/terraform/aws/data/README.md +18 -0
- package/infra/terraform/aws/data/main.tf +147 -0
- package/infra/terraform/aws/data/outputs.tf +14 -0
- package/infra/terraform/aws/data/variables.tf +57 -0
- package/infra/terraform/aws/data/versions.tf +10 -0
- package/infra/terraform/aws/domain/.terraform.lock.hcl +25 -0
- package/infra/terraform/aws/domain/README.md +20 -0
- package/infra/terraform/aws/domain/env/dev.tfvars.example +6 -0
- package/infra/terraform/aws/domain/env/prod.tfvars.example +7 -0
- package/infra/terraform/aws/domain/main.tf +149 -0
- package/infra/terraform/aws/domain/outputs.tf +29 -0
- package/infra/terraform/aws/domain/variables.tf +58 -0
- package/infra/terraform/aws/domain/versions.tf +10 -0
- package/infra/terraform/openstack/README.md +38 -0
- package/infra/terraform/openstack/dev/.terraform.lock.hcl +24 -0
- package/infra/terraform/openstack/dev/README.md +18 -0
- package/infra/terraform/openstack/dev/main.tf +49 -0
- package/infra/terraform/openstack/dev/providers.tf +15 -0
- package/infra/terraform/openstack/dev/terraform.tfvars.example +54 -0
- package/infra/terraform/openstack/dev/variables.tf +210 -0
- package/infra/terraform/openstack/dev/versions.tf +10 -0
- package/infra/terraform/openstack/modules/environment_host/main.tf +143 -0
- package/infra/terraform/openstack/modules/environment_host/outputs.tf +25 -0
- package/infra/terraform/openstack/modules/environment_host/templates/docker-host-user-data.sh.tftpl +40 -0
- package/infra/terraform/openstack/modules/environment_host/variables.tf +145 -0
- package/infra/terraform/openstack/modules/environment_host/versions.tf +7 -0
- package/infra/terraform/openstack/prod/.terraform.lock.hcl +24 -0
- package/infra/terraform/openstack/prod/README.md +18 -0
- package/infra/terraform/openstack/prod/main.tf +49 -0
- package/infra/terraform/openstack/prod/providers.tf +15 -0
- package/infra/terraform/openstack/prod/terraform.tfvars.example +55 -0
- package/infra/terraform/openstack/prod/variables.tf +210 -0
- package/infra/terraform/openstack/prod/versions.tf +10 -0
- package/infra/terraform/openstack/server/.terraform.lock.hcl +45 -0
- package/infra/terraform/openstack/server/README.md +47 -0
- package/infra/terraform/openstack/server/main.tf +161 -0
- package/infra/terraform/openstack/server/outputs.tf +30 -0
- package/infra/terraform/openstack/server/providers.tf +30 -0
- package/infra/terraform/openstack/server/templates/server-user-data.sh.tftpl +50 -0
- package/infra/terraform/openstack/server/variables.tf +233 -0
- package/infra/terraform/openstack/server/zz_aspace.auto.tfvars.example.json +29 -0
- package/lib/scaffold.mjs +379 -0
- package/package.json +33 -12
- package/pnpm-workspace.yaml +2 -0
- package/scripts/dev/audit_sdd_build_ast.py +277 -0
- package/sdd/01_planning/01_feature/INDEX.md +16 -0
- package/sdd/01_planning/01_feature/README.md +76 -0
- package/sdd/01_planning/01_feature/alerts_feature_spec.md +55 -0
- package/sdd/01_planning/01_feature/auth_feature_spec.md +57 -0
- package/sdd/01_planning/01_feature/catalog_feature_spec.md +61 -0
- package/sdd/01_planning/01_feature/fulfillment_feature_spec.md +58 -0
- package/sdd/01_planning/01_feature/health_feature_spec.md +52 -0
- package/sdd/01_planning/01_feature/inventory_feature_spec.md +60 -0
- package/sdd/01_planning/01_feature/order_feature_spec.md +63 -0
- package/sdd/01_planning/01_feature/shipping_feature_spec.md +55 -0
- package/sdd/01_planning/01_feature/support_feature_spec.md +53 -0
- package/sdd/01_planning/01_feature/user_feature_spec.md +54 -0
- package/sdd/01_planning/02_screen/INDEX.md +13 -0
- package/sdd/01_planning/02_screen/README.md +41 -0
- package/sdd/01_planning/02_screen/admin_screen_spec.pdf +0 -0
- package/sdd/01_planning/02_screen/assets/README.md +16 -0
- package/sdd/01_planning/02_screen/assets/example/README.md +13 -0
- package/sdd/01_planning/02_screen/landing_screen_spec.pdf +0 -0
- package/sdd/01_planning/02_screen/mobile_screen_spec.pdf +0 -0
- package/sdd/01_planning/02_screen/platform_screen_spec.pdf +0 -0
- package/sdd/01_planning/03_architecture/INDEX.md +9 -0
- package/sdd/01_planning/03_architecture/README.md +25 -0
- package/sdd/01_planning/03_architecture/architecture_document_structure.md +77 -0
- package/sdd/01_planning/03_architecture/backend/README.md +10 -0
- package/sdd/01_planning/03_architecture/frontend/README.md +12 -0
- package/sdd/01_planning/03_architecture/infra/README.md +10 -0
- package/sdd/01_planning/03_architecture/tech-research/README.md +4 -0
- package/sdd/01_planning/03_architecture/templates_system_architecture.md +84 -0
- package/sdd/01_planning/04_data/INDEX.md +4 -0
- package/sdd/01_planning/04_data/README.md +10 -0
- package/sdd/01_planning/04_data/templates_data_modeling.md +119 -0
- package/sdd/01_planning/05_api/README.md +12 -0
- package/sdd/01_planning/05_api/templates_api_contract.md +90 -0
- package/sdd/01_planning/06_iac/README.md +11 -0
- package/sdd/01_planning/06_iac/templates_runtime_and_cicd_baseline.md +46 -0
- package/sdd/01_planning/07_integration/README.md +11 -0
- package/sdd/01_planning/07_integration/templates_frontend_api_integration.md +46 -0
- package/sdd/01_planning/08_nonfunctional/README.md +7 -0
- package/sdd/01_planning/09_security/README.md +7 -0
- package/sdd/01_planning/10_test/README.md +12 -0
- package/sdd/01_planning/10_test/templates_test_strategy.md +60 -0
- package/sdd/01_planning/INDEX.md +19 -0
- package/sdd/01_planning/README.md +17 -0
- package/sdd/02_plan/01_feature/README.md +34 -0
- package/sdd/02_plan/01_feature/_feature_todo_template.md +29 -0
- package/sdd/02_plan/02_screen/INDEX.md +19 -0
- package/sdd/02_plan/02_screen/README.md +39 -0
- package/sdd/02_plan/02_screen/_screen_todo_template.md +60 -0
- package/sdd/02_plan/03_architecture/README.md +23 -0
- package/sdd/02_plan/03_architecture/architecture_document_governance.md +40 -0
- package/sdd/02_plan/03_architecture/build_ast_runtime_tree_governance.md +53 -0
- package/sdd/02_plan/03_architecture/repository_governance.md +39 -0
- package/sdd/02_plan/03_architecture/runtime_and_structure_governance.md +38 -0
- package/sdd/02_plan/03_architecture/templates-hexagonal-template-architecture.md +9 -0
- package/sdd/02_plan/03_architecture/toolchain_governance.md +98 -0
- package/sdd/02_plan/04_data/README.md +5 -0
- package/sdd/02_plan/05_api/README.md +5 -0
- package/sdd/02_plan/06_iac/README.md +11 -0
- package/sdd/02_plan/06_iac/dev_runtime_delivery.md +36 -0
- package/sdd/02_plan/06_iac/template_runtime_delivery.md +50 -0
- package/sdd/02_plan/07_integration/README.md +5 -0
- package/sdd/02_plan/07_integration/frontend_live_integration.md +31 -0
- package/sdd/02_plan/08_nonfunctional/README.md +5 -0
- package/sdd/02_plan/08_nonfunctional/repository_hygiene.md +26 -0
- package/sdd/02_plan/09_security/README.md +5 -0
- package/sdd/02_plan/10_test/README.md +11 -0
- package/sdd/02_plan/10_test/regression_verification.md +39 -0
- package/sdd/02_plan/10_test/templates/README.md +8 -0
- package/sdd/02_plan/10_test/templates/ui_parity_platform_contract.template.yaml +23 -0
- package/sdd/02_plan/10_test/verification_strategy.md +43 -0
- package/sdd/02_plan/99_generated/from_planning/ui_parity/.gitkeep +1 -0
- package/sdd/02_plan/README.md +40 -0
- package/sdd/03_build/01_feature/README.md +20 -0
- package/sdd/03_build/01_feature/domain/README.md +3 -0
- package/sdd/03_build/01_feature/domain/account_and_access.md +20 -0
- package/sdd/03_build/01_feature/domain/catalog_and_inventory.md +20 -0
- package/sdd/03_build/01_feature/domain/ordering_and_fulfillment.md +21 -0
- package/sdd/03_build/01_feature/domain/support_and_observability.md +21 -0
- package/sdd/03_build/01_feature/domain_surfaces.md +28 -0
- package/sdd/03_build/01_feature/service/README.md +3 -0
- package/sdd/03_build/01_feature/service/admin_surface.md +15 -0
- package/sdd/03_build/01_feature/service/landing_surface.md +13 -0
- package/sdd/03_build/01_feature/service/mobile_surface.md +14 -0
- package/sdd/03_build/01_feature/service/platform_surface.md +14 -0
- package/sdd/03_build/02_screen/README.md +25 -0
- package/sdd/03_build/02_screen/_screen_build_template.md +26 -0
- package/sdd/03_build/02_screen/admin/README.md +5 -0
- package/sdd/03_build/02_screen/landing/README.md +5 -0
- package/sdd/03_build/02_screen/mobile/README.md +5 -0
- package/sdd/03_build/02_screen/platform/README.md +5 -0
- package/sdd/03_build/03_architecture/README.md +10 -0
- package/sdd/03_build/03_architecture/architecture_document_governance.md +30 -0
- package/sdd/03_build/03_architecture/build_ast_runtime_tree_governance.md +24 -0
- package/sdd/03_build/03_architecture/repository_governance.md +18 -0
- package/sdd/03_build/03_architecture/toolchain_governance.md +36 -0
- package/sdd/03_build/06_iac/README.md +3 -0
- package/sdd/03_build/06_iac/dev_runtime_delivery.md +10 -0
- package/sdd/03_build/06_iac/template_runtime_delivery.md +49 -0
- package/sdd/03_build/07_integration/README.md +3 -0
- package/sdd/03_build/07_integration/frontend_live_integration.md +11 -0
- package/sdd/03_build/08_nonfunctional/README.md +3 -0
- package/sdd/03_build/08_nonfunctional/repository_hygiene.md +10 -0
- package/sdd/03_build/10_test/README.md +9 -0
- package/sdd/03_build/10_test/regression_verification.md +16 -0
- package/sdd/03_build/10_test/verification_harness.md +11 -0
- package/sdd/03_build/README.md +35 -0
- package/sdd/04_verify/01_feature/README.md +5 -0
- package/sdd/04_verify/01_feature/domain_verification.md +14 -0
- package/sdd/04_verify/01_feature/service_verification.md +22 -0
- package/sdd/04_verify/02_screen/README.md +6 -0
- package/sdd/04_verify/02_screen/_screen_verify_template.md +20 -0
- package/sdd/04_verify/02_screen/admin/README.md +4 -0
- package/sdd/04_verify/02_screen/landing/README.md +4 -0
- package/sdd/04_verify/02_screen/mobile/README.md +4 -0
- package/sdd/04_verify/02_screen/platform/README.md +4 -0
- package/sdd/04_verify/03_architecture/README.md +10 -0
- package/sdd/04_verify/03_architecture/architecture_document_governance.md +15 -0
- package/sdd/04_verify/03_architecture/build_ast_runtime_tree_governance.md +28 -0
- package/sdd/04_verify/03_architecture/repository_governance.md +16 -0
- package/sdd/04_verify/03_architecture/toolchain_governance.md +58 -0
- package/sdd/04_verify/06_iac/README.md +3 -0
- package/sdd/04_verify/06_iac/dev_runtime_delivery.md +10 -0
- package/sdd/04_verify/06_iac/template_runtime_delivery.md +42 -0
- package/sdd/04_verify/07_integration/README.md +3 -0
- package/sdd/04_verify/07_integration/frontend_live_integration.md +16 -0
- package/sdd/04_verify/08_nonfunctional/README.md +3 -0
- package/sdd/04_verify/08_nonfunctional/repository_hygiene.md +14 -0
- package/sdd/04_verify/10_test/README.md +9 -0
- package/sdd/04_verify/10_test/regression_verification.md +16 -0
- package/sdd/04_verify/10_test/ui_parity/README.md +4 -0
- package/sdd/04_verify/10_test/ui_parity/loop_runs/.gitkeep +0 -0
- package/sdd/04_verify/10_test/ui_parity/reference/.gitkeep +0 -0
- package/sdd/04_verify/10_test/ui_parity/staged_runs/.gitkeep +0 -0
- package/sdd/04_verify/10_test/verification_harness.md +17 -0
- package/sdd/04_verify/README.md +22 -0
- package/sdd/05_operate/01_runbooks/.gitkeep +1 -0
- package/sdd/05_operate/01_runbooks/README.md +4 -0
- package/sdd/05_operate/02_delivery_status/README.md +4 -0
- package/sdd/05_operate/02_delivery_status/service_status.md +16 -0
- package/sdd/05_operate/README.md +12 -0
- package/sdd/99_toolchain/01_automation/.gitkeep +1 -0
- package/sdd/99_toolchain/01_automation/README.md +76 -0
- package/sdd/99_toolchain/01_automation/agentic-dev/analyze_proof_results.py +132 -0
- package/sdd/99_toolchain/01_automation/agentic-dev/analyze_route_gap.py +85 -0
- package/sdd/99_toolchain/01_automation/agentic-dev/assets/repo-contract.template.json +75 -0
- package/sdd/99_toolchain/01_automation/agentic-dev/bootstrap_frontend_parity.sh +84 -0
- package/sdd/99_toolchain/01_automation/agentic-dev/init_frontend_parity.sh +33 -0
- package/sdd/99_toolchain/01_automation/agentic-dev/init_repo_contract.sh +51 -0
- package/sdd/99_toolchain/01_automation/agentic-dev/repo-contract.json +76 -0
- package/sdd/99_toolchain/01_automation/agentic-dev/resolve_frontend_target.py +52 -0
- package/sdd/99_toolchain/01_automation/agentic-dev/resolve_repo_contract.py +56 -0
- package/sdd/99_toolchain/01_automation/agentic-dev/run_frontend_target.sh +100 -0
- package/sdd/99_toolchain/01_automation/agentic-dev/run_repo_phase.sh +140 -0
- package/sdd/99_toolchain/01_automation/agentic-dev/validate_json_schema.py +39 -0
- package/sdd/99_toolchain/01_automation/agentic-parity-harness-design.md +291 -0
- package/sdd/99_toolchain/01_automation/assets/admin_screen_capture/dashboard.png +0 -0
- package/sdd/99_toolchain/01_automation/assets/admin_screen_capture/login.png +0 -0
- package/sdd/99_toolchain/01_automation/assets/admin_screen_capture/queue.png +0 -0
- package/sdd/99_toolchain/01_automation/assets/admin_screen_capture/support.png +0 -0
- package/sdd/99_toolchain/01_automation/assets/landing_screen_capture/home.png +0 -0
- package/sdd/99_toolchain/01_automation/assets/landing_screen_capture/login.png +0 -0
- package/sdd/99_toolchain/01_automation/assets/landing_screen_capture/workspace.png +0 -0
- package/sdd/99_toolchain/01_automation/assets/mobile_screen_capture/dashboard.png +0 -0
- package/sdd/99_toolchain/01_automation/assets/mobile_screen_capture/fulfillment.png +0 -0
- package/sdd/99_toolchain/01_automation/assets/mobile_screen_capture/login.png +0 -0
- package/sdd/99_toolchain/01_automation/assets/platform_screen_capture/dashboard.png +0 -0
- package/sdd/99_toolchain/01_automation/assets/platform_screen_capture/login.png +0 -0
- package/sdd/99_toolchain/01_automation/assets/platform_screen_capture/orders.png +0 -0
- package/sdd/99_toolchain/01_automation/build_asset_recipes.py +10 -0
- package/sdd/99_toolchain/01_automation/build_screen_spec_pdf.py +427 -0
- package/sdd/99_toolchain/01_automation/capture_screen_assets.mjs +148 -0
- package/sdd/99_toolchain/01_automation/harness-layout.md +34 -0
- package/sdd/99_toolchain/01_automation/parity-execution-tooling-design.md +319 -0
- package/sdd/99_toolchain/01_automation/playwright_exactness_manifest.py +21 -0
- package/sdd/99_toolchain/01_automation/run_playwright_exactness.py +87 -0
- package/sdd/99_toolchain/01_automation/screen_spec_manifest.py +321 -0
- package/sdd/99_toolchain/01_automation/spec_asset_builder.py +274 -0
- package/sdd/99_toolchain/01_automation/ui-contract-projection.md +79 -0
- package/sdd/99_toolchain/01_automation/ui-parity/README.md +60 -0
- package/sdd/99_toolchain/01_automation/ui-parity/cli/extract-reference-pages.mjs +2 -0
- package/sdd/99_toolchain/01_automation/ui-parity/cli/materialize-reference-assets.mjs +58 -0
- package/sdd/99_toolchain/01_automation/ui-parity/cli/normalize-reference-assets.mjs +2 -0
- package/sdd/99_toolchain/01_automation/ui-parity/cli/route-gap-report.mjs +187 -0
- package/sdd/99_toolchain/01_automation/ui-parity/cli/run-proof.mjs +50 -0
- package/sdd/99_toolchain/01_automation/ui-parity/cli/scaffold-contract.mjs +62 -0
- package/sdd/99_toolchain/01_automation/ui-parity/cli/upload-parity1.mjs +2 -0
- package/sdd/99_toolchain/01_automation/ui-parity/contracts/collector-metadata.schema.json +33 -0
- package/sdd/99_toolchain/01_automation/ui-parity/contracts/proof-result.schema.json +76 -0
- package/sdd/99_toolchain/01_automation/ui-parity/contracts/route-gap-report.schema.json +95 -0
- package/sdd/99_toolchain/01_automation/ui-parity/core/capture-runner.mjs +55 -0
- package/sdd/99_toolchain/01_automation/ui-parity/core/load-adapter.mjs +25 -0
- package/sdd/99_toolchain/01_automation/ui-parity/core/load-contract.mjs +81 -0
- package/sdd/99_toolchain/01_automation/ui-parity/core/paths.mjs +23 -0
- package/sdd/99_toolchain/01_automation/ui-parity/core/proof-runner.mjs +255 -0
- package/sdd/99_toolchain/01_automation/ui-parity/interfaces/ui-parity-artifact-layout.md +23 -0
- package/sdd/99_toolchain/01_automation/ui-parity/interfaces/ui-parity-proof-interface.md +60 -0
- package/sdd/99_toolchain/01_automation/ui-parity/interfaces/ui-parity-route-gap-interface.md +82 -0
- package/sdd/99_toolchain/01_automation/ui-parity/runtime/playwright-runtime.mjs +16 -0
- package/sdd/99_toolchain/01_automation/ui-parity/runtime/static-runtime.mjs +6 -0
- package/sdd/99_toolchain/02_policies/.gitkeep +1 -0
- package/sdd/99_toolchain/02_policies/build-ast-governance-policy.md +22 -0
- package/sdd/99_toolchain/02_policies/compose-runtime-baseline-policy.md +24 -0
- package/sdd/99_toolchain/02_policies/convention-storage-policy.md +26 -0
- package/sdd/99_toolchain/02_policies/main-push-before-dev-deploy-policy.md +27 -0
- package/sdd/99_toolchain/02_policies/otro-orchestration-policy.md +30 -0
- package/sdd/99_toolchain/02_policies/regression-verification-policy.md +22 -0
- package/sdd/99_toolchain/03_templates/.gitkeep +1 -0
- package/sdd/99_toolchain/03_templates/asset_recipe_manifest.example.py +38 -0
- package/sdd/99_toolchain/03_templates/generated_assets/README.md +11 -0
- package/sdd/99_toolchain/03_templates/generated_assets/example-brand-lockup.svg +3 -0
- package/sdd/99_toolchain/03_templates/generated_assets/example-brand-mark.svg +3 -0
- package/sdd/99_toolchain/03_templates/generated_assets/example-brand-wordmark.svg +3 -0
- package/sdd/99_toolchain/03_templates/playwright_exactness_manifest.example.py +21 -0
- package/sdd/99_toolchain/README.md +23 -0
- package/sdd/README.md +21 -0
- package/server/.dockerignore +4 -0
- package/server/.env.example +19 -0
- package/server/Dockerfile +22 -0
- package/server/Dockerfile.dev +19 -0
- package/server/README.md +33 -0
- package/server/__init__.py +0 -0
- package/server/api/__init__.py +1 -0
- package/server/api/http/__init__.py +4 -0
- package/server/api/http/app.py +53 -0
- package/server/api/http/router.py +24 -0
- package/server/config.py +52 -0
- package/server/contexts/__init__.py +12 -0
- package/server/contexts/alerts/__init__.py +1 -0
- package/server/contexts/alerts/application/__init__.py +13 -0
- package/server/contexts/alerts/application/services.py +41 -0
- package/server/contexts/alerts/contracts/__init__.py +3 -0
- package/server/contexts/alerts/contracts/http/__init__.py +3 -0
- package/server/contexts/alerts/contracts/http/router.py +37 -0
- package/server/contexts/alerts/domain/__init__.py +15 -0
- package/server/contexts/alerts/domain/models.py +29 -0
- package/server/contexts/alerts/infrastructure/__init__.py +11 -0
- package/server/contexts/alerts/infrastructure/repository.py +41 -0
- package/server/contexts/auth/__init__.py +1 -0
- package/server/contexts/auth/application/__init__.py +3 -0
- package/server/contexts/auth/application/ports.py +10 -0
- package/server/contexts/auth/application/services.py +64 -0
- package/server/contexts/auth/contracts/__init__.py +4 -0
- package/server/contexts/auth/contracts/http/__init__.py +4 -0
- package/server/contexts/auth/contracts/http/dependencies.py +37 -0
- package/server/contexts/auth/contracts/http/router.py +19 -0
- package/server/contexts/auth/domain/__init__.py +3 -0
- package/server/contexts/auth/domain/models.py +24 -0
- package/server/contexts/auth/infrastructure/__init__.py +4 -0
- package/server/contexts/auth/infrastructure/adapters/memory.py +19 -0
- package/server/contexts/auth/infrastructure/adapters/mongodb.py +24 -0
- package/server/contexts/auth/infrastructure/adapters/sqlalchemy.py +74 -0
- package/server/contexts/auth/infrastructure/repository.py +28 -0
- package/server/contexts/catalog/__init__.py +1 -0
- package/server/contexts/catalog/application/__init__.py +28 -0
- package/server/contexts/catalog/application/ports.py +15 -0
- package/server/contexts/catalog/application/services.py +154 -0
- package/server/contexts/catalog/contracts/__init__.py +3 -0
- package/server/contexts/catalog/contracts/http/__init__.py +3 -0
- package/server/contexts/catalog/contracts/http/router.py +60 -0
- package/server/contexts/catalog/domain/__init__.py +45 -0
- package/server/contexts/catalog/domain/models.py +113 -0
- package/server/contexts/catalog/infrastructure/__init__.py +4 -0
- package/server/contexts/catalog/infrastructure/adapters/memory.py +62 -0
- package/server/contexts/catalog/infrastructure/repository.py +8 -0
- package/server/contexts/fulfillment/__init__.py +1 -0
- package/server/contexts/fulfillment/application/__init__.py +13 -0
- package/server/contexts/fulfillment/application/ports.py +20 -0
- package/server/contexts/fulfillment/application/services.py +85 -0
- package/server/contexts/fulfillment/contracts/__init__.py +3 -0
- package/server/contexts/fulfillment/contracts/http/__init__.py +3 -0
- package/server/contexts/fulfillment/contracts/http/router.py +40 -0
- package/server/contexts/fulfillment/domain/__init__.py +25 -0
- package/server/contexts/fulfillment/domain/models.py +73 -0
- package/server/contexts/fulfillment/infrastructure/__init__.py +13 -0
- package/server/contexts/fulfillment/infrastructure/adapters/memory.py +43 -0
- package/server/contexts/fulfillment/infrastructure/repository.py +97 -0
- package/server/contexts/health/__init__.py +1 -0
- package/server/contexts/health/application/__init__.py +3 -0
- package/server/contexts/health/application/services.py +2 -0
- package/server/contexts/health/contracts/__init__.py +3 -0
- package/server/contexts/health/contracts/http/__init__.py +3 -0
- package/server/contexts/health/contracts/http/router.py +10 -0
- package/server/contexts/inventory/__init__.py +1 -0
- package/server/contexts/inventory/application/__init__.py +28 -0
- package/server/contexts/inventory/application/ports.py +11 -0
- package/server/contexts/inventory/application/services.py +214 -0
- package/server/contexts/inventory/contracts/__init__.py +3 -0
- package/server/contexts/inventory/contracts/http/__init__.py +3 -0
- package/server/contexts/inventory/contracts/http/router.py +82 -0
- package/server/contexts/inventory/domain/__init__.py +33 -0
- package/server/contexts/inventory/domain/models.py +93 -0
- package/server/contexts/inventory/infrastructure/__init__.py +4 -0
- package/server/contexts/inventory/infrastructure/adapters/memory.py +24 -0
- package/server/contexts/inventory/infrastructure/repository.py +8 -0
- package/server/contexts/orders/__init__.py +1 -0
- package/server/contexts/orders/application/__init__.py +19 -0
- package/server/contexts/orders/application/services.py +127 -0
- package/server/contexts/orders/contracts/__init__.py +3 -0
- package/server/contexts/orders/contracts/http/__init__.py +3 -0
- package/server/contexts/orders/contracts/http/router.py +82 -0
- package/server/contexts/orders/domain/__init__.py +29 -0
- package/server/contexts/orders/domain/models.py +95 -0
- package/server/contexts/orders/infrastructure/__init__.py +7 -0
- package/server/contexts/orders/infrastructure/repository.py +104 -0
- package/server/contexts/shipping/__init__.py +1 -0
- package/server/contexts/shipping/application/__init__.py +13 -0
- package/server/contexts/shipping/application/services.py +92 -0
- package/server/contexts/shipping/contracts/__init__.py +3 -0
- package/server/contexts/shipping/contracts/http/__init__.py +3 -0
- package/server/contexts/shipping/contracts/http/router.py +40 -0
- package/server/contexts/shipping/domain/__init__.py +19 -0
- package/server/contexts/shipping/domain/models.py +48 -0
- package/server/contexts/shipping/infrastructure/__init__.py +9 -0
- package/server/contexts/shipping/infrastructure/repository.py +50 -0
- package/server/contexts/support/__init__.py +1 -0
- package/server/contexts/support/application/__init__.py +13 -0
- package/server/contexts/support/application/services.py +29 -0
- package/server/contexts/support/contracts/__init__.py +3 -0
- package/server/contexts/support/contracts/http/__init__.py +3 -0
- package/server/contexts/support/contracts/http/router.py +40 -0
- package/server/contexts/support/domain/__init__.py +13 -0
- package/server/contexts/support/domain/models.py +27 -0
- package/server/contexts/support/infrastructure/__init__.py +11 -0
- package/server/contexts/support/infrastructure/repository.py +70 -0
- package/server/contexts/user/__init__.py +1 -0
- package/server/contexts/user/application/__init__.py +3 -0
- package/server/contexts/user/application/ports.py +11 -0
- package/server/contexts/user/application/services.py +44 -0
- package/server/contexts/user/contracts/__init__.py +3 -0
- package/server/contexts/user/contracts/http/__init__.py +3 -0
- package/server/contexts/user/contracts/http/router.py +26 -0
- package/server/contexts/user/domain/__init__.py +3 -0
- package/server/contexts/user/domain/models.py +22 -0
- package/server/contexts/user/infrastructure/__init__.py +3 -0
- package/server/contexts/user/infrastructure/adapters/memory.py +27 -0
- package/server/contexts/user/infrastructure/adapters/mongodb.py +41 -0
- package/server/contexts/user/infrastructure/adapters/sqlalchemy.py +94 -0
- package/server/contexts/user/infrastructure/factory.py +28 -0
- package/server/data/README.md +24 -0
- package/server/data/bootstrap/alerts.json +38 -0
- package/server/data/bootstrap/auth_accounts.json +18 -0
- package/server/data/bootstrap/catalog_products.json +179 -0
- package/server/data/bootstrap/fulfillment_events.json +5 -0
- package/server/data/bootstrap/fulfillment_notes.json +5 -0
- package/server/data/bootstrap/fulfillment_tasks.json +50 -0
- package/server/data/bootstrap/inventory_levels.json +80 -0
- package/server/data/bootstrap/orders.json +62 -0
- package/server/data/bootstrap/shipping_shipments.json +50 -0
- package/server/data/bootstrap/support_faqs.json +26 -0
- package/server/data/bootstrap/users.json +20 -0
- package/server/data/bootstrap_loader.py +15 -0
- package/server/docker-entrypoint.sh +56 -0
- package/server/main.py +3 -0
- package/server/pyproject.toml +36 -0
- package/server/shared/__init__.py +1 -0
- package/server/shared/application/__init__.py +3 -0
- package/server/shared/application/health.py +2 -0
- package/server/shared/infrastructure/__init__.py +10 -0
- package/server/shared/infrastructure/runtime.py +6 -0
- package/server/shared/infrastructure/security.py +33 -0
- package/server/tests/e2e/test_domain_feature_flows.py +483 -0
- package/server/tests/test_health.py +49 -0
- package/server/uv.lock +1169 -0
- package/bin/agentic-dev.js +0 -9
- package/src/cli.js +0 -37
- package/src/init-command.js +0 -230
- package/src/lib/command.js +0 -14
- package/src/lib/fs.js +0 -92
- package/src/lib/git.js +0 -57
- package/src/lib/github.js +0 -77
- package/src/lib/prompt.js +0 -52
- package/src/lib/system.js +0 -15
- package/src/lib/template.js +0 -143
|
@@ -0,0 +1,338 @@
|
|
|
1
|
+
import { AlertTriangle, ArrowUpRight, CircleCheckBig, Truck } from "lucide-react";
|
|
2
|
+
import { useEffect, useState } from "react";
|
|
3
|
+
import { Link } from "react-router-dom";
|
|
4
|
+
|
|
5
|
+
import {
|
|
6
|
+
fetchShipments,
|
|
7
|
+
fetchShippingOverview,
|
|
8
|
+
updateShipmentStatus,
|
|
9
|
+
type ShipmentSummary,
|
|
10
|
+
type ShippingOverviewResponse,
|
|
11
|
+
} from "@/api/shipping";
|
|
12
|
+
import { useAuth } from "@/auth/AuthProvider";
|
|
13
|
+
import { Button } from "@/components/ui/button";
|
|
14
|
+
import { Card } from "@/components/ui/card";
|
|
15
|
+
|
|
16
|
+
function shippingStatusClassName(status: string) {
|
|
17
|
+
if (status === "Delivered") {
|
|
18
|
+
return "bg-[#dff3ec] text-[var(--in-accent)]";
|
|
19
|
+
}
|
|
20
|
+
if (status === "Delayed") {
|
|
21
|
+
return "bg-[#ffe2d7] text-[#c4663a]";
|
|
22
|
+
}
|
|
23
|
+
if (status === "Out for delivery") {
|
|
24
|
+
return "bg-[#e9f4ff] text-[#245f92]";
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
return "bg-[#fff0d8] text-[#b56a1f]";
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
function shippingActionPayload(status: string) {
|
|
31
|
+
if (status === "Delayed") {
|
|
32
|
+
return {
|
|
33
|
+
label: "재개",
|
|
34
|
+
body: {
|
|
35
|
+
status: "In transit",
|
|
36
|
+
last_event: "재배차 완료",
|
|
37
|
+
eta: "2026.03.14 20:30",
|
|
38
|
+
},
|
|
39
|
+
variant: "secondary" as const,
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
if (status === "Delivered") {
|
|
44
|
+
return null;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
return {
|
|
48
|
+
label: "완료",
|
|
49
|
+
body: {
|
|
50
|
+
status: "Delivered",
|
|
51
|
+
last_event: "고객 인수 완료",
|
|
52
|
+
eta: "2026.03.14 19:10",
|
|
53
|
+
},
|
|
54
|
+
variant: "default" as const,
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export function ShippingPage() {
|
|
59
|
+
const { token } = useAuth();
|
|
60
|
+
const [overview, setOverview] = useState<ShippingOverviewResponse | null>(null);
|
|
61
|
+
const [shipments, setShipments] = useState<ShipmentSummary[]>([]);
|
|
62
|
+
const [loading, setLoading] = useState(true);
|
|
63
|
+
const [error, setError] = useState<string | null>(null);
|
|
64
|
+
const [pendingShipmentId, setPendingShipmentId] = useState<string | null>(null);
|
|
65
|
+
|
|
66
|
+
useEffect(() => {
|
|
67
|
+
const accessToken = token?.access_token;
|
|
68
|
+
if (!accessToken) {
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
71
|
+
const currentAccessToken = accessToken;
|
|
72
|
+
|
|
73
|
+
let cancelled = false;
|
|
74
|
+
|
|
75
|
+
async function loadShippingData() {
|
|
76
|
+
setLoading(true);
|
|
77
|
+
setError(null);
|
|
78
|
+
|
|
79
|
+
try {
|
|
80
|
+
const [overviewResponse, shipmentResponse] = await Promise.all([
|
|
81
|
+
fetchShippingOverview(currentAccessToken),
|
|
82
|
+
fetchShipments(currentAccessToken),
|
|
83
|
+
]);
|
|
84
|
+
if (!cancelled) {
|
|
85
|
+
setOverview(overviewResponse);
|
|
86
|
+
setShipments(shipmentResponse);
|
|
87
|
+
}
|
|
88
|
+
} catch (nextError) {
|
|
89
|
+
if (!cancelled) {
|
|
90
|
+
const message =
|
|
91
|
+
nextError instanceof Error ? nextError.message : "Request failed";
|
|
92
|
+
setError(message);
|
|
93
|
+
setOverview(null);
|
|
94
|
+
setShipments([]);
|
|
95
|
+
}
|
|
96
|
+
} finally {
|
|
97
|
+
if (!cancelled) {
|
|
98
|
+
setLoading(false);
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
void loadShippingData();
|
|
104
|
+
|
|
105
|
+
return () => {
|
|
106
|
+
cancelled = true;
|
|
107
|
+
};
|
|
108
|
+
}, [token?.access_token]);
|
|
109
|
+
|
|
110
|
+
async function handleShipmentAction(shipment: ShipmentSummary) {
|
|
111
|
+
const accessToken = token?.access_token;
|
|
112
|
+
if (!accessToken) {
|
|
113
|
+
return;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
const action = shippingActionPayload(shipment.status);
|
|
117
|
+
if (!action) {
|
|
118
|
+
return;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
setPendingShipmentId(shipment.shipment_id);
|
|
122
|
+
setError(null);
|
|
123
|
+
|
|
124
|
+
try {
|
|
125
|
+
await updateShipmentStatus(
|
|
126
|
+
shipment.shipment_id,
|
|
127
|
+
accessToken,
|
|
128
|
+
action.body,
|
|
129
|
+
);
|
|
130
|
+
const [overviewResponse, shipmentResponse] = await Promise.all([
|
|
131
|
+
fetchShippingOverview(accessToken),
|
|
132
|
+
fetchShipments(accessToken),
|
|
133
|
+
]);
|
|
134
|
+
setOverview(overviewResponse);
|
|
135
|
+
setShipments(shipmentResponse);
|
|
136
|
+
} catch (nextError) {
|
|
137
|
+
const message =
|
|
138
|
+
nextError instanceof Error ? nextError.message : "Request failed";
|
|
139
|
+
setError(message);
|
|
140
|
+
} finally {
|
|
141
|
+
setPendingShipmentId(null);
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
return (
|
|
146
|
+
<div className="grid gap-6 xl:grid-cols-[1fr_320px]">
|
|
147
|
+
<Card className="overflow-hidden shadow-[0_18px_48px_rgba(25,54,46,0.06)]">
|
|
148
|
+
<div className="border-b border-[var(--in-border)] px-6 py-5">
|
|
149
|
+
<div className="flex flex-wrap items-start justify-between gap-4">
|
|
150
|
+
<div>
|
|
151
|
+
<h2 className="text-xl font-black text-[var(--in-text)]">
|
|
152
|
+
Shipping operations
|
|
153
|
+
</h2>
|
|
154
|
+
<p className="mt-2 text-sm text-[var(--in-muted)]">
|
|
155
|
+
출고 이후 배송 상태, ETA, 마지막 이벤트를 운영자가 바로 갱신하는
|
|
156
|
+
downstream 배송 surface다.
|
|
157
|
+
</p>
|
|
158
|
+
</div>
|
|
159
|
+
<Link
|
|
160
|
+
className="inline-flex items-center gap-2 rounded-full bg-[var(--in-accent-soft)] px-3 py-2 text-sm font-semibold text-[var(--in-accent)]"
|
|
161
|
+
to="/fulfillment"
|
|
162
|
+
>
|
|
163
|
+
Fulfillment board
|
|
164
|
+
<ArrowUpRight className="h-4 w-4" />
|
|
165
|
+
</Link>
|
|
166
|
+
</div>
|
|
167
|
+
</div>
|
|
168
|
+
|
|
169
|
+
<table className="w-full border-collapse text-sm">
|
|
170
|
+
<thead className="bg-[#faf6ef] text-left text-[var(--in-muted)]">
|
|
171
|
+
<tr>
|
|
172
|
+
{["Shipment", "Carrier", "Status", "ETA", "Action"].map((cell) => (
|
|
173
|
+
<th
|
|
174
|
+
key={cell}
|
|
175
|
+
className="border-b border-[var(--in-border)] px-6 py-4 font-semibold"
|
|
176
|
+
>
|
|
177
|
+
{cell}
|
|
178
|
+
</th>
|
|
179
|
+
))}
|
|
180
|
+
</tr>
|
|
181
|
+
</thead>
|
|
182
|
+
<tbody>
|
|
183
|
+
{loading ? (
|
|
184
|
+
<tr>
|
|
185
|
+
<td
|
|
186
|
+
className="border-b border-[var(--in-border)] px-6 py-4 text-[var(--in-muted)]"
|
|
187
|
+
colSpan={5}
|
|
188
|
+
>
|
|
189
|
+
배송 shipment를 불러오는 중입니다.
|
|
190
|
+
</td>
|
|
191
|
+
</tr>
|
|
192
|
+
) : null}
|
|
193
|
+
{error ? (
|
|
194
|
+
<tr>
|
|
195
|
+
<td
|
|
196
|
+
className="border-b border-[var(--in-border)] px-6 py-4 text-[#9d4d26]"
|
|
197
|
+
colSpan={5}
|
|
198
|
+
>
|
|
199
|
+
{error}
|
|
200
|
+
</td>
|
|
201
|
+
</tr>
|
|
202
|
+
) : null}
|
|
203
|
+
{!loading && !error && !shipments.length ? (
|
|
204
|
+
<tr>
|
|
205
|
+
<td
|
|
206
|
+
className="border-b border-[var(--in-border)] px-6 py-4 text-[var(--in-muted)]"
|
|
207
|
+
colSpan={5}
|
|
208
|
+
>
|
|
209
|
+
현재 표시할 shipment가 없습니다.
|
|
210
|
+
</td>
|
|
211
|
+
</tr>
|
|
212
|
+
) : null}
|
|
213
|
+
{shipments.map((shipment) => {
|
|
214
|
+
const action = shippingActionPayload(shipment.status);
|
|
215
|
+
return (
|
|
216
|
+
<tr key={shipment.shipment_id}>
|
|
217
|
+
<td className="border-b border-[var(--in-border)] px-6 py-4">
|
|
218
|
+
<div className="font-semibold text-[var(--in-accent)]">
|
|
219
|
+
{shipment.shipment_id}
|
|
220
|
+
</div>
|
|
221
|
+
<div className="mt-1 text-xs text-[var(--in-muted)]">
|
|
222
|
+
{shipment.order_id} · {shipment.destination}
|
|
223
|
+
</div>
|
|
224
|
+
<div className="mt-1 text-xs text-[var(--in-muted)]">
|
|
225
|
+
{shipment.tracking_number}
|
|
226
|
+
</div>
|
|
227
|
+
</td>
|
|
228
|
+
<td className="border-b border-[var(--in-border)] px-6 py-4 text-[var(--in-muted)]">
|
|
229
|
+
<div className="font-semibold text-[var(--in-text)]">
|
|
230
|
+
{shipment.carrier}
|
|
231
|
+
</div>
|
|
232
|
+
<div className="mt-1 text-xs">{shipment.last_event}</div>
|
|
233
|
+
</td>
|
|
234
|
+
<td className="border-b border-[var(--in-border)] px-6 py-4">
|
|
235
|
+
<span
|
|
236
|
+
className={`rounded-full px-3 py-1 text-xs font-semibold ${shippingStatusClassName(
|
|
237
|
+
shipment.status,
|
|
238
|
+
)}`}
|
|
239
|
+
>
|
|
240
|
+
{shipment.status}
|
|
241
|
+
</span>
|
|
242
|
+
</td>
|
|
243
|
+
<td className="border-b border-[var(--in-border)] px-6 py-4 text-[var(--in-text)]">
|
|
244
|
+
{shipment.eta}
|
|
245
|
+
</td>
|
|
246
|
+
<td className="border-b border-[var(--in-border)] px-6 py-4">
|
|
247
|
+
{action ? (
|
|
248
|
+
<Button
|
|
249
|
+
size="sm"
|
|
250
|
+
variant={action.variant}
|
|
251
|
+
disabled={pendingShipmentId === shipment.shipment_id}
|
|
252
|
+
onClick={() => void handleShipmentAction(shipment)}
|
|
253
|
+
>
|
|
254
|
+
{pendingShipmentId === shipment.shipment_id
|
|
255
|
+
? "처리 중"
|
|
256
|
+
: action.label}
|
|
257
|
+
</Button>
|
|
258
|
+
) : (
|
|
259
|
+
<span className="text-xs font-semibold text-[var(--in-muted)]">
|
|
260
|
+
종료됨
|
|
261
|
+
</span>
|
|
262
|
+
)}
|
|
263
|
+
</td>
|
|
264
|
+
</tr>
|
|
265
|
+
);
|
|
266
|
+
})}
|
|
267
|
+
</tbody>
|
|
268
|
+
</table>
|
|
269
|
+
</Card>
|
|
270
|
+
|
|
271
|
+
<div className="space-y-6">
|
|
272
|
+
<Card className="p-6 shadow-[0_18px_48px_rgba(25,54,46,0.06)]">
|
|
273
|
+
<p className="text-sm font-semibold uppercase tracking-[0.16em] text-[var(--in-accent)]">
|
|
274
|
+
Shipping pulse
|
|
275
|
+
</p>
|
|
276
|
+
<p className="mt-3 text-2xl font-black text-[var(--in-text)]">
|
|
277
|
+
{overview?.highlighted_route ?? "Route unavailable"}
|
|
278
|
+
</p>
|
|
279
|
+
<div className="mt-6 grid gap-3">
|
|
280
|
+
{(overview?.stats ?? []).map((stat) => (
|
|
281
|
+
<div
|
|
282
|
+
key={stat.label}
|
|
283
|
+
className="rounded-[22px] border border-[var(--in-border)] bg-white px-4 py-4"
|
|
284
|
+
>
|
|
285
|
+
<div className="flex items-center justify-between gap-3">
|
|
286
|
+
<span className="text-sm text-[var(--in-muted)]">
|
|
287
|
+
{stat.label}
|
|
288
|
+
</span>
|
|
289
|
+
{stat.label === "지연" ? (
|
|
290
|
+
<AlertTriangle className="h-4 w-4 text-[#c4663a]" />
|
|
291
|
+
) : stat.label === "오늘 완료" ? (
|
|
292
|
+
<CircleCheckBig className="h-4 w-4 text-[#245f92]" />
|
|
293
|
+
) : (
|
|
294
|
+
<Truck className="h-4 w-4 text-[var(--in-accent)]" />
|
|
295
|
+
)}
|
|
296
|
+
</div>
|
|
297
|
+
<div className="mt-3 text-2xl font-black text-[var(--in-text)]">
|
|
298
|
+
{stat.value}
|
|
299
|
+
</div>
|
|
300
|
+
</div>
|
|
301
|
+
))}
|
|
302
|
+
{loading && !overview ? (
|
|
303
|
+
<div className="text-sm text-[var(--in-muted)]">
|
|
304
|
+
배송 overview를 불러오는 중입니다.
|
|
305
|
+
</div>
|
|
306
|
+
) : null}
|
|
307
|
+
</div>
|
|
308
|
+
</Card>
|
|
309
|
+
|
|
310
|
+
<Card className="p-6 shadow-[0_18px_48px_rgba(25,54,46,0.06)]">
|
|
311
|
+
<h2 className="text-xl font-black text-[var(--in-text)]">
|
|
312
|
+
Carrier load
|
|
313
|
+
</h2>
|
|
314
|
+
<div className="mt-5 space-y-3">
|
|
315
|
+
{!loading && !error && !(overview?.carriers.length ?? 0) ? (
|
|
316
|
+
<div className="text-sm text-[var(--in-muted)]">
|
|
317
|
+
표시할 carrier 데이터가 없습니다.
|
|
318
|
+
</div>
|
|
319
|
+
) : null}
|
|
320
|
+
{(overview?.carriers ?? []).map((carrier) => (
|
|
321
|
+
<div
|
|
322
|
+
key={carrier.label}
|
|
323
|
+
className="rounded-[22px] border border-[var(--in-border)] bg-white px-4 py-4"
|
|
324
|
+
>
|
|
325
|
+
<div className="font-semibold text-[var(--in-text)]">
|
|
326
|
+
{carrier.label}
|
|
327
|
+
</div>
|
|
328
|
+
<div className="mt-1 text-sm text-[var(--in-muted)]">
|
|
329
|
+
{carrier.value}
|
|
330
|
+
</div>
|
|
331
|
+
</div>
|
|
332
|
+
))}
|
|
333
|
+
</div>
|
|
334
|
+
</Card>
|
|
335
|
+
</div>
|
|
336
|
+
</div>
|
|
337
|
+
);
|
|
338
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
@tailwind base;
|
|
2
|
+
@tailwind components;
|
|
3
|
+
@tailwind utilities;
|
|
4
|
+
|
|
5
|
+
:root {
|
|
6
|
+
font-family: "SUIT", "Pretendard", "Apple SD Gothic Neo", sans-serif;
|
|
7
|
+
color: #1f2c45;
|
|
8
|
+
background: #f4f7fb;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
* {
|
|
12
|
+
box-sizing: border-box;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
body {
|
|
16
|
+
margin: 0;
|
|
17
|
+
min-width: 320px;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
a {
|
|
21
|
+
color: inherit;
|
|
22
|
+
text-decoration: none;
|
|
23
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { CSSProperties } from "react";
|
|
2
|
+
|
|
3
|
+
import type { InTheme } from "./theme";
|
|
4
|
+
|
|
5
|
+
export function inThemeVars(theme: InTheme): CSSProperties {
|
|
6
|
+
return {
|
|
7
|
+
"--in-shell-bg": theme.shellBg,
|
|
8
|
+
"--in-panel-bg": theme.panelBg,
|
|
9
|
+
"--in-border": theme.border,
|
|
10
|
+
"--in-accent": theme.accent,
|
|
11
|
+
"--in-accent-soft": theme.accentSoft,
|
|
12
|
+
"--in-muted": theme.muted,
|
|
13
|
+
"--in-text": theme.text,
|
|
14
|
+
"--in-card-radius": theme.cardRadius,
|
|
15
|
+
} as CSSProperties;
|
|
16
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export type InTheme = {
|
|
2
|
+
shellBg: string;
|
|
3
|
+
panelBg: string;
|
|
4
|
+
border: string;
|
|
5
|
+
accent: string;
|
|
6
|
+
accentSoft: string;
|
|
7
|
+
muted: string;
|
|
8
|
+
text: string;
|
|
9
|
+
cardRadius: string;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export const inTheme: InTheme = {
|
|
13
|
+
shellBg: "#f4efe6",
|
|
14
|
+
panelBg: "#fffdf8",
|
|
15
|
+
border: "#e7dccb",
|
|
16
|
+
accent: "#18705c",
|
|
17
|
+
accentSoft: "#dff3ec",
|
|
18
|
+
muted: "#6f665b",
|
|
19
|
+
text: "#203029",
|
|
20
|
+
cardRadius: "24px",
|
|
21
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/// <reference types="vite/client" />
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ES2020",
|
|
4
|
+
"useDefineForClassFields": true,
|
|
5
|
+
"lib": ["ES2020", "DOM", "DOM.Iterable"],
|
|
6
|
+
"allowJs": false,
|
|
7
|
+
"skipLibCheck": true,
|
|
8
|
+
"esModuleInterop": true,
|
|
9
|
+
"allowSyntheticDefaultImports": true,
|
|
10
|
+
"strict": true,
|
|
11
|
+
"forceConsistentCasingInFileNames": true,
|
|
12
|
+
"module": "ESNext",
|
|
13
|
+
"moduleResolution": "Node",
|
|
14
|
+
"resolveJsonModule": true,
|
|
15
|
+
"isolatedModules": true,
|
|
16
|
+
"noEmit": true,
|
|
17
|
+
"jsx": "react-jsx",
|
|
18
|
+
"baseUrl": ".",
|
|
19
|
+
"paths": {
|
|
20
|
+
"@/*": ["src/*"]
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
"include": ["src"],
|
|
24
|
+
"references": []
|
|
25
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { defineConfig } from "vite";
|
|
2
|
+
import react from "@vitejs/plugin-react";
|
|
3
|
+
import { fileURLToPath, URL } from "node:url";
|
|
4
|
+
|
|
5
|
+
export default defineConfig({
|
|
6
|
+
plugins: [react()],
|
|
7
|
+
resolve: {
|
|
8
|
+
alias: {
|
|
9
|
+
"@": fileURLToPath(new URL("./src", import.meta.url)),
|
|
10
|
+
},
|
|
11
|
+
},
|
|
12
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
VITE_API_BASE_URL=http://127.0.0.1:8000/api/v1
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
FROM node:20-slim
|
|
2
|
+
|
|
3
|
+
WORKDIR /app
|
|
4
|
+
|
|
5
|
+
COPY pnpm-lock.yaml pnpm-workspace.yaml ./
|
|
6
|
+
COPY client/platform/package.json ./client/platform/package.json
|
|
7
|
+
|
|
8
|
+
RUN npm install -g pnpm@10.32.0 && pnpm install --filter @do4ai/client-platform-template...
|
|
9
|
+
|
|
10
|
+
COPY . .
|
|
11
|
+
|
|
12
|
+
WORKDIR /app/client/platform
|
|
13
|
+
|
|
14
|
+
EXPOSE 3001
|
|
15
|
+
|
|
16
|
+
CMD ["pnpm", "dev", "--host", "0.0.0.0", "--port", "3001"]
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
FROM node:20-slim
|
|
2
|
+
|
|
3
|
+
WORKDIR /app
|
|
4
|
+
|
|
5
|
+
RUN npm install -g pnpm@10.32.0
|
|
6
|
+
|
|
7
|
+
COPY pnpm-lock.yaml pnpm-workspace.yaml ./
|
|
8
|
+
COPY client/platform/package.json ./client/platform/package.json
|
|
9
|
+
|
|
10
|
+
RUN pnpm install --frozen-lockfile --filter @do4ai/client-platform-template...
|
|
11
|
+
|
|
12
|
+
COPY client/platform ./client/platform
|
|
13
|
+
|
|
14
|
+
WORKDIR /app/client/platform
|
|
15
|
+
|
|
16
|
+
EXPOSE 3001
|
|
17
|
+
|
|
18
|
+
CMD ["sh", "-lc", "pnpm exec vite --host 0.0.0.0 --port ${PORT:-3001}"]
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# platform
|
|
2
|
+
|
|
3
|
+
일반 사용자용 제품 앱 보일러플레이트다.
|
|
4
|
+
|
|
5
|
+
포함 패턴:
|
|
6
|
+
|
|
7
|
+
- 상단 shell + workspace content
|
|
8
|
+
- KPI cards
|
|
9
|
+
- searchable list/table
|
|
10
|
+
- detail side panel
|
|
11
|
+
- CSS variable 기반 theme surface
|
|
12
|
+
|
|
13
|
+
시작:
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
npm install
|
|
17
|
+
npm run dev
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
기본 DEV 포트는 `3001`이다.
|
|
21
|
+
|
|
22
|
+
복제 직후 초기화:
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
npm run ui:parity:init
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
이 단계는 repo-level contract, `ui_parity_platform_contract.yaml`, route-gap manifest를 생성한다.
|
|
29
|
+
|
|
30
|
+
첫 proof 부트스트랩:
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
npm run ui:parity:bootstrap
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
이 단계는 build, preview, reference materialization, route-gap gate, proof gate까지 한 번에 수행한다.
|
|
37
|
+
|
|
38
|
+
패리티/하네스:
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
npm run ui:parity:scaffold
|
|
42
|
+
npm run ui:parity:materialize-references
|
|
43
|
+
npm run ui:parity:route-gap
|
|
44
|
+
npm run ui:parity:proof
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
이 템플릿은 repo root의 `sdd/99_toolchain/01_automation` 도구를 사용하고, `client/platform/scripts/ui-parity-platform-adapter.mjs`는 앱별 adapter 예시다.
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="ko">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8" />
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
|
+
<title>client-platform template</title>
|
|
7
|
+
</head>
|
|
8
|
+
<body>
|
|
9
|
+
<div id="root"></div>
|
|
10
|
+
<script type="module" src="/src/main.tsx"></script>
|
|
11
|
+
</body>
|
|
12
|
+
</html>
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@do4ai/client-platform-template",
|
|
3
|
+
"private": true,
|
|
4
|
+
"version": "0.1.0",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"packageManager": "pnpm@10.32.0",
|
|
7
|
+
"scripts": {
|
|
8
|
+
"dev": "vite --host 0.0.0.0 --port 3001",
|
|
9
|
+
"build": "tsc -b && vite build",
|
|
10
|
+
"preview": "vite preview --host 0.0.0.0 --port 4301",
|
|
11
|
+
"ui:parity:init": "bash ../../sdd/99_toolchain/01_automation/agentic-dev/init_frontend_parity.sh ../.. platform",
|
|
12
|
+
"ui:parity:bootstrap": "bash ../../sdd/99_toolchain/01_automation/agentic-dev/bootstrap_frontend_parity.sh ../.. platform",
|
|
13
|
+
"ui:parity:scaffold": "bash ../../sdd/99_toolchain/01_automation/agentic-dev/run_frontend_target.sh scaffold ../.. platform",
|
|
14
|
+
"ui:parity:materialize-references": "bash ../../sdd/99_toolchain/01_automation/agentic-dev/run_frontend_target.sh materialize_references ../.. platform",
|
|
15
|
+
"ui:parity:route-gap": "bash ../../sdd/99_toolchain/01_automation/agentic-dev/run_frontend_target.sh route_gap ../.. platform",
|
|
16
|
+
"ui:parity:proof": "bash ../../sdd/99_toolchain/01_automation/agentic-dev/run_frontend_target.sh proof ../.. platform",
|
|
17
|
+
"ui:parity": "npm run ui:parity:proof"
|
|
18
|
+
},
|
|
19
|
+
"dependencies": {
|
|
20
|
+
"class-variance-authority": "^0.7.1",
|
|
21
|
+
"clsx": "^2.1.1",
|
|
22
|
+
"lucide-react": "^0.576.0",
|
|
23
|
+
"react": "^18.3.1",
|
|
24
|
+
"react-dom": "^18.3.1",
|
|
25
|
+
"react-router-dom": "^6.30.1",
|
|
26
|
+
"tailwind-merge": "^3.5.0"
|
|
27
|
+
},
|
|
28
|
+
"devDependencies": {
|
|
29
|
+
"@playwright/test": "^1.58.2",
|
|
30
|
+
"@types/react": "^18.3.18",
|
|
31
|
+
"@types/react-dom": "^18.3.5",
|
|
32
|
+
"@vitejs/plugin-react": "^4.7.0",
|
|
33
|
+
"autoprefixer": "^10.4.21",
|
|
34
|
+
"pixelmatch": "^7.1.0",
|
|
35
|
+
"pngjs": "^7.0.0",
|
|
36
|
+
"postcss": "^8.5.3",
|
|
37
|
+
"tailwindcss": "^3.4.17",
|
|
38
|
+
"typescript": "^5.8.3",
|
|
39
|
+
"vite": "^5.4.19",
|
|
40
|
+
"yaml": "^2.8.1"
|
|
41
|
+
}
|
|
42
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import fs from "node:fs";
|
|
2
|
+
import path from "node:path";
|
|
3
|
+
import { fileURLToPath } from "node:url";
|
|
4
|
+
|
|
5
|
+
const scriptDir = path.dirname(fileURLToPath(import.meta.url));
|
|
6
|
+
const screens = JSON.parse(
|
|
7
|
+
fs.readFileSync(path.resolve(scriptDir, "../src/lib/specScreens.json"), "utf8"),
|
|
8
|
+
);
|
|
9
|
+
const routes = JSON.parse(
|
|
10
|
+
fs.readFileSync(path.resolve(scriptDir, "../src/lib/specRouteCatalog.json"), "utf8"),
|
|
11
|
+
);
|
|
12
|
+
|
|
13
|
+
const routeMap = new Map(routes.map((entry) => [entry.id, entry.route]));
|
|
14
|
+
|
|
15
|
+
export default {
|
|
16
|
+
service: "templates-platform",
|
|
17
|
+
targetBaseUrl: "http://127.0.0.1:4301",
|
|
18
|
+
viewport: {
|
|
19
|
+
width: 1440,
|
|
20
|
+
height: 1024,
|
|
21
|
+
},
|
|
22
|
+
screens: screens.map((screen) => ({
|
|
23
|
+
id: screen.id,
|
|
24
|
+
title: screen.title,
|
|
25
|
+
route: routeMap.get(screen.id) ?? "/",
|
|
26
|
+
referenceImage: `sdd/04_verify/10_test/ui_parity/reference/${screen.id}.png`,
|
|
27
|
+
readySelector: "body",
|
|
28
|
+
readyTimeoutMs: 10000,
|
|
29
|
+
tags: ["template", "platform"],
|
|
30
|
+
})),
|
|
31
|
+
async preparePage(page, { route }) {
|
|
32
|
+
await page.route("**/auth/me", async (routeRequest) => {
|
|
33
|
+
await routeRequest.fulfill({
|
|
34
|
+
status: 200,
|
|
35
|
+
contentType: "application/json",
|
|
36
|
+
body: JSON.stringify({
|
|
37
|
+
id: "tmpl-platform",
|
|
38
|
+
name: "Template Platform User",
|
|
39
|
+
email: "operator@example.com",
|
|
40
|
+
role: "member",
|
|
41
|
+
}),
|
|
42
|
+
});
|
|
43
|
+
});
|
|
44
|
+
await page.addInitScript(() => {
|
|
45
|
+
window.localStorage.setItem(
|
|
46
|
+
"platform.auth.token",
|
|
47
|
+
JSON.stringify({
|
|
48
|
+
access_token: "template-access-token",
|
|
49
|
+
token_type: "bearer",
|
|
50
|
+
user_id: "tmpl-platform",
|
|
51
|
+
}),
|
|
52
|
+
);
|
|
53
|
+
});
|
|
54
|
+
if (route === "/login") {
|
|
55
|
+
await page.addInitScript(() => {
|
|
56
|
+
window.localStorage.removeItem("platform.auth.token");
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
async waitForReady(page) {
|
|
61
|
+
await page.waitForLoadState("networkidle");
|
|
62
|
+
},
|
|
63
|
+
async resolveMaskRects() {
|
|
64
|
+
return [];
|
|
65
|
+
},
|
|
66
|
+
};
|