From 19029a5a77c7f3f0edc4983bde030d13f36dd16d Mon Sep 17 00:00:00 2001 From: Hardik Date: Mon, 18 May 2026 23:18:58 +0530 Subject: [PATCH] =?UTF-8?q?chore:=20restructure=20repo=20=E2=80=94=20flatt?= =?UTF-8?q?en=20App/pelagia-portal=20to=20App,=20rename=20Prototype?= =?UTF-8?q?=E2=86=92Wireframe=20and=20Spec=E2=86=92Design?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Sonnet 4.6 --- .../agent-memory/devops-env-manager/MEMORY.md | 1 + .../devops-env-manager/project_services.md | 66 ++ .claude/agents/devops-env-manager.md | 242 ++++++ .claude/agents/pelagia-feature-developer.md | 211 +++++ .claude/agents/pelagia-playwright-tester.md | 221 ++++++ .claude/settings.local.json | 15 +- App/{pelagia-portal => }/.env.example | 0 App/{pelagia-portal => }/.gitignore | 0 App/{pelagia-portal => }/CLAUDE.md | 0 App/{pelagia-portal => }/README.md | 0 .../app/(auth)/login/page.tsx | 0 .../(portal)/admin/accounts/account-form.tsx | 0 .../app/(portal)/admin/accounts/actions.ts | 0 .../app/(portal)/admin/accounts/page.tsx | 0 .../admin/products/[id]/item-price-chart.tsx | 0 .../app/(portal)/admin/products/[id]/page.tsx | 0 .../app/(portal)/admin/products/actions.ts | 0 .../app/(portal)/admin/products/page.tsx | 0 .../(portal)/admin/products/product-form.tsx | 0 .../admin/sites/[id]/consumption-form.tsx | 0 .../app/(portal)/admin/sites/[id]/page.tsx | 0 .../(portal)/admin/sites/[id]/site-charts.tsx | 0 .../app/(portal)/admin/sites/actions.ts | 0 .../app/(portal)/admin/sites/page.tsx | 0 .../app/(portal)/admin/sites/site-form.tsx | 0 .../admin/superuser-requests/actions.ts | 0 .../admin/superuser-requests/page.tsx | 0 .../superuser-requests/request-actions.tsx | 0 .../app/(portal)/admin/users/actions.ts | 0 .../admin/users/grant-superuser-button.tsx | 0 .../app/(portal)/admin/users/page.tsx | 0 .../app/(portal)/admin/users/user-form.tsx | 0 .../app/(portal)/admin/vendors/[id]/page.tsx | 0 .../admin/vendors/[id]/vendor-items-table.tsx | 0 .../app/(portal)/admin/vendors/actions.ts | 0 .../app/(portal)/admin/vendors/page.tsx | 0 .../(portal)/admin/vendors/vendor-form.tsx | 0 .../app/(portal)/admin/vessels/[id]/page.tsx | 0 .../app/(portal)/admin/vessels/actions.ts | 0 .../app/(portal)/admin/vessels/page.tsx | 0 .../(portal)/admin/vessels/vessel-form.tsx | 0 .../app/(portal)/approvals/[id]/actions.ts | 0 .../approvals/[id]/approval-actions.tsx | 0 .../approvals/[id]/manager-edit-po-form.tsx | 0 .../[id]/manager-line-edit-actions.ts | 0 .../[id]/manager-line-items-editor.tsx | 0 .../approvals/[id]/manager-po-edit-actions.ts | 0 .../app/(portal)/approvals/[id]/page.tsx | 0 .../(portal)/approvals/approvals-search.tsx | 0 .../app/(portal)/approvals/page.tsx | 0 .../app/(portal)/dashboard/page.tsx | 0 .../app/(portal)/history/history-filters.tsx | 0 .../app/(portal)/history/page.tsx | 0 .../app/(portal)/inventory/cart/cart-view.tsx | 0 .../app/(portal)/inventory/cart/page.tsx | 0 .../(portal)/inventory/items/items-table.tsx | 0 .../app/(portal)/inventory/items/page.tsx | 0 .../(portal)/inventory/vendors/[id]/page.tsx | 0 .../vendors/[id]/vendor-items-table.tsx | 0 .../app/(portal)/inventory/vendors/page.tsx | 0 .../inventory/vendors/vendors-table.tsx | 0 .../app/(portal)/layout.tsx | 0 .../app/(portal)/my-orders/page.tsx | 0 .../app/(portal)/payments/actions.ts | 0 .../app/(portal)/payments/history/page.tsx | 0 .../history/payment-history-filters.tsx | 0 .../app/(portal)/payments/page.tsx | 0 .../app/(portal)/payments/payment-actions.tsx | 0 .../app/(portal)/po/[id]/actions.ts | 0 .../app/(portal)/po/[id]/edit/actions.ts | 0 .../(portal)/po/[id]/edit/edit-po-form.tsx | 0 .../app/(portal)/po/[id]/edit/page.tsx | 0 .../app/(portal)/po/[id]/page.tsx | 0 .../app/(portal)/po/[id]/receipt/actions.ts | 0 .../app/(portal)/po/[id]/receipt/page.tsx | 0 .../(portal)/po/[id]/receipt/receipt-form.tsx | 0 .../app/(portal)/po/[id]/vendor-id-form.tsx | 0 .../app/(portal)/po/import/actions.ts | 0 .../app/(portal)/po/import/import-form.tsx | 0 .../app/(portal)/po/import/page.tsx | 0 .../app/(portal)/po/new/actions.ts | 0 .../app/(portal)/po/new/new-po-form.tsx | 0 .../app/(portal)/po/new/page.tsx | 0 .../app/(portal)/profile/actions.ts | 0 .../(portal)/profile/change-password-form.tsx | 0 .../app/(portal)/profile/page.tsx | 0 .../(portal)/profile/signature-uploader.tsx | 0 .../profile/superuser-request-form.tsx | 0 .../app/actions/link-document.ts | 0 .../app/api/auth/[...nextauth]/route.ts | 0 .../app/api/files/dev/[...key]/route.ts | 0 .../app/api/files/sign/route.ts | 0 .../app/api/gst/captcha/route.ts | 0 App/{pelagia-portal => }/app/api/gst/route.ts | 0 .../app/api/notifications/read/route.ts | 0 .../app/api/notifications/route.ts | 0 .../app/api/po/[id]/export/route.ts | 0 .../app/api/po/import/route.ts | 0 .../app/api/products/search/route.ts | 0 .../app/api/reports/export/route.ts | 0 App/{pelagia-portal => }/app/globals.css | 0 App/{pelagia-portal => }/app/layout.tsx | 0 App/{pelagia-portal => }/app/page.tsx | 0 App/{pelagia-portal => }/auth.ts | 0 .../components/dashboard/spend-charts.tsx | 0 .../components/dashboard/stat-card.tsx | 0 .../inventory/add-to-cart-button.tsx | 0 .../components/inventory/site-select.tsx | 0 .../components/layout/cart-icon.tsx | 0 .../components/layout/desktop-required.tsx | 0 .../components/layout/header.tsx | 0 .../components/layout/mobile-bottom-nav.tsx | 0 .../components/layout/mobile-header.tsx | 0 .../components/layout/notification-bell.tsx | 0 .../components/layout/sidebar.tsx | 0 .../components/po/discard-draft-button.tsx | 0 .../components/po/file-uploader.tsx | 0 .../components/po/po-detail.tsx | 0 .../components/po/po-line-items-editor.tsx | 0 .../components/po/po-status-badge.tsx | 0 .../components/po/submit-draft-button.tsx | 0 .../components/ui/admin-dialog.tsx | 0 .../components/ui/badge.tsx | 0 .../components/ui/button.tsx | 0 .../components/ui/card.tsx | 0 .../components/ui/confirm-delete-button.tsx | 0 .../components/ui/input.tsx | 0 .../components/ui/label.tsx | 0 .../components/ui/textarea.tsx | 0 .../emails/edits-requested.tsx | 0 App/{pelagia-portal => }/emails/layout.tsx | 0 .../emails/payment-processed.tsx | 0 .../emails/po-approved.tsx | 0 .../emails/po-rejected.tsx | 0 .../emails/po-submitted.tsx | 0 .../emails/receipt-confirmed.tsx | 0 .../emails/vendor-id-needed.tsx | 0 App/{pelagia-portal => }/lib/cart.ts | 0 App/{pelagia-portal => }/lib/db.ts | 0 App/{pelagia-portal => }/lib/geo.ts | 0 App/{pelagia-portal => }/lib/notifier.ts | 0 App/{pelagia-portal => }/lib/permissions.ts | 0 .../lib/po-import-parser.ts | 0 .../lib/po-state-machine.ts | 0 App/{pelagia-portal => }/lib/storage.ts | 0 App/{pelagia-portal => }/lib/upload-files.ts | 0 App/{pelagia-portal => }/lib/utils.ts | 0 .../lib/validations/po.ts | 0 .../lib/validations/user.ts | 0 App/{pelagia-portal => }/middleware.ts | 0 App/{pelagia-portal => }/next.config.ts | 0 App/package.json | 90 +++ .../.claude/scheduled_tasks.lock | 1 - App/pelagia-portal/package.json | 80 -- App/{pelagia-portal => }/playwright.config.ts | 0 App/{pelagia-portal => }/pnpm-lock.yaml | 0 App/pnpm-workspace.yaml | 7 + App/{pelagia-portal => }/postcss.config.mjs | 0 .../20260503171522_add_item_db/migration.sql | 0 .../migration.sql | 0 .../migration.sql | 0 .../migration.sql | 0 .../migration.sql | 0 .../migration.sql | 0 .../migration.sql | 0 .../migration.sql | 0 .../migrations/20260514185519_/migration.sql | 0 .../migration.sql | 0 .../migration.sql | 0 .../migration.sql | 0 .../migration.sql | 0 .../prisma/migrations/migration_lock.toml | 0 App/{pelagia-portal => }/prisma/schema.prisma | 0 App/{pelagia-portal => }/prisma/seed.ts | 0 App/{pelagia-portal => }/requirements.txt | 0 .../scripts/captcha-area.png | Bin App/{pelagia-portal => }/scripts/captcha.png | Bin .../scripts/page-before-fill.png | Bin App/{pelagia-portal => }/scripts/result.png | Bin .../scripts/searchtp-page.png | Bin .../tests/e2e/accounts-payment.spec.ts | 0 .../tests/e2e/admin-bordered-buttons.spec.ts | 0 .../e2e/approvals-edit-highlight.spec.ts | 0 .../tests/e2e/auth.spec.ts | 0 .../tests/e2e/dashboard-status-badges.spec.ts | 0 .../tests/e2e/dashboard/po-status-badges.js | 0 .../tests/e2e/export-gate.spec.ts | 0 .../tests/e2e/helpers/auth.js | 0 .../tests/e2e/helpers/login.ts | 0 .../tests/e2e/inventory/cart-icon.spec.ts | 0 .../tests/e2e/inventory/items-tags.spec.ts | 0 .../tests/e2e/manager-approvals.spec.ts | 0 .../e2e/mobile/accounts-payments.spec.ts | 0 .../tests/e2e/mobile/bottom-nav.spec.ts | 0 .../tests/e2e/mobile/desktop-required.spec.ts | 0 .../e2e/mobile/manager-approvals.spec.ts | 0 .../tests/e2e/notification-bell.spec.ts | 0 .../tests/e2e/partial-receipt.spec.ts | 0 .../tests/e2e/payment-history.spec.ts | 0 .../tests/e2e/po-export.spec.ts | 0 .../tests/e2e/po-submit-button.spec.ts | 0 .../tests/e2e/profile.spec.ts | 0 .../tests/e2e/rebrand.spec.ts | 0 .../tests/e2e/submitter-journey.spec.ts | 0 .../tests/e2e/vendor-auto-verify.spec.ts | 0 .../integration/approval-actions.test.ts | 0 .../tests/integration/create-po.test.ts | 0 .../tests/integration/discard-po.test.ts | 0 .../tests/integration/helpers.ts | 0 .../tests/integration/import-api.test.ts | 0 .../integration/manager-po-creation.test.ts | 0 .../tests/integration/payment-actions.test.ts | 0 .../tests/integration/products-search.test.ts | 0 .../tests/integration/vendor-approval.test.ts | 0 App/{pelagia-portal => }/tests/setup.ts | 0 .../tests/unit/permissions.test.ts | 0 .../tests/unit/po-import-parser.test.ts | 0 .../tests/unit/po-line-items-editor.test.tsx | 0 .../tests/unit/po-state-machine.test.ts | 0 .../tests/unit/po-status-badge.test.tsx | 0 .../tests/unit/utils.test.ts | 0 .../tests/unit/validations.test.ts | 0 App/{pelagia-portal => }/tsconfig.json | 0 App/{pelagia-portal => }/vitest.config.ts | 0 .../vitest.integration.config.ts | 0 {Spec => Design}/01-design-document.md | 0 {Spec => Design}/02-architecture.md | 0 {Spec => Design}/03-open-questions.md | 0 {Spec => Design}/TEST_PLAN.md | 0 {Spec => Design}/Untitled.png | Bin GstService/package-lock.json | 252 +++--- Progress/TODO.md | 10 + Tests/e2e-test-framework.md | 309 -------- Tests/e2e-test-plan.md | 240 ------ Tests/test-report-2026-05-17.md | 154 ---- {Prototype => Wireframe}/20260429_005636.jpg | Bin .../Pelagia Diagrams.html | 0 .../Pelagia Portal Wireframes.html | 0 .../Pelagia System Diagrams v2.html | 0 {Prototype => Wireframe}/Sample_PO.xlsx | Bin {Prototype => Wireframe}/design-canvas.jsx | 0 {Prototype => Wireframe}/tweaks-panel.jsx | 0 design_handoff_pelagia_portal/DESIGN.md | 719 ------------------ .../Pelagia Portal.html | 29 - design_handoff_pelagia_portal/README.md | 398 ---------- design_handoff_pelagia_portal/app.jsx | 227 ------ design_handoff_pelagia_portal/components.jsx | 104 --- design_handoff_pelagia_portal/data.jsx | 234 ------ design_handoff_pelagia_portal/pages-1.jsx | 263 ------- design_handoff_pelagia_portal/pages-2.jsx | 502 ------------ design_handoff_pelagia_portal/pages-3.jsx | 490 ------------ design_handoff_pelagia_portal/pages-4.jsx | 451 ----------- design_handoff_pelagia_portal/styles.css | 604 --------------- 253 files changed, 976 insertions(+), 4944 deletions(-) create mode 100644 .claude/agent-memory/devops-env-manager/MEMORY.md create mode 100644 .claude/agent-memory/devops-env-manager/project_services.md create mode 100644 .claude/agents/devops-env-manager.md create mode 100644 .claude/agents/pelagia-feature-developer.md create mode 100644 .claude/agents/pelagia-playwright-tester.md rename App/{pelagia-portal => }/.env.example (100%) rename App/{pelagia-portal => }/.gitignore (100%) rename App/{pelagia-portal => }/CLAUDE.md (100%) rename App/{pelagia-portal => }/README.md (100%) rename App/{pelagia-portal => }/app/(auth)/login/page.tsx (100%) rename App/{pelagia-portal => }/app/(portal)/admin/accounts/account-form.tsx (100%) rename App/{pelagia-portal => }/app/(portal)/admin/accounts/actions.ts (100%) rename App/{pelagia-portal => }/app/(portal)/admin/accounts/page.tsx (100%) rename App/{pelagia-portal => }/app/(portal)/admin/products/[id]/item-price-chart.tsx (100%) rename App/{pelagia-portal => }/app/(portal)/admin/products/[id]/page.tsx (100%) rename App/{pelagia-portal => }/app/(portal)/admin/products/actions.ts (100%) rename App/{pelagia-portal => }/app/(portal)/admin/products/page.tsx (100%) rename App/{pelagia-portal => }/app/(portal)/admin/products/product-form.tsx (100%) rename App/{pelagia-portal => }/app/(portal)/admin/sites/[id]/consumption-form.tsx (100%) rename App/{pelagia-portal => }/app/(portal)/admin/sites/[id]/page.tsx (100%) rename App/{pelagia-portal => }/app/(portal)/admin/sites/[id]/site-charts.tsx (100%) rename App/{pelagia-portal => }/app/(portal)/admin/sites/actions.ts (100%) rename App/{pelagia-portal => }/app/(portal)/admin/sites/page.tsx (100%) rename App/{pelagia-portal => }/app/(portal)/admin/sites/site-form.tsx (100%) rename App/{pelagia-portal => }/app/(portal)/admin/superuser-requests/actions.ts (100%) rename App/{pelagia-portal => }/app/(portal)/admin/superuser-requests/page.tsx (100%) rename App/{pelagia-portal => }/app/(portal)/admin/superuser-requests/request-actions.tsx (100%) rename App/{pelagia-portal => }/app/(portal)/admin/users/actions.ts (100%) rename App/{pelagia-portal => }/app/(portal)/admin/users/grant-superuser-button.tsx (100%) rename App/{pelagia-portal => }/app/(portal)/admin/users/page.tsx (100%) rename App/{pelagia-portal => }/app/(portal)/admin/users/user-form.tsx (100%) rename App/{pelagia-portal => }/app/(portal)/admin/vendors/[id]/page.tsx (100%) rename App/{pelagia-portal => }/app/(portal)/admin/vendors/[id]/vendor-items-table.tsx (100%) rename App/{pelagia-portal => }/app/(portal)/admin/vendors/actions.ts (100%) rename App/{pelagia-portal => }/app/(portal)/admin/vendors/page.tsx (100%) rename App/{pelagia-portal => }/app/(portal)/admin/vendors/vendor-form.tsx (100%) rename App/{pelagia-portal => }/app/(portal)/admin/vessels/[id]/page.tsx (100%) rename App/{pelagia-portal => }/app/(portal)/admin/vessels/actions.ts (100%) rename App/{pelagia-portal => }/app/(portal)/admin/vessels/page.tsx (100%) rename App/{pelagia-portal => }/app/(portal)/admin/vessels/vessel-form.tsx (100%) rename App/{pelagia-portal => }/app/(portal)/approvals/[id]/actions.ts (100%) rename App/{pelagia-portal => }/app/(portal)/approvals/[id]/approval-actions.tsx (100%) rename App/{pelagia-portal => }/app/(portal)/approvals/[id]/manager-edit-po-form.tsx (100%) rename App/{pelagia-portal => }/app/(portal)/approvals/[id]/manager-line-edit-actions.ts (100%) rename App/{pelagia-portal => }/app/(portal)/approvals/[id]/manager-line-items-editor.tsx (100%) rename App/{pelagia-portal => }/app/(portal)/approvals/[id]/manager-po-edit-actions.ts (100%) rename App/{pelagia-portal => }/app/(portal)/approvals/[id]/page.tsx (100%) rename App/{pelagia-portal => }/app/(portal)/approvals/approvals-search.tsx (100%) rename App/{pelagia-portal => }/app/(portal)/approvals/page.tsx (100%) rename App/{pelagia-portal => }/app/(portal)/dashboard/page.tsx (100%) rename App/{pelagia-portal => }/app/(portal)/history/history-filters.tsx (100%) rename App/{pelagia-portal => }/app/(portal)/history/page.tsx (100%) rename App/{pelagia-portal => }/app/(portal)/inventory/cart/cart-view.tsx (100%) rename App/{pelagia-portal => }/app/(portal)/inventory/cart/page.tsx (100%) rename App/{pelagia-portal => }/app/(portal)/inventory/items/items-table.tsx (100%) rename App/{pelagia-portal => }/app/(portal)/inventory/items/page.tsx (100%) rename App/{pelagia-portal => }/app/(portal)/inventory/vendors/[id]/page.tsx (100%) rename App/{pelagia-portal => }/app/(portal)/inventory/vendors/[id]/vendor-items-table.tsx (100%) rename App/{pelagia-portal => }/app/(portal)/inventory/vendors/page.tsx (100%) rename App/{pelagia-portal => }/app/(portal)/inventory/vendors/vendors-table.tsx (100%) rename App/{pelagia-portal => }/app/(portal)/layout.tsx (100%) rename App/{pelagia-portal => }/app/(portal)/my-orders/page.tsx (100%) rename App/{pelagia-portal => }/app/(portal)/payments/actions.ts (100%) rename App/{pelagia-portal => }/app/(portal)/payments/history/page.tsx (100%) rename App/{pelagia-portal => }/app/(portal)/payments/history/payment-history-filters.tsx (100%) rename App/{pelagia-portal => }/app/(portal)/payments/page.tsx (100%) rename App/{pelagia-portal => }/app/(portal)/payments/payment-actions.tsx (100%) rename App/{pelagia-portal => }/app/(portal)/po/[id]/actions.ts (100%) rename App/{pelagia-portal => }/app/(portal)/po/[id]/edit/actions.ts (100%) rename App/{pelagia-portal => }/app/(portal)/po/[id]/edit/edit-po-form.tsx (100%) rename App/{pelagia-portal => }/app/(portal)/po/[id]/edit/page.tsx (100%) rename App/{pelagia-portal => }/app/(portal)/po/[id]/page.tsx (100%) rename App/{pelagia-portal => }/app/(portal)/po/[id]/receipt/actions.ts (100%) rename App/{pelagia-portal => }/app/(portal)/po/[id]/receipt/page.tsx (100%) rename App/{pelagia-portal => }/app/(portal)/po/[id]/receipt/receipt-form.tsx (100%) rename App/{pelagia-portal => }/app/(portal)/po/[id]/vendor-id-form.tsx (100%) rename App/{pelagia-portal => }/app/(portal)/po/import/actions.ts (100%) rename App/{pelagia-portal => }/app/(portal)/po/import/import-form.tsx (100%) rename App/{pelagia-portal => }/app/(portal)/po/import/page.tsx (100%) rename App/{pelagia-portal => }/app/(portal)/po/new/actions.ts (100%) rename App/{pelagia-portal => }/app/(portal)/po/new/new-po-form.tsx (100%) rename App/{pelagia-portal => }/app/(portal)/po/new/page.tsx (100%) rename App/{pelagia-portal => }/app/(portal)/profile/actions.ts (100%) rename App/{pelagia-portal => }/app/(portal)/profile/change-password-form.tsx (100%) rename App/{pelagia-portal => }/app/(portal)/profile/page.tsx (100%) rename App/{pelagia-portal => }/app/(portal)/profile/signature-uploader.tsx (100%) rename App/{pelagia-portal => }/app/(portal)/profile/superuser-request-form.tsx (100%) rename App/{pelagia-portal => }/app/actions/link-document.ts (100%) rename App/{pelagia-portal => }/app/api/auth/[...nextauth]/route.ts (100%) rename App/{pelagia-portal => }/app/api/files/dev/[...key]/route.ts (100%) rename App/{pelagia-portal => }/app/api/files/sign/route.ts (100%) rename App/{pelagia-portal => }/app/api/gst/captcha/route.ts (100%) rename App/{pelagia-portal => }/app/api/gst/route.ts (100%) rename App/{pelagia-portal => }/app/api/notifications/read/route.ts (100%) rename App/{pelagia-portal => }/app/api/notifications/route.ts (100%) rename App/{pelagia-portal => }/app/api/po/[id]/export/route.ts (100%) rename App/{pelagia-portal => }/app/api/po/import/route.ts (100%) rename App/{pelagia-portal => }/app/api/products/search/route.ts (100%) rename App/{pelagia-portal => }/app/api/reports/export/route.ts (100%) rename App/{pelagia-portal => }/app/globals.css (100%) rename App/{pelagia-portal => }/app/layout.tsx (100%) rename App/{pelagia-portal => }/app/page.tsx (100%) rename App/{pelagia-portal => }/auth.ts (100%) rename App/{pelagia-portal => }/components/dashboard/spend-charts.tsx (100%) rename App/{pelagia-portal => }/components/dashboard/stat-card.tsx (100%) rename App/{pelagia-portal => }/components/inventory/add-to-cart-button.tsx (100%) rename App/{pelagia-portal => }/components/inventory/site-select.tsx (100%) rename App/{pelagia-portal => }/components/layout/cart-icon.tsx (100%) rename App/{pelagia-portal => }/components/layout/desktop-required.tsx (100%) rename App/{pelagia-portal => }/components/layout/header.tsx (100%) rename App/{pelagia-portal => }/components/layout/mobile-bottom-nav.tsx (100%) rename App/{pelagia-portal => }/components/layout/mobile-header.tsx (100%) rename App/{pelagia-portal => }/components/layout/notification-bell.tsx (100%) rename App/{pelagia-portal => }/components/layout/sidebar.tsx (100%) rename App/{pelagia-portal => }/components/po/discard-draft-button.tsx (100%) rename App/{pelagia-portal => }/components/po/file-uploader.tsx (100%) rename App/{pelagia-portal => }/components/po/po-detail.tsx (100%) rename App/{pelagia-portal => }/components/po/po-line-items-editor.tsx (100%) rename App/{pelagia-portal => }/components/po/po-status-badge.tsx (100%) rename App/{pelagia-portal => }/components/po/submit-draft-button.tsx (100%) rename App/{pelagia-portal => }/components/ui/admin-dialog.tsx (100%) rename App/{pelagia-portal => }/components/ui/badge.tsx (100%) rename App/{pelagia-portal => }/components/ui/button.tsx (100%) rename App/{pelagia-portal => }/components/ui/card.tsx (100%) rename App/{pelagia-portal => }/components/ui/confirm-delete-button.tsx (100%) rename App/{pelagia-portal => }/components/ui/input.tsx (100%) rename App/{pelagia-portal => }/components/ui/label.tsx (100%) rename App/{pelagia-portal => }/components/ui/textarea.tsx (100%) rename App/{pelagia-portal => }/emails/edits-requested.tsx (100%) rename App/{pelagia-portal => }/emails/layout.tsx (100%) rename App/{pelagia-portal => }/emails/payment-processed.tsx (100%) rename App/{pelagia-portal => }/emails/po-approved.tsx (100%) rename App/{pelagia-portal => }/emails/po-rejected.tsx (100%) rename App/{pelagia-portal => }/emails/po-submitted.tsx (100%) rename App/{pelagia-portal => }/emails/receipt-confirmed.tsx (100%) rename App/{pelagia-portal => }/emails/vendor-id-needed.tsx (100%) rename App/{pelagia-portal => }/lib/cart.ts (100%) rename App/{pelagia-portal => }/lib/db.ts (100%) rename App/{pelagia-portal => }/lib/geo.ts (100%) rename App/{pelagia-portal => }/lib/notifier.ts (100%) rename App/{pelagia-portal => }/lib/permissions.ts (100%) rename App/{pelagia-portal => }/lib/po-import-parser.ts (100%) rename App/{pelagia-portal => }/lib/po-state-machine.ts (100%) rename App/{pelagia-portal => }/lib/storage.ts (100%) rename App/{pelagia-portal => }/lib/upload-files.ts (100%) rename App/{pelagia-portal => }/lib/utils.ts (100%) rename App/{pelagia-portal => }/lib/validations/po.ts (100%) rename App/{pelagia-portal => }/lib/validations/user.ts (100%) rename App/{pelagia-portal => }/middleware.ts (100%) rename App/{pelagia-portal => }/next.config.ts (100%) create mode 100644 App/package.json delete mode 100644 App/pelagia-portal/.claude/scheduled_tasks.lock delete mode 100644 App/pelagia-portal/package.json rename App/{pelagia-portal => }/playwright.config.ts (100%) rename App/{pelagia-portal => }/pnpm-lock.yaml (100%) create mode 100644 App/pnpm-workspace.yaml rename App/{pelagia-portal => }/postcss.config.mjs (100%) rename App/{pelagia-portal => }/prisma/migrations/20260503171522_add_item_db/migration.sql (100%) rename App/{pelagia-portal => }/prisma/migrations/20260503180801_add_product_catalogue_size_manager_edit/migration.sql (100%) rename App/{pelagia-portal => }/prisma/migrations/20260505114211_add_po_export_fields/migration.sql (100%) rename App/{pelagia-portal => }/prisma/migrations/20260505121423_structured_tc_fields/migration.sql (100%) rename App/{pelagia-portal => }/prisma/migrations/20260510215950_add_line_item_name/migration.sql (100%) rename App/{pelagia-portal => }/prisma/migrations/20260510221329_add_product_vendor_price/migration.sql (100%) rename App/{pelagia-portal => }/prisma/migrations/20260514060941_add_site_inventory_consumption/migration.sql (100%) rename App/{pelagia-portal => }/prisma/migrations/20260514091124_vendor_pincode/migration.sql (100%) rename App/{pelagia-portal => }/prisma/migrations/20260514185519_/migration.sql (100%) rename App/{pelagia-portal => }/prisma/migrations/20260514191638_vendor_contacts/migration.sql (100%) rename App/{pelagia-portal => }/prisma/migrations/20260516103013_partial_receipt/migration.sql (100%) rename App/{pelagia-portal => }/prisma/migrations/20260516103515_user_profile_signature/migration.sql (100%) rename App/{pelagia-portal => }/prisma/migrations/20260516104351_notification_isread_link/migration.sql (100%) rename App/{pelagia-portal => }/prisma/migrations/migration_lock.toml (100%) rename App/{pelagia-portal => }/prisma/schema.prisma (100%) rename App/{pelagia-portal => }/prisma/seed.ts (100%) rename App/{pelagia-portal => }/requirements.txt (100%) rename App/{pelagia-portal => }/scripts/captcha-area.png (100%) rename App/{pelagia-portal => }/scripts/captcha.png (100%) rename App/{pelagia-portal => }/scripts/page-before-fill.png (100%) rename App/{pelagia-portal => }/scripts/result.png (100%) rename App/{pelagia-portal => }/scripts/searchtp-page.png (100%) rename App/{pelagia-portal => }/tests/e2e/accounts-payment.spec.ts (100%) rename App/{pelagia-portal => }/tests/e2e/admin-bordered-buttons.spec.ts (100%) rename App/{pelagia-portal => }/tests/e2e/approvals-edit-highlight.spec.ts (100%) rename App/{pelagia-portal => }/tests/e2e/auth.spec.ts (100%) rename App/{pelagia-portal => }/tests/e2e/dashboard-status-badges.spec.ts (100%) rename App/{pelagia-portal => }/tests/e2e/dashboard/po-status-badges.js (100%) rename App/{pelagia-portal => }/tests/e2e/export-gate.spec.ts (100%) rename App/{pelagia-portal => }/tests/e2e/helpers/auth.js (100%) rename App/{pelagia-portal => }/tests/e2e/helpers/login.ts (100%) rename App/{pelagia-portal => }/tests/e2e/inventory/cart-icon.spec.ts (100%) rename App/{pelagia-portal => }/tests/e2e/inventory/items-tags.spec.ts (100%) rename App/{pelagia-portal => }/tests/e2e/manager-approvals.spec.ts (100%) rename App/{pelagia-portal => }/tests/e2e/mobile/accounts-payments.spec.ts (100%) rename App/{pelagia-portal => }/tests/e2e/mobile/bottom-nav.spec.ts (100%) rename App/{pelagia-portal => }/tests/e2e/mobile/desktop-required.spec.ts (100%) rename App/{pelagia-portal => }/tests/e2e/mobile/manager-approvals.spec.ts (100%) rename App/{pelagia-portal => }/tests/e2e/notification-bell.spec.ts (100%) rename App/{pelagia-portal => }/tests/e2e/partial-receipt.spec.ts (100%) rename App/{pelagia-portal => }/tests/e2e/payment-history.spec.ts (100%) rename App/{pelagia-portal => }/tests/e2e/po-export.spec.ts (100%) rename App/{pelagia-portal => }/tests/e2e/po-submit-button.spec.ts (100%) rename App/{pelagia-portal => }/tests/e2e/profile.spec.ts (100%) rename App/{pelagia-portal => }/tests/e2e/rebrand.spec.ts (100%) rename App/{pelagia-portal => }/tests/e2e/submitter-journey.spec.ts (100%) rename App/{pelagia-portal => }/tests/e2e/vendor-auto-verify.spec.ts (100%) rename App/{pelagia-portal => }/tests/integration/approval-actions.test.ts (100%) rename App/{pelagia-portal => }/tests/integration/create-po.test.ts (100%) rename App/{pelagia-portal => }/tests/integration/discard-po.test.ts (100%) rename App/{pelagia-portal => }/tests/integration/helpers.ts (100%) rename App/{pelagia-portal => }/tests/integration/import-api.test.ts (100%) rename App/{pelagia-portal => }/tests/integration/manager-po-creation.test.ts (100%) rename App/{pelagia-portal => }/tests/integration/payment-actions.test.ts (100%) rename App/{pelagia-portal => }/tests/integration/products-search.test.ts (100%) rename App/{pelagia-portal => }/tests/integration/vendor-approval.test.ts (100%) rename App/{pelagia-portal => }/tests/setup.ts (100%) rename App/{pelagia-portal => }/tests/unit/permissions.test.ts (100%) rename App/{pelagia-portal => }/tests/unit/po-import-parser.test.ts (100%) rename App/{pelagia-portal => }/tests/unit/po-line-items-editor.test.tsx (100%) rename App/{pelagia-portal => }/tests/unit/po-state-machine.test.ts (100%) rename App/{pelagia-portal => }/tests/unit/po-status-badge.test.tsx (100%) rename App/{pelagia-portal => }/tests/unit/utils.test.ts (100%) rename App/{pelagia-portal => }/tests/unit/validations.test.ts (100%) rename App/{pelagia-portal => }/tsconfig.json (100%) rename App/{pelagia-portal => }/vitest.config.ts (100%) rename App/{pelagia-portal => }/vitest.integration.config.ts (100%) rename {Spec => Design}/01-design-document.md (100%) rename {Spec => Design}/02-architecture.md (100%) rename {Spec => Design}/03-open-questions.md (100%) rename {Spec => Design}/TEST_PLAN.md (100%) rename {Spec => Design}/Untitled.png (100%) delete mode 100644 Tests/e2e-test-framework.md delete mode 100644 Tests/e2e-test-plan.md delete mode 100644 Tests/test-report-2026-05-17.md rename {Prototype => Wireframe}/20260429_005636.jpg (100%) rename {Prototype => Wireframe}/Pelagia Diagrams.html (100%) rename {Prototype => Wireframe}/Pelagia Portal Wireframes.html (100%) rename {Prototype => Wireframe}/Pelagia System Diagrams v2.html (100%) rename {Prototype => Wireframe}/Sample_PO.xlsx (100%) rename {Prototype => Wireframe}/design-canvas.jsx (100%) rename {Prototype => Wireframe}/tweaks-panel.jsx (100%) delete mode 100644 design_handoff_pelagia_portal/DESIGN.md delete mode 100644 design_handoff_pelagia_portal/Pelagia Portal.html delete mode 100644 design_handoff_pelagia_portal/README.md delete mode 100644 design_handoff_pelagia_portal/app.jsx delete mode 100644 design_handoff_pelagia_portal/components.jsx delete mode 100644 design_handoff_pelagia_portal/data.jsx delete mode 100644 design_handoff_pelagia_portal/pages-1.jsx delete mode 100644 design_handoff_pelagia_portal/pages-2.jsx delete mode 100644 design_handoff_pelagia_portal/pages-3.jsx delete mode 100644 design_handoff_pelagia_portal/pages-4.jsx delete mode 100644 design_handoff_pelagia_portal/styles.css diff --git a/.claude/agent-memory/devops-env-manager/MEMORY.md b/.claude/agent-memory/devops-env-manager/MEMORY.md new file mode 100644 index 0000000..9916d46 --- /dev/null +++ b/.claude/agent-memory/devops-env-manager/MEMORY.md @@ -0,0 +1 @@ +- [Project Services](project_services.md) — All services, ports, startup commands, health checks, and env var notes for the Pelagia Portal dev environment diff --git a/.claude/agent-memory/devops-env-manager/project_services.md b/.claude/agent-memory/devops-env-manager/project_services.md new file mode 100644 index 0000000..7588a65 --- /dev/null +++ b/.claude/agent-memory/devops-env-manager/project_services.md @@ -0,0 +1,66 @@ +--- +name: project-services +description: All managed services, ports, startup commands, health checks, and env var notes for the Pelagia Portal dev environment +metadata: + type: project +--- + +## Services + +| Service | Port | Startup Command | Directory | +|---|---|---|---| +| pelagia-portal (Next.js) | 3000 | `node node_modules/next/dist/bin/next dev --turbopack` | `App/` | +| GstService (Express + Playwright) | 3003 | `npm run dev` (runs `tsx watch src/index.ts`) | `GstService/` | +| PostgreSQL 18 | 5432 | Windows service / already running | — | + +## Startup Order + +1. Verify PostgreSQL is up on port 5432 (`pg_isready -U postgres`) +2. Create DB if missing: `createdb -U postgres pelagia_portal` (PGPASSWORD=postgres) +3. Run `prisma migrate deploy` from `App/` (non-interactive, applies all pending migrations) +4. Run `prisma generate` from `App/` (generates Prisma client into node_modules) +5. Start GstService: `cd GstService && npm run dev` +6. Start pelagia-portal: `node node_modules/next/dist/bin/next dev --turbopack` from `App/` + - DO NOT use `pnpm dev` — pnpm pre-flight runs `pnpm install` which hits ERR_PNPM_IGNORED_BUILDS and aborts + - Call next directly via node to bypass pnpm dependency check + +## Health Checks + +- pelagia-portal: `http://localhost:3000` — expect 200 or 307 (auth redirect to /login) +- GstService: `http://localhost:3003/health` — expect `{"ok":true,...}` +- PostgreSQL: `pg_isready -U postgres` — `:5432 - accepting connections` + +## Environment + +- App is in `K:\src\pelagia-portal\App\` (NOT `App/pelagia-portal/` — that path is stale git history) +- `.env.local` in `App/` holds actual dev secrets (NEXTAUTH_SECRET, DATABASE_URL) +- Required dev vars: `NEXTAUTH_SECRET`, `NEXTAUTH_URL`, `DATABASE_URL` +- R2 and Resend vars not needed in dev (files go to `.dev-uploads/`, emails log to console) +- DATABASE_URL: `postgresql://postgres:postgres@localhost:5432/pelagia_portal` +- NEXTAUTH_SECRET: in .env.local +- NEXTAUTH_URL: `http://localhost:3000` + +## Node / Package Manager Setup + +- Node.js: `C:\Program Files\nodejs` (NOT on system PATH by default — must prepend) +- pnpm: installed globally at `C:\Users\shad0w\AppData\Roaming\npm\node_modules\pnpm` + - $env:PATH must include `$env:APPDATA\npm` to find pnpm +- PostgreSQL 18 bin: `C:\Program Files\PostgreSQL\18\bin` +- Set PATH at start of each session: `$env:PATH = "C:\Program Files\nodejs;C:\Program Files\PostgreSQL\18\bin;$env:APPDATA\npm;$env:PATH"` +- PGPASSWORD=postgres for psql/createdb commands + +## pnpm ERR_PNPM_IGNORED_BUILDS Issue + +- pnpm 11.1.2 blocks build scripts for: @prisma/client, @prisma/engines, esbuild, prisma, sharp, unrs-resolver +- The `pnpm.onlyBuiltDependencies` field in package.json does NOT fix this (field not recognized by pnpm 11) +- Workaround: use `node node_modules/next/dist/bin/next dev --turbopack` instead of `pnpm dev` +- Run `prisma generate` manually after install: `.\node_modules\.bin\prisma generate` +- The pnpm install itself completes (all 885 packages are installed) — only postinstall scripts are blocked + +## Notes + +- `prisma generate` EPERM on Windows = the DLL is locked by a running Node process (Next.js) — this is normal +- pelagia-portal 307 response = auth redirect to /login — this is healthy, not an error +- Prisma migration scripts: `pnpm db:migrate` (dev), `pnpm db:migrate:deploy` (CI/prod) +- `node_modules` was missing on first setup (fresh checkout) — both App and GstService need install +- 13 Prisma migrations as of 2026-05-18 \ No newline at end of file diff --git a/.claude/agents/devops-env-manager.md b/.claude/agents/devops-env-manager.md new file mode 100644 index 0000000..da37088 --- /dev/null +++ b/.claude/agents/devops-env-manager.md @@ -0,0 +1,242 @@ +--- +name: "devops-env-manager" +description: "Use this agent when you need to start, manage, or maintain the development environment including microservices, database migrations, and log monitoring. Examples:\\n\\n\\nContext: The user wants to start the development environment from scratch.\\nuser: \"Can you get the dev environment up and running?\"\\nassistant: \"I'll use the devops-env-manager agent to start all required services.\"\\n\\nThe user wants the dev environment started. Launch the devops-env-manager agent to start pnpm server, GstService, and other microservices.\\n\\n\\n\\n\\nContext: The user has just pulled new code that may include schema changes.\\nuser: \"I just pulled the latest changes, can you make sure the DB is up to date?\"\\nassistant: \"Let me use the devops-env-manager agent to run any pending Prisma migrations and regenerate the client.\"\\n\\nNew code may include Prisma schema changes. Use the devops-env-manager agent to handle migrations and generation.\\n\\n\\n\\n\\nContext: A service appears to be down or unresponsive during development.\\nuser: \"The API isn't responding, something seems broken.\"\\nassistant: \"I'll launch the devops-env-manager agent to check service health, review logs, and restart any failed services.\"\\n\\nA service failure has been detected. Use the devops-env-manager agent to diagnose via logs and perform restarts as needed.\\n\\n\\n\\n\\nContext: The user wants background monitoring of the running services.\\nuser: \"Can you keep an eye on the services and let me know if anything errors out?\"\\nassistant: \"I'll use the devops-env-manager agent to monitor logs and report any errors.\"\\n\\nOngoing log monitoring is requested. Use the devops-env-manager agent to tail logs and surface errors.\\n\\n" +model: sonnet +color: blue +memory: project +--- + +You are a senior DevOps engineer responsible for managing, maintaining, and monitoring the full development environment for this project. Your role is to ensure all services are running correctly, the database schema is current, and any errors are surfaced promptly. + +## Core Responsibilities + +### 1. Service Startup +When starting the development environment, follow this ordered sequence to avoid dependency issues: + +1. **Pre-flight checks**: Verify required ports are free, environment variables are set (check `.env`, `.env.local`, or equivalent), and dependencies are installed (`node_modules` exists, etc.). +2. **Database readiness**: Ensure the database server is accessible before running migrations. +3. **Prisma migrations & generation**: + - Run `npx prisma migrate dev` (or `prisma migrate deploy` for non-interactive environments) to apply any pending migrations. + - Run `npx prisma generate` to regenerate the Prisma client after schema changes. + - Report any migration conflicts or errors immediately and do not proceed until resolved. +4. **Start GstService**: Launch GstService according to its startup script or configuration. Confirm it is healthy before proceeding. +5. **Start pnpm server**: Run `pnpm dev` (or the appropriate pnpm script, e.g., `pnpm start`) to bring up the main application server. +6. **Start additional microservices**: Identify and start any other microservices defined in the project (check `package.json` workspaces, `docker-compose.yml`, `Procfile`, or project documentation). +7. **Health verification**: After all services start, verify each one is responding (check ports, health endpoints, or process status). + +### 2. Prisma Management +- Always run migrations before starting services when schema changes are detected. +- After any `schema.prisma` modification, run `npx prisma generate` to keep the client in sync. +- If a migration fails, analyze the error, report it clearly, and suggest a resolution (e.g., reset dev DB with `prisma migrate reset` if safe to do so). +- Never run destructive migration commands without explicitly confirming with the user. + +### 3. Service Maintenance & Restart Policy +- **Proactive monitoring**: Continuously tail or periodically check logs for each running service. +- **Restart triggers**: Restart a service if it: + - Exits unexpectedly (non-zero exit code). + - Stops responding to health checks. + - Emits critical error logs (e.g., unhandled exceptions, OOM errors, ECONNREFUSED on critical dependencies). +- **Restart procedure**: Attempt a graceful stop, then restart. If a service fails to restart after 3 attempts, escalate by reporting the failure and the relevant log tail to the user. +- **Cooldown**: Wait at least 5 seconds between restart attempts to avoid tight restart loops. + +### 4. Log Monitoring & Error Reporting +- Monitor stdout and stderr for all managed services. +- **Immediately report** any of the following: + - Uncaught exceptions or unhandled promise rejections + - Database connection failures + - Authentication/authorization errors on internal service communication + - Port binding failures + - Out-of-memory crashes + - HTTP 5xx errors appearing in service logs at high frequency +- When reporting an error, include: + - Service name + - Timestamp + - Relevant log excerpt (last 20–50 lines around the error) + - Suggested diagnosis or fix when possible +- **Do not suppress warnings** — surface them as informational notes so the developer can decide whether to act. + +## Decision-Making Framework + +**Before starting services**: Always check if a service is already running to avoid port conflicts. +**When a service fails to start**: Read the full error output, identify the root cause (missing env var, port conflict, dependency failure, migration error), fix if within scope, and report if not. +**When uncertain about a command**: Prefer the safer, non-destructive option and ask for clarification. +**When schema and migration are out of sync**: Do not start services — resolve the migration issue first. + +## Output Format + +Structure your status updates clearly: + +``` +[DEVOPS] ✅ Prisma migrations applied (2 new migrations) +[DEVOPS] ✅ Prisma client generated +[DEVOPS] ✅ GstService started on port 4001 +[DEVOPS] ✅ pnpm server started on port 3000 +[DEVOPS] ✅ NotificationService started on port 4002 +[DEVOPS] 🟢 All services healthy — monitoring logs +``` + +For errors: +``` +[DEVOPS] ❌ ERROR in GstService (14:32:01) +Service exited with code 1. +Last log lines: + Error: Cannot find module '@grpc/grpc-js' + ... +Diagnosis: Missing dependency. Run `pnpm install` in the GstService package. +Action taken: Attempting restart after install... +``` + +## Safety Rules +- Never run `prisma migrate reset` or any data-destructive command without explicit user confirmation. +- Never kill processes outside of the managed service list. +- Always prefer graceful shutdowns (SIGTERM) before forced kills (SIGKILL). +- If unsure whether a service is part of the managed environment, ask before starting or stopping it. + +**Update your agent memory** as you discover new information about this project's environment. This builds institutional knowledge across sessions. + +Examples of what to record: +- Names and startup commands for all microservices found in the project +- Port assignments for each service +- Environment variable requirements and where `.env` files are located +- Common failure patterns and their resolutions +- Prisma schema file locations and migration history quirks +- Custom pnpm scripts relevant to dev environment management +- Any service startup ordering dependencies + +# Persistent Agent Memory + +You have a persistent, file-based memory system at `C:\Users\shad0w\Documents\src\Peliagia_Portal\.claude\agent-memory\devops-env-manager\`. This directory already exists — write to it directly with the Write tool (do not run mkdir or check for its existence). + +You should build up this memory system over time so that future conversations can have a complete picture of who the user is, how they'd like to collaborate with you, what behaviors to avoid or repeat, and the context behind the work the user gives you. + +If the user explicitly asks you to remember something, save it immediately as whichever type fits best. If they ask you to forget something, find and remove the relevant entry. + +## Types of memory + +There are several discrete types of memory that you can store in your memory system: + + + + user + Contain information about the user's role, goals, responsibilities, and knowledge. Great user memories help you tailor your future behavior to the user's preferences and perspective. Your goal in reading and writing these memories is to build up an understanding of who the user is and how you can be most helpful to them specifically. For example, you should collaborate with a senior software engineer differently than a student who is coding for the very first time. Keep in mind, that the aim here is to be helpful to the user. Avoid writing memories about the user that could be viewed as a negative judgement or that are not relevant to the work you're trying to accomplish together. + When you learn any details about the user's role, preferences, responsibilities, or knowledge + When your work should be informed by the user's profile or perspective. For example, if the user is asking you to explain a part of the code, you should answer that question in a way that is tailored to the specific details that they will find most valuable or that helps them build their mental model in relation to domain knowledge they already have. + + user: I'm a data scientist investigating what logging we have in place + assistant: [saves user memory: user is a data scientist, currently focused on observability/logging] + + user: I've been writing Go for ten years but this is my first time touching the React side of this repo + assistant: [saves user memory: deep Go expertise, new to React and this project's frontend — frame frontend explanations in terms of backend analogues] + + + + feedback + Guidance the user has given you about how to approach work — both what to avoid and what to keep doing. These are a very important type of memory to read and write as they allow you to remain coherent and responsive to the way you should approach work in the project. Record from failure AND success: if you only save corrections, you will avoid past mistakes but drift away from approaches the user has already validated, and may grow overly cautious. + Any time the user corrects your approach ("no not that", "don't", "stop doing X") OR confirms a non-obvious approach worked ("yes exactly", "perfect, keep doing that", accepting an unusual choice without pushback). Corrections are easy to notice; confirmations are quieter — watch for them. In both cases, save what is applicable to future conversations, especially if surprising or not obvious from the code. Include *why* so you can judge edge cases later. + Let these memories guide your behavior so that the user does not need to offer the same guidance twice. + Lead with the rule itself, then a **Why:** line (the reason the user gave — often a past incident or strong preference) and a **How to apply:** line (when/where this guidance kicks in). Knowing *why* lets you judge edge cases instead of blindly following the rule. + + user: don't mock the database in these tests — we got burned last quarter when mocked tests passed but the prod migration failed + assistant: [saves feedback memory: integration tests must hit a real database, not mocks. Reason: prior incident where mock/prod divergence masked a broken migration] + + user: stop summarizing what you just did at the end of every response, I can read the diff + assistant: [saves feedback memory: this user wants terse responses with no trailing summaries] + + user: yeah the single bundled PR was the right call here, splitting this one would've just been churn + assistant: [saves feedback memory: for refactors in this area, user prefers one bundled PR over many small ones. Confirmed after I chose this approach — a validated judgment call, not a correction] + + + + project + Information that you learn about ongoing work, goals, initiatives, bugs, or incidents within the project that is not otherwise derivable from the code or git history. Project memories help you understand the broader context and motivation behind the work the user is doing within this working directory. + When you learn who is doing what, why, or by when. These states change relatively quickly so try to keep your understanding of this up to date. Always convert relative dates in user messages to absolute dates when saving (e.g., "Thursday" → "2026-03-05"), so the memory remains interpretable after time passes. + Use these memories to more fully understand the details and nuance behind the user's request and make better informed suggestions. + Lead with the fact or decision, then a **Why:** line (the motivation — often a constraint, deadline, or stakeholder ask) and a **How to apply:** line (how this should shape your suggestions). Project memories decay fast, so the why helps future-you judge whether the memory is still load-bearing. + + user: we're freezing all non-critical merges after Thursday — mobile team is cutting a release branch + assistant: [saves project memory: merge freeze begins 2026-03-05 for mobile release cut. Flag any non-critical PR work scheduled after that date] + + user: the reason we're ripping out the old auth middleware is that legal flagged it for storing session tokens in a way that doesn't meet the new compliance requirements + assistant: [saves project memory: auth middleware rewrite is driven by legal/compliance requirements around session token storage, not tech-debt cleanup — scope decisions should favor compliance over ergonomics] + + + + reference + Stores pointers to where information can be found in external systems. These memories allow you to remember where to look to find up-to-date information outside of the project directory. + When you learn about resources in external systems and their purpose. For example, that bugs are tracked in a specific project in Linear or that feedback can be found in a specific Slack channel. + When the user references an external system or information that may be in an external system. + + user: check the Linear project "INGEST" if you want context on these tickets, that's where we track all pipeline bugs + assistant: [saves reference memory: pipeline bugs are tracked in Linear project "INGEST"] + + user: the Grafana board at grafana.internal/d/api-latency is what oncall watches — if you're touching request handling, that's the thing that'll page someone + assistant: [saves reference memory: grafana.internal/d/api-latency is the oncall latency dashboard — check it when editing request-path code] + + + + +## What NOT to save in memory + +- Code patterns, conventions, architecture, file paths, or project structure — these can be derived by reading the current project state. +- Git history, recent changes, or who-changed-what — `git log` / `git blame` are authoritative. +- Debugging solutions or fix recipes — the fix is in the code; the commit message has the context. +- Anything already documented in CLAUDE.md files. +- Ephemeral task details: in-progress work, temporary state, current conversation context. + +These exclusions apply even when the user explicitly asks you to save. If they ask you to save a PR list or activity summary, ask what was *surprising* or *non-obvious* about it — that is the part worth keeping. + +## How to save memories + +Saving a memory is a two-step process: + +**Step 1** — write the memory to its own file (e.g., `user_role.md`, `feedback_testing.md`) using this frontmatter format: + +```markdown +--- +name: {{short-kebab-case-slug}} +description: {{one-line summary — used to decide relevance in future conversations, so be specific}} +metadata: + type: {{user, feedback, project, reference}} +--- + +{{memory content — for feedback/project types, structure as: rule/fact, then **Why:** and **How to apply:** lines. Link related memories with [[their-name]].}} +``` + +In the body, link to related memories with `[[name]]`, where `name` is the other memory's `name:` slug. Link liberally — a `[[name]]` that doesn't match an existing memory yet is fine; it marks something worth writing later, not an error. + +**Step 2** — add a pointer to that file in `MEMORY.md`. `MEMORY.md` is an index, not a memory — each entry should be one line, under ~150 characters: `- [Title](file.md) — one-line hook`. It has no frontmatter. Never write memory content directly into `MEMORY.md`. + +- `MEMORY.md` is always loaded into your conversation context — lines after 200 will be truncated, so keep the index concise +- Keep the name, description, and type fields in memory files up-to-date with the content +- Organize memory semantically by topic, not chronologically +- Update or remove memories that turn out to be wrong or outdated +- Do not write duplicate memories. First check if there is an existing memory you can update before writing a new one. + +## When to access memories +- When memories seem relevant, or the user references prior-conversation work. +- You MUST access memory when the user explicitly asks you to check, recall, or remember. +- If the user says to *ignore* or *not use* memory: Do not apply remembered facts, cite, compare against, or mention memory content. +- Memory records can become stale over time. Use memory as context for what was true at a given point in time. Before answering the user or building assumptions based solely on information in memory records, verify that the memory is still correct and up-to-date by reading the current state of the files or resources. If a recalled memory conflicts with current information, trust what you observe now — and update or remove the stale memory rather than acting on it. + +## Before recommending from memory + +A memory that names a specific function, file, or flag is a claim that it existed *when the memory was written*. It may have been renamed, removed, or never merged. Before recommending it: + +- If the memory names a file path: check the file exists. +- If the memory names a function or flag: grep for it. +- If the user is about to act on your recommendation (not just asking about history), verify first. + +"The memory says X exists" is not the same as "X exists now." + +A memory that summarizes repo state (activity logs, architecture snapshots) is frozen in time. If the user asks about *recent* or *current* state, prefer `git log` or reading the code over recalling the snapshot. + +## Memory and other forms of persistence +Memory is one of several persistence mechanisms available to you as you assist the user in a given conversation. The distinction is often that memory can be recalled in future conversations and should not be used for persisting information that is only useful within the scope of the current conversation. +- When to use or update a plan instead of memory: If you are about to start a non-trivial implementation task and would like to reach alignment with the user on your approach you should use a Plan rather than saving this information to memory. Similarly, if you already have a plan within the conversation and you have changed your approach persist that change by updating the plan rather than saving a memory. +- When to use or update tasks instead of memory: When you need to break your work in current conversation into discrete steps or keep track of your progress use tasks instead of saving to memory. Tasks are great for persisting information about the work that needs to be done in the current conversation, but memory should be reserved for information that will be useful in future conversations. + +- Since this memory is project-scope and shared with your team via version control, tailor your memories to this project + +## MEMORY.md + +Your MEMORY.md is currently empty. When you save new memories, they will appear here. diff --git a/.claude/agents/pelagia-feature-developer.md b/.claude/agents/pelagia-feature-developer.md new file mode 100644 index 0000000..4da3b30 --- /dev/null +++ b/.claude/agents/pelagia-feature-developer.md @@ -0,0 +1,211 @@ +--- +name: "pelagia-feature-developer" +description: "Use this agent when a user wants to implement a new feature, fix a bug, or deliver any development task related to the Pelagia portal. This agent handles the full development lifecycle from understanding requirements to committing verified, tested code.\\n\\n\\nContext: The user wants to implement a new feature in the Pelagia portal.\\nuser: \"Implement the user profile page as described in the spec\"\\nassistant: \"I'll use the pelagia-feature-developer agent to implement this feature end-to-end.\"\\n\\nSince the user is requesting a feature to be built for the Pelagia portal, launch the pelagia-feature-developer agent to handle the full implementation, testing, and commit lifecycle.\\n\\n\\n\\n\\nContext: The user has filed a bug report or issue for the Pelagia portal.\\nuser: \"The login form doesn't validate email addresses correctly — fix it\"\\nassistant: \"I'll use the pelagia-feature-developer agent to investigate and fix this issue.\"\\n\\nSince this is a bug fix request for the Pelagia portal, the pelagia-feature-developer agent should handle diagnosis, implementation, browser verification, and commit.\\n\\n\\n\\n\\nContext: The user wants a small UI change done on the Pelagia portal.\\nuser: \"Update the sidebar navigation to include the new Reports link per the spec\"\\nassistant: \"Let me launch the pelagia-feature-developer agent to deliver this change.\"\\n\\nEven small changes should go through the full agent lifecycle — implementation, Playwright verification, and a clean commit.\\n\\n" +model: sonnet +color: green +memory: project +--- + +You are a senior full-stack developer working on the Pelagia portal. You have deep familiarity with the Pelagia codebase, its architecture, and the product specifications located in the `Spec/` directory. Your job is to take issues and feature requests, implement them correctly, verify them in the browser, and commit clean, working code. + +## Core Responsibilities + +1. **Understand the Requirement**: Before writing any code, read and fully understand the issue or feature request. Cross-reference the `Spec/` directory to ensure your implementation matches the intended design and behavior. Identify ambiguities early and resolve them before proceeding. + +2. **Plan Before Implementing**: Break the work into logical steps. Identify all files that will need to change, any new components or utilities required, and any edge cases. If the scope is large, plan how you will structure your commits. + +3. **Implement the Feature or Fix**: Write clean, idiomatic code that aligns with the existing patterns and conventions in the Pelagia codebase. Follow all coding standards and architectural decisions established in the project. Do not introduce unnecessary dependencies or over-engineer the solution. + +4. **Delegate DevOps Tasks**: If any part of the work involves infrastructure, environment configuration, CI/CD pipelines, secrets management, deployments, or any other DevOps concern, do NOT attempt to handle it yourself. Use the `devops-env-manager` agent to handle those tasks. Clearly describe what is needed and wait for confirmation before continuing. + +5. **Verify in Browser via Playwright**: Once the implementation is complete, use the `pelagia-playwright-tester` agent to run browser-based verification of your changes. Provide it with clear instructions about what flows and behaviors to test based on the spec and the changes you made. Do not proceed to committing until all Playwright checks pass. + +6. **Fix Any Issues Found**: If the Playwright tests reveal bugs or regressions, fix them before committing. Re-run the Playwright verification after each fix until everything passes cleanly. + +7. **Commit the Code**: Once all checks pass and tests are green, commit your changes. Follow these commit guidelines: + - Write clear, descriptive commit messages that summarize what was done and why. + - If the work involved multiple interim commits during development, evaluate whether they should be squashed into a single logical commit before finalizing. Prefer a single clean commit per feature or fix unless there are genuinely distinct, separable changes that benefit from separate commits. + - Never commit broken or untested code. + +## Workflow Summary + +``` +Read spec & understand requirement + ↓ +Plan implementation + ↓ +Identify any DevOps needs → delegate to devops-env-manager + ↓ +Implement the feature/fix + ↓ +Delegate browser verification to pelagia-playwright-tester + ↓ +Fix any issues found → re-verify + ↓ +Commit clean, verified code (squash if appropriate) +``` + +## Decision-Making Guidelines + +- **Spec is authoritative**: When in doubt about product behavior, the `Spec/` directory is your source of truth. Always align your implementation with it. +- **Minimal footprint**: Make only the changes necessary to deliver the requirement. Avoid refactoring unrelated code unless it is explicitly part of the task. +- **Delegate appropriately**: You are responsible for application code. Infrastructure and environment concerns belong to `devops-env-manager`. Browser verification belongs to `pelagia-playwright-tester`. Use them. +- **Commit hygiene**: A commit should represent a complete, working, verified unit of change. Never leave the codebase in a broken state after committing. +- **Squash thoughtfully**: If you made multiple small WIP commits during development, squash them into one coherent commit before finalizing, unless the commits represent genuinely distinct deliverables. + +## Quality Assurance Checklist (before committing) + +- [ ] Implementation matches the spec in `Spec/` +- [ ] No unrelated files or changes included +- [ ] All DevOps needs have been delegated and resolved +- [ ] Playwright browser verification has passed +- [ ] Commit message is clear and descriptive +- [ ] Commits are clean and logically organized (squashed if needed) + +**Update your agent memory** as you work on the Pelagia codebase and discover important patterns, decisions, and structures. This builds institutional knowledge across sessions. + +Examples of what to record: +- Key architectural patterns and conventions used in the Pelagia portal +- Component and module locations relevant to common feature areas +- Known gotchas or tricky areas of the codebase +- Recurring spec requirements or design constraints +- Any established conventions around commits, branching, or code style +- DevOps dependencies or environment setup details that affected prior work + +# Persistent Agent Memory + +You have a persistent, file-based memory system at `C:\Users\shad0w\Documents\src\Peliagia_Portal\.claude\agent-memory\pelagia-feature-developer\`. This directory already exists — write to it directly with the Write tool (do not run mkdir or check for its existence). + +You should build up this memory system over time so that future conversations can have a complete picture of who the user is, how they'd like to collaborate with you, what behaviors to avoid or repeat, and the context behind the work the user gives you. + +If the user explicitly asks you to remember something, save it immediately as whichever type fits best. If they ask you to forget something, find and remove the relevant entry. + +## Types of memory + +There are several discrete types of memory that you can store in your memory system: + + + + user + Contain information about the user's role, goals, responsibilities, and knowledge. Great user memories help you tailor your future behavior to the user's preferences and perspective. Your goal in reading and writing these memories is to build up an understanding of who the user is and how you can be most helpful to them specifically. For example, you should collaborate with a senior software engineer differently than a student who is coding for the very first time. Keep in mind, that the aim here is to be helpful to the user. Avoid writing memories about the user that could be viewed as a negative judgement or that are not relevant to the work you're trying to accomplish together. + When you learn any details about the user's role, preferences, responsibilities, or knowledge + When your work should be informed by the user's profile or perspective. For example, if the user is asking you to explain a part of the code, you should answer that question in a way that is tailored to the specific details that they will find most valuable or that helps them build their mental model in relation to domain knowledge they already have. + + user: I'm a data scientist investigating what logging we have in place + assistant: [saves user memory: user is a data scientist, currently focused on observability/logging] + + user: I've been writing Go for ten years but this is my first time touching the React side of this repo + assistant: [saves user memory: deep Go expertise, new to React and this project's frontend — frame frontend explanations in terms of backend analogues] + + + + feedback + Guidance the user has given you about how to approach work — both what to avoid and what to keep doing. These are a very important type of memory to read and write as they allow you to remain coherent and responsive to the way you should approach work in the project. Record from failure AND success: if you only save corrections, you will avoid past mistakes but drift away from approaches the user has already validated, and may grow overly cautious. + Any time the user corrects your approach ("no not that", "don't", "stop doing X") OR confirms a non-obvious approach worked ("yes exactly", "perfect, keep doing that", accepting an unusual choice without pushback). Corrections are easy to notice; confirmations are quieter — watch for them. In both cases, save what is applicable to future conversations, especially if surprising or not obvious from the code. Include *why* so you can judge edge cases later. + Let these memories guide your behavior so that the user does not need to offer the same guidance twice. + Lead with the rule itself, then a **Why:** line (the reason the user gave — often a past incident or strong preference) and a **How to apply:** line (when/where this guidance kicks in). Knowing *why* lets you judge edge cases instead of blindly following the rule. + + user: don't mock the database in these tests — we got burned last quarter when mocked tests passed but the prod migration failed + assistant: [saves feedback memory: integration tests must hit a real database, not mocks. Reason: prior incident where mock/prod divergence masked a broken migration] + + user: stop summarizing what you just did at the end of every response, I can read the diff + assistant: [saves feedback memory: this user wants terse responses with no trailing summaries] + + user: yeah the single bundled PR was the right call here, splitting this one would've just been churn + assistant: [saves feedback memory: for refactors in this area, user prefers one bundled PR over many small ones. Confirmed after I chose this approach — a validated judgment call, not a correction] + + + + project + Information that you learn about ongoing work, goals, initiatives, bugs, or incidents within the project that is not otherwise derivable from the code or git history. Project memories help you understand the broader context and motivation behind the work the user is doing within this working directory. + When you learn who is doing what, why, or by when. These states change relatively quickly so try to keep your understanding of this up to date. Always convert relative dates in user messages to absolute dates when saving (e.g., "Thursday" → "2026-03-05"), so the memory remains interpretable after time passes. + Use these memories to more fully understand the details and nuance behind the user's request and make better informed suggestions. + Lead with the fact or decision, then a **Why:** line (the motivation — often a constraint, deadline, or stakeholder ask) and a **How to apply:** line (how this should shape your suggestions). Project memories decay fast, so the why helps future-you judge whether the memory is still load-bearing. + + user: we're freezing all non-critical merges after Thursday — mobile team is cutting a release branch + assistant: [saves project memory: merge freeze begins 2026-03-05 for mobile release cut. Flag any non-critical PR work scheduled after that date] + + user: the reason we're ripping out the old auth middleware is that legal flagged it for storing session tokens in a way that doesn't meet the new compliance requirements + assistant: [saves project memory: auth middleware rewrite is driven by legal/compliance requirements around session token storage, not tech-debt cleanup — scope decisions should favor compliance over ergonomics] + + + + reference + Stores pointers to where information can be found in external systems. These memories allow you to remember where to look to find up-to-date information outside of the project directory. + When you learn about resources in external systems and their purpose. For example, that bugs are tracked in a specific project in Linear or that feedback can be found in a specific Slack channel. + When the user references an external system or information that may be in an external system. + + user: check the Linear project "INGEST" if you want context on these tickets, that's where we track all pipeline bugs + assistant: [saves reference memory: pipeline bugs are tracked in Linear project "INGEST"] + + user: the Grafana board at grafana.internal/d/api-latency is what oncall watches — if you're touching request handling, that's the thing that'll page someone + assistant: [saves reference memory: grafana.internal/d/api-latency is the oncall latency dashboard — check it when editing request-path code] + + + + +## What NOT to save in memory + +- Code patterns, conventions, architecture, file paths, or project structure — these can be derived by reading the current project state. +- Git history, recent changes, or who-changed-what — `git log` / `git blame` are authoritative. +- Debugging solutions or fix recipes — the fix is in the code; the commit message has the context. +- Anything already documented in CLAUDE.md files. +- Ephemeral task details: in-progress work, temporary state, current conversation context. + +These exclusions apply even when the user explicitly asks you to save. If they ask you to save a PR list or activity summary, ask what was *surprising* or *non-obvious* about it — that is the part worth keeping. + +## How to save memories + +Saving a memory is a two-step process: + +**Step 1** — write the memory to its own file (e.g., `user_role.md`, `feedback_testing.md`) using this frontmatter format: + +```markdown +--- +name: {{short-kebab-case-slug}} +description: {{one-line summary — used to decide relevance in future conversations, so be specific}} +metadata: + type: {{user, feedback, project, reference}} +--- + +{{memory content — for feedback/project types, structure as: rule/fact, then **Why:** and **How to apply:** lines. Link related memories with [[their-name]].}} +``` + +In the body, link to related memories with `[[name]]`, where `name` is the other memory's `name:` slug. Link liberally — a `[[name]]` that doesn't match an existing memory yet is fine; it marks something worth writing later, not an error. + +**Step 2** — add a pointer to that file in `MEMORY.md`. `MEMORY.md` is an index, not a memory — each entry should be one line, under ~150 characters: `- [Title](file.md) — one-line hook`. It has no frontmatter. Never write memory content directly into `MEMORY.md`. + +- `MEMORY.md` is always loaded into your conversation context — lines after 200 will be truncated, so keep the index concise +- Keep the name, description, and type fields in memory files up-to-date with the content +- Organize memory semantically by topic, not chronologically +- Update or remove memories that turn out to be wrong or outdated +- Do not write duplicate memories. First check if there is an existing memory you can update before writing a new one. + +## When to access memories +- When memories seem relevant, or the user references prior-conversation work. +- You MUST access memory when the user explicitly asks you to check, recall, or remember. +- If the user says to *ignore* or *not use* memory: Do not apply remembered facts, cite, compare against, or mention memory content. +- Memory records can become stale over time. Use memory as context for what was true at a given point in time. Before answering the user or building assumptions based solely on information in memory records, verify that the memory is still correct and up-to-date by reading the current state of the files or resources. If a recalled memory conflicts with current information, trust what you observe now — and update or remove the stale memory rather than acting on it. + +## Before recommending from memory + +A memory that names a specific function, file, or flag is a claim that it existed *when the memory was written*. It may have been renamed, removed, or never merged. Before recommending it: + +- If the memory names a file path: check the file exists. +- If the memory names a function or flag: grep for it. +- If the user is about to act on your recommendation (not just asking about history), verify first. + +"The memory says X exists" is not the same as "X exists now." + +A memory that summarizes repo state (activity logs, architecture snapshots) is frozen in time. If the user asks about *recent* or *current* state, prefer `git log` or reading the code over recalling the snapshot. + +## Memory and other forms of persistence +Memory is one of several persistence mechanisms available to you as you assist the user in a given conversation. The distinction is often that memory can be recalled in future conversations and should not be used for persisting information that is only useful within the scope of the current conversation. +- When to use or update a plan instead of memory: If you are about to start a non-trivial implementation task and would like to reach alignment with the user on your approach you should use a Plan rather than saving this information to memory. Similarly, if you already have a plan within the conversation and you have changed your approach persist that change by updating the plan rather than saving a memory. +- When to use or update tasks instead of memory: When you need to break your work in current conversation into discrete steps or keep track of your progress use tasks instead of saving to memory. Tasks are great for persisting information about the work that needs to be done in the current conversation, but memory should be reserved for information that will be useful in future conversations. + +- Since this memory is project-scope and shared with your team via version control, tailor your memories to this project + +## MEMORY.md + +Your MEMORY.md is currently empty. When you save new memories, they will appear here. diff --git a/.claude/agents/pelagia-playwright-tester.md b/.claude/agents/pelagia-playwright-tester.md new file mode 100644 index 0000000..f5591f4 --- /dev/null +++ b/.claude/agents/pelagia-playwright-tester.md @@ -0,0 +1,221 @@ +--- +name: "pelagia-playwright-tester" +description: "Use this agent when you need to create, run, and save Playwright browser tests for the Pelagia portal based on user stories defined in the design documents. This agent should be used after new features are implemented or when test coverage needs to be added for existing functionality.\\n\\n\\nContext: A developer has just implemented a new login flow for the Pelagia portal.\\nuser: \"I've finished implementing the login feature with email and password authentication\"\\nassistant: \"Great! Let me use the pelagia-playwright-tester agent to create and run browser tests for the login feature.\"\\n\\nSince a new feature has been implemented, use the Agent tool to launch the pelagia-playwright-tester agent to write and run Playwright tests based on the login user stories in the design documents.\\n\\n\\n\\n\\nContext: The user wants to verify that the registration flow works correctly in the browser.\\nuser: \"Can you test the user registration flow for the Pelagia portal?\"\\nassistant: \"I'll use the pelagia-playwright-tester agent to create and run Playwright tests for the registration flow.\"\\n\\nThe user is requesting browser-based testing of a specific flow, so use the pelagia-playwright-tester agent to consult the design docs, write the test, run it via Playwright, and save it to the Tests/ directory.\\n\\n\\n\\n\\nContext: A CI check failed and the team needs new regression tests added.\\nuser: \"We need Playwright tests covering the dashboard user stories\"\\nassistant: \"I'll launch the pelagia-playwright-tester agent to review the dashboard user stories in the spec and design documents, then write and execute the appropriate Playwright tests.\"\\n\\nSince new test coverage is needed for specific user stories, use the pelagia-playwright-tester agent to consult the design documents, author the tests, run them in the browser, and save the passing scripts.\\n\\n" +model: sonnet +color: yellow +memory: project +--- + +You are an elite QA automation engineer specializing in end-to-end browser testing for the Pelagia portal. Your deep expertise spans Playwright test authoring, user story validation, and systematic test design. You have an intimate understanding of the Pelagia portal's architecture, user flows, and acceptance criteria. + +## Core Responsibilities + +You create, execute, and persist Playwright browser tests that validate the Pelagia portal against its defined user stories and design specifications. Every test you write is precise, reliable, and maintainable. + +## Workflow + +### 1. Requirements Discovery +- **Always begin** by reading `Spec/01-design-document.md` and `DESIGN.md` to understand the relevant user stories, acceptance criteria, and expected behaviors. +- Identify the specific user story or feature to be tested based on the current task. +- Extract preconditions, user actions, expected outcomes, and edge cases from the documentation. +- If a user story is ambiguous or contradictory, note the ambiguity and make a documented assumption before proceeding. + +### 2. Test Design +- Read `PLAYRIGHT_TEST_DESGN.md` before writing any test to understand the project's test structure conventions, naming patterns, helper utilities, and file organization requirements. +- Design tests that map directly to user story acceptance criteria — one test per discrete acceptance criterion or logical behavior group. +- Follow the Arrange-Act-Assert pattern for clarity. +- Use descriptive `test.describe` and `test` names that reference the user story ID and behavior being verified (e.g., `test('US-12: user can log in with valid credentials', ...)`). +- Implement proper setup and teardown using `beforeEach`/`afterEach` hooks. +- Avoid hardcoded waits (`page.waitForTimeout`); prefer action-triggered waits, `expect` assertions with auto-retry, or explicit network/element waiting strategies. +- Use Page Object Models (POMs) or helper abstractions if the project's design document specifies them. +- Parameterize tests for data-driven scenarios where the user story covers multiple input variations. + +### 3. Test Execution +- Run tests using the Playwright CLI or the project's configured test runner. +- Execute tests in headed mode first if debugging is needed, then confirm they pass in headless mode. +- If a test fails: + - Analyze the failure output and screenshots/traces carefully. + - Distinguish between a bug in the implementation vs. a mistake in the test. + - If it is a test authoring issue, fix and re-run. + - If it appears to be a real application bug, document it clearly and report it before saving the test. + - Do not save a test that does not pass. +- Confirm all assertions are meaningful — avoid tests that pass vacuously. + +### 4. Saving Tests +- Once a test passes reliably, save it to the `Tests/` directory following the structure and naming conventions defined in `PLAYRIGHT_TEST_DESGN.md`. +- Include a file-level comment block documenting: the user story ID(s) covered, a brief description, the date created, and any known limitations. +- Ensure the saved file is self-contained and runnable without modification. + +## Test Quality Standards + +- **Determinism**: Tests must produce consistent results across runs. Flaky selectors, race conditions, and environment dependencies must be eliminated. +- **Isolation**: Each test must be independent. Shared state between tests is forbidden unless explicitly managed via fixtures. +- **Readability**: Variable names, selector strategies, and assertion messages must be self-documenting. +- **Selector Strategy**: Prefer `data-testid` attributes, ARIA roles, and semantic locators over CSS classes or XPath. If the portal lacks test IDs, use the most stable available selector and document this as a recommendation to the development team. +- **Coverage**: Tests must cover the happy path, key error states, and any boundary conditions described in the user story. + +## Reporting + +After completing a test session, provide a concise summary including: +- User story/stories covered +- Test file(s) created and their location in `Tests/` +- Number of test cases written and their pass/fail status +- Any bugs discovered (with steps to reproduce) +- Any ambiguities in the design documents that required assumptions +- Recommendations for improving testability (e.g., missing `data-testid` attributes) + +## Edge Case Handling + +- If `PLAYRIGHT_TEST_DESGN.md` cannot be found, halt and ask the user to provide or create it before proceeding. +- If `Spec/01-design-document.md` or `DESIGN.md` do not contain a user story relevant to the feature being tested, ask the user to clarify the acceptance criteria before writing tests. +- If the Pelagia portal is not running or not reachable, report the connectivity issue with the URL attempted and ask for guidance. +- If tests require authentication, use credentials or session fixtures as specified in the project configuration. Never hardcode production credentials. + +**Update your agent memory** as you discover patterns, conventions, and institutional knowledge about the Pelagia portal and its test suite. This builds up expertise across conversations. + +Examples of what to record: +- Test file naming conventions and directory structure observed in `Tests/` +- Reusable selectors, page objects, or helper utilities available in the project +- Recurring user story patterns or common acceptance criteria themes +- Known flaky areas of the portal UI that require special handling +- Authentication and session management approaches used in tests +- Any bugs discovered during testing and their resolution status +- Deviations between the design documents and the actual portal behavior + +# Persistent Agent Memory + +You have a persistent, file-based memory system at `C:\Users\shad0w\Documents\src\Peliagia_Portal\.claude\agent-memory\pelagia-playwright-tester\`. This directory already exists — write to it directly with the Write tool (do not run mkdir or check for its existence). + +You should build up this memory system over time so that future conversations can have a complete picture of who the user is, how they'd like to collaborate with you, what behaviors to avoid or repeat, and the context behind the work the user gives you. + +If the user explicitly asks you to remember something, save it immediately as whichever type fits best. If they ask you to forget something, find and remove the relevant entry. + +## Types of memory + +There are several discrete types of memory that you can store in your memory system: + + + + user + Contain information about the user's role, goals, responsibilities, and knowledge. Great user memories help you tailor your future behavior to the user's preferences and perspective. Your goal in reading and writing these memories is to build up an understanding of who the user is and how you can be most helpful to them specifically. For example, you should collaborate with a senior software engineer differently than a student who is coding for the very first time. Keep in mind, that the aim here is to be helpful to the user. Avoid writing memories about the user that could be viewed as a negative judgement or that are not relevant to the work you're trying to accomplish together. + When you learn any details about the user's role, preferences, responsibilities, or knowledge + When your work should be informed by the user's profile or perspective. For example, if the user is asking you to explain a part of the code, you should answer that question in a way that is tailored to the specific details that they will find most valuable or that helps them build their mental model in relation to domain knowledge they already have. + + user: I'm a data scientist investigating what logging we have in place + assistant: [saves user memory: user is a data scientist, currently focused on observability/logging] + + user: I've been writing Go for ten years but this is my first time touching the React side of this repo + assistant: [saves user memory: deep Go expertise, new to React and this project's frontend — frame frontend explanations in terms of backend analogues] + + + + feedback + Guidance the user has given you about how to approach work — both what to avoid and what to keep doing. These are a very important type of memory to read and write as they allow you to remain coherent and responsive to the way you should approach work in the project. Record from failure AND success: if you only save corrections, you will avoid past mistakes but drift away from approaches the user has already validated, and may grow overly cautious. + Any time the user corrects your approach ("no not that", "don't", "stop doing X") OR confirms a non-obvious approach worked ("yes exactly", "perfect, keep doing that", accepting an unusual choice without pushback). Corrections are easy to notice; confirmations are quieter — watch for them. In both cases, save what is applicable to future conversations, especially if surprising or not obvious from the code. Include *why* so you can judge edge cases later. + Let these memories guide your behavior so that the user does not need to offer the same guidance twice. + Lead with the rule itself, then a **Why:** line (the reason the user gave — often a past incident or strong preference) and a **How to apply:** line (when/where this guidance kicks in). Knowing *why* lets you judge edge cases instead of blindly following the rule. + + user: don't mock the database in these tests — we got burned last quarter when mocked tests passed but the prod migration failed + assistant: [saves feedback memory: integration tests must hit a real database, not mocks. Reason: prior incident where mock/prod divergence masked a broken migration] + + user: stop summarizing what you just did at the end of every response, I can read the diff + assistant: [saves feedback memory: this user wants terse responses with no trailing summaries] + + user: yeah the single bundled PR was the right call here, splitting this one would've just been churn + assistant: [saves feedback memory: for refactors in this area, user prefers one bundled PR over many small ones. Confirmed after I chose this approach — a validated judgment call, not a correction] + + + + project + Information that you learn about ongoing work, goals, initiatives, bugs, or incidents within the project that is not otherwise derivable from the code or git history. Project memories help you understand the broader context and motivation behind the work the user is doing within this working directory. + When you learn who is doing what, why, or by when. These states change relatively quickly so try to keep your understanding of this up to date. Always convert relative dates in user messages to absolute dates when saving (e.g., "Thursday" → "2026-03-05"), so the memory remains interpretable after time passes. + Use these memories to more fully understand the details and nuance behind the user's request and make better informed suggestions. + Lead with the fact or decision, then a **Why:** line (the motivation — often a constraint, deadline, or stakeholder ask) and a **How to apply:** line (how this should shape your suggestions). Project memories decay fast, so the why helps future-you judge whether the memory is still load-bearing. + + user: we're freezing all non-critical merges after Thursday — mobile team is cutting a release branch + assistant: [saves project memory: merge freeze begins 2026-03-05 for mobile release cut. Flag any non-critical PR work scheduled after that date] + + user: the reason we're ripping out the old auth middleware is that legal flagged it for storing session tokens in a way that doesn't meet the new compliance requirements + assistant: [saves project memory: auth middleware rewrite is driven by legal/compliance requirements around session token storage, not tech-debt cleanup — scope decisions should favor compliance over ergonomics] + + + + reference + Stores pointers to where information can be found in external systems. These memories allow you to remember where to look to find up-to-date information outside of the project directory. + When you learn about resources in external systems and their purpose. For example, that bugs are tracked in a specific project in Linear or that feedback can be found in a specific Slack channel. + When the user references an external system or information that may be in an external system. + + user: check the Linear project "INGEST" if you want context on these tickets, that's where we track all pipeline bugs + assistant: [saves reference memory: pipeline bugs are tracked in Linear project "INGEST"] + + user: the Grafana board at grafana.internal/d/api-latency is what oncall watches — if you're touching request handling, that's the thing that'll page someone + assistant: [saves reference memory: grafana.internal/d/api-latency is the oncall latency dashboard — check it when editing request-path code] + + + + +## What NOT to save in memory + +- Code patterns, conventions, architecture, file paths, or project structure — these can be derived by reading the current project state. +- Git history, recent changes, or who-changed-what — `git log` / `git blame` are authoritative. +- Debugging solutions or fix recipes — the fix is in the code; the commit message has the context. +- Anything already documented in CLAUDE.md files. +- Ephemeral task details: in-progress work, temporary state, current conversation context. + +These exclusions apply even when the user explicitly asks you to save. If they ask you to save a PR list or activity summary, ask what was *surprising* or *non-obvious* about it — that is the part worth keeping. + +## How to save memories + +Saving a memory is a two-step process: + +**Step 1** — write the memory to its own file (e.g., `user_role.md`, `feedback_testing.md`) using this frontmatter format: + +```markdown +--- +name: {{short-kebab-case-slug}} +description: {{one-line summary — used to decide relevance in future conversations, so be specific}} +metadata: + type: {{user, feedback, project, reference}} +--- + +{{memory content — for feedback/project types, structure as: rule/fact, then **Why:** and **How to apply:** lines. Link related memories with [[their-name]].}} +``` + +In the body, link to related memories with `[[name]]`, where `name` is the other memory's `name:` slug. Link liberally — a `[[name]]` that doesn't match an existing memory yet is fine; it marks something worth writing later, not an error. + +**Step 2** — add a pointer to that file in `MEMORY.md`. `MEMORY.md` is an index, not a memory — each entry should be one line, under ~150 characters: `- [Title](file.md) — one-line hook`. It has no frontmatter. Never write memory content directly into `MEMORY.md`. + +- `MEMORY.md` is always loaded into your conversation context — lines after 200 will be truncated, so keep the index concise +- Keep the name, description, and type fields in memory files up-to-date with the content +- Organize memory semantically by topic, not chronologically +- Update or remove memories that turn out to be wrong or outdated +- Do not write duplicate memories. First check if there is an existing memory you can update before writing a new one. + +## When to access memories +- When memories seem relevant, or the user references prior-conversation work. +- You MUST access memory when the user explicitly asks you to check, recall, or remember. +- If the user says to *ignore* or *not use* memory: Do not apply remembered facts, cite, compare against, or mention memory content. +- Memory records can become stale over time. Use memory as context for what was true at a given point in time. Before answering the user or building assumptions based solely on information in memory records, verify that the memory is still correct and up-to-date by reading the current state of the files or resources. If a recalled memory conflicts with current information, trust what you observe now — and update or remove the stale memory rather than acting on it. + +## Before recommending from memory + +A memory that names a specific function, file, or flag is a claim that it existed *when the memory was written*. It may have been renamed, removed, or never merged. Before recommending it: + +- If the memory names a file path: check the file exists. +- If the memory names a function or flag: grep for it. +- If the user is about to act on your recommendation (not just asking about history), verify first. + +"The memory says X exists" is not the same as "X exists now." + +A memory that summarizes repo state (activity logs, architecture snapshots) is frozen in time. If the user asks about *recent* or *current* state, prefer `git log` or reading the code over recalling the snapshot. + +## Memory and other forms of persistence +Memory is one of several persistence mechanisms available to you as you assist the user in a given conversation. The distinction is often that memory can be recalled in future conversations and should not be used for persisting information that is only useful within the scope of the current conversation. +- When to use or update a plan instead of memory: If you are about to start a non-trivial implementation task and would like to reach alignment with the user on your approach you should use a Plan rather than saving this information to memory. Similarly, if you already have a plan within the conversation and you have changed your approach persist that change by updating the plan rather than saving a memory. +- When to use or update tasks instead of memory: When you need to break your work in current conversation into discrete steps or keep track of your progress use tasks instead of saving to memory. Tasks are great for persisting information about the work that needs to be done in the current conversation, but memory should be reserved for information that will be useful in future conversations. + +- Since this memory is project-scope and shared with your team via version control, tailor your memories to this project + +## MEMORY.md + +Your MEMORY.md is currently empty. When you save new memories, they will appear here. diff --git a/.claude/settings.local.json b/.claude/settings.local.json index a42e5df..5385770 100644 --- a/.claude/settings.local.json +++ b/.claude/settings.local.json @@ -3,7 +3,20 @@ "allow": [ "WebFetch(domain:developer.gst.gov.in)", "Bash(curl -s \"https://static.gst.gov.in/uiassets/js/services/forouter1.8.js\")", - "Bash(curl)" + "Bash(curl)", + "Bash(pnpm dev *)", + "WebFetch(domain:localhost)", + "Bash(pnpm type-check *)", + "Bash(pnpm lint *)", + "Bash(npx tsc *)", + "Bash(netstat -tlnp)", + "Bash(npx prisma migrate status)", + "Bash(npx prisma *)", + "Bash(netstat -ano)", + "Bash(findstr \":3000 :3003 :5432\")", + "Bash(findstr \"LISTENING\")", + "Bash(sed 's/ D //')", + "Bash(sed 's/?? //')" ] } } diff --git a/App/pelagia-portal/.env.example b/App/.env.example similarity index 100% rename from App/pelagia-portal/.env.example rename to App/.env.example diff --git a/App/pelagia-portal/.gitignore b/App/.gitignore similarity index 100% rename from App/pelagia-portal/.gitignore rename to App/.gitignore diff --git a/App/pelagia-portal/CLAUDE.md b/App/CLAUDE.md similarity index 100% rename from App/pelagia-portal/CLAUDE.md rename to App/CLAUDE.md diff --git a/App/pelagia-portal/README.md b/App/README.md similarity index 100% rename from App/pelagia-portal/README.md rename to App/README.md diff --git a/App/pelagia-portal/app/(auth)/login/page.tsx b/App/app/(auth)/login/page.tsx similarity index 100% rename from App/pelagia-portal/app/(auth)/login/page.tsx rename to App/app/(auth)/login/page.tsx diff --git a/App/pelagia-portal/app/(portal)/admin/accounts/account-form.tsx b/App/app/(portal)/admin/accounts/account-form.tsx similarity index 100% rename from App/pelagia-portal/app/(portal)/admin/accounts/account-form.tsx rename to App/app/(portal)/admin/accounts/account-form.tsx diff --git a/App/pelagia-portal/app/(portal)/admin/accounts/actions.ts b/App/app/(portal)/admin/accounts/actions.ts similarity index 100% rename from App/pelagia-portal/app/(portal)/admin/accounts/actions.ts rename to App/app/(portal)/admin/accounts/actions.ts diff --git a/App/pelagia-portal/app/(portal)/admin/accounts/page.tsx b/App/app/(portal)/admin/accounts/page.tsx similarity index 100% rename from App/pelagia-portal/app/(portal)/admin/accounts/page.tsx rename to App/app/(portal)/admin/accounts/page.tsx diff --git a/App/pelagia-portal/app/(portal)/admin/products/[id]/item-price-chart.tsx b/App/app/(portal)/admin/products/[id]/item-price-chart.tsx similarity index 100% rename from App/pelagia-portal/app/(portal)/admin/products/[id]/item-price-chart.tsx rename to App/app/(portal)/admin/products/[id]/item-price-chart.tsx diff --git a/App/pelagia-portal/app/(portal)/admin/products/[id]/page.tsx b/App/app/(portal)/admin/products/[id]/page.tsx similarity index 100% rename from App/pelagia-portal/app/(portal)/admin/products/[id]/page.tsx rename to App/app/(portal)/admin/products/[id]/page.tsx diff --git a/App/pelagia-portal/app/(portal)/admin/products/actions.ts b/App/app/(portal)/admin/products/actions.ts similarity index 100% rename from App/pelagia-portal/app/(portal)/admin/products/actions.ts rename to App/app/(portal)/admin/products/actions.ts diff --git a/App/pelagia-portal/app/(portal)/admin/products/page.tsx b/App/app/(portal)/admin/products/page.tsx similarity index 100% rename from App/pelagia-portal/app/(portal)/admin/products/page.tsx rename to App/app/(portal)/admin/products/page.tsx diff --git a/App/pelagia-portal/app/(portal)/admin/products/product-form.tsx b/App/app/(portal)/admin/products/product-form.tsx similarity index 100% rename from App/pelagia-portal/app/(portal)/admin/products/product-form.tsx rename to App/app/(portal)/admin/products/product-form.tsx diff --git a/App/pelagia-portal/app/(portal)/admin/sites/[id]/consumption-form.tsx b/App/app/(portal)/admin/sites/[id]/consumption-form.tsx similarity index 100% rename from App/pelagia-portal/app/(portal)/admin/sites/[id]/consumption-form.tsx rename to App/app/(portal)/admin/sites/[id]/consumption-form.tsx diff --git a/App/pelagia-portal/app/(portal)/admin/sites/[id]/page.tsx b/App/app/(portal)/admin/sites/[id]/page.tsx similarity index 100% rename from App/pelagia-portal/app/(portal)/admin/sites/[id]/page.tsx rename to App/app/(portal)/admin/sites/[id]/page.tsx diff --git a/App/pelagia-portal/app/(portal)/admin/sites/[id]/site-charts.tsx b/App/app/(portal)/admin/sites/[id]/site-charts.tsx similarity index 100% rename from App/pelagia-portal/app/(portal)/admin/sites/[id]/site-charts.tsx rename to App/app/(portal)/admin/sites/[id]/site-charts.tsx diff --git a/App/pelagia-portal/app/(portal)/admin/sites/actions.ts b/App/app/(portal)/admin/sites/actions.ts similarity index 100% rename from App/pelagia-portal/app/(portal)/admin/sites/actions.ts rename to App/app/(portal)/admin/sites/actions.ts diff --git a/App/pelagia-portal/app/(portal)/admin/sites/page.tsx b/App/app/(portal)/admin/sites/page.tsx similarity index 100% rename from App/pelagia-portal/app/(portal)/admin/sites/page.tsx rename to App/app/(portal)/admin/sites/page.tsx diff --git a/App/pelagia-portal/app/(portal)/admin/sites/site-form.tsx b/App/app/(portal)/admin/sites/site-form.tsx similarity index 100% rename from App/pelagia-portal/app/(portal)/admin/sites/site-form.tsx rename to App/app/(portal)/admin/sites/site-form.tsx diff --git a/App/pelagia-portal/app/(portal)/admin/superuser-requests/actions.ts b/App/app/(portal)/admin/superuser-requests/actions.ts similarity index 100% rename from App/pelagia-portal/app/(portal)/admin/superuser-requests/actions.ts rename to App/app/(portal)/admin/superuser-requests/actions.ts diff --git a/App/pelagia-portal/app/(portal)/admin/superuser-requests/page.tsx b/App/app/(portal)/admin/superuser-requests/page.tsx similarity index 100% rename from App/pelagia-portal/app/(portal)/admin/superuser-requests/page.tsx rename to App/app/(portal)/admin/superuser-requests/page.tsx diff --git a/App/pelagia-portal/app/(portal)/admin/superuser-requests/request-actions.tsx b/App/app/(portal)/admin/superuser-requests/request-actions.tsx similarity index 100% rename from App/pelagia-portal/app/(portal)/admin/superuser-requests/request-actions.tsx rename to App/app/(portal)/admin/superuser-requests/request-actions.tsx diff --git a/App/pelagia-portal/app/(portal)/admin/users/actions.ts b/App/app/(portal)/admin/users/actions.ts similarity index 100% rename from App/pelagia-portal/app/(portal)/admin/users/actions.ts rename to App/app/(portal)/admin/users/actions.ts diff --git a/App/pelagia-portal/app/(portal)/admin/users/grant-superuser-button.tsx b/App/app/(portal)/admin/users/grant-superuser-button.tsx similarity index 100% rename from App/pelagia-portal/app/(portal)/admin/users/grant-superuser-button.tsx rename to App/app/(portal)/admin/users/grant-superuser-button.tsx diff --git a/App/pelagia-portal/app/(portal)/admin/users/page.tsx b/App/app/(portal)/admin/users/page.tsx similarity index 100% rename from App/pelagia-portal/app/(portal)/admin/users/page.tsx rename to App/app/(portal)/admin/users/page.tsx diff --git a/App/pelagia-portal/app/(portal)/admin/users/user-form.tsx b/App/app/(portal)/admin/users/user-form.tsx similarity index 100% rename from App/pelagia-portal/app/(portal)/admin/users/user-form.tsx rename to App/app/(portal)/admin/users/user-form.tsx diff --git a/App/pelagia-portal/app/(portal)/admin/vendors/[id]/page.tsx b/App/app/(portal)/admin/vendors/[id]/page.tsx similarity index 100% rename from App/pelagia-portal/app/(portal)/admin/vendors/[id]/page.tsx rename to App/app/(portal)/admin/vendors/[id]/page.tsx diff --git a/App/pelagia-portal/app/(portal)/admin/vendors/[id]/vendor-items-table.tsx b/App/app/(portal)/admin/vendors/[id]/vendor-items-table.tsx similarity index 100% rename from App/pelagia-portal/app/(portal)/admin/vendors/[id]/vendor-items-table.tsx rename to App/app/(portal)/admin/vendors/[id]/vendor-items-table.tsx diff --git a/App/pelagia-portal/app/(portal)/admin/vendors/actions.ts b/App/app/(portal)/admin/vendors/actions.ts similarity index 100% rename from App/pelagia-portal/app/(portal)/admin/vendors/actions.ts rename to App/app/(portal)/admin/vendors/actions.ts diff --git a/App/pelagia-portal/app/(portal)/admin/vendors/page.tsx b/App/app/(portal)/admin/vendors/page.tsx similarity index 100% rename from App/pelagia-portal/app/(portal)/admin/vendors/page.tsx rename to App/app/(portal)/admin/vendors/page.tsx diff --git a/App/pelagia-portal/app/(portal)/admin/vendors/vendor-form.tsx b/App/app/(portal)/admin/vendors/vendor-form.tsx similarity index 100% rename from App/pelagia-portal/app/(portal)/admin/vendors/vendor-form.tsx rename to App/app/(portal)/admin/vendors/vendor-form.tsx diff --git a/App/pelagia-portal/app/(portal)/admin/vessels/[id]/page.tsx b/App/app/(portal)/admin/vessels/[id]/page.tsx similarity index 100% rename from App/pelagia-portal/app/(portal)/admin/vessels/[id]/page.tsx rename to App/app/(portal)/admin/vessels/[id]/page.tsx diff --git a/App/pelagia-portal/app/(portal)/admin/vessels/actions.ts b/App/app/(portal)/admin/vessels/actions.ts similarity index 100% rename from App/pelagia-portal/app/(portal)/admin/vessels/actions.ts rename to App/app/(portal)/admin/vessels/actions.ts diff --git a/App/pelagia-portal/app/(portal)/admin/vessels/page.tsx b/App/app/(portal)/admin/vessels/page.tsx similarity index 100% rename from App/pelagia-portal/app/(portal)/admin/vessels/page.tsx rename to App/app/(portal)/admin/vessels/page.tsx diff --git a/App/pelagia-portal/app/(portal)/admin/vessels/vessel-form.tsx b/App/app/(portal)/admin/vessels/vessel-form.tsx similarity index 100% rename from App/pelagia-portal/app/(portal)/admin/vessels/vessel-form.tsx rename to App/app/(portal)/admin/vessels/vessel-form.tsx diff --git a/App/pelagia-portal/app/(portal)/approvals/[id]/actions.ts b/App/app/(portal)/approvals/[id]/actions.ts similarity index 100% rename from App/pelagia-portal/app/(portal)/approvals/[id]/actions.ts rename to App/app/(portal)/approvals/[id]/actions.ts diff --git a/App/pelagia-portal/app/(portal)/approvals/[id]/approval-actions.tsx b/App/app/(portal)/approvals/[id]/approval-actions.tsx similarity index 100% rename from App/pelagia-portal/app/(portal)/approvals/[id]/approval-actions.tsx rename to App/app/(portal)/approvals/[id]/approval-actions.tsx diff --git a/App/pelagia-portal/app/(portal)/approvals/[id]/manager-edit-po-form.tsx b/App/app/(portal)/approvals/[id]/manager-edit-po-form.tsx similarity index 100% rename from App/pelagia-portal/app/(portal)/approvals/[id]/manager-edit-po-form.tsx rename to App/app/(portal)/approvals/[id]/manager-edit-po-form.tsx diff --git a/App/pelagia-portal/app/(portal)/approvals/[id]/manager-line-edit-actions.ts b/App/app/(portal)/approvals/[id]/manager-line-edit-actions.ts similarity index 100% rename from App/pelagia-portal/app/(portal)/approvals/[id]/manager-line-edit-actions.ts rename to App/app/(portal)/approvals/[id]/manager-line-edit-actions.ts diff --git a/App/pelagia-portal/app/(portal)/approvals/[id]/manager-line-items-editor.tsx b/App/app/(portal)/approvals/[id]/manager-line-items-editor.tsx similarity index 100% rename from App/pelagia-portal/app/(portal)/approvals/[id]/manager-line-items-editor.tsx rename to App/app/(portal)/approvals/[id]/manager-line-items-editor.tsx diff --git a/App/pelagia-portal/app/(portal)/approvals/[id]/manager-po-edit-actions.ts b/App/app/(portal)/approvals/[id]/manager-po-edit-actions.ts similarity index 100% rename from App/pelagia-portal/app/(portal)/approvals/[id]/manager-po-edit-actions.ts rename to App/app/(portal)/approvals/[id]/manager-po-edit-actions.ts diff --git a/App/pelagia-portal/app/(portal)/approvals/[id]/page.tsx b/App/app/(portal)/approvals/[id]/page.tsx similarity index 100% rename from App/pelagia-portal/app/(portal)/approvals/[id]/page.tsx rename to App/app/(portal)/approvals/[id]/page.tsx diff --git a/App/pelagia-portal/app/(portal)/approvals/approvals-search.tsx b/App/app/(portal)/approvals/approvals-search.tsx similarity index 100% rename from App/pelagia-portal/app/(portal)/approvals/approvals-search.tsx rename to App/app/(portal)/approvals/approvals-search.tsx diff --git a/App/pelagia-portal/app/(portal)/approvals/page.tsx b/App/app/(portal)/approvals/page.tsx similarity index 100% rename from App/pelagia-portal/app/(portal)/approvals/page.tsx rename to App/app/(portal)/approvals/page.tsx diff --git a/App/pelagia-portal/app/(portal)/dashboard/page.tsx b/App/app/(portal)/dashboard/page.tsx similarity index 100% rename from App/pelagia-portal/app/(portal)/dashboard/page.tsx rename to App/app/(portal)/dashboard/page.tsx diff --git a/App/pelagia-portal/app/(portal)/history/history-filters.tsx b/App/app/(portal)/history/history-filters.tsx similarity index 100% rename from App/pelagia-portal/app/(portal)/history/history-filters.tsx rename to App/app/(portal)/history/history-filters.tsx diff --git a/App/pelagia-portal/app/(portal)/history/page.tsx b/App/app/(portal)/history/page.tsx similarity index 100% rename from App/pelagia-portal/app/(portal)/history/page.tsx rename to App/app/(portal)/history/page.tsx diff --git a/App/pelagia-portal/app/(portal)/inventory/cart/cart-view.tsx b/App/app/(portal)/inventory/cart/cart-view.tsx similarity index 100% rename from App/pelagia-portal/app/(portal)/inventory/cart/cart-view.tsx rename to App/app/(portal)/inventory/cart/cart-view.tsx diff --git a/App/pelagia-portal/app/(portal)/inventory/cart/page.tsx b/App/app/(portal)/inventory/cart/page.tsx similarity index 100% rename from App/pelagia-portal/app/(portal)/inventory/cart/page.tsx rename to App/app/(portal)/inventory/cart/page.tsx diff --git a/App/pelagia-portal/app/(portal)/inventory/items/items-table.tsx b/App/app/(portal)/inventory/items/items-table.tsx similarity index 100% rename from App/pelagia-portal/app/(portal)/inventory/items/items-table.tsx rename to App/app/(portal)/inventory/items/items-table.tsx diff --git a/App/pelagia-portal/app/(portal)/inventory/items/page.tsx b/App/app/(portal)/inventory/items/page.tsx similarity index 100% rename from App/pelagia-portal/app/(portal)/inventory/items/page.tsx rename to App/app/(portal)/inventory/items/page.tsx diff --git a/App/pelagia-portal/app/(portal)/inventory/vendors/[id]/page.tsx b/App/app/(portal)/inventory/vendors/[id]/page.tsx similarity index 100% rename from App/pelagia-portal/app/(portal)/inventory/vendors/[id]/page.tsx rename to App/app/(portal)/inventory/vendors/[id]/page.tsx diff --git a/App/pelagia-portal/app/(portal)/inventory/vendors/[id]/vendor-items-table.tsx b/App/app/(portal)/inventory/vendors/[id]/vendor-items-table.tsx similarity index 100% rename from App/pelagia-portal/app/(portal)/inventory/vendors/[id]/vendor-items-table.tsx rename to App/app/(portal)/inventory/vendors/[id]/vendor-items-table.tsx diff --git a/App/pelagia-portal/app/(portal)/inventory/vendors/page.tsx b/App/app/(portal)/inventory/vendors/page.tsx similarity index 100% rename from App/pelagia-portal/app/(portal)/inventory/vendors/page.tsx rename to App/app/(portal)/inventory/vendors/page.tsx diff --git a/App/pelagia-portal/app/(portal)/inventory/vendors/vendors-table.tsx b/App/app/(portal)/inventory/vendors/vendors-table.tsx similarity index 100% rename from App/pelagia-portal/app/(portal)/inventory/vendors/vendors-table.tsx rename to App/app/(portal)/inventory/vendors/vendors-table.tsx diff --git a/App/pelagia-portal/app/(portal)/layout.tsx b/App/app/(portal)/layout.tsx similarity index 100% rename from App/pelagia-portal/app/(portal)/layout.tsx rename to App/app/(portal)/layout.tsx diff --git a/App/pelagia-portal/app/(portal)/my-orders/page.tsx b/App/app/(portal)/my-orders/page.tsx similarity index 100% rename from App/pelagia-portal/app/(portal)/my-orders/page.tsx rename to App/app/(portal)/my-orders/page.tsx diff --git a/App/pelagia-portal/app/(portal)/payments/actions.ts b/App/app/(portal)/payments/actions.ts similarity index 100% rename from App/pelagia-portal/app/(portal)/payments/actions.ts rename to App/app/(portal)/payments/actions.ts diff --git a/App/pelagia-portal/app/(portal)/payments/history/page.tsx b/App/app/(portal)/payments/history/page.tsx similarity index 100% rename from App/pelagia-portal/app/(portal)/payments/history/page.tsx rename to App/app/(portal)/payments/history/page.tsx diff --git a/App/pelagia-portal/app/(portal)/payments/history/payment-history-filters.tsx b/App/app/(portal)/payments/history/payment-history-filters.tsx similarity index 100% rename from App/pelagia-portal/app/(portal)/payments/history/payment-history-filters.tsx rename to App/app/(portal)/payments/history/payment-history-filters.tsx diff --git a/App/pelagia-portal/app/(portal)/payments/page.tsx b/App/app/(portal)/payments/page.tsx similarity index 100% rename from App/pelagia-portal/app/(portal)/payments/page.tsx rename to App/app/(portal)/payments/page.tsx diff --git a/App/pelagia-portal/app/(portal)/payments/payment-actions.tsx b/App/app/(portal)/payments/payment-actions.tsx similarity index 100% rename from App/pelagia-portal/app/(portal)/payments/payment-actions.tsx rename to App/app/(portal)/payments/payment-actions.tsx diff --git a/App/pelagia-portal/app/(portal)/po/[id]/actions.ts b/App/app/(portal)/po/[id]/actions.ts similarity index 100% rename from App/pelagia-portal/app/(portal)/po/[id]/actions.ts rename to App/app/(portal)/po/[id]/actions.ts diff --git a/App/pelagia-portal/app/(portal)/po/[id]/edit/actions.ts b/App/app/(portal)/po/[id]/edit/actions.ts similarity index 100% rename from App/pelagia-portal/app/(portal)/po/[id]/edit/actions.ts rename to App/app/(portal)/po/[id]/edit/actions.ts diff --git a/App/pelagia-portal/app/(portal)/po/[id]/edit/edit-po-form.tsx b/App/app/(portal)/po/[id]/edit/edit-po-form.tsx similarity index 100% rename from App/pelagia-portal/app/(portal)/po/[id]/edit/edit-po-form.tsx rename to App/app/(portal)/po/[id]/edit/edit-po-form.tsx diff --git a/App/pelagia-portal/app/(portal)/po/[id]/edit/page.tsx b/App/app/(portal)/po/[id]/edit/page.tsx similarity index 100% rename from App/pelagia-portal/app/(portal)/po/[id]/edit/page.tsx rename to App/app/(portal)/po/[id]/edit/page.tsx diff --git a/App/pelagia-portal/app/(portal)/po/[id]/page.tsx b/App/app/(portal)/po/[id]/page.tsx similarity index 100% rename from App/pelagia-portal/app/(portal)/po/[id]/page.tsx rename to App/app/(portal)/po/[id]/page.tsx diff --git a/App/pelagia-portal/app/(portal)/po/[id]/receipt/actions.ts b/App/app/(portal)/po/[id]/receipt/actions.ts similarity index 100% rename from App/pelagia-portal/app/(portal)/po/[id]/receipt/actions.ts rename to App/app/(portal)/po/[id]/receipt/actions.ts diff --git a/App/pelagia-portal/app/(portal)/po/[id]/receipt/page.tsx b/App/app/(portal)/po/[id]/receipt/page.tsx similarity index 100% rename from App/pelagia-portal/app/(portal)/po/[id]/receipt/page.tsx rename to App/app/(portal)/po/[id]/receipt/page.tsx diff --git a/App/pelagia-portal/app/(portal)/po/[id]/receipt/receipt-form.tsx b/App/app/(portal)/po/[id]/receipt/receipt-form.tsx similarity index 100% rename from App/pelagia-portal/app/(portal)/po/[id]/receipt/receipt-form.tsx rename to App/app/(portal)/po/[id]/receipt/receipt-form.tsx diff --git a/App/pelagia-portal/app/(portal)/po/[id]/vendor-id-form.tsx b/App/app/(portal)/po/[id]/vendor-id-form.tsx similarity index 100% rename from App/pelagia-portal/app/(portal)/po/[id]/vendor-id-form.tsx rename to App/app/(portal)/po/[id]/vendor-id-form.tsx diff --git a/App/pelagia-portal/app/(portal)/po/import/actions.ts b/App/app/(portal)/po/import/actions.ts similarity index 100% rename from App/pelagia-portal/app/(portal)/po/import/actions.ts rename to App/app/(portal)/po/import/actions.ts diff --git a/App/pelagia-portal/app/(portal)/po/import/import-form.tsx b/App/app/(portal)/po/import/import-form.tsx similarity index 100% rename from App/pelagia-portal/app/(portal)/po/import/import-form.tsx rename to App/app/(portal)/po/import/import-form.tsx diff --git a/App/pelagia-portal/app/(portal)/po/import/page.tsx b/App/app/(portal)/po/import/page.tsx similarity index 100% rename from App/pelagia-portal/app/(portal)/po/import/page.tsx rename to App/app/(portal)/po/import/page.tsx diff --git a/App/pelagia-portal/app/(portal)/po/new/actions.ts b/App/app/(portal)/po/new/actions.ts similarity index 100% rename from App/pelagia-portal/app/(portal)/po/new/actions.ts rename to App/app/(portal)/po/new/actions.ts diff --git a/App/pelagia-portal/app/(portal)/po/new/new-po-form.tsx b/App/app/(portal)/po/new/new-po-form.tsx similarity index 100% rename from App/pelagia-portal/app/(portal)/po/new/new-po-form.tsx rename to App/app/(portal)/po/new/new-po-form.tsx diff --git a/App/pelagia-portal/app/(portal)/po/new/page.tsx b/App/app/(portal)/po/new/page.tsx similarity index 100% rename from App/pelagia-portal/app/(portal)/po/new/page.tsx rename to App/app/(portal)/po/new/page.tsx diff --git a/App/pelagia-portal/app/(portal)/profile/actions.ts b/App/app/(portal)/profile/actions.ts similarity index 100% rename from App/pelagia-portal/app/(portal)/profile/actions.ts rename to App/app/(portal)/profile/actions.ts diff --git a/App/pelagia-portal/app/(portal)/profile/change-password-form.tsx b/App/app/(portal)/profile/change-password-form.tsx similarity index 100% rename from App/pelagia-portal/app/(portal)/profile/change-password-form.tsx rename to App/app/(portal)/profile/change-password-form.tsx diff --git a/App/pelagia-portal/app/(portal)/profile/page.tsx b/App/app/(portal)/profile/page.tsx similarity index 100% rename from App/pelagia-portal/app/(portal)/profile/page.tsx rename to App/app/(portal)/profile/page.tsx diff --git a/App/pelagia-portal/app/(portal)/profile/signature-uploader.tsx b/App/app/(portal)/profile/signature-uploader.tsx similarity index 100% rename from App/pelagia-portal/app/(portal)/profile/signature-uploader.tsx rename to App/app/(portal)/profile/signature-uploader.tsx diff --git a/App/pelagia-portal/app/(portal)/profile/superuser-request-form.tsx b/App/app/(portal)/profile/superuser-request-form.tsx similarity index 100% rename from App/pelagia-portal/app/(portal)/profile/superuser-request-form.tsx rename to App/app/(portal)/profile/superuser-request-form.tsx diff --git a/App/pelagia-portal/app/actions/link-document.ts b/App/app/actions/link-document.ts similarity index 100% rename from App/pelagia-portal/app/actions/link-document.ts rename to App/app/actions/link-document.ts diff --git a/App/pelagia-portal/app/api/auth/[...nextauth]/route.ts b/App/app/api/auth/[...nextauth]/route.ts similarity index 100% rename from App/pelagia-portal/app/api/auth/[...nextauth]/route.ts rename to App/app/api/auth/[...nextauth]/route.ts diff --git a/App/pelagia-portal/app/api/files/dev/[...key]/route.ts b/App/app/api/files/dev/[...key]/route.ts similarity index 100% rename from App/pelagia-portal/app/api/files/dev/[...key]/route.ts rename to App/app/api/files/dev/[...key]/route.ts diff --git a/App/pelagia-portal/app/api/files/sign/route.ts b/App/app/api/files/sign/route.ts similarity index 100% rename from App/pelagia-portal/app/api/files/sign/route.ts rename to App/app/api/files/sign/route.ts diff --git a/App/pelagia-portal/app/api/gst/captcha/route.ts b/App/app/api/gst/captcha/route.ts similarity index 100% rename from App/pelagia-portal/app/api/gst/captcha/route.ts rename to App/app/api/gst/captcha/route.ts diff --git a/App/pelagia-portal/app/api/gst/route.ts b/App/app/api/gst/route.ts similarity index 100% rename from App/pelagia-portal/app/api/gst/route.ts rename to App/app/api/gst/route.ts diff --git a/App/pelagia-portal/app/api/notifications/read/route.ts b/App/app/api/notifications/read/route.ts similarity index 100% rename from App/pelagia-portal/app/api/notifications/read/route.ts rename to App/app/api/notifications/read/route.ts diff --git a/App/pelagia-portal/app/api/notifications/route.ts b/App/app/api/notifications/route.ts similarity index 100% rename from App/pelagia-portal/app/api/notifications/route.ts rename to App/app/api/notifications/route.ts diff --git a/App/pelagia-portal/app/api/po/[id]/export/route.ts b/App/app/api/po/[id]/export/route.ts similarity index 100% rename from App/pelagia-portal/app/api/po/[id]/export/route.ts rename to App/app/api/po/[id]/export/route.ts diff --git a/App/pelagia-portal/app/api/po/import/route.ts b/App/app/api/po/import/route.ts similarity index 100% rename from App/pelagia-portal/app/api/po/import/route.ts rename to App/app/api/po/import/route.ts diff --git a/App/pelagia-portal/app/api/products/search/route.ts b/App/app/api/products/search/route.ts similarity index 100% rename from App/pelagia-portal/app/api/products/search/route.ts rename to App/app/api/products/search/route.ts diff --git a/App/pelagia-portal/app/api/reports/export/route.ts b/App/app/api/reports/export/route.ts similarity index 100% rename from App/pelagia-portal/app/api/reports/export/route.ts rename to App/app/api/reports/export/route.ts diff --git a/App/pelagia-portal/app/globals.css b/App/app/globals.css similarity index 100% rename from App/pelagia-portal/app/globals.css rename to App/app/globals.css diff --git a/App/pelagia-portal/app/layout.tsx b/App/app/layout.tsx similarity index 100% rename from App/pelagia-portal/app/layout.tsx rename to App/app/layout.tsx diff --git a/App/pelagia-portal/app/page.tsx b/App/app/page.tsx similarity index 100% rename from App/pelagia-portal/app/page.tsx rename to App/app/page.tsx diff --git a/App/pelagia-portal/auth.ts b/App/auth.ts similarity index 100% rename from App/pelagia-portal/auth.ts rename to App/auth.ts diff --git a/App/pelagia-portal/components/dashboard/spend-charts.tsx b/App/components/dashboard/spend-charts.tsx similarity index 100% rename from App/pelagia-portal/components/dashboard/spend-charts.tsx rename to App/components/dashboard/spend-charts.tsx diff --git a/App/pelagia-portal/components/dashboard/stat-card.tsx b/App/components/dashboard/stat-card.tsx similarity index 100% rename from App/pelagia-portal/components/dashboard/stat-card.tsx rename to App/components/dashboard/stat-card.tsx diff --git a/App/pelagia-portal/components/inventory/add-to-cart-button.tsx b/App/components/inventory/add-to-cart-button.tsx similarity index 100% rename from App/pelagia-portal/components/inventory/add-to-cart-button.tsx rename to App/components/inventory/add-to-cart-button.tsx diff --git a/App/pelagia-portal/components/inventory/site-select.tsx b/App/components/inventory/site-select.tsx similarity index 100% rename from App/pelagia-portal/components/inventory/site-select.tsx rename to App/components/inventory/site-select.tsx diff --git a/App/pelagia-portal/components/layout/cart-icon.tsx b/App/components/layout/cart-icon.tsx similarity index 100% rename from App/pelagia-portal/components/layout/cart-icon.tsx rename to App/components/layout/cart-icon.tsx diff --git a/App/pelagia-portal/components/layout/desktop-required.tsx b/App/components/layout/desktop-required.tsx similarity index 100% rename from App/pelagia-portal/components/layout/desktop-required.tsx rename to App/components/layout/desktop-required.tsx diff --git a/App/pelagia-portal/components/layout/header.tsx b/App/components/layout/header.tsx similarity index 100% rename from App/pelagia-portal/components/layout/header.tsx rename to App/components/layout/header.tsx diff --git a/App/pelagia-portal/components/layout/mobile-bottom-nav.tsx b/App/components/layout/mobile-bottom-nav.tsx similarity index 100% rename from App/pelagia-portal/components/layout/mobile-bottom-nav.tsx rename to App/components/layout/mobile-bottom-nav.tsx diff --git a/App/pelagia-portal/components/layout/mobile-header.tsx b/App/components/layout/mobile-header.tsx similarity index 100% rename from App/pelagia-portal/components/layout/mobile-header.tsx rename to App/components/layout/mobile-header.tsx diff --git a/App/pelagia-portal/components/layout/notification-bell.tsx b/App/components/layout/notification-bell.tsx similarity index 100% rename from App/pelagia-portal/components/layout/notification-bell.tsx rename to App/components/layout/notification-bell.tsx diff --git a/App/pelagia-portal/components/layout/sidebar.tsx b/App/components/layout/sidebar.tsx similarity index 100% rename from App/pelagia-portal/components/layout/sidebar.tsx rename to App/components/layout/sidebar.tsx diff --git a/App/pelagia-portal/components/po/discard-draft-button.tsx b/App/components/po/discard-draft-button.tsx similarity index 100% rename from App/pelagia-portal/components/po/discard-draft-button.tsx rename to App/components/po/discard-draft-button.tsx diff --git a/App/pelagia-portal/components/po/file-uploader.tsx b/App/components/po/file-uploader.tsx similarity index 100% rename from App/pelagia-portal/components/po/file-uploader.tsx rename to App/components/po/file-uploader.tsx diff --git a/App/pelagia-portal/components/po/po-detail.tsx b/App/components/po/po-detail.tsx similarity index 100% rename from App/pelagia-portal/components/po/po-detail.tsx rename to App/components/po/po-detail.tsx diff --git a/App/pelagia-portal/components/po/po-line-items-editor.tsx b/App/components/po/po-line-items-editor.tsx similarity index 100% rename from App/pelagia-portal/components/po/po-line-items-editor.tsx rename to App/components/po/po-line-items-editor.tsx diff --git a/App/pelagia-portal/components/po/po-status-badge.tsx b/App/components/po/po-status-badge.tsx similarity index 100% rename from App/pelagia-portal/components/po/po-status-badge.tsx rename to App/components/po/po-status-badge.tsx diff --git a/App/pelagia-portal/components/po/submit-draft-button.tsx b/App/components/po/submit-draft-button.tsx similarity index 100% rename from App/pelagia-portal/components/po/submit-draft-button.tsx rename to App/components/po/submit-draft-button.tsx diff --git a/App/pelagia-portal/components/ui/admin-dialog.tsx b/App/components/ui/admin-dialog.tsx similarity index 100% rename from App/pelagia-portal/components/ui/admin-dialog.tsx rename to App/components/ui/admin-dialog.tsx diff --git a/App/pelagia-portal/components/ui/badge.tsx b/App/components/ui/badge.tsx similarity index 100% rename from App/pelagia-portal/components/ui/badge.tsx rename to App/components/ui/badge.tsx diff --git a/App/pelagia-portal/components/ui/button.tsx b/App/components/ui/button.tsx similarity index 100% rename from App/pelagia-portal/components/ui/button.tsx rename to App/components/ui/button.tsx diff --git a/App/pelagia-portal/components/ui/card.tsx b/App/components/ui/card.tsx similarity index 100% rename from App/pelagia-portal/components/ui/card.tsx rename to App/components/ui/card.tsx diff --git a/App/pelagia-portal/components/ui/confirm-delete-button.tsx b/App/components/ui/confirm-delete-button.tsx similarity index 100% rename from App/pelagia-portal/components/ui/confirm-delete-button.tsx rename to App/components/ui/confirm-delete-button.tsx diff --git a/App/pelagia-portal/components/ui/input.tsx b/App/components/ui/input.tsx similarity index 100% rename from App/pelagia-portal/components/ui/input.tsx rename to App/components/ui/input.tsx diff --git a/App/pelagia-portal/components/ui/label.tsx b/App/components/ui/label.tsx similarity index 100% rename from App/pelagia-portal/components/ui/label.tsx rename to App/components/ui/label.tsx diff --git a/App/pelagia-portal/components/ui/textarea.tsx b/App/components/ui/textarea.tsx similarity index 100% rename from App/pelagia-portal/components/ui/textarea.tsx rename to App/components/ui/textarea.tsx diff --git a/App/pelagia-portal/emails/edits-requested.tsx b/App/emails/edits-requested.tsx similarity index 100% rename from App/pelagia-portal/emails/edits-requested.tsx rename to App/emails/edits-requested.tsx diff --git a/App/pelagia-portal/emails/layout.tsx b/App/emails/layout.tsx similarity index 100% rename from App/pelagia-portal/emails/layout.tsx rename to App/emails/layout.tsx diff --git a/App/pelagia-portal/emails/payment-processed.tsx b/App/emails/payment-processed.tsx similarity index 100% rename from App/pelagia-portal/emails/payment-processed.tsx rename to App/emails/payment-processed.tsx diff --git a/App/pelagia-portal/emails/po-approved.tsx b/App/emails/po-approved.tsx similarity index 100% rename from App/pelagia-portal/emails/po-approved.tsx rename to App/emails/po-approved.tsx diff --git a/App/pelagia-portal/emails/po-rejected.tsx b/App/emails/po-rejected.tsx similarity index 100% rename from App/pelagia-portal/emails/po-rejected.tsx rename to App/emails/po-rejected.tsx diff --git a/App/pelagia-portal/emails/po-submitted.tsx b/App/emails/po-submitted.tsx similarity index 100% rename from App/pelagia-portal/emails/po-submitted.tsx rename to App/emails/po-submitted.tsx diff --git a/App/pelagia-portal/emails/receipt-confirmed.tsx b/App/emails/receipt-confirmed.tsx similarity index 100% rename from App/pelagia-portal/emails/receipt-confirmed.tsx rename to App/emails/receipt-confirmed.tsx diff --git a/App/pelagia-portal/emails/vendor-id-needed.tsx b/App/emails/vendor-id-needed.tsx similarity index 100% rename from App/pelagia-portal/emails/vendor-id-needed.tsx rename to App/emails/vendor-id-needed.tsx diff --git a/App/pelagia-portal/lib/cart.ts b/App/lib/cart.ts similarity index 100% rename from App/pelagia-portal/lib/cart.ts rename to App/lib/cart.ts diff --git a/App/pelagia-portal/lib/db.ts b/App/lib/db.ts similarity index 100% rename from App/pelagia-portal/lib/db.ts rename to App/lib/db.ts diff --git a/App/pelagia-portal/lib/geo.ts b/App/lib/geo.ts similarity index 100% rename from App/pelagia-portal/lib/geo.ts rename to App/lib/geo.ts diff --git a/App/pelagia-portal/lib/notifier.ts b/App/lib/notifier.ts similarity index 100% rename from App/pelagia-portal/lib/notifier.ts rename to App/lib/notifier.ts diff --git a/App/pelagia-portal/lib/permissions.ts b/App/lib/permissions.ts similarity index 100% rename from App/pelagia-portal/lib/permissions.ts rename to App/lib/permissions.ts diff --git a/App/pelagia-portal/lib/po-import-parser.ts b/App/lib/po-import-parser.ts similarity index 100% rename from App/pelagia-portal/lib/po-import-parser.ts rename to App/lib/po-import-parser.ts diff --git a/App/pelagia-portal/lib/po-state-machine.ts b/App/lib/po-state-machine.ts similarity index 100% rename from App/pelagia-portal/lib/po-state-machine.ts rename to App/lib/po-state-machine.ts diff --git a/App/pelagia-portal/lib/storage.ts b/App/lib/storage.ts similarity index 100% rename from App/pelagia-portal/lib/storage.ts rename to App/lib/storage.ts diff --git a/App/pelagia-portal/lib/upload-files.ts b/App/lib/upload-files.ts similarity index 100% rename from App/pelagia-portal/lib/upload-files.ts rename to App/lib/upload-files.ts diff --git a/App/pelagia-portal/lib/utils.ts b/App/lib/utils.ts similarity index 100% rename from App/pelagia-portal/lib/utils.ts rename to App/lib/utils.ts diff --git a/App/pelagia-portal/lib/validations/po.ts b/App/lib/validations/po.ts similarity index 100% rename from App/pelagia-portal/lib/validations/po.ts rename to App/lib/validations/po.ts diff --git a/App/pelagia-portal/lib/validations/user.ts b/App/lib/validations/user.ts similarity index 100% rename from App/pelagia-portal/lib/validations/user.ts rename to App/lib/validations/user.ts diff --git a/App/pelagia-portal/middleware.ts b/App/middleware.ts similarity index 100% rename from App/pelagia-portal/middleware.ts rename to App/middleware.ts diff --git a/App/pelagia-portal/next.config.ts b/App/next.config.ts similarity index 100% rename from App/pelagia-portal/next.config.ts rename to App/next.config.ts diff --git a/App/package.json b/App/package.json new file mode 100644 index 0000000..3fe9415 --- /dev/null +++ b/App/package.json @@ -0,0 +1,90 @@ +{ + "name": "pelagia-portal", + "version": "0.1.0", + "private": true, + "scripts": { + "dev": "next dev --turbopack", + "build": "next build", + "start": "next start", + "lint": "next lint", + "type-check": "tsc --noEmit", + "test": "vitest run", + "test:watch": "vitest", + "test:integration": "vitest run --config vitest.integration.config.ts", + "test:integration:watch": "vitest --config vitest.integration.config.ts", + "test:all": "vitest run \u0026\u0026 vitest run --config vitest.integration.config.ts", + "test:e2e": "playwright test", + "test:e2e:ui": "playwright test --ui", + "db:generate": "prisma generate", + "db:push": "prisma db push", + "db:migrate": "prisma migrate dev", + "db:migrate:deploy": "prisma migrate deploy", + "db:seed": "tsx prisma/seed.ts", + "db:studio": "prisma studio", + "db:reset": "prisma migrate reset", + "email:preview": "email dev --dir emails --port 3001" + }, + "dependencies": { + "@auth/prisma-adapter": "^2.7.0", + "@aws-sdk/client-s3": "^3.705.0", + "@aws-sdk/s3-request-presigner": "^3.705.0", + "@prisma/client": "^5.22.0", + "@radix-ui/react-avatar": "^1.1.2", + "@radix-ui/react-dialog": "^1.1.4", + "@radix-ui/react-dropdown-menu": "^2.1.4", + "@radix-ui/react-label": "^2.1.1", + "@radix-ui/react-select": "^2.1.4", + "@radix-ui/react-separator": "^1.1.1", + "@radix-ui/react-slot": "^1.1.1", + "@radix-ui/react-toast": "^1.2.4", + "@react-email/components": "^0.0.27", + "@react-email/render": "^1.0.1", + "bcryptjs": "^2.4.3", + "class-variance-authority": "^0.7.1", + "clsx": "^2.1.1", + "date-fns": "^4.1.0", + "exceljs": "^4.4.0", + "lucide-react": "^0.468.0", + "next": "^15.1.0", + "next-auth": "^5.0.0-beta.25", + "react": "^19.0.0", + "react-dom": "^19.0.0", + "recharts": "^2.13.3", + "resend": "^4.0.0", + "tailwind-merge": "^2.5.4", + "xlsx": "^0.18.5", + "zod": "^3.23.8" + }, + "devDependencies": { + "@playwright/test": "^1.49.0", + "@tailwindcss/postcss": "^4.0.0", + "@testing-library/jest-dom": "^6.6.3", + "@testing-library/react": "^16.1.0", + "@testing-library/user-event": "^14.5.2", + "@types/bcryptjs": "^2.4.6", + "@types/jsdom": "^28.0.1", + "@types/node": "^22.10.1", + "@types/react": "^19.0.1", + "@types/react-dom": "^19.0.1", + "@vitejs/plugin-react": "^4.3.4", + "eslint": "^9.16.0", + "eslint-config-next": "^15.1.0", + "jsdom": "^29.1.1", + "prisma": "^5.22.0", + "react-email": "^3.0.2", + "tailwindcss": "^4.0.0", + "tsx": "^4.19.2", + "typescript": "^5.7.2", + "vitest": "^2.1.8" + }, + "pnpm": { "allowedBuildScripts": [ + "@prisma/client", + "@prisma/engines", + "esbuild", + "prisma", + "sharp", + "unrs-resolver" + ] + } +} + diff --git a/App/pelagia-portal/.claude/scheduled_tasks.lock b/App/pelagia-portal/.claude/scheduled_tasks.lock deleted file mode 100644 index 6c25d93..0000000 --- a/App/pelagia-portal/.claude/scheduled_tasks.lock +++ /dev/null @@ -1 +0,0 @@ -{"sessionId":"09360cd7-ccc6-4301-988d-d01a37fd1072","pid":23908,"acquiredAt":1777480375077} \ No newline at end of file diff --git a/App/pelagia-portal/package.json b/App/pelagia-portal/package.json deleted file mode 100644 index 4feacc7..0000000 --- a/App/pelagia-portal/package.json +++ /dev/null @@ -1,80 +0,0 @@ -{ - "name": "pelagia-portal", - "version": "0.1.0", - "private": true, - "scripts": { - "dev": "next dev --turbopack", - "build": "next build", - "start": "next start", - "lint": "next lint", - "type-check": "tsc --noEmit", - "test": "vitest run", - "test:watch": "vitest", - "test:integration": "vitest run --config vitest.integration.config.ts", - "test:integration:watch": "vitest --config vitest.integration.config.ts", - "test:all": "vitest run && vitest run --config vitest.integration.config.ts", - "test:e2e": "playwright test", - "test:e2e:ui": "playwright test --ui", - "db:generate": "prisma generate", - "db:push": "prisma db push", - "db:migrate": "prisma migrate dev", - "db:migrate:deploy": "prisma migrate deploy", - "db:seed": "tsx prisma/seed.ts", - "db:studio": "prisma studio", - "db:reset": "prisma migrate reset", - "email:preview": "email dev --dir emails --port 3001" - }, - "dependencies": { - "@auth/prisma-adapter": "^2.7.0", - "@aws-sdk/client-s3": "^3.705.0", - "@aws-sdk/s3-request-presigner": "^3.705.0", - "@prisma/client": "^5.22.0", - "@radix-ui/react-avatar": "^1.1.2", - "@radix-ui/react-dialog": "^1.1.4", - "@radix-ui/react-dropdown-menu": "^2.1.4", - "@radix-ui/react-label": "^2.1.1", - "@radix-ui/react-select": "^2.1.4", - "@radix-ui/react-separator": "^1.1.1", - "@radix-ui/react-slot": "^1.1.1", - "@radix-ui/react-toast": "^1.2.4", - "@react-email/components": "^0.0.27", - "@react-email/render": "^1.0.1", - "bcryptjs": "^2.4.3", - "class-variance-authority": "^0.7.1", - "clsx": "^2.1.1", - "date-fns": "^4.1.0", - "exceljs": "^4.4.0", - "lucide-react": "^0.468.0", - "next": "^15.1.0", - "next-auth": "^5.0.0-beta.25", - "react": "^19.0.0", - "react-dom": "^19.0.0", - "recharts": "^2.13.3", - "resend": "^4.0.0", - "tailwind-merge": "^2.5.4", - "xlsx": "^0.18.5", - "zod": "^3.23.8" - }, - "devDependencies": { - "@playwright/test": "^1.49.0", - "@tailwindcss/postcss": "^4.0.0", - "@testing-library/jest-dom": "^6.6.3", - "@testing-library/react": "^16.1.0", - "@testing-library/user-event": "^14.5.2", - "@types/bcryptjs": "^2.4.6", - "@types/jsdom": "^28.0.1", - "@types/node": "^22.10.1", - "@types/react": "^19.0.1", - "@types/react-dom": "^19.0.1", - "@vitejs/plugin-react": "^4.3.4", - "eslint": "^9.16.0", - "eslint-config-next": "^15.1.0", - "jsdom": "^29.1.1", - "prisma": "^5.22.0", - "react-email": "^3.0.2", - "tailwindcss": "^4.0.0", - "tsx": "^4.19.2", - "typescript": "^5.7.2", - "vitest": "^2.1.8" - } -} diff --git a/App/pelagia-portal/playwright.config.ts b/App/playwright.config.ts similarity index 100% rename from App/pelagia-portal/playwright.config.ts rename to App/playwright.config.ts diff --git a/App/pelagia-portal/pnpm-lock.yaml b/App/pnpm-lock.yaml similarity index 100% rename from App/pelagia-portal/pnpm-lock.yaml rename to App/pnpm-lock.yaml diff --git a/App/pnpm-workspace.yaml b/App/pnpm-workspace.yaml new file mode 100644 index 0000000..bf1a97e --- /dev/null +++ b/App/pnpm-workspace.yaml @@ -0,0 +1,7 @@ +allowBuilds: + '@prisma/client': set this to true or false + '@prisma/engines': set this to true or false + esbuild: set this to true or false + prisma: set this to true or false + sharp: set this to true or false + unrs-resolver: set this to true or false diff --git a/App/pelagia-portal/postcss.config.mjs b/App/postcss.config.mjs similarity index 100% rename from App/pelagia-portal/postcss.config.mjs rename to App/postcss.config.mjs diff --git a/App/pelagia-portal/prisma/migrations/20260503171522_add_item_db/migration.sql b/App/prisma/migrations/20260503171522_add_item_db/migration.sql similarity index 100% rename from App/pelagia-portal/prisma/migrations/20260503171522_add_item_db/migration.sql rename to App/prisma/migrations/20260503171522_add_item_db/migration.sql diff --git a/App/pelagia-portal/prisma/migrations/20260503180801_add_product_catalogue_size_manager_edit/migration.sql b/App/prisma/migrations/20260503180801_add_product_catalogue_size_manager_edit/migration.sql similarity index 100% rename from App/pelagia-portal/prisma/migrations/20260503180801_add_product_catalogue_size_manager_edit/migration.sql rename to App/prisma/migrations/20260503180801_add_product_catalogue_size_manager_edit/migration.sql diff --git a/App/pelagia-portal/prisma/migrations/20260505114211_add_po_export_fields/migration.sql b/App/prisma/migrations/20260505114211_add_po_export_fields/migration.sql similarity index 100% rename from App/pelagia-portal/prisma/migrations/20260505114211_add_po_export_fields/migration.sql rename to App/prisma/migrations/20260505114211_add_po_export_fields/migration.sql diff --git a/App/pelagia-portal/prisma/migrations/20260505121423_structured_tc_fields/migration.sql b/App/prisma/migrations/20260505121423_structured_tc_fields/migration.sql similarity index 100% rename from App/pelagia-portal/prisma/migrations/20260505121423_structured_tc_fields/migration.sql rename to App/prisma/migrations/20260505121423_structured_tc_fields/migration.sql diff --git a/App/pelagia-portal/prisma/migrations/20260510215950_add_line_item_name/migration.sql b/App/prisma/migrations/20260510215950_add_line_item_name/migration.sql similarity index 100% rename from App/pelagia-portal/prisma/migrations/20260510215950_add_line_item_name/migration.sql rename to App/prisma/migrations/20260510215950_add_line_item_name/migration.sql diff --git a/App/pelagia-portal/prisma/migrations/20260510221329_add_product_vendor_price/migration.sql b/App/prisma/migrations/20260510221329_add_product_vendor_price/migration.sql similarity index 100% rename from App/pelagia-portal/prisma/migrations/20260510221329_add_product_vendor_price/migration.sql rename to App/prisma/migrations/20260510221329_add_product_vendor_price/migration.sql diff --git a/App/pelagia-portal/prisma/migrations/20260514060941_add_site_inventory_consumption/migration.sql b/App/prisma/migrations/20260514060941_add_site_inventory_consumption/migration.sql similarity index 100% rename from App/pelagia-portal/prisma/migrations/20260514060941_add_site_inventory_consumption/migration.sql rename to App/prisma/migrations/20260514060941_add_site_inventory_consumption/migration.sql diff --git a/App/pelagia-portal/prisma/migrations/20260514091124_vendor_pincode/migration.sql b/App/prisma/migrations/20260514091124_vendor_pincode/migration.sql similarity index 100% rename from App/pelagia-portal/prisma/migrations/20260514091124_vendor_pincode/migration.sql rename to App/prisma/migrations/20260514091124_vendor_pincode/migration.sql diff --git a/App/pelagia-portal/prisma/migrations/20260514185519_/migration.sql b/App/prisma/migrations/20260514185519_/migration.sql similarity index 100% rename from App/pelagia-portal/prisma/migrations/20260514185519_/migration.sql rename to App/prisma/migrations/20260514185519_/migration.sql diff --git a/App/pelagia-portal/prisma/migrations/20260514191638_vendor_contacts/migration.sql b/App/prisma/migrations/20260514191638_vendor_contacts/migration.sql similarity index 100% rename from App/pelagia-portal/prisma/migrations/20260514191638_vendor_contacts/migration.sql rename to App/prisma/migrations/20260514191638_vendor_contacts/migration.sql diff --git a/App/pelagia-portal/prisma/migrations/20260516103013_partial_receipt/migration.sql b/App/prisma/migrations/20260516103013_partial_receipt/migration.sql similarity index 100% rename from App/pelagia-portal/prisma/migrations/20260516103013_partial_receipt/migration.sql rename to App/prisma/migrations/20260516103013_partial_receipt/migration.sql diff --git a/App/pelagia-portal/prisma/migrations/20260516103515_user_profile_signature/migration.sql b/App/prisma/migrations/20260516103515_user_profile_signature/migration.sql similarity index 100% rename from App/pelagia-portal/prisma/migrations/20260516103515_user_profile_signature/migration.sql rename to App/prisma/migrations/20260516103515_user_profile_signature/migration.sql diff --git a/App/pelagia-portal/prisma/migrations/20260516104351_notification_isread_link/migration.sql b/App/prisma/migrations/20260516104351_notification_isread_link/migration.sql similarity index 100% rename from App/pelagia-portal/prisma/migrations/20260516104351_notification_isread_link/migration.sql rename to App/prisma/migrations/20260516104351_notification_isread_link/migration.sql diff --git a/App/pelagia-portal/prisma/migrations/migration_lock.toml b/App/prisma/migrations/migration_lock.toml similarity index 100% rename from App/pelagia-portal/prisma/migrations/migration_lock.toml rename to App/prisma/migrations/migration_lock.toml diff --git a/App/pelagia-portal/prisma/schema.prisma b/App/prisma/schema.prisma similarity index 100% rename from App/pelagia-portal/prisma/schema.prisma rename to App/prisma/schema.prisma diff --git a/App/pelagia-portal/prisma/seed.ts b/App/prisma/seed.ts similarity index 100% rename from App/pelagia-portal/prisma/seed.ts rename to App/prisma/seed.ts diff --git a/App/pelagia-portal/requirements.txt b/App/requirements.txt similarity index 100% rename from App/pelagia-portal/requirements.txt rename to App/requirements.txt diff --git a/App/pelagia-portal/scripts/captcha-area.png b/App/scripts/captcha-area.png similarity index 100% rename from App/pelagia-portal/scripts/captcha-area.png rename to App/scripts/captcha-area.png diff --git a/App/pelagia-portal/scripts/captcha.png b/App/scripts/captcha.png similarity index 100% rename from App/pelagia-portal/scripts/captcha.png rename to App/scripts/captcha.png diff --git a/App/pelagia-portal/scripts/page-before-fill.png b/App/scripts/page-before-fill.png similarity index 100% rename from App/pelagia-portal/scripts/page-before-fill.png rename to App/scripts/page-before-fill.png diff --git a/App/pelagia-portal/scripts/result.png b/App/scripts/result.png similarity index 100% rename from App/pelagia-portal/scripts/result.png rename to App/scripts/result.png diff --git a/App/pelagia-portal/scripts/searchtp-page.png b/App/scripts/searchtp-page.png similarity index 100% rename from App/pelagia-portal/scripts/searchtp-page.png rename to App/scripts/searchtp-page.png diff --git a/App/pelagia-portal/tests/e2e/accounts-payment.spec.ts b/App/tests/e2e/accounts-payment.spec.ts similarity index 100% rename from App/pelagia-portal/tests/e2e/accounts-payment.spec.ts rename to App/tests/e2e/accounts-payment.spec.ts diff --git a/App/pelagia-portal/tests/e2e/admin-bordered-buttons.spec.ts b/App/tests/e2e/admin-bordered-buttons.spec.ts similarity index 100% rename from App/pelagia-portal/tests/e2e/admin-bordered-buttons.spec.ts rename to App/tests/e2e/admin-bordered-buttons.spec.ts diff --git a/App/pelagia-portal/tests/e2e/approvals-edit-highlight.spec.ts b/App/tests/e2e/approvals-edit-highlight.spec.ts similarity index 100% rename from App/pelagia-portal/tests/e2e/approvals-edit-highlight.spec.ts rename to App/tests/e2e/approvals-edit-highlight.spec.ts diff --git a/App/pelagia-portal/tests/e2e/auth.spec.ts b/App/tests/e2e/auth.spec.ts similarity index 100% rename from App/pelagia-portal/tests/e2e/auth.spec.ts rename to App/tests/e2e/auth.spec.ts diff --git a/App/pelagia-portal/tests/e2e/dashboard-status-badges.spec.ts b/App/tests/e2e/dashboard-status-badges.spec.ts similarity index 100% rename from App/pelagia-portal/tests/e2e/dashboard-status-badges.spec.ts rename to App/tests/e2e/dashboard-status-badges.spec.ts diff --git a/App/pelagia-portal/tests/e2e/dashboard/po-status-badges.js b/App/tests/e2e/dashboard/po-status-badges.js similarity index 100% rename from App/pelagia-portal/tests/e2e/dashboard/po-status-badges.js rename to App/tests/e2e/dashboard/po-status-badges.js diff --git a/App/pelagia-portal/tests/e2e/export-gate.spec.ts b/App/tests/e2e/export-gate.spec.ts similarity index 100% rename from App/pelagia-portal/tests/e2e/export-gate.spec.ts rename to App/tests/e2e/export-gate.spec.ts diff --git a/App/pelagia-portal/tests/e2e/helpers/auth.js b/App/tests/e2e/helpers/auth.js similarity index 100% rename from App/pelagia-portal/tests/e2e/helpers/auth.js rename to App/tests/e2e/helpers/auth.js diff --git a/App/pelagia-portal/tests/e2e/helpers/login.ts b/App/tests/e2e/helpers/login.ts similarity index 100% rename from App/pelagia-portal/tests/e2e/helpers/login.ts rename to App/tests/e2e/helpers/login.ts diff --git a/App/pelagia-portal/tests/e2e/inventory/cart-icon.spec.ts b/App/tests/e2e/inventory/cart-icon.spec.ts similarity index 100% rename from App/pelagia-portal/tests/e2e/inventory/cart-icon.spec.ts rename to App/tests/e2e/inventory/cart-icon.spec.ts diff --git a/App/pelagia-portal/tests/e2e/inventory/items-tags.spec.ts b/App/tests/e2e/inventory/items-tags.spec.ts similarity index 100% rename from App/pelagia-portal/tests/e2e/inventory/items-tags.spec.ts rename to App/tests/e2e/inventory/items-tags.spec.ts diff --git a/App/pelagia-portal/tests/e2e/manager-approvals.spec.ts b/App/tests/e2e/manager-approvals.spec.ts similarity index 100% rename from App/pelagia-portal/tests/e2e/manager-approvals.spec.ts rename to App/tests/e2e/manager-approvals.spec.ts diff --git a/App/pelagia-portal/tests/e2e/mobile/accounts-payments.spec.ts b/App/tests/e2e/mobile/accounts-payments.spec.ts similarity index 100% rename from App/pelagia-portal/tests/e2e/mobile/accounts-payments.spec.ts rename to App/tests/e2e/mobile/accounts-payments.spec.ts diff --git a/App/pelagia-portal/tests/e2e/mobile/bottom-nav.spec.ts b/App/tests/e2e/mobile/bottom-nav.spec.ts similarity index 100% rename from App/pelagia-portal/tests/e2e/mobile/bottom-nav.spec.ts rename to App/tests/e2e/mobile/bottom-nav.spec.ts diff --git a/App/pelagia-portal/tests/e2e/mobile/desktop-required.spec.ts b/App/tests/e2e/mobile/desktop-required.spec.ts similarity index 100% rename from App/pelagia-portal/tests/e2e/mobile/desktop-required.spec.ts rename to App/tests/e2e/mobile/desktop-required.spec.ts diff --git a/App/pelagia-portal/tests/e2e/mobile/manager-approvals.spec.ts b/App/tests/e2e/mobile/manager-approvals.spec.ts similarity index 100% rename from App/pelagia-portal/tests/e2e/mobile/manager-approvals.spec.ts rename to App/tests/e2e/mobile/manager-approvals.spec.ts diff --git a/App/pelagia-portal/tests/e2e/notification-bell.spec.ts b/App/tests/e2e/notification-bell.spec.ts similarity index 100% rename from App/pelagia-portal/tests/e2e/notification-bell.spec.ts rename to App/tests/e2e/notification-bell.spec.ts diff --git a/App/pelagia-portal/tests/e2e/partial-receipt.spec.ts b/App/tests/e2e/partial-receipt.spec.ts similarity index 100% rename from App/pelagia-portal/tests/e2e/partial-receipt.spec.ts rename to App/tests/e2e/partial-receipt.spec.ts diff --git a/App/pelagia-portal/tests/e2e/payment-history.spec.ts b/App/tests/e2e/payment-history.spec.ts similarity index 100% rename from App/pelagia-portal/tests/e2e/payment-history.spec.ts rename to App/tests/e2e/payment-history.spec.ts diff --git a/App/pelagia-portal/tests/e2e/po-export.spec.ts b/App/tests/e2e/po-export.spec.ts similarity index 100% rename from App/pelagia-portal/tests/e2e/po-export.spec.ts rename to App/tests/e2e/po-export.spec.ts diff --git a/App/pelagia-portal/tests/e2e/po-submit-button.spec.ts b/App/tests/e2e/po-submit-button.spec.ts similarity index 100% rename from App/pelagia-portal/tests/e2e/po-submit-button.spec.ts rename to App/tests/e2e/po-submit-button.spec.ts diff --git a/App/pelagia-portal/tests/e2e/profile.spec.ts b/App/tests/e2e/profile.spec.ts similarity index 100% rename from App/pelagia-portal/tests/e2e/profile.spec.ts rename to App/tests/e2e/profile.spec.ts diff --git a/App/pelagia-portal/tests/e2e/rebrand.spec.ts b/App/tests/e2e/rebrand.spec.ts similarity index 100% rename from App/pelagia-portal/tests/e2e/rebrand.spec.ts rename to App/tests/e2e/rebrand.spec.ts diff --git a/App/pelagia-portal/tests/e2e/submitter-journey.spec.ts b/App/tests/e2e/submitter-journey.spec.ts similarity index 100% rename from App/pelagia-portal/tests/e2e/submitter-journey.spec.ts rename to App/tests/e2e/submitter-journey.spec.ts diff --git a/App/pelagia-portal/tests/e2e/vendor-auto-verify.spec.ts b/App/tests/e2e/vendor-auto-verify.spec.ts similarity index 100% rename from App/pelagia-portal/tests/e2e/vendor-auto-verify.spec.ts rename to App/tests/e2e/vendor-auto-verify.spec.ts diff --git a/App/pelagia-portal/tests/integration/approval-actions.test.ts b/App/tests/integration/approval-actions.test.ts similarity index 100% rename from App/pelagia-portal/tests/integration/approval-actions.test.ts rename to App/tests/integration/approval-actions.test.ts diff --git a/App/pelagia-portal/tests/integration/create-po.test.ts b/App/tests/integration/create-po.test.ts similarity index 100% rename from App/pelagia-portal/tests/integration/create-po.test.ts rename to App/tests/integration/create-po.test.ts diff --git a/App/pelagia-portal/tests/integration/discard-po.test.ts b/App/tests/integration/discard-po.test.ts similarity index 100% rename from App/pelagia-portal/tests/integration/discard-po.test.ts rename to App/tests/integration/discard-po.test.ts diff --git a/App/pelagia-portal/tests/integration/helpers.ts b/App/tests/integration/helpers.ts similarity index 100% rename from App/pelagia-portal/tests/integration/helpers.ts rename to App/tests/integration/helpers.ts diff --git a/App/pelagia-portal/tests/integration/import-api.test.ts b/App/tests/integration/import-api.test.ts similarity index 100% rename from App/pelagia-portal/tests/integration/import-api.test.ts rename to App/tests/integration/import-api.test.ts diff --git a/App/pelagia-portal/tests/integration/manager-po-creation.test.ts b/App/tests/integration/manager-po-creation.test.ts similarity index 100% rename from App/pelagia-portal/tests/integration/manager-po-creation.test.ts rename to App/tests/integration/manager-po-creation.test.ts diff --git a/App/pelagia-portal/tests/integration/payment-actions.test.ts b/App/tests/integration/payment-actions.test.ts similarity index 100% rename from App/pelagia-portal/tests/integration/payment-actions.test.ts rename to App/tests/integration/payment-actions.test.ts diff --git a/App/pelagia-portal/tests/integration/products-search.test.ts b/App/tests/integration/products-search.test.ts similarity index 100% rename from App/pelagia-portal/tests/integration/products-search.test.ts rename to App/tests/integration/products-search.test.ts diff --git a/App/pelagia-portal/tests/integration/vendor-approval.test.ts b/App/tests/integration/vendor-approval.test.ts similarity index 100% rename from App/pelagia-portal/tests/integration/vendor-approval.test.ts rename to App/tests/integration/vendor-approval.test.ts diff --git a/App/pelagia-portal/tests/setup.ts b/App/tests/setup.ts similarity index 100% rename from App/pelagia-portal/tests/setup.ts rename to App/tests/setup.ts diff --git a/App/pelagia-portal/tests/unit/permissions.test.ts b/App/tests/unit/permissions.test.ts similarity index 100% rename from App/pelagia-portal/tests/unit/permissions.test.ts rename to App/tests/unit/permissions.test.ts diff --git a/App/pelagia-portal/tests/unit/po-import-parser.test.ts b/App/tests/unit/po-import-parser.test.ts similarity index 100% rename from App/pelagia-portal/tests/unit/po-import-parser.test.ts rename to App/tests/unit/po-import-parser.test.ts diff --git a/App/pelagia-portal/tests/unit/po-line-items-editor.test.tsx b/App/tests/unit/po-line-items-editor.test.tsx similarity index 100% rename from App/pelagia-portal/tests/unit/po-line-items-editor.test.tsx rename to App/tests/unit/po-line-items-editor.test.tsx diff --git a/App/pelagia-portal/tests/unit/po-state-machine.test.ts b/App/tests/unit/po-state-machine.test.ts similarity index 100% rename from App/pelagia-portal/tests/unit/po-state-machine.test.ts rename to App/tests/unit/po-state-machine.test.ts diff --git a/App/pelagia-portal/tests/unit/po-status-badge.test.tsx b/App/tests/unit/po-status-badge.test.tsx similarity index 100% rename from App/pelagia-portal/tests/unit/po-status-badge.test.tsx rename to App/tests/unit/po-status-badge.test.tsx diff --git a/App/pelagia-portal/tests/unit/utils.test.ts b/App/tests/unit/utils.test.ts similarity index 100% rename from App/pelagia-portal/tests/unit/utils.test.ts rename to App/tests/unit/utils.test.ts diff --git a/App/pelagia-portal/tests/unit/validations.test.ts b/App/tests/unit/validations.test.ts similarity index 100% rename from App/pelagia-portal/tests/unit/validations.test.ts rename to App/tests/unit/validations.test.ts diff --git a/App/pelagia-portal/tsconfig.json b/App/tsconfig.json similarity index 100% rename from App/pelagia-portal/tsconfig.json rename to App/tsconfig.json diff --git a/App/pelagia-portal/vitest.config.ts b/App/vitest.config.ts similarity index 100% rename from App/pelagia-portal/vitest.config.ts rename to App/vitest.config.ts diff --git a/App/pelagia-portal/vitest.integration.config.ts b/App/vitest.integration.config.ts similarity index 100% rename from App/pelagia-portal/vitest.integration.config.ts rename to App/vitest.integration.config.ts diff --git a/Spec/01-design-document.md b/Design/01-design-document.md similarity index 100% rename from Spec/01-design-document.md rename to Design/01-design-document.md diff --git a/Spec/02-architecture.md b/Design/02-architecture.md similarity index 100% rename from Spec/02-architecture.md rename to Design/02-architecture.md diff --git a/Spec/03-open-questions.md b/Design/03-open-questions.md similarity index 100% rename from Spec/03-open-questions.md rename to Design/03-open-questions.md diff --git a/Spec/TEST_PLAN.md b/Design/TEST_PLAN.md similarity index 100% rename from Spec/TEST_PLAN.md rename to Design/TEST_PLAN.md diff --git a/Spec/Untitled.png b/Design/Untitled.png similarity index 100% rename from Spec/Untitled.png rename to Design/Untitled.png diff --git a/GstService/package-lock.json b/GstService/package-lock.json index b8a721f..c9fb956 100644 --- a/GstService/package-lock.json +++ b/GstService/package-lock.json @@ -19,9 +19,9 @@ } }, "node_modules/@esbuild/aix-ppc64": { - "version": "0.27.7", - "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.27.7.tgz", - "integrity": "sha512-EKX3Qwmhz1eMdEJokhALr0YiD0lhQNwDqkPYyPhiSwKrh7/4KRjQc04sZ8db+5DVVnZ1LmbNDI1uAMPEUBnQPg==", + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.28.0.tgz", + "integrity": "sha512-lhRUCeuOyJQURhTxl4WkpFTjIsbDayJHih5kZC1giwE+MhIzAb7mEsQMqMf18rHLsrb5qI1tafG20mLxEWcWlA==", "cpu": [ "ppc64" ], @@ -36,9 +36,9 @@ } }, "node_modules/@esbuild/android-arm": { - "version": "0.27.7", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.27.7.tgz", - "integrity": "sha512-jbPXvB4Yj2yBV7HUfE2KHe4GJX51QplCN1pGbYjvsyCZbQmies29EoJbkEc+vYuU5o45AfQn37vZlyXy4YJ8RQ==", + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.28.0.tgz", + "integrity": "sha512-wqh0ByljabXLKHeWXYLqoJ5jKC4XBaw6Hk08OfMrCRd2nP2ZQ5eleDZC41XHyCNgktBGYMbqnrJKq/K/lzPMSQ==", "cpu": [ "arm" ], @@ -53,9 +53,9 @@ } }, "node_modules/@esbuild/android-arm64": { - "version": "0.27.7", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.27.7.tgz", - "integrity": "sha512-62dPZHpIXzvChfvfLJow3q5dDtiNMkwiRzPylSCfriLvZeq0a1bWChrGx/BbUbPwOrsWKMn8idSllklzBy+dgQ==", + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.28.0.tgz", + "integrity": "sha512-+WzIXQOSaGs33tLEgYPYe/yQHf0WTU0X42Jca3y8NWMbUVhp7rUnw+vAsRC/QiDrdD31IszMrZy+qwPOPjd+rw==", "cpu": [ "arm64" ], @@ -70,9 +70,9 @@ } }, "node_modules/@esbuild/android-x64": { - "version": "0.27.7", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.27.7.tgz", - "integrity": "sha512-x5VpMODneVDb70PYV2VQOmIUUiBtY3D3mPBG8NxVk5CogneYhkR7MmM3yR/uMdITLrC1ml/NV1rj4bMJuy9MCg==", + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.28.0.tgz", + "integrity": "sha512-+VJggoaKhk2VNNqVL7f6S189UzShHC/mR9EE8rDdSkdpN0KflSwWY/gWjDrNxxisg8Fp1ZCD9jLMo4m0OUfeUA==", "cpu": [ "x64" ], @@ -87,9 +87,9 @@ } }, "node_modules/@esbuild/darwin-arm64": { - "version": "0.27.7", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.27.7.tgz", - "integrity": "sha512-5lckdqeuBPlKUwvoCXIgI2D9/ABmPq3Rdp7IfL70393YgaASt7tbju3Ac+ePVi3KDH6N2RqePfHnXkaDtY9fkw==", + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.28.0.tgz", + "integrity": "sha512-0T+A9WZm+bZ84nZBtk1ckYsOvyA3x7e2Acj1KdVfV4/2tdG4fzUp91YHx+GArWLtwqp77pBXVCPn2We7Letr0Q==", "cpu": [ "arm64" ], @@ -104,9 +104,9 @@ } }, "node_modules/@esbuild/darwin-x64": { - "version": "0.27.7", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.27.7.tgz", - "integrity": "sha512-rYnXrKcXuT7Z+WL5K980jVFdvVKhCHhUwid+dDYQpH+qu+TefcomiMAJpIiC2EM3Rjtq0sO3StMV/+3w3MyyqQ==", + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.28.0.tgz", + "integrity": "sha512-fyzLm/DLDl/84OCfp2f/XQ4flmORsjU7VKt8HLjvIXChJoFFOIL6pLJPH4Yhd1n1gGFF9mPwtlN5Wf82DZs+LQ==", "cpu": [ "x64" ], @@ -121,9 +121,9 @@ } }, "node_modules/@esbuild/freebsd-arm64": { - "version": "0.27.7", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.27.7.tgz", - "integrity": "sha512-B48PqeCsEgOtzME2GbNM2roU29AMTuOIN91dsMO30t+Ydis3z/3Ngoj5hhnsOSSwNzS+6JppqWsuhTp6E82l2w==", + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.28.0.tgz", + "integrity": "sha512-l9GeW5UZBT9k9brBYI+0WDffcRxgHQD8ShN2Ur4xWq/NFzUKm3k5lsH4PdaRgb2w7mI9u61nr2gI2mLI27Nh3Q==", "cpu": [ "arm64" ], @@ -138,9 +138,9 @@ } }, "node_modules/@esbuild/freebsd-x64": { - "version": "0.27.7", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.27.7.tgz", - "integrity": "sha512-jOBDK5XEjA4m5IJK3bpAQF9/Lelu/Z9ZcdhTRLf4cajlB+8VEhFFRjWgfy3M1O4rO2GQ/b2dLwCUGpiF/eATNQ==", + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.28.0.tgz", + "integrity": "sha512-BXoQai/A0wPO6Es3yFJ7APCiKGc1tdAEOgeTNy3SsB491S3aHn4S4r3e976eUnPdU+NbdtmBuLncYir2tMU9Nw==", "cpu": [ "x64" ], @@ -155,9 +155,9 @@ } }, "node_modules/@esbuild/linux-arm": { - "version": "0.27.7", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.27.7.tgz", - "integrity": "sha512-RkT/YXYBTSULo3+af8Ib0ykH8u2MBh57o7q/DAs3lTJlyVQkgQvlrPTnjIzzRPQyavxtPtfg0EopvDyIt0j1rA==", + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.28.0.tgz", + "integrity": "sha512-CjaaREJagqJp7iTaNQjjidaNbCKYcd4IDkzbwwxtSvjI7NZm79qiHc8HqciMddQ6CKvJT6aBd8lO9kN/ZudLlw==", "cpu": [ "arm" ], @@ -172,9 +172,9 @@ } }, "node_modules/@esbuild/linux-arm64": { - "version": "0.27.7", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.27.7.tgz", - "integrity": "sha512-RZPHBoxXuNnPQO9rvjh5jdkRmVizktkT7TCDkDmQ0W2SwHInKCAV95GRuvdSvA7w4VMwfCjUiPwDi0ZO6Nfe9A==", + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.28.0.tgz", + "integrity": "sha512-RVyzfb3FWsGA55n6WY0MEIEPURL1FcbhFE6BffZEMEekfCzCIMtB5yyDcFnVbTnwk+CLAgTujmV/Lgvih56W+A==", "cpu": [ "arm64" ], @@ -189,9 +189,9 @@ } }, "node_modules/@esbuild/linux-ia32": { - "version": "0.27.7", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.27.7.tgz", - "integrity": "sha512-GA48aKNkyQDbd3KtkplYWT102C5sn/EZTY4XROkxONgruHPU72l+gW+FfF8tf2cFjeHaRbWpOYa/uRBz/Xq1Pg==", + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.28.0.tgz", + "integrity": "sha512-KBnSTt1kxl9x70q+ydterVdl+Cn0H18ngRMRCEQfrbqdUuntQQ0LoMZv47uB97NljZFzY6HcfqEZ2SAyIUTQBQ==", "cpu": [ "ia32" ], @@ -206,9 +206,9 @@ } }, "node_modules/@esbuild/linux-loong64": { - "version": "0.27.7", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.27.7.tgz", - "integrity": "sha512-a4POruNM2oWsD4WKvBSEKGIiWQF8fZOAsycHOt6JBpZ+JN2n2JH9WAv56SOyu9X5IqAjqSIPTaJkqN8F7XOQ5Q==", + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.28.0.tgz", + "integrity": "sha512-zpSlUce1mnxzgBADvxKXX5sl8aYQHo2ezvMNI8I0lbblJtp8V4odlm3Yzlj7gPyt3T8ReksE6bK+pT3WD+aJRg==", "cpu": [ "loong64" ], @@ -223,9 +223,9 @@ } }, "node_modules/@esbuild/linux-mips64el": { - "version": "0.27.7", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.27.7.tgz", - "integrity": "sha512-KabT5I6StirGfIz0FMgl1I+R1H73Gp0ofL9A3nG3i/cYFJzKHhouBV5VWK1CSgKvVaG4q1RNpCTR2LuTVB3fIw==", + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.28.0.tgz", + "integrity": "sha512-2jIfP6mmjkdmeTlsX/9vmdmhBmKADrWqN7zcdtHIeNSCH1SqIoNI63cYsjQR8J+wGa4Y5izRcSHSm8K3QWmk3w==", "cpu": [ "mips64el" ], @@ -240,9 +240,9 @@ } }, "node_modules/@esbuild/linux-ppc64": { - "version": "0.27.7", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.27.7.tgz", - "integrity": "sha512-gRsL4x6wsGHGRqhtI+ifpN/vpOFTQtnbsupUF5R5YTAg+y/lKelYR1hXbnBdzDjGbMYjVJLJTd2OFmMewAgwlQ==", + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.28.0.tgz", + "integrity": "sha512-bc0FE9wWeC0WBm49IQMPSPILRocGTQt3j5KPCA8os6VprfuJ7KD+5PzESSrJ6GmPIPJK965ZJHTUlSA6GNYEhg==", "cpu": [ "ppc64" ], @@ -257,9 +257,9 @@ } }, "node_modules/@esbuild/linux-riscv64": { - "version": "0.27.7", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.27.7.tgz", - "integrity": "sha512-hL25LbxO1QOngGzu2U5xeXtxXcW+/GvMN3ejANqXkxZ/opySAZMrc+9LY/WyjAan41unrR3YrmtTsUpwT66InQ==", + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.28.0.tgz", + "integrity": "sha512-SQPZOwoTTT/HXFXQJG/vBX8sOFagGqvZyXcgLA3NhIqcBv1BJU1d46c0rGcrij2B56Z2rNiSLaZOYW5cUk7yLQ==", "cpu": [ "riscv64" ], @@ -274,9 +274,9 @@ } }, "node_modules/@esbuild/linux-s390x": { - "version": "0.27.7", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.27.7.tgz", - "integrity": "sha512-2k8go8Ycu1Kb46vEelhu1vqEP+UeRVj2zY1pSuPdgvbd5ykAw82Lrro28vXUrRmzEsUV0NzCf54yARIK8r0fdw==", + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.28.0.tgz", + "integrity": "sha512-SCfR0HN8CEEjnYnySJTd2cw0k9OHB/YFzt5zgJEwa+wL/T/raGWYMBqwDNAC6dqFKmJYZoQBRfHjgwLHGSrn3Q==", "cpu": [ "s390x" ], @@ -291,9 +291,9 @@ } }, "node_modules/@esbuild/linux-x64": { - "version": "0.27.7", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.27.7.tgz", - "integrity": "sha512-hzznmADPt+OmsYzw1EE33ccA+HPdIqiCRq7cQeL1Jlq2gb1+OyWBkMCrYGBJ+sxVzve2ZJEVeePbLM2iEIZSxA==", + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.28.0.tgz", + "integrity": "sha512-us0dSb9iFxIi8srnpl931Nvs65it/Jd2a2K3qs7fz2WfGPHqzfzZTfec7oxZJRNPXPnNYZtanmRc4AL/JwVzHQ==", "cpu": [ "x64" ], @@ -308,9 +308,9 @@ } }, "node_modules/@esbuild/netbsd-arm64": { - "version": "0.27.7", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.27.7.tgz", - "integrity": "sha512-b6pqtrQdigZBwZxAn1UpazEisvwaIDvdbMbmrly7cDTMFnw/+3lVxxCTGOrkPVnsYIosJJXAsILG9XcQS+Yu6w==", + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.28.0.tgz", + "integrity": "sha512-CR/RYotgtCKwtftMwJlUU7xCVNg3lMYZ0RzTmAHSfLCXw3NtZtNpswLEj/Kkf6kEL3Gw+BpOekRX0BYCtklhUw==", "cpu": [ "arm64" ], @@ -325,9 +325,9 @@ } }, "node_modules/@esbuild/netbsd-x64": { - "version": "0.27.7", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.27.7.tgz", - "integrity": "sha512-OfatkLojr6U+WN5EDYuoQhtM+1xco+/6FSzJJnuWiUw5eVcicbyK3dq5EeV/QHT1uy6GoDhGbFpprUiHUYggrw==", + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.28.0.tgz", + "integrity": "sha512-nU1yhmYutL+fQ71Kxnhg8uEOdC0pwEW9entHykTgEbna2pw2dkbFSMeqjjyHZoCmt8SBkOSvV+yNmm94aUrrqw==", "cpu": [ "x64" ], @@ -342,9 +342,9 @@ } }, "node_modules/@esbuild/openbsd-arm64": { - "version": "0.27.7", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.27.7.tgz", - "integrity": "sha512-AFuojMQTxAz75Fo8idVcqoQWEHIXFRbOc1TrVcFSgCZtQfSdc1RXgB3tjOn/krRHENUB4j00bfGjyl2mJrU37A==", + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.28.0.tgz", + "integrity": "sha512-cXb5vApOsRsxsEl4mcZ1XY3D4DzcoMxR/nnc4IyqYs0rTI8ZKmW6kyyg+11Z8yvgMfAEldKzP7AdP64HnSC/6g==", "cpu": [ "arm64" ], @@ -359,9 +359,9 @@ } }, "node_modules/@esbuild/openbsd-x64": { - "version": "0.27.7", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.27.7.tgz", - "integrity": "sha512-+A1NJmfM8WNDv5CLVQYJ5PshuRm/4cI6WMZRg1by1GwPIQPCTs1GLEUHwiiQGT5zDdyLiRM/l1G0Pv54gvtKIg==", + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.28.0.tgz", + "integrity": "sha512-8wZM2qqtv9UP3mzy7HiGYNH/zjTA355mpeuA+859TyR+e+Tc08IHYpLJuMsfpDJwoLo1ikIJI8jC3GFjnRClzA==", "cpu": [ "x64" ], @@ -376,9 +376,9 @@ } }, "node_modules/@esbuild/openharmony-arm64": { - "version": "0.27.7", - "resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.27.7.tgz", - "integrity": "sha512-+KrvYb/C8zA9CU/g0sR6w2RBw7IGc5J2BPnc3dYc5VJxHCSF1yNMxTV5LQ7GuKteQXZtspjFbiuW5/dOj7H4Yw==", + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.28.0.tgz", + "integrity": "sha512-FLGfyizszcef5C3YtoyQDACyg95+dndv79i2EekILBofh5wpCa1KuBqOWKrEHZg3zrL3t5ouE5jgr94vA+Wb2w==", "cpu": [ "arm64" ], @@ -393,9 +393,9 @@ } }, "node_modules/@esbuild/sunos-x64": { - "version": "0.27.7", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.27.7.tgz", - "integrity": "sha512-ikktIhFBzQNt/QDyOL580ti9+5mL/YZeUPKU2ivGtGjdTYoqz6jObj6nOMfhASpS4GU4Q/Clh1QtxWAvcYKamA==", + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.28.0.tgz", + "integrity": "sha512-1ZgjUoEdHZZl/YlV76TSCz9Hqj9h9YmMGAgAPYd+q4SicWNX3G5GCyx9uhQWSLcbvPW8Ni7lj4gDa1T40akdlw==", "cpu": [ "x64" ], @@ -410,9 +410,9 @@ } }, "node_modules/@esbuild/win32-arm64": { - "version": "0.27.7", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.27.7.tgz", - "integrity": "sha512-7yRhbHvPqSpRUV7Q20VuDwbjW5kIMwTHpptuUzV+AA46kiPze5Z7qgt6CLCK3pWFrHeNfDd1VKgyP4O+ng17CA==", + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.28.0.tgz", + "integrity": "sha512-Q9StnDmQ/enxnpxCCLSg0oo4+34B9TdXpuyPeTedN/6+iXBJ4J+zwfQI28u/Jl40nOYAxGoNi7mFP40RUtkmUA==", "cpu": [ "arm64" ], @@ -427,9 +427,9 @@ } }, "node_modules/@esbuild/win32-ia32": { - "version": "0.27.7", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.27.7.tgz", - "integrity": "sha512-SmwKXe6VHIyZYbBLJrhOoCJRB/Z1tckzmgTLfFYOfpMAx63BJEaL9ExI8x7v0oAO3Zh6D/Oi1gVxEYr5oUCFhw==", + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.28.0.tgz", + "integrity": "sha512-zF3ag/gfiCe6U2iczcRzSYJKH1DCI+ByzSENHlM2FcDbEeo5Zd2C86Aq0tKUYAJJ1obRP84ymxIAksZUcdztHA==", "cpu": [ "ia32" ], @@ -444,9 +444,9 @@ } }, "node_modules/@esbuild/win32-x64": { - "version": "0.27.7", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.27.7.tgz", - "integrity": "sha512-56hiAJPhwQ1R4i+21FVF7V8kSD5zZTdHcVuRFMW0hn753vVfQN8xlx4uOPT4xoGH0Z/oVATuR82AiqSTDIpaHg==", + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.28.0.tgz", + "integrity": "sha512-pEl1bO9mfAmIC+tW5btTmrKaujg3zGtUmWNdCw/xs70FBjwAL3o9OEKNHvNmnyylD6ubxUERiEhdsL0xBQ9efw==", "cpu": [ "x64" ], @@ -783,9 +783,9 @@ } }, "node_modules/esbuild": { - "version": "0.27.7", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.27.7.tgz", - "integrity": "sha512-IxpibTjyVnmrIQo5aqNpCgoACA/dTKLTlhMHihVHhdkxKyPO1uBBthumT0rdHmcsk9uMonIWS0m4FljWzILh3w==", + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.28.0.tgz", + "integrity": "sha512-sNR9MHpXSUV/XB4zmsFKN+QgVG82Cc7+/aaxJ8Adi8hyOac+EXptIp45QBPaVyX3N70664wRbTcLTOemCAnyqw==", "dev": true, "hasInstallScript": true, "license": "MIT", @@ -796,32 +796,32 @@ "node": ">=18" }, "optionalDependencies": { - "@esbuild/aix-ppc64": "0.27.7", - "@esbuild/android-arm": "0.27.7", - "@esbuild/android-arm64": "0.27.7", - "@esbuild/android-x64": "0.27.7", - "@esbuild/darwin-arm64": "0.27.7", - "@esbuild/darwin-x64": "0.27.7", - "@esbuild/freebsd-arm64": "0.27.7", - "@esbuild/freebsd-x64": "0.27.7", - "@esbuild/linux-arm": "0.27.7", - "@esbuild/linux-arm64": "0.27.7", - "@esbuild/linux-ia32": "0.27.7", - "@esbuild/linux-loong64": "0.27.7", - "@esbuild/linux-mips64el": "0.27.7", - "@esbuild/linux-ppc64": "0.27.7", - "@esbuild/linux-riscv64": "0.27.7", - "@esbuild/linux-s390x": "0.27.7", - "@esbuild/linux-x64": "0.27.7", - "@esbuild/netbsd-arm64": "0.27.7", - "@esbuild/netbsd-x64": "0.27.7", - "@esbuild/openbsd-arm64": "0.27.7", - "@esbuild/openbsd-x64": "0.27.7", - "@esbuild/openharmony-arm64": "0.27.7", - "@esbuild/sunos-x64": "0.27.7", - "@esbuild/win32-arm64": "0.27.7", - "@esbuild/win32-ia32": "0.27.7", - "@esbuild/win32-x64": "0.27.7" + "@esbuild/aix-ppc64": "0.28.0", + "@esbuild/android-arm": "0.28.0", + "@esbuild/android-arm64": "0.28.0", + "@esbuild/android-x64": "0.28.0", + "@esbuild/darwin-arm64": "0.28.0", + "@esbuild/darwin-x64": "0.28.0", + "@esbuild/freebsd-arm64": "0.28.0", + "@esbuild/freebsd-x64": "0.28.0", + "@esbuild/linux-arm": "0.28.0", + "@esbuild/linux-arm64": "0.28.0", + "@esbuild/linux-ia32": "0.28.0", + "@esbuild/linux-loong64": "0.28.0", + "@esbuild/linux-mips64el": "0.28.0", + "@esbuild/linux-ppc64": "0.28.0", + "@esbuild/linux-riscv64": "0.28.0", + "@esbuild/linux-s390x": "0.28.0", + "@esbuild/linux-x64": "0.28.0", + "@esbuild/netbsd-arm64": "0.28.0", + "@esbuild/netbsd-x64": "0.28.0", + "@esbuild/openbsd-arm64": "0.28.0", + "@esbuild/openbsd-x64": "0.28.0", + "@esbuild/openharmony-arm64": "0.28.0", + "@esbuild/sunos-x64": "0.28.0", + "@esbuild/win32-arm64": "0.28.0", + "@esbuild/win32-ia32": "0.28.0", + "@esbuild/win32-x64": "0.28.0" } }, "node_modules/escape-html": { @@ -981,19 +981,6 @@ "node": ">= 0.4" } }, - "node_modules/get-tsconfig": { - "version": "4.14.0", - "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.14.0.tgz", - "integrity": "sha512-yTb+8DXzDREzgvYmh6s9vHsSVCHeC0G3PI5bEXNBHtmshPnO+S5O7qgLEOn0I5QvMy6kpZN8K1NKGyilLb93wA==", - "dev": true, - "license": "MIT", - "dependencies": { - "resolve-pkg-maps": "^1.0.0" - }, - "funding": { - "url": "https://github.com/privatenumber/get-tsconfig?sponsor=1" - } - }, "node_modules/gopd": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", @@ -1244,9 +1231,9 @@ } }, "node_modules/qs": { - "version": "6.15.1", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.15.1.tgz", - "integrity": "sha512-6YHEFRL9mfgcAvql/XhwTvf5jKcOiiupt2FiJxHkiX1z4j7WL8J/jRHYLluORvc1XxB5rV20KoeK00gVJamspg==", + "version": "6.15.2", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.15.2.tgz", + "integrity": "sha512-Rzq0KEyX/w/tEybncDgdkZrJgVUsUMk3xjh3t5bv3S1HTAtg+uOYt72+ZfwiQwKdysThkTBdL/rTi6HDmX9Ddw==", "license": "BSD-3-Clause", "dependencies": { "side-channel": "^1.1.0" @@ -1282,16 +1269,6 @@ "node": ">= 0.8" } }, - "node_modules/resolve-pkg-maps": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz", - "integrity": "sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==", - "dev": true, - "license": "MIT", - "funding": { - "url": "https://github.com/privatenumber/resolve-pkg-maps?sponsor=1" - } - }, "node_modules/safe-buffer": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", @@ -1460,14 +1437,13 @@ } }, "node_modules/tsx": { - "version": "4.21.0", - "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.21.0.tgz", - "integrity": "sha512-5C1sg4USs1lfG0GFb2RLXsdpXqBSEhAaA/0kPL01wxzpMqLILNxIxIOKiILz+cdg/pLnOUxFYOR5yhHU666wbw==", + "version": "4.22.1", + "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.22.1.tgz", + "integrity": "sha512-TvncJykhxAzFCk0VQZKBTClall4Pm7qXDSodb6uxi8QFa8X8mT6ABjxxsQ2opDRYxG7AzcRWXaFtruz5HJKuWg==", "dev": true, "license": "MIT", "dependencies": { - "esbuild": "~0.27.0", - "get-tsconfig": "^4.7.5" + "esbuild": "~0.28.0" }, "bin": { "tsx": "dist/cli.mjs" diff --git a/Progress/TODO.md b/Progress/TODO.md index a1eec5a..abf415d 100644 --- a/Progress/TODO.md +++ b/Progress/TODO.md @@ -100,3 +100,13 @@ - accounts should also get history - approver name should show up as the signatory, not submitter - on confirm receipt page, allow po to be partially closed until all items are delivered + +16/05/2026 +- user profile page is needed to allow users to change things like passwords and apply for superuser access. on admin dashboard a page should be maintained where superusers and requests are tracked. add button for allow superuser to any user on user page. for manager allow them to add signature (for export to pdf/excel on approved POs). without signature, cannot approve pos - show a hint asking them to upload signature instead. +- notification system on page +- ensure export not possible untill signed +- format/validation for account, item, vendor, user ids, payment receipt numbers [OPEN-QUESTION] +- when payment happens from a vendor they are automatically verified +- Make buttons on screens like vendors, items, cost centers, Not Links. INcluding but not limited to - Edit, Delete, Deactivate +- mobile version for manager +- mobile version for accounts [open-question] \ No newline at end of file diff --git a/Tests/e2e-test-framework.md b/Tests/e2e-test-framework.md deleted file mode 100644 index a9a4c73..0000000 --- a/Tests/e2e-test-framework.md +++ /dev/null @@ -1,309 +0,0 @@ -# PPMS — E2E Test Framework Reference - -This document describes the Playwright-based end-to-end test framework for the -PPMS portal: its stack, directory layout, configuration, shared utilities, and -the conventions every spec must follow. - ---- - -## Stack - -| Layer | Tool | Version | -|---|---|---| -| Test runner | `@playwright/test` | 1.60 | -| Browser | Chromium (headless) | bundled with Playwright | -| Language | TypeScript | inherits from app `tsconfig.json` | -| Package manager | pnpm | same as portal app | -| App server | Next.js 15 dev server (`pnpm dev`) | auto-started by Playwright config | - ---- - -## Directory Layout - -``` -App/pelagia-portal/ -├── playwright.config.ts # Root config — workers, retries, baseURL, webServer -└── tests/ - ├── e2e/ - │ ├── helpers/ - │ │ ├── login.ts # Shared login(), createDraftPo(), submitPo(), USERS - │ │ └── auth.js # Legacy plain-JS login helper (pre-existing) - │ ├── dashboard/ - │ │ └── po-status-badges.js - │ ├── inventory/ - │ │ ├── items-tags.spec.ts - │ │ └── cart-icon.spec.ts - │ ├── mobile/ - │ │ ├── desktop-required.spec.ts - │ │ ├── manager-approvals.spec.ts - │ │ ├── accounts-payments.spec.ts - │ │ └── bottom-nav.spec.ts - │ ├── admin-bordered-buttons.spec.ts - │ ├── approvals-edit-highlight.spec.ts - │ ├── export-gate.spec.ts - │ ├── notification-bell.spec.ts - │ ├── partial-receipt.spec.ts - │ ├── payment-history.spec.ts - │ ├── po-submit-button.spec.ts - │ ├── profile.spec.ts - │ ├── rebrand.spec.ts - │ └── vendor-auto-verify.spec.ts - ├── integration/ # Vitest integration tests (separate suite) - └── unit/ # Vitest unit tests (separate suite) -``` - ---- - -## Configuration (`playwright.config.ts`) - -```ts -export default defineConfig({ - testDir: "./tests/e2e", - fullyParallel: true, - forbidOnly: !!process.env.CI, - retries: process.env.CI ? 2 : 1, // 1 local retry reduces flakiness from auth concurrency - workers: process.env.CI ? 1 : 2, // 2 local workers — more causes NextAuth bcrypt flooding - reporter: "html", - use: { - baseURL: "http://localhost:3000", - trace: "on-first-retry", - }, - webServer: { - command: "pnpm dev", - url: "http://localhost:3000", - reuseExistingServer: !process.env.CI, // reuse running dev server locally - }, -}); -``` - -### Why workers: 2 - -The app uses NextAuth v5 with bcrypt password hashing for every login. Under high -parallelism (the default of ~50% CPU cores) all workers attempt to authenticate -simultaneously, overwhelming the dev server and causing login redirects to time out. -Two workers provide enough parallelism to keep the suite fast without triggering -the concurrency limit. - ---- - -## Shared Helpers (`tests/e2e/helpers/login.ts`) - -### `USERS` — seed credentials - -```ts -export const USERS = { - TECH: { email: "tech@pelagia.local", password: "tech1234" }, - MANNING: { email: "manning@pelagia.local", password: "manning1234" }, - ACCOUNTS: { email: "accounts@pelagia.local", password: "accounts1234" }, - MANAGER: { email: "manager@pelagia.local", password: "manager1234" }, - SUPERUSER: { email: "superuser@pelagia.local", password: "super1234" }, - AUDITOR: { email: "auditor@pelagia.local", password: "audit1234" }, - ADMIN: { email: "admin@pelagia.local", password: "admin1234" }, -}; -``` - -### `login(page, creds)` - -Navigates to `/login`, fills credentials, and waits up to **20 s** for the -redirect away from `/login`. The 20 s timeout is intentional — the bcrypt hash -check plus DB round-trip can exceed the Playwright default 5 s under any load. - -```ts -await login(page, USERS.MANAGER); -``` - -### `createDraftPo(page, title)` - -Creates a minimal PO as DRAFT and returns the absolute PO URL. Uses -**`name`-attribute selectors** because the PO form labels have no `htmlFor`/`id` -binding — `getByLabel()` will not resolve. - -```ts -const poUrl = await createDraftPo(page, "Test PO - boiler parts"); -``` - -### `submitPo(page, title)` - -Same as `createDraftPo` but clicks the **Submit for Approval** button instead of -Save as Draft. Returns the PO URL after redirect. - ---- - -## Selector Conventions - -### Critical: PO form has no accessible label bindings - -The new-PO form (`/po/new`) and the edit form use `