Synaplan
기업을 위한 오픈소스 AI 플랫폼
Google Sheets 기반 재고·생산 관리 MVP로 공급→창고→생산→고객 흐름을 사진 검증하고 손실·HPP를 추적합니다
Inventory & Production Control MVP on Google Sheets: supplier > warehouse > production > customer, photo-verified, shrinkage & HPP tracking
비즈니스JavaScript · HTMLGitHub @maxondelberthakim-lgtm온라인운영자 미확인
써 보셨어요? 한 번만 눌러 주세요. 로그인은 필요 없어요.
아직 감지된 업데이트가 없습니다. GitHub 릴리스가 나오면 여기에 보입니다.
개인 계정의 공개 저장소 소유자는 GitHub로 로그인해 운영자를 확인하고 소개를 직접 관리할 수 있습니다. 관리자 승인은 필요하지 않습니다.
로그인한 뒤 확인 파일을 만들어 이 저장소의 기본 브랜치에 30분 안에 커밋해 주세요. 다른 브랜치나 포크의 파일은 인정하지 않습니다. 파일을 올린 뒤 아래에서 확인하면 관리자 승인 없이 관리할 수 있습니다. 자격을 유지하려면 파일을 남겨 두세요.
로그인이 필요하면 로그인 화면으로 이동합니다. 로그인 후 이곳으로 돌아와 원하는 확인 버튼을 다시 눌러 주세요.
프로젝트 폴더에서 /nomorevibe verify를 실행하면 소유권을 확인하고 소개를 직접 관리할 수 있습니다.
1분 만에 확인하기메이커가 쓴 소개는 위의 한 줄이 전부입니다. 더 자세한 내용은 저장소 README에서 읽을 수 있습니다. 저장소 README ↗
README 전체를 불러오는 중입니다.
README 전문 보기 ↗Mobile web app for a small polybag factory: every kilogram that moves between supplier → warehouse (GBJ) → blowing → cutting → warehouse → customer is logged with a typed quantity, a photo where it matters, and a timestamp — then reviewed after the fact by a supervisor.
Backend: Cloudflare Workers + Durable Object (SQLite), free plan. The business logic is the same
apps-script/*.gs code, bundled by tools/build-cf.py and run inside the Worker (cloudflare/).
Google Sheets is no longer the database (v9 → Cloudflare migration keeps every row; the old Apps Script
deployment still works as a fallback by pointing tools/api-url.txt back at it).
▶ App (Cloudflare Pages PWA) — static frontend (
docs/app, deployed withwrangler pages deploy; the old github.io/app copy only redirects here), calls the Worker as a JSON API (POST {fn,args,idKlien}). Installable, no Google sign-in; name + PIN only. ~50 ms per call.▶ Offline demo — the real backend logic running in the browser on sample data. Nothing you do there is saved (refresh = reset).
Demo sign-in (name · PIN): Admin 1234 · Direktur 2468 · Manager 1357 · Yansen 2211 · Deny 3322 · Bastari 4433 · Staff Gudang 1111 (demo only — the live app has no default STAF account since v11.1)
There are no per-job records and no approvals on the production floor — the system must never slow production down.
| Step | Who | What is entered | Stock effect |
|---|---|---|---|
| Shift report (one per 12-hour shift: 1 = 08–20, 2 = 20–08) | Manager Produksi | Blowing section: its own operators, pellets taken from the warehouse (per SKU, kg), roll made per grade (KW / Super / Super Plus), BS per grade. Cutting section: its own operators, roll taken from the pile per grade (typed, not derived — the pile may come from earlier shifts), polybag made per grade, BS per grade. Either machine can be marked "not running". | blowing: pellets −, roll +, BS + · cutting: roll −, polybag +, BS + |
| Month-end warehouse count | Manager | physical kg per item in the warehouse | adjustment |
| Production count (v10.1, blind) | Manager | polybag produced this month, BS produced, pellets still in the production area, uncut roll, plastic inside the machines — the app only adds it up; the expected figure is never shown to the person counting | — |
| Reconciliation (v10.1) | Admin only | opening stock + purchases − ending stock of raw material (per the ledger, incl. warehouse-count differences) + material already in production at month start vs the manager's production count; difference = shrinkage / unrecorded; also compared with shift-report totals (roll made − roll used = uncut roll) | — |
| Close the month | Manager (reopen: Admin) | one tap — snapshot of COGS, gross profit, shrinkage; transactions dated in that month become read-only | — |
pellets into blowing − polybag made − BS − Δroll stock,
plus negative stock-count differences. Reports show it per month next to the COGS.SCR-BS-KW, SCR-BS-SUP, SCR-BS-SPL), counted at both machines, sold or sent to the
crusher (chassen) and received back as recycled pellets (RM-BP-DU). BS is valued at 0; its value comes back through
the crushing fee.METODE_HPP=RATA): pellets from purchase prices (PO / invoice), roll =
(pellets taken + BIAYA_PROSES_PER_KG × kg) ÷ kg roll, polybag = roll consumed ÷ kg polybag, recycled pellets =
(BS value + fee) ÷ kg. FIFO batches are gone.COGS = opening stock value + purchases − supplier returns + crushing fees + process cost − closing stock value,
gross profit = sales at SO prices − COGS. Stock value per category (raw material, roll, polybag, BS) is shown for
the opening and closing of the month. Closing the month stores the snapshot in Tutup_Bulan.PO, SO, PRODUKSI, GUDANG, MANAJEMEN — empty = all)
· ADMIN (everything + users + reopen months + reconciliation). Default accounts: Admin, Direktur, Manager (all modules),
Yansen (PO & invoices + all warehouse work: receipts, shipments, returns, damage, recycling), Deny (sales
orders), Bastari (shift reports & production count) — change the PINs. There is no default STAF account since
v11.1; Admin → Pengguna can still create STAF accounts (warehouse only, no prices). Module access is enforced on the server (wajibModul_) and mirrored in the UI.| # | Movement | Photo | Delivery note | Stock effect |
|---|---|---|---|---|
| PO | Purchase order (manager: item, kg, price, spec, ETA, TOP) | — | — | — |
| ⓪ | Goods receipt against a PO (supplier → GBJ), QC note | required | required + OCR | GBJ + |
| 🧾 | Supplier invoice → compare with Σ(received × PO price) → validate, correct price (recomputes average cost) | required | — | prices only |
| ↩ | Return to supplier — only from a recorded receipt | required | — | GBJ − |
| ⚠ | Damaged goods — reported by staff, approved by manager | optional | — | GBJ − after approval |
| ♻ | BS recycling: BS sent to a crushing vendor → recycled pellets back, with shrinkage & service fee | optional | optional | BS −, pellets + |
| SO | Sales order (customer, ship date, TOP, items, prices) | — | — | reserves stock |
| ④ | Goods out, sold (GBJ → customer), picked from an SO | required | required | GBJ − |
| ↩ | Return from customer | required | — | GBJ + |
?unduh=1 auto-downloads), payment terms counted from the document date or the actual first
shipment/receipt (TOP_Dari DOKUMEN|KIRIM, recomputed on every shipment/receipt), TOP prefilled 0, Yansen = PO+SO+GUDANG.INV/YYYY/MM/NNN or typed), and from a purchase order Yansen (module PO) creates a PO document; both are snapshots
stored in Dokumen and served by the Worker at GET /dok/<token> as a printable page ("Simpan PDF" = browser print).
The link is sent with WhatsApp via wa.me/<number>?text=… (message + link prefilled; the sender taps send) — numbers
are picked from a contact list (Master_Kontak_WA) or typed and saved. Company header, bank account and footer notes
live in Settings (Admin → Dokumen; editable by the PO account / Admin), and can be overridden per document. Cancelling a
document kills its link; a new PO document for the same PO number replaces the old one.KG_PER_BAL, default 25,
changed in Admin → Dokumen); stock is always stored in kg, documents show both. Polybag SKUs carry a size note
(cm × cm) shown under the SKU list and on documents.tambahFoto, once per entry, logged). Exception: BS recycling requires a photo of the crusher's delivery note both
when BS leaves and when recycled pellets come back.MAKS_EDIT_HARI or the month is closed. Every change is logged.apps-script/ business logic + UI (also still pasteable into Apps Script)
Config.gs schema, enums, default master data (SKUs per grade), settings
Server.gs receipts, shipments, review, stock, reports, users, SKU, opname, JSON API (doPost)
Pembelian.gs schema migration (v9→v10), purchase orders, invoices, average-cost engine, damage, reorder prediction
Penjualan.gs sales orders (TOP), monthly CSV export
DaurUlang.gs BS recycling (chassen)
Produksi.gs v10.1: shift reports (blowing + cutting per shift), production report, blind production count, reconciliation
TutupBulan.gs v10: monthly close — COGS, gross profit, shrinkage, lock / reopen
Media.gs photo upload + delivery-note OCR
Index.html / Styles.html / Script.html PWA frontend + i18n
cloudflare/ Worker + Durable Object runtime (src/), deploy.sh, README.md, DEPLOY.md
docs/app/ the real app (built by tools/build-app.py); docs/index.html = offline demo (tools/build-demo.py)
tests/ Node test suites — the real .gs files against an in-memory sheet AND against the Cloudflare engine
tools/ build-cf.py (Worker bundle), build-app.py, build-demo.py, seed.js, api-url.txt
See cloudflare/DEPLOY.md. Short version: on the owner's Mac,
cd "Claude Co Work/ipc-cloudflare" && bash deploy.sh (downloads a portable Node, wrangler deploy, sets the admin
key), or double-click deploy-v10.command in Finder. The schema migration runs itself on the first request after deploy (v10.1: v10 per-machine shift rows are merged into one row per shift, the old sheets are kept as *_lama). v10: archives Pekerjaan* /
Master_Standar_Susut as *_lama, adds the Kualitas column and the per-grade roll / polybag / BS SKUs, deactivates
the old RM-BS-* raw-material SKUs, switches METODE_HPP to RATA, adds the Manager Produksi / Sales Manager accounts.
cd tests && npm test # ~960 checks: sheet harness + Cloudflare engine (incl. live-data migration v9→v10→v10.1)
python3 tools/build-cf.py # bundle apps-script/*.gs → cloudflare/src/backend.js
python3 tools/build-app.py # rebuild docs/app/ (PWA); API URL from tools/api-url.txt — deploy: double-click deploy-app.command on the Mac (wrangler pages deploy docs/app --project-name h-plast)
python3 tools/build-demo.py # rebuild docs/index.html
cd cloudflare && npx wrangler dev --port 8787 --local # local Worker for the Playwright e2e
v12 — customer invoices from SOs and PO documents with shareable print links + WhatsApp send, contact list, bale/kg
entry, SKU size notes, document settings. v11.2 — photos optional at entry time ("+ Foto" later from history), crusher delivery-note photos mandatory for
recycling, every cancellation requires a reason. v11.1.1 — admin hapusTransaksiSebelum to purge test data. v11.1 — app moves to h-plast.pages.dev (Cloudflare Pages); Staff Gudang removed, Yansen does the warehouse work.
v11 — access revamp: per-account module access (Yansen PO · Deny SO · Bastari production), review/approval process
removed (entries final on save, 24-hour self-edit window for staff). v10.1 — two 12-hour shifts, one report per shift
with separate blowing / cutting operators, roll used typed by the cutting operator, blind monthly production count +
admin-only reconciliation. v10 — shift reports replace jobs, average
costing replaces FIFO, monthly close with COGS / gross profit / shrinkage, SO & PO with TOP. Backend on Cloudflare (free plan). Not yet: offline mode, barcode
scanning, receivables / payment tracking beyond the due date.
MAKS_EDIT_HARI or inside a closed month can be changed. Every change is logged.