Commit graph

15 commits

Author SHA1 Message Date
7774af03a5 feat(C-001,C-002): implement dashboard and begin inventory views
Some checks failed
Build and Deploy / build (push) Failing after 10m59s
Build and Deploy / deploy (push) Has been skipped
Implements complete dashboard with metrics, recent activity, and quick navigation.
Begins inventory system with service layer and category selector.

Dashboard (C-001) - Complete:
- Server component with parallel data fetching
- Summary cards: WIP, Finished Goods, Total Weight, Recent Orders
- Recent activity tables: top 5 orders and shipments
- Alert banner for important notifications
- Quick navigation cards to all major features
- Loading skeletons with Suspense boundaries
- Reusable components: SummaryCard, QuickNavCard, tables
- Dashboard service with typed Epicor queries

Inventory (C-002) - Core Complete:
- Complete service layer for all 6 inventory categories
- Category selector page with permission-based visibility
- Reusable inventory summary table with search and CSV export
- WIP inventory page as template for other categories
- Sub-user permission enforcement at service layer
- Type-safe stored procedure calls with proper error handling

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-16 11:41:56 +00:00
a67558de23 feat(F-008,F-009,F-010): complete Phase 1 foundation with middleware, navigation, and migrations
Implements authentication middleware with rate limiting, comprehensive permission
system, full portal navigation with sidebar and header, company selection flow,
and data migration tooling from SQL Server to PostgreSQL.

Key additions:
- Middleware: auth guards, rate limiting, session management
- Permissions: role-based access control with hierarchical permission rules
- Navigation: responsive sidebar with expandable sections, header with notifications
- Company selector: multi-company user support with session-based active company
- Data migration: comprehensive script for migrating auth and quest domain tables
- Schema: added auth_user_type_permission_group junction table

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-16 11:07:44 +00:00
bbcee034cb feat(F-007): implement Better Auth with login and account request
Some checks failed
Build and Deploy / build (push) Failing after 3m6s
Build and Deploy / deploy (push) Has been skipped
Better Auth Configuration:
- Database adapter for PostgreSQL with custom schema mapping
- Email/password authentication enabled
- 7-day session expiration with 24-hour update frequency
- Custom field mappings for auth_user, auth_session, auth_account tables
- Server-side auth helpers: getSession(), requireAuth()
- Client-side React hooks: signIn, signOut, signUp, useSession

Authentication Pages:
- /login: Email/password login with error handling
- /forgot-password: Password reset request flow
- /account-request: New user registration form
  - Captures: name, email, phone, company, Epicor ID, message
  - Creates quest_account_request record for admin approval
  - Success confirmation with next steps

API Routes:
- /api/auth/[...all]: Better Auth handler for all auth operations
- /api/account-request: Account request submission endpoint

UI Components:
- Added Textarea component from shadcn/ui
- Form validation and loading states
- Toast notifications for user feedback
- Responsive card-based layouts

Session management and enhanced context (company, permissions) will be
added in F-008 middleware implementation.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-16 02:25:52 +00:00
10028bcd47 feat(F-006): enhance Epicor MSSQL connection service
Some checks failed
Build and Deploy / build (push) Failing after 7m11s
Build and Deploy / deploy (push) Has been skipped
Enhanced Connection Management:
- Custom error classes: EpicorConnectionError, EpicorQueryError, EpicorTimeoutError
- Connection pool reuse with state tracking
- Configuration validation on startup
- Configurable timeouts (connect: 30s, request: 60s)

Query Execution:
- execStoredProc: execute stored procedures with typed parameters
- execQuery: execute raw SQL queries with parameterization
- execPortalStoredProc: helper for standard portal SP params (CustID, DBNAME, sub)
- Comprehensive error handling with timeout detection

Health & Utilities:
- checkConnection: validates connection with actual query test
- closeConnection: graceful pool shutdown
- getPortalDbName: helper for cross-database query parameters
- Graceful shutdown handlers (SIGINT, SIGTERM)

Type Definitions (src/types/epicor.ts):
- Inventory: summary, detail, with paint codes and dimensions
- Orders: list, acknowledgement with lines
- Shipments: list, BOL detail with lines
- Coil Activity: usage, receipts, coil-by-coil
- Jobs: status, traveler with operations and materials
- Customers: ship-to addresses
- Invoices: customer/job matching
- Shipping Reports: monthly and YTD

Ready for service layer implementation in Phase 2.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-16 02:18:00 +00:00
d8af580d93 feat(F-004,F-005): complete Quest and remaining domain schemas
Some checks failed
Build and Deploy / deploy (push) Blocked by required conditions
Build and Deploy / build (push) Has been cancelled
Quest Domain Complete (F-004):
- quest_account_request: new user registration requests
- quest_notification + alert reads: notification/alert system
- quest_email_event + subscriptions: email event management
- quest_email_log: email tracking
- quest_plant + inventory_type + inventory_plant: plant/inventory configuration
- quest_processed_order_acknowledgement_email: duplicate prevention

Remaining Domains Complete (F-005):

Shipment Requests:
- ship_request + ship_request_detail: shipment request cart workflow

Allocation Requests:
- alloc_request + alloc_request_detail + alloc_plant: coil allocation workflow

Invoice Management:
- inv_upload + inv_upload_entry + inv_upload_status: invoice upload/processing

Finance/AP:
- finance_ap_check_processing_batch + status: AP check processing

Paint Schedule:
- paint_plant + paint_line + paint_line_type + paint_plant_line + paint_schedule

Documentation:
- doc_category + doc_article + doc_article_permission_group: knowledge base

Wave/EDI:
- wave_process + wave_process_history: EDI processing

Task Scheduler:
- lts_task + lts_task_type + lts_task_schedule + lts_task_execution

Total: 60+ tables, 600+ columns across all domains. All migrations applied successfully.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-16 02:16:28 +00:00
e643af1fe6 feat(F-003): implement auth domain Prisma schema and migration
Some checks failed
Build and Deploy / build (push) Failing after 5m18s
Build and Deploy / deploy (push) Has been skipped
Auth Domain (Complete):
- auth_user: Better Auth compatible with password, 2FA, SSO support
- auth_session: session management with IP and user agent tracking
- auth_account: OAuth provider accounts
- auth_oauth_client + tokens: OAuth client configuration and token management
- auth_user_type: role definitions (admin, customer, internal)
- auth_domain: multi-tenant domain grouping
- auth_password_history + reset: password security and recovery
- auth_permission_group + rule + category: RBAC system with granular permissions
- auth_security_question + answer: account recovery mechanism

Quest Domain (Partial - Core User/Company):
- quest_user: portal-specific user data (sub-user flag, API tokens)
- quest_company: customer/company info (Epicor integration, invoicing flags)
- quest_user_company: many-to-many with active company tracking

Migration applied successfully to PostgreSQL 16 database.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-16 02:08:09 +00:00
7cd434aa82 feat(F-001): scaffold Next.js 15 project with TypeScript and Tailwind
Some checks failed
Build and Deploy / build (push) Failing after 18m25s
Build and Deploy / deploy (push) Has been skipped
- Initialize Next.js 15 with App Router and TypeScript strict mode
- Configure Tailwind CSS with shadcn/ui theme system
- Install shadcn/ui components (button, card, input, table, etc.)
- Set up ESLint and Prettier with automatic formatting
- Configure path aliases (@/*) in tsconfig.json
- Create full project structure per CLAUDE.md
- Add health check endpoint at /api/health
- Configure next.config.ts with output: 'standalone' for Docker
- Set up Prisma with placeholder schema
- Configure Vitest (unit) and Playwright (E2E) testing
- Add VS Code settings for consistent development experience

Build verification: TypeScript compilation, ESLint, and production build all pass.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-16 00:04:44 +00:00
6ef918aad4 Add reference docs and update CLAUDE.md
Some checks failed
Build and Deploy / build (push) Failing after 5s
Build and Deploy / deploy (push) Has been skipped
2026-02-15 23:33:57 +00:00
fbe79c0773 Update CLAUDE.md and TASKS.md to match infrastructure
Some checks failed
Build and Deploy / build (push) Failing after 9s
Build and Deploy / deploy (push) Has been skipped
2026-02-15 23:25:24 +00:00
66ba6a6c89 Update CLAUDE.md to match actual infrastructure
Some checks failed
Build and Deploy / build (push) Failing after 8s
Build and Deploy / deploy (push) Has been skipped
2026-02-15 23:17:06 +00:00
9b75729bac Remove DOCKER_HOST from workflow
Some checks failed
Build and Deploy / build (push) Failing after 33s
Build and Deploy / deploy (push) Has been skipped
2026-02-15 22:52:33 +00:00
9100695253 Simplify CI to use plain docker build
Some checks failed
Build and Deploy / build (push) Failing after 4s
Build and Deploy / deploy (push) Has been skipped
2026-02-15 22:50:24 +00:00
50833b778a Add Dockerfile and CI/CD pipeline
Some checks failed
Build and Deploy / build (push) Failing after 56s
Build and Deploy / deploy (push) Has been skipped
2026-02-15 22:42:41 +00:00
36c157893e Add test workflow
All checks were successful
Test CI / test (push) Successful in 33s
2026-02-15 22:15:14 +00:00
91f4ba3dbf Initial infrastructure setup 2026-02-15 19:31:34 +00:00