A focused supplier catalog import application. React + Fastify + PostgreSQL, with durable preparation jobs, deterministic transformations, reviewable diffs, atomic commits and source-level audit history.
npm ci
npm run setup
npm run demo
npm run devOpen http://localhost:5173. Setup creates an ignored .env with a random local DEMO_PASSWORD. Sign in with owner@importforge.local, editor@importforge.local, or viewer@importforge.local using that password. The first API startup migrates and seeds 12 products across three suppliers. No AI key is required. Do not run a second local API against the same PGlite directory.
The local adapter persists real embedded PostgreSQL data in .data/postgres and immutable source objects in .data/objects. It runs durable jobs inside the API for convenience. Production uses PostgreSQL through Prisma, separate BullMQ workers, and private S3. Local mode is explicitly single-process; it is not the production scaling topology.
npm run demo is optional and runs while the API is stopped. On an empty import history, it creates two actual completed imports for Paper & Co./Linkline and a NovaTech file awaiting mapping. It preserves existing work and leaves NovaTech SKU 00042 at PHP 425.00.
- Browse the seeded Catalog; NovaTech SKU
00042starts at PHP 425.00. - New import → NovaTech Supply → upload
apps/web/public/samples/novatech-messy.csv. - Suggest mappings → accept the explicitly labeled deterministic suggestions.
- Select comma grouping, remove the
PHPprefix, and approve currency default PHP. - Category mappings:
computer accessories = Computer accessoriesandperipherals = Peripherals. Unit mapping:pcs = piece. - Save & validate. Initial result: 2 creates, 1 update, 1 unchanged, 2 blocked.
- Exclude records 5 and 6 with reasons (ambiguous currency and missing product name). Review the exact price diff, then commit.
- Receipt: 2 created, 1 updated, 1 unchanged, 2 excluded, 0 rejected; all 6 source records accounted for.
- Catalog → Wireless Mouse → history links to the source import/record. Repeat the same file/config/exclusions: 4 unchanged, 2 excluded, no duplicates.
Seed state affects create/update counts after prior imports; use fresh local data for the initial demonstration. Do not delete data you need. To use a new demo database, stop the API and move .data to a backup directory first.
| Command | Purpose |
|---|---|
npm run dev |
API, local worker and Vite |
npm run api / npm run worker |
Independently runnable production processes |
npm run db:migrate / npm run db:seed |
Explicit database initialization |
npm test |
Engine, database transaction, security and provider tests |
npm run test:e2e |
Playwright against installed Microsoft Edge; requires seeded .env |
npm run typecheck / npm run lint / npm run build |
Static checks and web production bundle |
npm run evaluate / npm run benchmark |
Reproducible reports under docs/results |
Read product, architecture, database, API, frontend, design, security, plan, and decisions.
See operations and scaling, verification and limitations, and portfolio demonstration.
packages/import-engine/src/index.ts: standalone parsing, exact monetary normalization, mapping validation and reconciliation.apps/api/src/imports.ts: optimistic revisions, absence/version checks, workspace locking, atomic catalog/audit/receipt writes.apps/api/src/jobs.ts: durable job claim, leases, repeated delivery, retries and terminal state.apps/api/src/server.ts: trust boundaries, workspace-scoped reads, RBAC and idempotent commit transport.apps/api/src/ai.ts: bounded provider data, validated suggestions and deterministic fallback.apps/web/src/features/imports/workspace.tsx: explicit draft ownership, user-approved transformations, review and receipts.
No external site is published. No production credentials are bundled.