Run a small food shop with a fast, low-cost POS
This system manages menu products, ingredient recipes, inventory, payment fees, expenses, receipts and end-of-day reports. The separate viewer.html lets a co-owner see the latest cloud copy without editing it.
Recommended low-cost design
At the shop
- One existing or used Windows laptop as the main POS.
- This PWA installed from the browser.
- Official merchant QR Ph as the main cashless method.
- Optional NFC Android phone with GCash PocketPay or a Maya Terminal for cards.
- Optional 58mm USB thermal printer and wired 2D scanner.
Online
- Static files on Cloudflare Pages, Vercel or Netlify.
- Cloudflare Worker and D1 for cloud sync.
- Separate admin and viewer keys.
- Partner opens
viewer.html, which is read-only. - Main POS continues recording locally if internet fails.
First setup
- Open Settings. Enter the store name, branch, address, phone, cashier name and receipt footer.
- Choose receipt width. Use 58mm for the cheapest thermal printer, 80mm for easier reading, or A4 for an ordinary printer.
- Review currency conversion. Sales remain stored in PHP. Enter how many Philippine pesos equal one unit of USD, CAD or any replacement currency such as AUD or HKD.
- Review payment fees. Replace the sample GCash and Maya rates with the exact rates in the signed merchant agreement.
- Add inventory. Create ingredients, packaging and supplies with one consistent unit, current quantity, reorder level and cost per unit.
- Add products and recipes. Attach the exact ingredient and packaging deduction used for one product.
- Download a JSON backup. Keep the first clean setup copy before recording real sales.
- Configure cloud sync. Complete the Cloudflare API steps below, then push the first cloud copy.
Daily operating instructions
Complete a sale
- Open POS / Checkout.
- Tap product tiles or scan the SKU/barcode into the search field.
- Adjust quantities and discount.
- Proceed to payment.
- For QR/card, verify the official merchant result and enter the reference.
- Record the sale and print when needed.
What happens automatically
- Ingredient and packaging quantities are deducted.
- The configured processor fee is calculated.
- Gross sales, net receipts and COGS are recorded.
- Profit estimates and low-stock warnings update.
- The cloud copy syncs when internet is available.
Restock, waste or correct stock
Open Inventory and choose Adjust beside an item. Use a positive quantity for purchases. Choose Waste or Supplier return for reductions; the POS converts the entered amount to a negative movement. Update unit cost when the latest purchase cost changes.
Void an incorrect sale
Open Sales, choose Void and enter a reason. The recipe inventory is restored. A processor refund is separate and must be performed in the official GCash or Maya merchant system.
End of day
Open Reports & EOD, select one date, review gross sales, payment fees, net receipts, COGS, expenses and estimated net amount, then choose Close selected day. Add a cash-count or variance note when useful.
Payment recommendations and integration
1. QR Ph: recommended first choice
QR Ph is the Philippine interoperable merchant QR standard. A customer can use a participating bank or e-wallet app to scan the merchant QR. It requires no card reader and the published merchant rates are generally below card rates.
- Customer scans the official merchant QR Ph code.
- Cashier checks the official merchant app, dashboard or sound device.
- Cashier chooses the matching QR method in this POS.
- Cashier enters the transaction reference.
- The POS records the fee and net receipt.
2. GCash PocketPay: cheapest card-tap option when a suitable phone already exists
GCash says PocketPay requires Android 11 or later, a built-in NFC chip and an internet connection. It is not supported on iPhone. Process the card in the official PocketPay app, wait for approval, then record the reference in this POS.
3. Maya Terminal or Terminal Lite
Enter the amount on the official Maya device, complete tap/insert/QR, wait for approval, and record the terminal reference in the POS. Hardware and commercial terms require a Maya merchant application or quote.
Published sample fees checked July 15, 2026
| Provider / method | Published sample rate | POS sample setting |
|---|---|---|
| GCash for Business QR Ph | 1.0% VAT-inclusive | 1.0% |
| GCash credit/debit card | 3.2% VAT-inclusive | 3.2% |
| Maya QR Ph / Maya QR | Starting at 1.5% | 1.5% |
| Maya Terminal card | Starting at 3.5% | 3.5% |
| Maya online card checkout | Starting at 3.5% + ₱10 | Add both percentage and fixed fee when used |
Low-cost hardware guide
| Item | Practical low-cost choice | Rough PH online range observed July 2026 |
|---|---|---|
| Main POS | Existing or used Windows laptop | ₱0 if owned; roughly ₱3,000–₱10,000 used |
| Receipt printer | 58mm USB thermal, ESC/POS compatible | About ₱800–₱2,300 |
| Scanner | Wired 2D USB barcode/QR scanner | About ₱600–₱1,500 |
| Cash storage | Manual locked cash box or drawer | About ₱600–₱1,500 |
| Stand | Basic laptop/tablet stand | About ₱300–₱1,000 |
| Card tap phone | Used NFC Android 11+ phone | About ₱2,500–₱6,000 |
Printer integration
- Install the operating-system printer driver.
- Connect by USB for the most reliable cheap setup.
- Set 58mm or 80mm in POS Settings.
- Print one test receipt.
Bluetooth printer compatibility varies, especially on tablets. A Windows laptop and USB printer are easier to support. A browser may not automatically open an electronic cash drawer, so keep the drawer key available or configure the printer driver if it supports a drawer pulse.
Scanner integration
- Plug the scanner into USB.
- Open POS / Checkout.
- Choose Focus scanner.
- Scan a product barcode.
- The scanner acts as a keyboard and normally sends Enter.
Cloudflare deployment: recommended
A. Deploy the D1 sync API
Open a terminal in the cloudflare-api folder.
npm install npx wrangler login npx wrangler d1 create foodshop-pos-db
Copy wrangler.toml.example to wrangler.toml. Paste the D1 database ID returned by Cloudflare.
npx wrangler d1 execute foodshop-pos-db --remote --file=schema.sql
Generate two different long keys:
node -e "console.log(require('crypto').randomBytes(32).toString('hex'))"
Save them as Worker secrets:
npx wrangler secret put ADMIN_KEY npx wrangler secret put VIEWER_KEY npx wrangler deploy
Copy the deployed Worker address. The API base address ends before /api/state.
B. Deploy the static website
- Open Cloudflare Workers & Pages.
- Create a Pages application.
- Choose Direct Upload.
- Upload only the
publicfolder, keepingindex.htmlat the root. - Open the generated
pages.devaddress.
CLI alternative:
npx wrangler pages deploy public --project-name foodshop-pos
C. Connect the POS
- Open the deployed main POS.
- Go to Settings.
- Enter the Worker URL, Store ID and admin key.
- Save, test, then push the local copy.
- After the final site address is known, restrict
ALLOWED_ORIGINSinwrangler.tomland redeploy the Worker.
Vercel and Netlify deployment
The static POS can be hosted anywhere. The Cloudflare Worker and D1 can remain the backend even when the website is on Vercel or Netlify.
Vercel
- Open Vercel Drop.
- Drag the
publicfolder. - Choose a project name and deploy.
npm i -g vercel cd public vercel --prod
Netlify
- Open Netlify Drop or Projects.
- Drag the
publicfolder. - Use the generated site address.
npm i -g netlify-cli netlify deploy --dir=public --prod
After deployment, enter the same Cloudflare Worker API address in the main POS and viewer. Add the Vercel or Netlify website origin to the Worker's ALLOWED_ORIGINS.
Read-only partner viewer
- Open the deployed
viewer.htmladdress. - Enter the Worker API base URL and the same Store ID used by the POS.
- Enter the separate viewer key, not the admin key.
- Choose a date range. The page refreshes every 30 seconds.
The viewer has no editing screens. The Worker also rejects write requests made with the viewer key. This provides stronger protection than simply hiding buttons.
Security, backups and BIR caution
- Use long random admin and viewer keys.
- Never place live keys inside the publicly uploaded
config.js. - Give a partner only the viewer key.
- Use one active admin POS device at a time.
- Download a JSON backup weekly and CSV exports monthly.
- Keep backups in at least two places.
- Use multi-factor authentication on the Cloudflare account.
- Use official merchant apps or terminals for payment verification and refunds.
Official reference pages
These links were used to check the platform and payment information. Rates and rules should be rechecked before opening the store.