A complete working demo of an automated bulk order processing pipeline. It showcases how bulk orders (e.g. from a CSV) can be imported, matched to supplier catalogs using fuzzy matching, and automatically fulfilled by driving a supplier's website via Playwright.
- Frontend: Next.js (App Router), TypeScript, Tailwind CSS v4, shadcn/ui.
- Backend: FastAPI, Python 3.10+, SQLite.
- Processing: Pandas (CSV parsing), RapidFuzz (fuzzy matching).
- Automation: Playwright (headless browser automation).
The backend runs on http://localhost:8000.
- Open a terminal in the
backend/directory. - Create a virtual environment (recommended):
python -m venv venv # Windows: venv\Scripts\activate # macOS/Linux: source venv/bin/activate
- Install dependencies:
pip install -r requirements.txt
- Install Playwright browsers:
playwright install chromium
- Start the backend server:
uvicorn app.main:app --reload
Note: On the first run, the backend will automatically create the SQLite database (backend/data/bulkorder.db) and populate it with 2 mockup suppliers, 20 products, and 50 sample orders. It will also generate a sample CSV at backend/data/sample_orders.csv.
The frontend runs on http://localhost:3000.
- Open a new terminal in the
frontend/directory. - Install dependencies:
npm install
- Start the development server:
npm run dev
- Open
http://localhost:3000in your browser. - Dashboard: View the overall metrics and the seeded 50 orders in various states.
- Upload: Navigate to "Upload Orders" to drop the sample CSV located at
backend/data/sample_orders.csv. This will import new orders. - Matching: Click "Run Matching" to use RapidFuzz to match the imported orders to the mockup supplier catalog.
- Processing: Click "Process All" (or "Run Automation" on a specific order's detail page) to trigger Playwright. Playwright will invisibly navigate to the Mock Supplier Site (hosted by the backend at
http://localhost:8000/supplier-site/), search the product, add it to the cart, checkout, and extract the generated Tracking Number and Order Reference. - Timeline: Click on any Order ID to view its complete timeline.
/backend— FastAPI application, Playwright automation, SQLite DB, and the mock supplier HTML site./frontend— Next.js React application with shadcn UI components and premium styling.