No description
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> |
||
|---|---|---|
| .forgejo/workflows | ||
| .vscode | ||
| docs | ||
| prisma | ||
| src | ||
| tests | ||
| traefik | ||
| .dockerignore | ||
| .env.example | ||
| .eslintrc.json | ||
| .gitignore | ||
| .prettierignore | ||
| .prettierrc | ||
| CLAUDE.md | ||
| components.json | ||
| create-files.sh | ||
| docker-compose.yml | ||
| Dockerfile | ||
| init-databases.sh | ||
| next.config.ts | ||
| package-lock.json | ||
| package.json | ||
| playwright.config.ts | ||
| postcss.config.mjs | ||
| README.md | ||
| setup.sh | ||
| tailwind.config.ts | ||
| TASKS.md | ||
| tsconfig.json | ||
| vitest.config.ts | ||
Vorteq Quest Portal
Modern customer portal for Vorteq Coil, built with Next.js 15, TypeScript, and PostgreSQL.
Tech Stack
- Framework: Next.js 15 with App Router
- Language: TypeScript (strict mode)
- Database (App): PostgreSQL 16 with Prisma ORM
- Database (Epicor): SQL Server (read-only via mssql package)
- Auth: Better Auth
- UI: shadcn/ui + Tailwind CSS
- Cache/Queue: Redis 7 + BullMQ
- Email: Microsoft Graph API
- Infrastructure: Docker + Traefik + Forgejo CI/CD
Getting Started
Prerequisites
- Node.js 22 LTS
- Docker & Docker Compose
- Access to Epicor SQL Server
Development Setup
-
Install dependencies:
npm install -
Set up environment variables:
cp .env.example .env # Edit .env with your configuration -
Initialize database:
npm run db:push npm run db:seed -
Run development server:
npm run dev
Available Scripts
npm run dev- Start development servernpm run build- Build for productionnpm run start- Start production servernpm run lint- Run ESLintnpm run typecheck- Run TypeScript compiler checknpm test- Run unit testsnpm run test:e2e- Run E2E testsnpm run db:push- Push Prisma schema to databasenpm run db:migrate- Create migrationnpm run db:seed- Seed database
Project Structure
See CLAUDE.md for detailed project structure and coding conventions.
Documentation
- Project Instructions:
CLAUDE.md - Task Tracking:
TASKS.md - PRD:
docs/Vorteq_Quest_PRD_v1.0.docx - Legacy Documentation:
docs/directory
Infrastructure
- Production: https://quest.vorteq.wulf.cloud
- Development: https://dev.quest.vorteq.wulf.cloud
- Testing: https://testing.vorteq.wulf.cloud
- Traefik Dashboard: https://traefik.vorteq.wulf.cloud
License
Proprietary - Vorteq Coil