agentic-dev 0.2.10 → 0.2.12
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/README.md +50 -29
- package/bin/agentic-dev.mjs +656 -124
- package/lib/scaffold.mjs +109 -6
- package/package.json +8 -22
- package/.agent/prd.json +0 -29
- package/.agent/progress.txt +0 -1
- package/.agent/prompt.md +0 -21
- package/.agent/ralph-loop-state.json +0 -13
- package/.agent/ralph-supervisor-state.json +0 -12
- package/.agent/ralph-supervisor.sh +0 -238
- package/.agent/ralph.sh +0 -305
- package/.agent/runs/README.md +0 -7
- package/.agent/sdd-build-ast-audit.json +0 -13
- package/.claude/CLAUDE.md +0 -44
- package/.claude/agentic-dev.json +0 -3
- package/.claude/agents/ai-dev.md +0 -27
- package/.claude/agents/backend-dev.md +0 -26
- package/.claude/agents/db-dev.md +0 -26
- package/.claude/agents/devops.md +0 -27
- package/.claude/agents/frontend-dev.md +0 -25
- package/.claude/agents/github-ops.md +0 -25
- package/.claude/agents/test-dev.md +0 -26
- package/.claude/agents/uiux-designer.md +0 -25
- package/.claude/settings.json +0 -49
- package/.claude/settings.local.json +0 -8
- package/.claude/skills/sdd/SKILL.md +0 -189
- package/.claude/skills/sdd/agents/openai.yaml +0 -4
- package/.claude/skills/sdd/references/section-map.md +0 -67
- package/.claude/workspace-config.json +0 -3
- package/.codex/agentic-dev.json +0 -3
- package/.codex/agents/README.md +0 -22
- package/.codex/agents/api.toml +0 -11
- package/.codex/agents/architecture.toml +0 -11
- package/.codex/agents/ci.toml +0 -11
- package/.codex/agents/gitops.toml +0 -11
- package/.codex/agents/orchestrator.toml +0 -11
- package/.codex/agents/quality.toml +0 -11
- package/.codex/agents/runtime.toml +0 -11
- package/.codex/agents/security.toml +0 -11
- package/.codex/agents/specs.toml +0 -11
- package/.codex/agents/ui.toml +0 -11
- package/.codex/config.toml +0 -46
- package/.codex/skills/SKILL.md +0 -13
- package/.codex/skills/sdd/SKILL.md +0 -189
- package/.codex/skills/sdd/agents/openai.yaml +0 -4
- package/.codex/skills/sdd/references/section-map.md +0 -67
- package/.dockerignore +0 -8
- package/.env.example +0 -50
- package/.gitignore +0 -16
- package/AGENTS.md +0 -86
- package/SDD_SKILL.md +0 -589
- package/client/admin/.dockerignore +0 -3
- package/client/admin/.env.example +0 -1
- package/client/admin/Dockerfile +0 -16
- package/client/admin/Dockerfile.dev +0 -18
- package/client/admin/README.md +0 -20
- package/client/admin/index.html +0 -12
- package/client/admin/package.json +0 -41
- package/client/admin/postcss.config.js +0 -6
- package/client/admin/scripts/ui-parity-admin-adapter.mjs +0 -65
- package/client/admin/src/api/alerts.ts +0 -33
- package/client/admin/src/api/client.ts +0 -71
- package/client/admin/src/api/orders.ts +0 -33
- package/client/admin/src/api/support.ts +0 -11
- package/client/admin/src/app/App.tsx +0 -23
- package/client/admin/src/auth/AuthProvider.tsx +0 -122
- package/client/admin/src/auth/ProtectedRoute.tsx +0 -22
- package/client/admin/src/auth/auth-client.ts +0 -38
- package/client/admin/src/auth/types.ts +0 -18
- package/client/admin/src/components/AdminNotificationsDrawer.tsx +0 -162
- package/client/admin/src/components/AdminShell.tsx +0 -76
- package/client/admin/src/components/ui/button.tsx +0 -34
- package/client/admin/src/components/ui/input.tsx +0 -21
- package/client/admin/src/lib/cn.ts +0 -6
- package/client/admin/src/lib/specRouteCatalog.json +0 -30
- package/client/admin/src/lib/specScreens.json +0 -22
- package/client/admin/src/main.tsx +0 -17
- package/client/admin/src/pages/AdminDashboardPage.tsx +0 -171
- package/client/admin/src/pages/AdminLoginPage.tsx +0 -75
- package/client/admin/src/pages/AdminQueuePage.tsx +0 -107
- package/client/admin/src/pages/AdminSupportPage.tsx +0 -61
- package/client/admin/src/styles/globals.css +0 -17
- package/client/admin/src/theme-vars.ts +0 -18
- package/client/admin/src/theme.ts +0 -25
- package/client/admin/src/vite-env.d.ts +0 -1
- package/client/admin/tailwind.config.js +0 -8
- package/client/admin/tsconfig.json +0 -25
- package/client/admin/vite.config.ts +0 -12
- package/client/landing/.dockerignore +0 -3
- package/client/landing/.env.example +0 -1
- package/client/landing/Dockerfile +0 -16
- package/client/landing/Dockerfile.dev +0 -18
- package/client/landing/README.md +0 -18
- package/client/landing/index.html +0 -12
- package/client/landing/package.json +0 -41
- package/client/landing/postcss.config.js +0 -6
- package/client/landing/scripts/ui-parity-landing-adapter.mjs +0 -65
- package/client/landing/src/App.tsx +0 -21
- package/client/landing/src/api/catalog.ts +0 -30
- package/client/landing/src/api/client.ts +0 -30
- package/client/landing/src/auth/AuthProvider.tsx +0 -122
- package/client/landing/src/auth/ProtectedRoute.tsx +0 -22
- package/client/landing/src/auth/auth-client.ts +0 -38
- package/client/landing/src/auth/types.ts +0 -18
- package/client/landing/src/components/LandingShell.tsx +0 -34
- package/client/landing/src/lib/specRouteCatalog.json +0 -23
- package/client/landing/src/lib/specScreens.json +0 -17
- package/client/landing/src/main.tsx +0 -17
- package/client/landing/src/pages/LandingHomePage.tsx +0 -215
- package/client/landing/src/pages/LandingLoginPage.tsx +0 -90
- package/client/landing/src/pages/LandingWorkspacePage.tsx +0 -126
- package/client/landing/src/styles/globals.css +0 -17
- package/client/landing/src/theme-vars.ts +0 -16
- package/client/landing/src/theme.ts +0 -21
- package/client/landing/src/vite-env.d.ts +0 -1
- package/client/landing/tailwind.config.js +0 -8
- package/client/landing/tsconfig.json +0 -25
- package/client/landing/vite.config.ts +0 -12
- package/client/mobile/.dockerignore +0 -2
- package/client/mobile/.env.example +0 -1
- package/client/mobile/Dockerfile +0 -16
- package/client/mobile/Dockerfile.dev +0 -18
- package/client/mobile/README.md +0 -19
- package/client/mobile/index.html +0 -12
- package/client/mobile/package.json +0 -42
- package/client/mobile/postcss.config.js +0 -6
- package/client/mobile/scripts/ui-parity-mobile-adapter.mjs +0 -67
- package/client/mobile/src/App.tsx +0 -1
- package/client/mobile/src/api/client.ts +0 -62
- package/client/mobile/src/api/fulfillment.ts +0 -55
- package/client/mobile/src/api/shipping.ts +0 -56
- package/client/mobile/src/app/App.tsx +0 -23
- package/client/mobile/src/auth/AuthProvider.tsx +0 -122
- package/client/mobile/src/auth/ProtectedRoute.tsx +0 -27
- package/client/mobile/src/auth/auth-client.ts +0 -38
- package/client/mobile/src/auth/types.ts +0 -18
- package/client/mobile/src/components/InShell.tsx +0 -74
- package/client/mobile/src/components/ui/button.tsx +0 -35
- package/client/mobile/src/components/ui/card.tsx +0 -15
- package/client/mobile/src/components/ui/input.tsx +0 -21
- package/client/mobile/src/lib/cn.ts +0 -6
- package/client/mobile/src/lib/specRouteCatalog.json +0 -26
- package/client/mobile/src/lib/specScreens.json +0 -22
- package/client/mobile/src/lib/useSpeechRecognitionInput.ts +0 -271
- package/client/mobile/src/main.tsx +0 -17
- package/client/mobile/src/pages/DashboardPage.tsx +0 -172
- package/client/mobile/src/pages/FulfillmentPage.tsx +0 -138
- package/client/mobile/src/pages/LoginPage.tsx +0 -74
- package/client/mobile/src/pages/ShippingPage.tsx +0 -338
- package/client/mobile/src/styles/globals.css +0 -23
- package/client/mobile/src/theme-vars.ts +0 -16
- package/client/mobile/src/theme.ts +0 -21
- package/client/mobile/src/vite-env.d.ts +0 -1
- package/client/mobile/tailwind.config.js +0 -8
- package/client/mobile/tsconfig.json +0 -25
- package/client/mobile/vite.config.ts +0 -12
- package/client/web/.dockerignore +0 -3
- package/client/web/.env.example +0 -1
- package/client/web/Dockerfile +0 -16
- package/client/web/Dockerfile.dev +0 -18
- package/client/web/README.md +0 -47
- package/client/web/index.html +0 -12
- package/client/web/package.json +0 -42
- package/client/web/postcss.config.js +0 -6
- package/client/web/scripts/ui-parity-web-adapter.mjs +0 -66
- package/client/web/src/api/client.ts +0 -30
- package/client/web/src/api/orders.ts +0 -42
- package/client/web/src/app/App.tsx +0 -21
- package/client/web/src/auth/AuthProvider.tsx +0 -122
- package/client/web/src/auth/ProtectedRoute.tsx +0 -22
- package/client/web/src/auth/auth-client.ts +0 -38
- package/client/web/src/auth/types.ts +0 -18
- package/client/web/src/components/AppShell.tsx +0 -59
- package/client/web/src/components/ui/button.tsx +0 -35
- package/client/web/src/components/ui/card.tsx +0 -7
- package/client/web/src/components/ui/input.tsx +0 -21
- package/client/web/src/lib/cn.ts +0 -6
- package/client/web/src/lib/specRouteCatalog.json +0 -23
- package/client/web/src/lib/specScreens.json +0 -17
- package/client/web/src/main.tsx +0 -17
- package/client/web/src/pages/DashboardPage.tsx +0 -158
- package/client/web/src/pages/LoginPage.tsx +0 -72
- package/client/web/src/pages/OrdersPage.tsx +0 -123
- package/client/web/src/styles/globals.css +0 -17
- package/client/web/src/theme-vars.ts +0 -18
- package/client/web/src/theme.ts +0 -25
- package/client/web/src/vite-env.d.ts +0 -1
- package/client/web/tailwind.config.js +0 -8
- package/client/web/tsconfig.json +0 -25
- package/client/web/vite.config.ts +0 -12
- package/compose.yml +0 -206
- package/infra/compose/.env.dev.example +0 -28
- package/infra/compose/.env.prod.example +0 -29
- package/infra/compose/README.md +0 -35
- package/infra/compose/dev.yml +0 -125
- package/infra/compose/prod.yml +0 -126
- package/infra/terraform/README.md +0 -34
- package/infra/terraform/aws/data/.terraform.lock.hcl +0 -25
- package/infra/terraform/aws/data/README.md +0 -18
- package/infra/terraform/aws/data/main.tf +0 -147
- package/infra/terraform/aws/data/outputs.tf +0 -14
- package/infra/terraform/aws/data/variables.tf +0 -57
- package/infra/terraform/aws/data/versions.tf +0 -10
- package/infra/terraform/aws/domain/.terraform.lock.hcl +0 -25
- package/infra/terraform/aws/domain/README.md +0 -20
- package/infra/terraform/aws/domain/env/dev.tfvars.example +0 -6
- package/infra/terraform/aws/domain/env/prod.tfvars.example +0 -7
- package/infra/terraform/aws/domain/main.tf +0 -149
- package/infra/terraform/aws/domain/outputs.tf +0 -29
- package/infra/terraform/aws/domain/variables.tf +0 -58
- package/infra/terraform/aws/domain/versions.tf +0 -10
- package/infra/terraform/openstack/README.md +0 -38
- package/infra/terraform/openstack/dev/.terraform.lock.hcl +0 -24
- package/infra/terraform/openstack/dev/README.md +0 -18
- package/infra/terraform/openstack/dev/main.tf +0 -49
- package/infra/terraform/openstack/dev/providers.tf +0 -15
- package/infra/terraform/openstack/dev/terraform.tfvars.example +0 -54
- package/infra/terraform/openstack/dev/variables.tf +0 -210
- package/infra/terraform/openstack/dev/versions.tf +0 -10
- package/infra/terraform/openstack/modules/environment_host/main.tf +0 -143
- package/infra/terraform/openstack/modules/environment_host/outputs.tf +0 -25
- package/infra/terraform/openstack/modules/environment_host/templates/docker-host-user-data.sh.tftpl +0 -40
- package/infra/terraform/openstack/modules/environment_host/variables.tf +0 -145
- package/infra/terraform/openstack/modules/environment_host/versions.tf +0 -7
- package/infra/terraform/openstack/prod/.terraform.lock.hcl +0 -24
- package/infra/terraform/openstack/prod/README.md +0 -18
- package/infra/terraform/openstack/prod/main.tf +0 -49
- package/infra/terraform/openstack/prod/providers.tf +0 -15
- package/infra/terraform/openstack/prod/terraform.tfvars.example +0 -55
- package/infra/terraform/openstack/prod/variables.tf +0 -210
- package/infra/terraform/openstack/prod/versions.tf +0 -10
- package/infra/terraform/openstack/server/.terraform.lock.hcl +0 -45
- package/infra/terraform/openstack/server/README.md +0 -47
- package/infra/terraform/openstack/server/main.tf +0 -161
- package/infra/terraform/openstack/server/outputs.tf +0 -30
- package/infra/terraform/openstack/server/providers.tf +0 -30
- package/infra/terraform/openstack/server/templates/server-user-data.sh.tftpl +0 -50
- package/infra/terraform/openstack/server/variables.tf +0 -233
- package/infra/terraform/openstack/server/zz_aspace.auto.tfvars.example.json +0 -29
- package/pnpm-workspace.yaml +0 -2
- package/scripts/dev/audit_sdd_build_ast.py +0 -277
- package/sdd/01_planning/01_feature/INDEX.md +0 -16
- package/sdd/01_planning/01_feature/README.md +0 -76
- package/sdd/01_planning/01_feature/alerts_feature_spec.md +0 -55
- package/sdd/01_planning/01_feature/auth_feature_spec.md +0 -57
- package/sdd/01_planning/01_feature/catalog_feature_spec.md +0 -61
- package/sdd/01_planning/01_feature/fulfillment_feature_spec.md +0 -58
- package/sdd/01_planning/01_feature/health_feature_spec.md +0 -52
- package/sdd/01_planning/01_feature/inventory_feature_spec.md +0 -60
- package/sdd/01_planning/01_feature/order_feature_spec.md +0 -63
- package/sdd/01_planning/01_feature/shipping_feature_spec.md +0 -55
- package/sdd/01_planning/01_feature/support_feature_spec.md +0 -53
- package/sdd/01_planning/01_feature/user_feature_spec.md +0 -54
- package/sdd/01_planning/02_screen/INDEX.md +0 -13
- package/sdd/01_planning/02_screen/README.md +0 -41
- package/sdd/01_planning/02_screen/admin_screen_spec.pdf +0 -0
- package/sdd/01_planning/02_screen/assets/README.md +0 -16
- package/sdd/01_planning/02_screen/assets/example/README.md +0 -13
- 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/web_screen_spec.pdf +0 -0
- package/sdd/01_planning/03_architecture/INDEX.md +0 -9
- package/sdd/01_planning/03_architecture/README.md +0 -25
- package/sdd/01_planning/03_architecture/architecture_document_structure.md +0 -77
- package/sdd/01_planning/03_architecture/backend/README.md +0 -10
- package/sdd/01_planning/03_architecture/frontend/README.md +0 -12
- package/sdd/01_planning/03_architecture/infra/README.md +0 -10
- package/sdd/01_planning/03_architecture/tech-research/README.md +0 -4
- package/sdd/01_planning/03_architecture/templates_system_architecture.md +0 -84
- package/sdd/01_planning/04_data/INDEX.md +0 -4
- package/sdd/01_planning/04_data/README.md +0 -10
- package/sdd/01_planning/04_data/templates_data_modeling.md +0 -119
- package/sdd/01_planning/05_api/README.md +0 -12
- package/sdd/01_planning/05_api/templates_api_contract.md +0 -90
- package/sdd/01_planning/06_iac/README.md +0 -11
- package/sdd/01_planning/06_iac/templates_runtime_and_cicd_baseline.md +0 -46
- package/sdd/01_planning/07_integration/README.md +0 -11
- package/sdd/01_planning/07_integration/templates_frontend_api_integration.md +0 -46
- package/sdd/01_planning/08_nonfunctional/README.md +0 -7
- package/sdd/01_planning/09_security/README.md +0 -7
- package/sdd/01_planning/10_test/README.md +0 -12
- package/sdd/01_planning/10_test/templates_test_strategy.md +0 -60
- package/sdd/01_planning/INDEX.md +0 -19
- package/sdd/01_planning/README.md +0 -17
- package/sdd/02_plan/01_feature/README.md +0 -34
- package/sdd/02_plan/01_feature/_feature_todo_template.md +0 -29
- package/sdd/02_plan/02_screen/INDEX.md +0 -19
- package/sdd/02_plan/02_screen/README.md +0 -39
- package/sdd/02_plan/02_screen/_screen_todo_template.md +0 -60
- package/sdd/02_plan/03_architecture/README.md +0 -23
- package/sdd/02_plan/03_architecture/architecture_document_governance.md +0 -40
- package/sdd/02_plan/03_architecture/build_ast_runtime_tree_governance.md +0 -53
- package/sdd/02_plan/03_architecture/repository_governance.md +0 -39
- package/sdd/02_plan/03_architecture/runtime_and_structure_governance.md +0 -38
- package/sdd/02_plan/03_architecture/templates-hexagonal-template-architecture.md +0 -9
- package/sdd/02_plan/03_architecture/toolchain_governance.md +0 -98
- package/sdd/02_plan/04_data/README.md +0 -5
- package/sdd/02_plan/05_api/README.md +0 -5
- package/sdd/02_plan/06_iac/README.md +0 -11
- package/sdd/02_plan/06_iac/dev_runtime_delivery.md +0 -36
- package/sdd/02_plan/06_iac/template_runtime_delivery.md +0 -50
- package/sdd/02_plan/07_integration/README.md +0 -5
- package/sdd/02_plan/07_integration/frontend_live_integration.md +0 -31
- package/sdd/02_plan/08_nonfunctional/README.md +0 -5
- package/sdd/02_plan/08_nonfunctional/repository_hygiene.md +0 -26
- package/sdd/02_plan/09_security/README.md +0 -5
- package/sdd/02_plan/10_test/README.md +0 -11
- package/sdd/02_plan/10_test/regression_verification.md +0 -39
- package/sdd/02_plan/10_test/templates/README.md +0 -8
- package/sdd/02_plan/10_test/templates/ui_parity_web_contract.template.yaml +0 -23
- package/sdd/02_plan/10_test/verification_strategy.md +0 -43
- package/sdd/02_plan/99_generated/from_planning/ui_parity/.gitkeep +0 -1
- package/sdd/02_plan/README.md +0 -40
- package/sdd/03_build/01_feature/README.md +0 -20
- package/sdd/03_build/01_feature/domain/README.md +0 -3
- package/sdd/03_build/01_feature/domain/account_and_access.md +0 -20
- package/sdd/03_build/01_feature/domain/catalog_and_inventory.md +0 -20
- package/sdd/03_build/01_feature/domain/ordering_and_fulfillment.md +0 -21
- package/sdd/03_build/01_feature/domain/support_and_observability.md +0 -21
- package/sdd/03_build/01_feature/domain_surfaces.md +0 -28
- package/sdd/03_build/01_feature/service/README.md +0 -3
- package/sdd/03_build/01_feature/service/admin_surface.md +0 -15
- package/sdd/03_build/01_feature/service/landing_surface.md +0 -13
- package/sdd/03_build/01_feature/service/mobile_surface.md +0 -14
- package/sdd/03_build/01_feature/service/web_surface.md +0 -14
- package/sdd/03_build/02_screen/README.md +0 -25
- package/sdd/03_build/02_screen/_screen_build_template.md +0 -26
- package/sdd/03_build/02_screen/admin/README.md +0 -5
- package/sdd/03_build/02_screen/landing/README.md +0 -5
- package/sdd/03_build/02_screen/mobile/README.md +0 -5
- package/sdd/03_build/02_screen/web/README.md +0 -5
- package/sdd/03_build/03_architecture/README.md +0 -10
- package/sdd/03_build/03_architecture/architecture_document_governance.md +0 -30
- package/sdd/03_build/03_architecture/build_ast_runtime_tree_governance.md +0 -24
- package/sdd/03_build/03_architecture/repository_governance.md +0 -18
- package/sdd/03_build/03_architecture/toolchain_governance.md +0 -36
- package/sdd/03_build/06_iac/README.md +0 -3
- package/sdd/03_build/06_iac/dev_runtime_delivery.md +0 -10
- package/sdd/03_build/06_iac/template_runtime_delivery.md +0 -49
- package/sdd/03_build/07_integration/README.md +0 -3
- package/sdd/03_build/07_integration/frontend_live_integration.md +0 -11
- package/sdd/03_build/08_nonfunctional/README.md +0 -3
- package/sdd/03_build/08_nonfunctional/repository_hygiene.md +0 -10
- package/sdd/03_build/10_test/README.md +0 -9
- package/sdd/03_build/10_test/regression_verification.md +0 -16
- package/sdd/03_build/10_test/verification_harness.md +0 -11
- package/sdd/03_build/README.md +0 -35
- package/sdd/03_verify/01_feature/README.md +0 -5
- package/sdd/03_verify/01_feature/domain_verification.md +0 -14
- package/sdd/03_verify/01_feature/service_verification.md +0 -22
- package/sdd/03_verify/02_screen/README.md +0 -6
- package/sdd/03_verify/02_screen/_screen_verify_template.md +0 -20
- package/sdd/03_verify/02_screen/admin/README.md +0 -4
- package/sdd/03_verify/02_screen/landing/README.md +0 -4
- package/sdd/03_verify/02_screen/mobile/README.md +0 -4
- package/sdd/03_verify/02_screen/web/README.md +0 -4
- package/sdd/03_verify/03_architecture/README.md +0 -10
- package/sdd/03_verify/03_architecture/architecture_document_governance.md +0 -15
- package/sdd/03_verify/03_architecture/build_ast_runtime_tree_governance.md +0 -28
- package/sdd/03_verify/03_architecture/repository_governance.md +0 -16
- package/sdd/03_verify/03_architecture/toolchain_governance.md +0 -58
- package/sdd/03_verify/06_iac/README.md +0 -3
- package/sdd/03_verify/06_iac/dev_runtime_delivery.md +0 -10
- package/sdd/03_verify/06_iac/template_runtime_delivery.md +0 -42
- package/sdd/03_verify/07_integration/README.md +0 -3
- package/sdd/03_verify/07_integration/frontend_live_integration.md +0 -16
- package/sdd/03_verify/08_nonfunctional/README.md +0 -3
- package/sdd/03_verify/08_nonfunctional/repository_hygiene.md +0 -14
- package/sdd/03_verify/10_test/README.md +0 -9
- package/sdd/03_verify/10_test/regression_verification.md +0 -16
- package/sdd/03_verify/10_test/ui_parity/README.md +0 -4
- package/sdd/03_verify/10_test/ui_parity/loop_runs/.gitkeep +0 -0
- package/sdd/03_verify/10_test/ui_parity/reference/.gitkeep +0 -0
- package/sdd/03_verify/10_test/ui_parity/staged_runs/.gitkeep +0 -0
- package/sdd/03_verify/10_test/verification_harness.md +0 -17
- package/sdd/03_verify/README.md +0 -22
- package/sdd/05_operate/01_runbooks/.gitkeep +0 -1
- package/sdd/05_operate/01_runbooks/README.md +0 -4
- package/sdd/05_operate/02_delivery_status/README.md +0 -4
- package/sdd/05_operate/02_delivery_status/service_status.md +0 -16
- package/sdd/05_operate/README.md +0 -12
- package/sdd/99_toolchain/01_automation/.gitkeep +0 -1
- package/sdd/99_toolchain/01_automation/README.md +0 -76
- package/sdd/99_toolchain/01_automation/agentic-dev/analyze_proof_results.py +0 -132
- package/sdd/99_toolchain/01_automation/agentic-dev/analyze_route_gap.py +0 -85
- package/sdd/99_toolchain/01_automation/agentic-dev/assets/repo-contract.template.json +0 -75
- package/sdd/99_toolchain/01_automation/agentic-dev/bootstrap_frontend_parity.sh +0 -84
- package/sdd/99_toolchain/01_automation/agentic-dev/init_frontend_parity.sh +0 -33
- package/sdd/99_toolchain/01_automation/agentic-dev/init_repo_contract.sh +0 -51
- package/sdd/99_toolchain/01_automation/agentic-dev/repo-contract.json +0 -76
- package/sdd/99_toolchain/01_automation/agentic-dev/resolve_frontend_target.py +0 -52
- package/sdd/99_toolchain/01_automation/agentic-dev/resolve_repo_contract.py +0 -56
- package/sdd/99_toolchain/01_automation/agentic-dev/run_frontend_target.sh +0 -100
- package/sdd/99_toolchain/01_automation/agentic-dev/run_repo_phase.sh +0 -140
- package/sdd/99_toolchain/01_automation/agentic-dev/validate_json_schema.py +0 -39
- package/sdd/99_toolchain/01_automation/agentic-parity-harness-design.md +0 -291
- 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/web_screen_capture/dashboard.png +0 -0
- package/sdd/99_toolchain/01_automation/assets/web_screen_capture/login.png +0 -0
- package/sdd/99_toolchain/01_automation/assets/web_screen_capture/orders.png +0 -0
- package/sdd/99_toolchain/01_automation/build_asset_recipes.py +0 -10
- package/sdd/99_toolchain/01_automation/build_screen_spec_pdf.py +0 -427
- package/sdd/99_toolchain/01_automation/capture_screen_assets.mjs +0 -148
- package/sdd/99_toolchain/01_automation/harness-layout.md +0 -34
- package/sdd/99_toolchain/01_automation/parity-execution-tooling-design.md +0 -319
- package/sdd/99_toolchain/01_automation/playwright_exactness_manifest.py +0 -21
- package/sdd/99_toolchain/01_automation/run_playwright_exactness.py +0 -87
- package/sdd/99_toolchain/01_automation/screen_spec_manifest.py +0 -321
- package/sdd/99_toolchain/01_automation/spec_asset_builder.py +0 -274
- package/sdd/99_toolchain/01_automation/ui-contract-projection.md +0 -79
- package/sdd/99_toolchain/01_automation/ui-parity/README.md +0 -60
- package/sdd/99_toolchain/01_automation/ui-parity/cli/extract-reference-pages.mjs +0 -2
- package/sdd/99_toolchain/01_automation/ui-parity/cli/materialize-reference-assets.mjs +0 -58
- package/sdd/99_toolchain/01_automation/ui-parity/cli/normalize-reference-assets.mjs +0 -2
- package/sdd/99_toolchain/01_automation/ui-parity/cli/route-gap-report.mjs +0 -187
- package/sdd/99_toolchain/01_automation/ui-parity/cli/run-proof.mjs +0 -50
- package/sdd/99_toolchain/01_automation/ui-parity/cli/scaffold-contract.mjs +0 -62
- package/sdd/99_toolchain/01_automation/ui-parity/cli/upload-parity1.mjs +0 -2
- package/sdd/99_toolchain/01_automation/ui-parity/contracts/collector-metadata.schema.json +0 -33
- package/sdd/99_toolchain/01_automation/ui-parity/contracts/proof-result.schema.json +0 -76
- package/sdd/99_toolchain/01_automation/ui-parity/contracts/route-gap-report.schema.json +0 -95
- package/sdd/99_toolchain/01_automation/ui-parity/core/capture-runner.mjs +0 -55
- package/sdd/99_toolchain/01_automation/ui-parity/core/load-adapter.mjs +0 -25
- package/sdd/99_toolchain/01_automation/ui-parity/core/load-contract.mjs +0 -81
- package/sdd/99_toolchain/01_automation/ui-parity/core/paths.mjs +0 -23
- package/sdd/99_toolchain/01_automation/ui-parity/core/proof-runner.mjs +0 -255
- package/sdd/99_toolchain/01_automation/ui-parity/interfaces/ui-parity-artifact-layout.md +0 -23
- package/sdd/99_toolchain/01_automation/ui-parity/interfaces/ui-parity-proof-interface.md +0 -60
- package/sdd/99_toolchain/01_automation/ui-parity/interfaces/ui-parity-route-gap-interface.md +0 -82
- package/sdd/99_toolchain/01_automation/ui-parity/runtime/playwright-runtime.mjs +0 -16
- package/sdd/99_toolchain/01_automation/ui-parity/runtime/static-runtime.mjs +0 -6
- package/sdd/99_toolchain/02_policies/.gitkeep +0 -1
- package/sdd/99_toolchain/02_policies/build-ast-governance-policy.md +0 -22
- package/sdd/99_toolchain/02_policies/compose-runtime-baseline-policy.md +0 -24
- package/sdd/99_toolchain/02_policies/convention-storage-policy.md +0 -26
- package/sdd/99_toolchain/02_policies/main-push-before-dev-deploy-policy.md +0 -27
- package/sdd/99_toolchain/02_policies/regression-verification-policy.md +0 -22
- package/sdd/99_toolchain/03_templates/.gitkeep +0 -1
- package/sdd/99_toolchain/03_templates/asset_recipe_manifest.example.py +0 -38
- package/sdd/99_toolchain/03_templates/generated_assets/README.md +0 -11
- package/sdd/99_toolchain/03_templates/generated_assets/example-brand-lockup.svg +0 -3
- package/sdd/99_toolchain/03_templates/generated_assets/example-brand-mark.svg +0 -3
- package/sdd/99_toolchain/03_templates/generated_assets/example-brand-wordmark.svg +0 -3
- package/sdd/99_toolchain/03_templates/playwright_exactness_manifest.example.py +0 -21
- package/sdd/99_toolchain/README.md +0 -23
- package/sdd/README.md +0 -21
- package/server/.dockerignore +0 -4
- package/server/.env.example +0 -19
- package/server/Dockerfile +0 -22
- package/server/Dockerfile.dev +0 -19
- package/server/README.md +0 -33
- package/server/__init__.py +0 -0
- package/server/api/__init__.py +0 -1
- package/server/api/http/__init__.py +0 -4
- package/server/api/http/app.py +0 -53
- package/server/api/http/router.py +0 -24
- package/server/config.py +0 -52
- package/server/contexts/__init__.py +0 -12
- package/server/contexts/alerts/__init__.py +0 -1
- package/server/contexts/alerts/application/__init__.py +0 -13
- package/server/contexts/alerts/application/services.py +0 -41
- package/server/contexts/alerts/contracts/__init__.py +0 -3
- package/server/contexts/alerts/contracts/http/__init__.py +0 -3
- package/server/contexts/alerts/contracts/http/router.py +0 -37
- package/server/contexts/alerts/domain/__init__.py +0 -15
- package/server/contexts/alerts/domain/models.py +0 -29
- package/server/contexts/alerts/infrastructure/__init__.py +0 -11
- package/server/contexts/alerts/infrastructure/repository.py +0 -41
- package/server/contexts/auth/__init__.py +0 -1
- package/server/contexts/auth/application/__init__.py +0 -3
- package/server/contexts/auth/application/ports.py +0 -10
- package/server/contexts/auth/application/services.py +0 -64
- package/server/contexts/auth/contracts/__init__.py +0 -4
- package/server/contexts/auth/contracts/http/__init__.py +0 -4
- package/server/contexts/auth/contracts/http/dependencies.py +0 -37
- package/server/contexts/auth/contracts/http/router.py +0 -19
- package/server/contexts/auth/domain/__init__.py +0 -3
- package/server/contexts/auth/domain/models.py +0 -24
- package/server/contexts/auth/infrastructure/__init__.py +0 -4
- package/server/contexts/auth/infrastructure/adapters/memory.py +0 -19
- package/server/contexts/auth/infrastructure/adapters/mongodb.py +0 -24
- package/server/contexts/auth/infrastructure/adapters/sqlalchemy.py +0 -74
- package/server/contexts/auth/infrastructure/repository.py +0 -28
- package/server/contexts/catalog/__init__.py +0 -1
- package/server/contexts/catalog/application/__init__.py +0 -28
- package/server/contexts/catalog/application/ports.py +0 -15
- package/server/contexts/catalog/application/services.py +0 -154
- package/server/contexts/catalog/contracts/__init__.py +0 -3
- package/server/contexts/catalog/contracts/http/__init__.py +0 -3
- package/server/contexts/catalog/contracts/http/router.py +0 -60
- package/server/contexts/catalog/domain/__init__.py +0 -45
- package/server/contexts/catalog/domain/models.py +0 -113
- package/server/contexts/catalog/infrastructure/__init__.py +0 -4
- package/server/contexts/catalog/infrastructure/adapters/memory.py +0 -62
- package/server/contexts/catalog/infrastructure/repository.py +0 -8
- package/server/contexts/fulfillment/__init__.py +0 -1
- package/server/contexts/fulfillment/application/__init__.py +0 -13
- package/server/contexts/fulfillment/application/ports.py +0 -20
- package/server/contexts/fulfillment/application/services.py +0 -85
- package/server/contexts/fulfillment/contracts/__init__.py +0 -3
- package/server/contexts/fulfillment/contracts/http/__init__.py +0 -3
- package/server/contexts/fulfillment/contracts/http/router.py +0 -40
- package/server/contexts/fulfillment/domain/__init__.py +0 -25
- package/server/contexts/fulfillment/domain/models.py +0 -73
- package/server/contexts/fulfillment/infrastructure/__init__.py +0 -13
- package/server/contexts/fulfillment/infrastructure/adapters/memory.py +0 -43
- package/server/contexts/fulfillment/infrastructure/repository.py +0 -97
- package/server/contexts/health/__init__.py +0 -1
- package/server/contexts/health/application/__init__.py +0 -3
- package/server/contexts/health/application/services.py +0 -2
- package/server/contexts/health/contracts/__init__.py +0 -3
- package/server/contexts/health/contracts/http/__init__.py +0 -3
- package/server/contexts/health/contracts/http/router.py +0 -10
- package/server/contexts/inventory/__init__.py +0 -1
- package/server/contexts/inventory/application/__init__.py +0 -28
- package/server/contexts/inventory/application/ports.py +0 -11
- package/server/contexts/inventory/application/services.py +0 -214
- package/server/contexts/inventory/contracts/__init__.py +0 -3
- package/server/contexts/inventory/contracts/http/__init__.py +0 -3
- package/server/contexts/inventory/contracts/http/router.py +0 -82
- package/server/contexts/inventory/domain/__init__.py +0 -33
- package/server/contexts/inventory/domain/models.py +0 -93
- package/server/contexts/inventory/infrastructure/__init__.py +0 -4
- package/server/contexts/inventory/infrastructure/adapters/memory.py +0 -24
- package/server/contexts/inventory/infrastructure/repository.py +0 -8
- package/server/contexts/orders/__init__.py +0 -1
- package/server/contexts/orders/application/__init__.py +0 -19
- package/server/contexts/orders/application/services.py +0 -127
- package/server/contexts/orders/contracts/__init__.py +0 -3
- package/server/contexts/orders/contracts/http/__init__.py +0 -3
- package/server/contexts/orders/contracts/http/router.py +0 -82
- package/server/contexts/orders/domain/__init__.py +0 -29
- package/server/contexts/orders/domain/models.py +0 -95
- package/server/contexts/orders/infrastructure/__init__.py +0 -7
- package/server/contexts/orders/infrastructure/repository.py +0 -104
- package/server/contexts/shipping/__init__.py +0 -1
- package/server/contexts/shipping/application/__init__.py +0 -13
- package/server/contexts/shipping/application/services.py +0 -92
- package/server/contexts/shipping/contracts/__init__.py +0 -3
- package/server/contexts/shipping/contracts/http/__init__.py +0 -3
- package/server/contexts/shipping/contracts/http/router.py +0 -40
- package/server/contexts/shipping/domain/__init__.py +0 -19
- package/server/contexts/shipping/domain/models.py +0 -48
- package/server/contexts/shipping/infrastructure/__init__.py +0 -9
- package/server/contexts/shipping/infrastructure/repository.py +0 -50
- package/server/contexts/support/__init__.py +0 -1
- package/server/contexts/support/application/__init__.py +0 -13
- package/server/contexts/support/application/services.py +0 -29
- package/server/contexts/support/contracts/__init__.py +0 -3
- package/server/contexts/support/contracts/http/__init__.py +0 -3
- package/server/contexts/support/contracts/http/router.py +0 -40
- package/server/contexts/support/domain/__init__.py +0 -13
- package/server/contexts/support/domain/models.py +0 -27
- package/server/contexts/support/infrastructure/__init__.py +0 -11
- package/server/contexts/support/infrastructure/repository.py +0 -70
- package/server/contexts/user/__init__.py +0 -1
- package/server/contexts/user/application/__init__.py +0 -3
- package/server/contexts/user/application/ports.py +0 -11
- package/server/contexts/user/application/services.py +0 -44
- package/server/contexts/user/contracts/__init__.py +0 -3
- package/server/contexts/user/contracts/http/__init__.py +0 -3
- package/server/contexts/user/contracts/http/router.py +0 -26
- package/server/contexts/user/domain/__init__.py +0 -3
- package/server/contexts/user/domain/models.py +0 -22
- package/server/contexts/user/infrastructure/__init__.py +0 -3
- package/server/contexts/user/infrastructure/adapters/memory.py +0 -27
- package/server/contexts/user/infrastructure/adapters/mongodb.py +0 -41
- package/server/contexts/user/infrastructure/adapters/sqlalchemy.py +0 -94
- package/server/contexts/user/infrastructure/factory.py +0 -28
- package/server/data/README.md +0 -24
- package/server/data/bootstrap/alerts.json +0 -38
- package/server/data/bootstrap/auth_accounts.json +0 -18
- package/server/data/bootstrap/catalog_products.json +0 -179
- package/server/data/bootstrap/fulfillment_events.json +0 -5
- package/server/data/bootstrap/fulfillment_notes.json +0 -5
- package/server/data/bootstrap/fulfillment_tasks.json +0 -50
- package/server/data/bootstrap/inventory_levels.json +0 -80
- package/server/data/bootstrap/orders.json +0 -62
- package/server/data/bootstrap/shipping_shipments.json +0 -50
- package/server/data/bootstrap/support_faqs.json +0 -26
- package/server/data/bootstrap/users.json +0 -20
- package/server/data/bootstrap_loader.py +0 -15
- package/server/docker-entrypoint.sh +0 -56
- package/server/main.py +0 -3
- package/server/pyproject.toml +0 -36
- package/server/shared/__init__.py +0 -1
- package/server/shared/application/__init__.py +0 -3
- package/server/shared/application/health.py +0 -2
- package/server/shared/infrastructure/__init__.py +0 -10
- package/server/shared/infrastructure/runtime.py +0 -6
- package/server/shared/infrastructure/security.py +0 -33
- package/server/tests/e2e/test_domain_feature_flows.py +0 -483
- package/server/tests/test_health.py +0 -49
- package/server/uv.lock +0 -1169
|
@@ -1,67 +0,0 @@
|
|
|
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-mobile",
|
|
17
|
-
targetBaseUrl: "http://127.0.0.1:4302",
|
|
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/03_verify/10_test/ui_parity/reference/${screen.id}.png`,
|
|
27
|
-
readySelector: "body",
|
|
28
|
-
readyTimeoutMs: 10000,
|
|
29
|
-
tags: ["template", "mobile"],
|
|
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-mobile",
|
|
38
|
-
name: "Template Mobile Operator",
|
|
39
|
-
email: "operator@example.com",
|
|
40
|
-
role: "operator",
|
|
41
|
-
status: "active",
|
|
42
|
-
}),
|
|
43
|
-
});
|
|
44
|
-
});
|
|
45
|
-
await page.addInitScript(() => {
|
|
46
|
-
window.localStorage.setItem(
|
|
47
|
-
"mobile.auth.token",
|
|
48
|
-
JSON.stringify({
|
|
49
|
-
access_token: "template-access-token",
|
|
50
|
-
token_type: "bearer",
|
|
51
|
-
user_id: "tmpl-mobile",
|
|
52
|
-
}),
|
|
53
|
-
);
|
|
54
|
-
});
|
|
55
|
-
if (route === "/login") {
|
|
56
|
-
await page.addInitScript(() => {
|
|
57
|
-
window.localStorage.removeItem("mobile.auth.token");
|
|
58
|
-
});
|
|
59
|
-
}
|
|
60
|
-
},
|
|
61
|
-
async waitForReady(page) {
|
|
62
|
-
await page.waitForLoadState("networkidle");
|
|
63
|
-
},
|
|
64
|
-
async resolveMaskRects() {
|
|
65
|
-
return [];
|
|
66
|
-
},
|
|
67
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { App } from "./app/App";
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
const API_BASE_URL =
|
|
2
|
-
(import.meta.env.VITE_API_BASE_URL as string | undefined)?.replace(/\/$/, "") ??
|
|
3
|
-
"";
|
|
4
|
-
|
|
5
|
-
interface RequestOptions {
|
|
6
|
-
accessToken?: string;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
interface WriteOptions extends RequestOptions {
|
|
10
|
-
body?: unknown;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
async function readJson<T>(response: Response): Promise<T> {
|
|
14
|
-
if (!response.ok) {
|
|
15
|
-
let message = "Request failed";
|
|
16
|
-
try {
|
|
17
|
-
const data = (await response.json()) as { detail?: string };
|
|
18
|
-
if (typeof data.detail === "string" && data.detail.length > 0) {
|
|
19
|
-
message = data.detail;
|
|
20
|
-
}
|
|
21
|
-
} catch {
|
|
22
|
-
message = response.statusText || message;
|
|
23
|
-
}
|
|
24
|
-
throw new Error(message);
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
return (await response.json()) as T;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
export async function apiGet<T>(
|
|
31
|
-
path: string,
|
|
32
|
-
options?: RequestOptions,
|
|
33
|
-
): Promise<T> {
|
|
34
|
-
const response = await fetch(`${API_BASE_URL}${path}`, {
|
|
35
|
-
headers: options?.accessToken
|
|
36
|
-
? { Authorization: `Bearer ${options.accessToken}` }
|
|
37
|
-
: undefined,
|
|
38
|
-
});
|
|
39
|
-
|
|
40
|
-
return readJson<T>(response);
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
export async function apiPatch<T>(
|
|
44
|
-
path: string,
|
|
45
|
-
options?: WriteOptions,
|
|
46
|
-
): Promise<T> {
|
|
47
|
-
const headers: Record<string, string> = {
|
|
48
|
-
"Content-Type": "application/json",
|
|
49
|
-
};
|
|
50
|
-
|
|
51
|
-
if (options?.accessToken) {
|
|
52
|
-
headers.Authorization = `Bearer ${options.accessToken}`;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
const response = await fetch(`${API_BASE_URL}${path}`, {
|
|
56
|
-
method: "PATCH",
|
|
57
|
-
headers,
|
|
58
|
-
body: JSON.stringify(options?.body ?? {}),
|
|
59
|
-
});
|
|
60
|
-
|
|
61
|
-
return readJson<T>(response);
|
|
62
|
-
}
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import { apiGet } from "@/api/client";
|
|
2
|
-
|
|
3
|
-
export interface FulfillmentStat {
|
|
4
|
-
label: string;
|
|
5
|
-
value: string;
|
|
6
|
-
tone?: string | null;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
export interface FulfillmentTimelineItem {
|
|
10
|
-
time: string;
|
|
11
|
-
title: string;
|
|
12
|
-
tone: string;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export interface FulfillmentStageLoad {
|
|
16
|
-
label: string;
|
|
17
|
-
value: string;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
export interface FulfillmentOverviewResponse {
|
|
21
|
-
throughput_total: string;
|
|
22
|
-
stats: FulfillmentStat[];
|
|
23
|
-
timeline: FulfillmentTimelineItem[];
|
|
24
|
-
stage_load: FulfillmentStageLoad[];
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
export interface FulfillmentTask {
|
|
28
|
-
id: string;
|
|
29
|
-
order_id: string;
|
|
30
|
-
title: string;
|
|
31
|
-
assignee: string;
|
|
32
|
-
stage: string;
|
|
33
|
-
status: string;
|
|
34
|
-
priority: string;
|
|
35
|
-
sla: string;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
export interface FulfillmentNote {
|
|
39
|
-
id: string;
|
|
40
|
-
note: string;
|
|
41
|
-
emphasis: string;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
export interface FulfillmentBoardResponse {
|
|
45
|
-
tasks: FulfillmentTask[];
|
|
46
|
-
notes: FulfillmentNote[];
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
export function fetchFulfillmentOverview(accessToken: string) {
|
|
50
|
-
return apiGet<FulfillmentOverviewResponse>("/fulfillment/overview", { accessToken });
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
export function fetchFulfillmentBoard(accessToken: string) {
|
|
54
|
-
return apiGet<FulfillmentBoardResponse>("/fulfillment/board", { accessToken });
|
|
55
|
-
}
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import { apiGet, apiPatch } from "@/api/client";
|
|
2
|
-
|
|
3
|
-
export interface ShippingStat {
|
|
4
|
-
label: string;
|
|
5
|
-
value: string;
|
|
6
|
-
tone?: string | null;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
export interface ShippingCarrierLoad {
|
|
10
|
-
label: string;
|
|
11
|
-
value: string;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export interface ShippingOverviewResponse {
|
|
15
|
-
stats: ShippingStat[];
|
|
16
|
-
carriers: ShippingCarrierLoad[];
|
|
17
|
-
highlighted_route: string;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
export interface ShipmentSummary {
|
|
21
|
-
shipment_id: string;
|
|
22
|
-
order_id: string;
|
|
23
|
-
carrier: string;
|
|
24
|
-
destination: string;
|
|
25
|
-
tracking_number: string;
|
|
26
|
-
status: string;
|
|
27
|
-
eta: string;
|
|
28
|
-
last_event: string;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
export interface ShipmentStatusTransition {
|
|
32
|
-
shipment_id: string;
|
|
33
|
-
previous_status: string;
|
|
34
|
-
status: string;
|
|
35
|
-
previous_last_event: string;
|
|
36
|
-
last_event: string;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
export function fetchShippingOverview(accessToken: string) {
|
|
40
|
-
return apiGet<ShippingOverviewResponse>("/shipping/overview", { accessToken });
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
export function fetchShipments(accessToken: string) {
|
|
44
|
-
return apiGet<ShipmentSummary[]>("/shipping/shipments", { accessToken });
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
export function updateShipmentStatus(
|
|
48
|
-
shipmentId: string,
|
|
49
|
-
accessToken: string,
|
|
50
|
-
body: { status: string; last_event: string; eta?: string },
|
|
51
|
-
) {
|
|
52
|
-
return apiPatch<ShipmentStatusTransition>(
|
|
53
|
-
`/shipping/shipments/${shipmentId}/status`,
|
|
54
|
-
{ accessToken, body },
|
|
55
|
-
);
|
|
56
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { Route, Routes } from "react-router-dom";
|
|
2
|
-
|
|
3
|
-
import { ProtectedRoute } from "@/auth/ProtectedRoute";
|
|
4
|
-
import { InShell } from "@/components/InShell";
|
|
5
|
-
import { DashboardPage } from "@/pages/DashboardPage";
|
|
6
|
-
import { FulfillmentPage } from "@/pages/FulfillmentPage";
|
|
7
|
-
import { LoginPage } from "@/pages/LoginPage";
|
|
8
|
-
import { ShippingPage } from "@/pages/ShippingPage";
|
|
9
|
-
|
|
10
|
-
export function App() {
|
|
11
|
-
return (
|
|
12
|
-
<Routes>
|
|
13
|
-
<Route path="/login" element={<LoginPage />} />
|
|
14
|
-
<Route element={<ProtectedRoute />}>
|
|
15
|
-
<Route element={<InShell />}>
|
|
16
|
-
<Route path="/" element={<DashboardPage />} />
|
|
17
|
-
<Route path="/fulfillment" element={<FulfillmentPage />} />
|
|
18
|
-
<Route path="/shipping" element={<ShippingPage />} />
|
|
19
|
-
</Route>
|
|
20
|
-
</Route>
|
|
21
|
-
</Routes>
|
|
22
|
-
);
|
|
23
|
-
}
|
|
@@ -1,122 +0,0 @@
|
|
|
1
|
-
import { createContext, useContext, useEffect, useMemo, useState, type ReactNode } from "react";
|
|
2
|
-
|
|
3
|
-
import { getMe, login as loginRequest } from "@/auth/auth-client";
|
|
4
|
-
import type { AuthToken, AuthUser, LoginCommand } from "@/auth/types";
|
|
5
|
-
|
|
6
|
-
const STORAGE_KEY = "mobile.auth.token";
|
|
7
|
-
|
|
8
|
-
interface AuthContextValue {
|
|
9
|
-
user: AuthUser | null;
|
|
10
|
-
token: AuthToken | null;
|
|
11
|
-
initializing: boolean;
|
|
12
|
-
authenticating: boolean;
|
|
13
|
-
login: (command: LoginCommand) => Promise<void>;
|
|
14
|
-
logout: () => void;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
const AuthContext = createContext<AuthContextValue | undefined>(undefined);
|
|
18
|
-
|
|
19
|
-
function readStoredToken(): AuthToken | null {
|
|
20
|
-
const raw = window.localStorage.getItem(STORAGE_KEY);
|
|
21
|
-
if (!raw) {
|
|
22
|
-
return null;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
try {
|
|
26
|
-
return JSON.parse(raw) as AuthToken;
|
|
27
|
-
} catch {
|
|
28
|
-
window.localStorage.removeItem(STORAGE_KEY);
|
|
29
|
-
return null;
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
function storeToken(token: AuthToken | null) {
|
|
34
|
-
if (token) {
|
|
35
|
-
window.localStorage.setItem(STORAGE_KEY, JSON.stringify(token));
|
|
36
|
-
return;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
window.localStorage.removeItem(STORAGE_KEY);
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
export function AuthProvider({ children }: { children: ReactNode }) {
|
|
43
|
-
const [token, setToken] = useState<AuthToken | null>(() => readStoredToken());
|
|
44
|
-
const [user, setUser] = useState<AuthUser | null>(null);
|
|
45
|
-
const [initializing, setInitializing] = useState(true);
|
|
46
|
-
const [authenticating, setAuthenticating] = useState(false);
|
|
47
|
-
|
|
48
|
-
useEffect(() => {
|
|
49
|
-
let cancelled = false;
|
|
50
|
-
|
|
51
|
-
async function bootstrap() {
|
|
52
|
-
if (!token) {
|
|
53
|
-
setUser(null);
|
|
54
|
-
setInitializing(false);
|
|
55
|
-
return;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
try {
|
|
59
|
-
const currentUser = await getMe(token.access_token);
|
|
60
|
-
if (!cancelled) {
|
|
61
|
-
setUser(currentUser);
|
|
62
|
-
}
|
|
63
|
-
} catch {
|
|
64
|
-
if (!cancelled) {
|
|
65
|
-
setToken(null);
|
|
66
|
-
setUser(null);
|
|
67
|
-
storeToken(null);
|
|
68
|
-
}
|
|
69
|
-
} finally {
|
|
70
|
-
if (!cancelled) {
|
|
71
|
-
setInitializing(false);
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
void bootstrap();
|
|
77
|
-
|
|
78
|
-
return () => {
|
|
79
|
-
cancelled = true;
|
|
80
|
-
};
|
|
81
|
-
}, [token]);
|
|
82
|
-
|
|
83
|
-
const value = useMemo<AuthContextValue>(
|
|
84
|
-
() => ({
|
|
85
|
-
user,
|
|
86
|
-
token,
|
|
87
|
-
initializing,
|
|
88
|
-
authenticating,
|
|
89
|
-
async login(command) {
|
|
90
|
-
setAuthenticating(true);
|
|
91
|
-
try {
|
|
92
|
-
const nextToken = await loginRequest(command);
|
|
93
|
-
storeToken(nextToken);
|
|
94
|
-
setToken(nextToken);
|
|
95
|
-
const currentUser = await getMe(nextToken.access_token);
|
|
96
|
-
setUser(currentUser);
|
|
97
|
-
} finally {
|
|
98
|
-
setAuthenticating(false);
|
|
99
|
-
setInitializing(false);
|
|
100
|
-
}
|
|
101
|
-
},
|
|
102
|
-
logout() {
|
|
103
|
-
storeToken(null);
|
|
104
|
-
setToken(null);
|
|
105
|
-
setUser(null);
|
|
106
|
-
setInitializing(false);
|
|
107
|
-
},
|
|
108
|
-
}),
|
|
109
|
-
[authenticating, initializing, token, user],
|
|
110
|
-
);
|
|
111
|
-
|
|
112
|
-
return <AuthContext.Provider value={value}>{children}</AuthContext.Provider>;
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
export function useAuth() {
|
|
116
|
-
const context = useContext(AuthContext);
|
|
117
|
-
if (!context) {
|
|
118
|
-
throw new Error("useAuth must be used within an AuthProvider");
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
return context;
|
|
122
|
-
}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { Navigate, Outlet, useLocation } from "react-router-dom";
|
|
2
|
-
|
|
3
|
-
import { useAuth } from "@/auth/AuthProvider";
|
|
4
|
-
import { inTheme } from "@/theme";
|
|
5
|
-
import { inThemeVars } from "@/theme-vars";
|
|
6
|
-
|
|
7
|
-
export function ProtectedRoute() {
|
|
8
|
-
const { initializing, user } = useAuth();
|
|
9
|
-
const location = useLocation();
|
|
10
|
-
|
|
11
|
-
if (initializing) {
|
|
12
|
-
return (
|
|
13
|
-
<div
|
|
14
|
-
className="flex min-h-screen items-center justify-center bg-[var(--in-shell-bg)] text-sm font-medium text-[var(--in-muted)]"
|
|
15
|
-
style={inThemeVars(inTheme)}
|
|
16
|
-
>
|
|
17
|
-
세션을 확인하는 중입니다.
|
|
18
|
-
</div>
|
|
19
|
-
);
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
if (!user) {
|
|
23
|
-
return <Navigate to="/login" replace state={{ from: location }} />;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
return <Outlet />;
|
|
27
|
-
}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import type { AuthToken, AuthUser, LoginCommand } from "@/auth/types";
|
|
2
|
-
|
|
3
|
-
const API_BASE_URL = (import.meta.env.VITE_API_BASE_URL as string | undefined)?.replace(/\/$/, "") ?? "";
|
|
4
|
-
|
|
5
|
-
async function readJson<T>(response: Response): Promise<T> {
|
|
6
|
-
if (!response.ok) {
|
|
7
|
-
let message = "Request failed";
|
|
8
|
-
try {
|
|
9
|
-
const data = (await response.json()) as { detail?: string };
|
|
10
|
-
if (typeof data.detail === "string" && data.detail.length > 0) {
|
|
11
|
-
message = data.detail;
|
|
12
|
-
}
|
|
13
|
-
} catch {
|
|
14
|
-
message = response.statusText || message;
|
|
15
|
-
}
|
|
16
|
-
throw new Error(message);
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
return (await response.json()) as T;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
export async function login(command: LoginCommand): Promise<AuthToken> {
|
|
23
|
-
const response = await fetch(`${API_BASE_URL}/auth/login`, {
|
|
24
|
-
method: "POST",
|
|
25
|
-
headers: { "Content-Type": "application/json" },
|
|
26
|
-
body: JSON.stringify(command),
|
|
27
|
-
});
|
|
28
|
-
|
|
29
|
-
return readJson<AuthToken>(response);
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
export async function getMe(accessToken: string): Promise<AuthUser> {
|
|
33
|
-
const response = await fetch(`${API_BASE_URL}/auth/me`, {
|
|
34
|
-
headers: { Authorization: `Bearer ${accessToken}` },
|
|
35
|
-
});
|
|
36
|
-
|
|
37
|
-
return readJson<AuthUser>(response);
|
|
38
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
export interface AuthToken {
|
|
2
|
-
access_token: string;
|
|
3
|
-
token_type: string;
|
|
4
|
-
user_id: string;
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
export interface AuthUser {
|
|
8
|
-
id: string;
|
|
9
|
-
name: string;
|
|
10
|
-
email: string;
|
|
11
|
-
role: string;
|
|
12
|
-
status: string;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export interface LoginCommand {
|
|
16
|
-
email: string;
|
|
17
|
-
password: string;
|
|
18
|
-
}
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
import { Globe2, Languages, Sparkles, Truck } from "lucide-react";
|
|
2
|
-
import { NavLink, Outlet } from "react-router-dom";
|
|
3
|
-
|
|
4
|
-
import { useAuth } from "@/auth/AuthProvider";
|
|
5
|
-
import { Button } from "@/components/ui/button";
|
|
6
|
-
import { inTheme } from "@/theme";
|
|
7
|
-
import { inThemeVars } from "@/theme-vars";
|
|
8
|
-
|
|
9
|
-
const navItems = [
|
|
10
|
-
{ to: "/", label: "Overview", icon: Globe2 },
|
|
11
|
-
{ to: "/fulfillment", label: "Fulfillment", icon: Languages },
|
|
12
|
-
{ to: "/shipping", label: "Shipping", icon: Truck },
|
|
13
|
-
];
|
|
14
|
-
|
|
15
|
-
export function InShell() {
|
|
16
|
-
const { logout, user } = useAuth();
|
|
17
|
-
|
|
18
|
-
return (
|
|
19
|
-
<div
|
|
20
|
-
className="min-h-screen bg-[var(--in-shell-bg)] text-[var(--in-text)]"
|
|
21
|
-
style={inThemeVars(inTheme)}
|
|
22
|
-
>
|
|
23
|
-
<header className="border-b border-[var(--in-border)] bg-[var(--in-panel-bg)]">
|
|
24
|
-
<div className="mx-auto flex max-w-7xl flex-wrap items-center gap-4 px-6 py-5">
|
|
25
|
-
<div>
|
|
26
|
-
<div className="text-xs font-black uppercase tracking-[0.24em] text-[var(--in-accent)]">IN</div>
|
|
27
|
-
<div className="mt-1 text-xl font-black tracking-[-0.04em]">Operations Relay Workspace</div>
|
|
28
|
-
</div>
|
|
29
|
-
|
|
30
|
-
<nav className="flex items-center gap-2 md:ml-8">
|
|
31
|
-
{navItems.map((item) => {
|
|
32
|
-
const Icon = item.icon;
|
|
33
|
-
return (
|
|
34
|
-
<NavLink
|
|
35
|
-
key={item.to}
|
|
36
|
-
to={item.to}
|
|
37
|
-
end={item.to === "/"}
|
|
38
|
-
className={({ isActive }) =>
|
|
39
|
-
[
|
|
40
|
-
"inline-flex items-center gap-2 rounded-full px-4 py-2 text-sm font-semibold transition-colors",
|
|
41
|
-
isActive
|
|
42
|
-
? "bg-[var(--in-accent-soft)] text-[var(--in-accent)]"
|
|
43
|
-
: "text-[var(--in-muted)] hover:bg-white",
|
|
44
|
-
].join(" ")
|
|
45
|
-
}
|
|
46
|
-
>
|
|
47
|
-
<Icon className="h-4 w-4" />
|
|
48
|
-
{item.label}
|
|
49
|
-
</NavLink>
|
|
50
|
-
);
|
|
51
|
-
})}
|
|
52
|
-
</nav>
|
|
53
|
-
|
|
54
|
-
<div className="ml-auto flex flex-wrap items-center gap-3">
|
|
55
|
-
<div 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)]">
|
|
56
|
-
<Sparkles className="h-4 w-4" />
|
|
57
|
-
Multilingual relay active
|
|
58
|
-
</div>
|
|
59
|
-
<div className="rounded-full border border-[var(--in-border)] bg-white px-4 py-2 text-sm font-semibold text-[var(--in-text)]">
|
|
60
|
-
{user?.name ?? user?.email}
|
|
61
|
-
</div>
|
|
62
|
-
<Button variant="outline" onClick={logout}>
|
|
63
|
-
Log out
|
|
64
|
-
</Button>
|
|
65
|
-
</div>
|
|
66
|
-
</div>
|
|
67
|
-
</header>
|
|
68
|
-
|
|
69
|
-
<main className="mx-auto max-w-7xl px-6 py-8">
|
|
70
|
-
<Outlet />
|
|
71
|
-
</main>
|
|
72
|
-
</div>
|
|
73
|
-
);
|
|
74
|
-
}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { cva, type VariantProps } from "class-variance-authority";
|
|
3
|
-
|
|
4
|
-
import { cn } from "@/lib/cn";
|
|
5
|
-
|
|
6
|
-
const buttonVariants = cva(
|
|
7
|
-
"inline-flex items-center justify-center rounded-full text-sm font-semibold transition-colors disabled:pointer-events-none disabled:opacity-50",
|
|
8
|
-
{
|
|
9
|
-
variants: {
|
|
10
|
-
variant: {
|
|
11
|
-
default: "bg-[var(--in-accent)] text-white hover:opacity-90",
|
|
12
|
-
secondary: "bg-[var(--in-accent-soft)] text-[var(--in-accent)] hover:opacity-90",
|
|
13
|
-
outline: "border border-[var(--in-border)] bg-white text-[var(--in-text)] hover:bg-[var(--in-accent-soft)]",
|
|
14
|
-
},
|
|
15
|
-
size: {
|
|
16
|
-
default: "h-10 px-4 py-2",
|
|
17
|
-
sm: "h-9 px-3",
|
|
18
|
-
lg: "h-11 px-5",
|
|
19
|
-
},
|
|
20
|
-
},
|
|
21
|
-
defaultVariants: {
|
|
22
|
-
variant: "default",
|
|
23
|
-
size: "default",
|
|
24
|
-
},
|
|
25
|
-
},
|
|
26
|
-
);
|
|
27
|
-
|
|
28
|
-
export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {}
|
|
29
|
-
|
|
30
|
-
const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(({ className, variant, size, ...props }, ref) => {
|
|
31
|
-
return <button ref={ref} className={cn(buttonVariants({ variant, size }), className)} {...props} />;
|
|
32
|
-
});
|
|
33
|
-
Button.displayName = "Button";
|
|
34
|
-
|
|
35
|
-
export { Button, buttonVariants };
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import type { HTMLAttributes } from "react";
|
|
2
|
-
|
|
3
|
-
import { cn } from "@/lib/cn";
|
|
4
|
-
|
|
5
|
-
export function Card({ className, ...props }: HTMLAttributes<HTMLDivElement>) {
|
|
6
|
-
return (
|
|
7
|
-
<div
|
|
8
|
-
className={cn(
|
|
9
|
-
"rounded-[var(--in-card-radius)] border border-[var(--in-border)] bg-[var(--in-panel-bg)]",
|
|
10
|
-
className,
|
|
11
|
-
)}
|
|
12
|
-
{...props}
|
|
13
|
-
/>
|
|
14
|
-
);
|
|
15
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
|
|
3
|
-
import { cn } from "@/lib/cn";
|
|
4
|
-
|
|
5
|
-
export interface InputProps extends React.InputHTMLAttributes<HTMLInputElement> {}
|
|
6
|
-
|
|
7
|
-
const Input = React.forwardRef<HTMLInputElement, InputProps>(({ className, ...props }, ref) => {
|
|
8
|
-
return (
|
|
9
|
-
<input
|
|
10
|
-
ref={ref}
|
|
11
|
-
className={cn(
|
|
12
|
-
"flex h-11 w-full rounded-2xl border border-[var(--in-border)] bg-white px-4 py-2 text-sm text-[var(--in-text)] outline-none placeholder:text-[var(--in-muted)] focus:border-[var(--in-accent)] focus:ring-2 focus:ring-[#d6eee7]",
|
|
13
|
-
className,
|
|
14
|
-
)}
|
|
15
|
-
{...props}
|
|
16
|
-
/>
|
|
17
|
-
);
|
|
18
|
-
});
|
|
19
|
-
Input.displayName = "Input";
|
|
20
|
-
|
|
21
|
-
export { Input };
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
[
|
|
2
|
-
{
|
|
3
|
-
"id": "TIN_001",
|
|
4
|
-
"route": "/login",
|
|
5
|
-
"binding": "direct",
|
|
6
|
-
"notes": ["Authentication entry route for the mobile workspace."]
|
|
7
|
-
},
|
|
8
|
-
{
|
|
9
|
-
"id": "TIN_002",
|
|
10
|
-
"route": "/",
|
|
11
|
-
"binding": "protected",
|
|
12
|
-
"notes": ["Overview route for fulfillment and shipping relay status."]
|
|
13
|
-
},
|
|
14
|
-
{
|
|
15
|
-
"id": "TIN_003",
|
|
16
|
-
"route": "/fulfillment",
|
|
17
|
-
"binding": "protected",
|
|
18
|
-
"notes": ["Fulfillment board route backed by the fulfillment domain."]
|
|
19
|
-
},
|
|
20
|
-
{
|
|
21
|
-
"id": "TIN_004",
|
|
22
|
-
"route": "/shipping",
|
|
23
|
-
"binding": "protected",
|
|
24
|
-
"notes": ["Shipping operations route backed by the shipping domain."]
|
|
25
|
-
}
|
|
26
|
-
]
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
[
|
|
2
|
-
{
|
|
3
|
-
"id": "TIN_001",
|
|
4
|
-
"title": "Login",
|
|
5
|
-
"tags": ["auth", "entry"]
|
|
6
|
-
},
|
|
7
|
-
{
|
|
8
|
-
"id": "TIN_002",
|
|
9
|
-
"title": "Overview",
|
|
10
|
-
"tags": ["dashboard", "protected"]
|
|
11
|
-
},
|
|
12
|
-
{
|
|
13
|
-
"id": "TIN_003",
|
|
14
|
-
"title": "Fulfillment",
|
|
15
|
-
"tags": ["fulfillment", "protected"]
|
|
16
|
-
},
|
|
17
|
-
{
|
|
18
|
-
"id": "TIN_004",
|
|
19
|
-
"title": "Shipping",
|
|
20
|
-
"tags": ["shipping", "protected"]
|
|
21
|
-
}
|
|
22
|
-
]
|