Inspiration

The project addresses the task of converting recipes, operator forecasts and ending-stock records into supplier-order drafts. Handling supplier conversations in Cantonese and English can create risks of quantity or price misunderstandings; this problem hypothesis has not yet been validated through user research. The prototype aims to reduce routine calculation errors and streamline the quote-to-checkout flow for independent operators, focusing on local processing and traceable operator-approved workflows rather than relying on cloud-based solutions.

What it does

PrepOrder AI calculates supplier-order quantities from synthetic recipes, operator-entered forecasts and safety quantities, ending stock and incoming stock, rounding to package sizes. Sold-today data displays ingredient usage only; demand forecasting is not automated. It uses a local Ollama model to extract structured data from unstructured supplier text, validating quantities and prices. The system flags shortages or price changes for explicit human approval before generating a checksum of the frozen approved terms. After Sandbox configuration, it can initiate a PayPal Sandbox checkout for a single merchant, ensuring operator control over revised terms without automating financial decisions.

How we built it

Built with Python standard libraries, the app runs on 127.0.0.1:8794. It uses Decimal arithmetic for precise inventory math and local Ollama for JSON extraction from supplier text. The frontend is pure HTML/CSS/JS. PayPal integration uses the REST API for Sandbox testing. The Python web application uses the standard library; local AI requires the separately installed Ollama runtime and model. The codebase includes procurement.py, state_ai.py, and paypal_gateway.py, with private state stored locally.

Challenges

Handling unstructured Cantonese and English supplier replies requires local extraction and independent validation. We faced the challenge of ensuring strict validation for quantities and prices before approval. Integrating PayPal Sandbox required careful credential management without exposing secrets. We also needed to simulate input channels like WhatsApp text accurately while maintaining a clear distinction between simulated data and actual financial transactions, avoiding any claim of real-world payment processing.

Accomplishments

The prototype generates three supplier drafts from synthetic recipe, forecast and ending-stock data. A real local Ollama call read a Cantonese offer as two kilograms at HKD80 per kilogram. Python computed HKD160 and held a one-kilogram shortage and price change for operator approval. Twenty-three unit tests passed. A virtual buyer approved the HKD160.00 order; actual PayPal Sandbox capture succeeded and a subsequent status check confirmed COMPLETED. No real money was charged. Phone and WhatsApp inputs remain text simulations.

What we learned

We learned that the tested local model can extract this synthetic supplier example, while units and currencies need explicit rejection rules. Managing Decimal precision is critical for financial calculations. We discovered the importance of explicit human-in-the-loop approvals for price changes to maintain trust. Integrating with PayPal Sandbox highlighted the complexity of credential handling and the need for clear separation between development and production environments. We also learned that simulating input channels requires careful state management.

What's next

Benchmark local Cantonese speech recognition and synthesis on procurement vocabulary and telephone audio. Connect approved supplier phone and WhatsApp Business channels, preserving the same purchase-order history across channels. Test model and hardware choices, supplier acknowledgement, stock records, and the cost of setup and support before a real restaurant pilot. No production deployment or customer savings are claimed.

Running and testing

The public MIT repository includes complete source and setup instructions. Run locally with Python and a separately installed Ollama model. Supply your own private PayPal Sandbox credentials to test the one synthetic merchant; do not use real money. The 23 unit tests run without network access.

AI assistance

Local Ollama assisted bounded writing and code drafts; a supervising assistant reviewed and tested the result. Runtime AI extracts supplier text, while Python calculates quantities and money. English video narration is synthetic Kokoro-82M, not a voice clone.

Development period and prior submission

PrepOrder AI was developed and tested during the LaunchPad Hacks period (16 Oct–20 Nov 2026), with core implementation occurring on 25–26 October 2026. This prototype addresses procurement inefficiencies for independent HK eateries by converting recipes and forecasts into supplier order drafts. The system utilizes Python for precise Decimal arithmetic and local Ollama for extracting structured data from unstructured Cantonese/English text, with supplier-text extraction performed locally and order changes approved by an operator.

This submission discloses that the same independent prototype was previously submitted to the PayPal AI Hackathon on 26 October 2026. No awards or funding were received for PrepOrder. The current version relies on existing public MIT code and a 101.84-second demonstration video, requiring no new code. Features are limited to synthetic data, manual forecasts, and text simulations for phone/WhatsApp channels. A PayPal Sandbox capture of HKD160 was completed, confirming technical functionality without real money. Development was AI-assisted with Codex supervision and local Ollama drafting, with Python handling exact calculations. No production deployment or customer savings are claimed.

Built With

Share this project:

Updates

Submission history