Domain: LogiTech (Logistics & Supply Chain)
Build2Break Hackathon Submission
Logistics coordinators and procurement teams spend 40% of their time daily manually re-typing quotes from freight forwarders and suppliers into Excel spreadsheets or ERP systems. Quotes arrive in various formats:
- Scanned PDF documents
- Images (JPG, PNG) from mobile cameras
- Excel files with inconsistent formatting
- Word documents
- Text files
This manual process is:
- Time-consuming: Over 40% of the day is consumed with doing repetitive tasks
- Error-prone: Manual data entry leads to typos and missing information
- Inefficient: Delays procurement decisions and quote comparisons
- Scalable bottleneck: Cannot handle high quote volumes
https://vimeo.com/1152623961?share=copy&fl=sv&fe=ci
This solution addresses a critical operational efficiency challenge in the LogiTech domain:
- Inventory and Stock Tracking: Automated quote processing enables faster procurement decisions
- Supply Chain Coordination: Streamlines vendor quote management and comparison
- Operational Efficiency: Reduces manual work by 95%, freeing coordinators for strategic tasks
- Visibility: Centralized quote data in ERPNext provides better supply chain visibility
The solution directly aligns with LogiTech domain objectives of improving operational efficiency and supply chain coordination, ensuring efficient adoption of "glue logic" to different ERP and Inventory Management System.
An automated quote processing system that:
- Accepts quotes in multiple formats (PDF, images, Excel, Word, text)
- Extracts structured data using OCR, AI, and intelligent parsing
- Automatically pushes extracted data to ERPNext for quote management
- Flexible Adoption across different ERP and Inventory Management system
- Easy to Use interface.
Key Features:
- Multi-format support (PDF, images, Excel, Word, text)
- OCR for scanned documents
- AI-powered data extraction (Gemini AI)
- Automatic ERPNext integration
- Robust file validation and error handling
- Dockerized deployment for easy setup
┌─────────────────────────────────────────┐
│ React Frontend (Vite) │
│ Port: 5173 │
│ - Quote upload & review UI │
│ - Calls /api/parse & /api/insert│
└──────────────┬──────────────────────────┘
│ HTTP /api/* (proxied)
│
┌──────────────▼──────────────────────────┐
│ MCP Agent (FastAPI, erpnext_mcp) │
│ Port: 8001 (host) → 8000 (container)│
│ - OCR + parsing (PDF, Excel, images)│
│ - Gemini AI extraction (optional) │
│ - /parse (extract items) │
│ - /insert (sync items to ERPNext) │
└──────────────┬──────────────────────────┘
│ HTTP REST (Frappe API)
│
┌──────────────▼──────────────────────────┐
│ ERPNext Stack (frappe/erpnext) │
│ Port: 8080 (UI) │
│ - Items, Quotations, Masters │
│ - Background jobs & scheduler │
└─────────────────────────────────────────┘
Supporting Services:
- MariaDB (ERPNext database)
- Redis (queue + cache)
Technology Stack:
- Frontend: React + Vite, Nginx
- Backend: Python + FastAPI
- MCP Agent: Python, Tesseract OCR, Gemini AI, pandas
- ERPNext: Frappe framework, MariaDB, Redis
- Infrastructure: Docker Compose
- File Quality: Assumes uploaded files are readable (not corrupted, reasonable image quality for OCR)
- Quote Format: Assumes quotes contain standard information (vendor, pricing, dates, locations)
- ERPNext Setup: Assumes ERPNext is properly configured with required doctypes
- Network: Assumes stable network connectivity between services
- API Keys: Assumes GEMINI_API_KEY is provided for AI extraction (falls back to naive parsing if missing)
- User Behavior: Assumes users upload valid quote files (not malicious content)
- File Size: Maximum 10MB per file, 5 files per upload
- File Types: Currently supports PDF, images (JPG/PNG), Excel (XLS/XLSX), Word (DOC/DOCX), and text files
- OCR Accuracy: OCR accuracy depends on image quality; poor scans may result in extraction errors
- Data Extraction: AI extraction quality depends on quote format consistency
- ERPNext Integration: Requires ERPNext to be running and accessible
- Language Support: Currently optimized for English text; other languages may have reduced accuracy
- Processing Time: Large files or complex quotes may take 30-60 seconds to process
- If the Gemini AI API key is not available, or is invalid, we'll default to naive processing. Garbage value and undefined behaviour is expected.
- File uploads are validated for type and size
- Filenames are sanitized to prevent path traversal
- Rate limiting prevents abuse (50 requests per 15 minutes)
- CORS is configured for allowed origins only
- Files are stored in isolated uploads directory
- Docker and Docker Compose installed
- At least 4GB RAM available
- Ports 5173, 8001, 8080 available
- Have a Gemini API key
-
Clone the repository:
git clone https://github.com/beppvis/Flow_ers cd Flow_ers -
Start all services:
docker-compose up --build
-
Access the application:
- React Frontend (Quote Upload UI): http://localhost:5173
- ERPNext UI: http://localhost:8081
Create a .env file in the root directory by copying the .env.example file which is already existing in the root folder:
# Fill in your own API key
GEMINI_API_KEY=your_gemini_api_key
# By default docker-compose wires FRAPPE_URL=http://backend:8081 inside the network.
# Only set these if you are pointing to a different ERPNext instance.
FRAPPE_URL=http://backend:8081
You should also place the same .env file inside erpnext_mcp .
# Build and start all services
docker-compose up --build -d
# View logs
docker-compose logs -f
# Stop all services
docker-compose down
# Stop and remove volumes (clean slate)
docker-compose down -v# Check service status
docker-compose ps
# Test MCP agent (FastAPI)
curl http://localhost:8001/docs
# Test ERPNext UI (should return HTML)
curl http://localhost:8080-
Upload Quotes:
- Open http://localhost:5173
- Drag and drop quote files or click to browse
- Select up to 5 files (max 10MB each)
- Click "Upload" button
-
Processing:
- Files are validated and stored
- MCP agent processes files (OCR, extraction)
- Data is pushed to ERPNext
- Success message displayed
-
View in ERPNext:
- Open http://localhost:8081
- Login with default credentials (if first run) [User:
AdministratorPass:admin] - Navigate to Items or Quotes section
- View processed quote data
Services not starting:
# Check logs for ERPNext core
docker-compose logs backend
# Check logs for MCP Agent
docker-compose logs erpnext-mcp-backend
# Rebuild specific services
docker-compose build erpnext-mcp-backend
docker-compose up erpnext-mcp-backendPort conflicts:
- Change ports in
docker-compose.ymlif needed
ERPNext not accessible:
- Wait 2-3 minutes for ERPNext to fully initialize (site creation, migrations, etc.)
- Check ERPNext logs:
docker-compose logs backend
File upload fails:
- Check file size (max 10MB)
- Verify file type is supported
- Check backend logs for errors
Flow_ers/
├── client/ # React frontend (Vite) for quote upload & review
│ ├── src/
│ ├── Dockerfile # Builds the frontend dev server
├── erpnext_mcp/ # MCP Agent (FastAPI) for parsing & ERPNext sync
│ ├── main.py
│ ├── processor.py
│ ├── erpnext_client.py
│ ├── requirements.txt
│ └── Dockerfile # Builds the MCP backend
├── dataset/ # Sample PDFs, images, and Excel quotes (demo only)
├── docker-compose.yml # Orchestrates ERPNext + MCP + Frontend
└── README.md # This file
All endpoints are exposed by the erpnext_mcp FastAPI service and are typically called via the frontend using /api/* (Vite proxy).
-
POST /parse- Description: Upload one or more quote files (
quotesfield,multipart/form-data). - Behavior: Runs OCR/parsing and returns a JSON list of extracted items. Does not write to ERPNext.
- Description: Upload one or more quote files (
-
POST /insert- Description: Accepts a JSON list of items (same shape as
/parseoutput). - Behavior: Inserts/updates Items in ERPNext using the configured
FRAPPE_URL.
- Description: Accepts a JSON list of items (same shape as
-
GET /docs- Description: Swagger UI for interactive testing of the MCP API.
- Web UI served by the
frappe/erpnextimage (proxied containerfrontendservice). - Default site created as
frontendwith Administrator / admin (first run).
For questions or issues, please open a GitHub Issue in this repository.