P106  PLAMOGBAMOGH.CLOUD--:--
PlamoGBP106

Group buying for India's Gunpla model-kit community

A web app and Discord bot that splits a group order's price, shipping and customs fairly between members, down to the rupee. I co-built it with Vinayak and Yash.

RoleCo-builder
WithVinayak (repo owner), Yash
WhenApr 2026–now
StatusUsed every day for Plamo India's group buys; unofficial community tool
StackTypeScript, Cloudflare Workers and Hono, D1 and R2, React, Discord interactions
Built withCo-built. AI coding agents for speed.

In short

Problem. Group buys of Japanese, and now Chinese, model kits ran on spreadsheets. Someone had to keep track of who claimed which kit and what each person owed for it, along with weight-based international shipping and Indian customs, all in rupees at a moving exchange rate, with partial and lumped payments.

Who uses it. It is used by Plamo India, a Discord community of over 3,000 members. About 36 people use it on an average day.

What I built. My part of what we co-built with Vinayak and Yash (52% of the code running today) covers price fetching and kit price history, personal spends, parcel tracking, split parcels, kit transfers and settlement, China group buys, wishlist alerts for supporters, the Available Kits filters, and the Discord commands that go with them.

What I measured. I looked at usage totals from the app's database on 12 Nov 2026, the repository numbers, and my share of the code.

A PlamoGB deal page with the lead, buyer and receiver, a split table of three kits with their owners and shares of price, shipping and customs, a per-person table of what is owed in each phase, and a list of payments.
FIG 01The heart of a deal, showing who organises, buys and receives it, each kit's share of the price, shipping and customs in yen and rupees, what each person owes in each phase, and the payments recorded so far.Screenshots of PlamoGB running on my PC with invented test members and deals, 14 Oct 2026. No real member's data.

Used daily, built from feedback

Since the first deal in March, 363 people have claimed 5,780 kits through PlamoGB, and members have recorded 4,972 payments to each other worth 47 lakh rupees. The money never passes through the app. It keeps the record of who owes whom, and who has paid. And it is still growing fast. The payments members record have gone up every single month since April, from 1.5 lakh rupees in April to 10.1 lakh rupees in October, a 6.7× rise in six months. In the month to 12 November alone, members claimed 814 kits and recorded 11.5 lakh rupees in payments, over 37,000 rupees a day.

Members ask for things in the deal threads on Discord, and we build them. Some of the features I built, and why:

  • Price from the link. Paste a shop link while creating a deal, and the price fills in, like the photo already did. Anyone can refresh it later. If the price changes, everyone who claimed a kit gets a ping in the deal's Discord thread.
  • Kit price history. Look up any kit and see how often it has come up in group buys, its price in each deal, and what it finally cost in India, from delivered deals only. Members use it to decide whether a deal is worth joining.
  • Personal spends. One private page with what you've committed to, what people owe you as an organiser, and what you've paid, month by month. Deals still collecting claims, or ones that fell through, stay out of the "to collect" total, so that number is honest.
  • Parcel tracking. There's no tracking API we could use, so the app reads Japan Post's public tracking page and turns each scan into one of six steps, from posted to delivered. Anyone in the deal can check from the deal page, or with /track in the deal's Discord thread. When an organiser's check shows the parcel at Indian customs, the deal moves to its customs phase and each receiver gets a Discord message that their customs payment is due. If an order ships in several parcels, it only counts as delivered once every parcel has arrived.
  • Every photo of the listing. Fetching a listing now pulls every photo the seller uploaded, not just the first. We asked members before building it, and the answer was a clear yes.
  • Split parcels. Members suggested it, because big orders were paying too much in shipping and customs. A deal can now ship in several parcels, each with its own shipping, customs and receiver, and the app works out who owes whom for each one.
  • China group buys. Deals from Chinese shops, priced in yuan and sent to India through a warehouse in Hong Kong. I built it from my memory of a China group buy I once joined, so I asked members to tell me what's missing as they use it.
  • Handing a kit on. If someone can't take a kit after all, they can offer it in the deal and another member can take it over, without the organiser stepping in. Before accepting, the new owner sees exactly what they'll owe, and to whom.
  • Without leaving Discord. /split shows you privately what you owe in a deal, /pay records a payment, and /track posts the parcel's progress to the deal's thread.
  • Wishlist alerts for supporters. As more members used the app, its hosting outgrew the free tier. I wanted a way to help cover that without taking anything away from people who don't pay. Members who chip in can now list up to 50 kits they are hunting for, and the bot sends them a personal message when one is added to a deal, put up for transfer or unclaimed again. A server fund bar on the home page shows how close the month is to covering its hosting. Everything else stays free for everyone, and members responded warmly to the announcement.
  • Private cabinet kits. Members can choose which kits show in their Trophy Cabinet. Every kit stays public until they decide otherwise.
  • Finding a kit faster. Available Kits can be filtered by whether a kit is unclaimed or up for transfer, its origin, the discount, the price and the deal's status, and sorted by discount or price. Open a deal and come back, and your filters, search and scroll position are where you left them, on every list in the app.
  • More shops, and customs fixed. Fetch Price and Fetch Image now work with PayPay Flea Market listings. When India Post's old customs service stopped working, I moved Fetch Customs to ICEGATE, the customs department's own service.
  • Fewer misclicks. Moving a deal to its next stage now asks first, because it pings everyone in the thread. On phones, a tap on a popup's background no longer hits the button underneath, and a failed delete now says why.
  • Group buys beyond Gunpla. Figures, diecast and other group buys get their own Discord threads, with tags that follow the deal as it moves along.
  • No duplicate deals. If someone starts a group buy for a listing that is already running, the app spots it, so members don't end up split across two deals for the same kits.
  • When a deal falls through. An organiser can mark a deal as failed and give the reason, or undo it if things work out. Failed deals archive themselves after a set number of days, so the lists stay clean.

What it looks like

PlamoGB’s home page: “Split Gunpla group buys fairly, from Japan and China to India”, with tiles for creating a group buy, my group buys, my deals, my cabinet, personal spends, kit history, deals, available kits and submitting an item.
FIG 02The home page, with every feature as a plain tile, from creating a group buy to the trophy cabinet.Screenshots of PlamoGB running on my PC with invented test members and deals, 14 Oct 2026. No real member's data.
My trophy cabinet in PlamoGB: kits in the cabinet, how many are built and on the bench, total spent, a backlog progress bar, and cards with box art for kits such as Strike Freedom, Hi-Nu Gundam and GaoGaiGar, each marked built or sealed.
Personal spends: the total you would owe today, committed and probable amounts, money to collect from others, a donut of what is outstanding by phase and a chart of payments over twelve months.
FIG 03Left: my own trophy cabinet, with what's built, what's on the bench and what's still sealed. Right: personal spends, with what you'd owe if you paid for everything today and what others owe you.Left: my own cabinet in PlamoGB, 14 Oct 2026, with the total spent blurred. Right: PlamoGB on my PC with invented test data.
A delivered deal in PlamoGB: its status timeline from adding to delivered, then shipment tracking in six steps from posted to delivered, and the full scan history from a post office in Japan through the foreign post offices in Kolkata and Mumbai to final delivery in India.
FIG 04Tracking on a real deal I was part of, showing every Japan Post scan from posting in Japan through customs in India to delivery, sorted into six steps, with the deal's own status above.A real deal in PlamoGB, 14 Oct 2026, with the organiser's name and the tracking number blurred. The scrolled history is joined into one picture.

1Context

PlamoGB replaced spreadsheets for Plamo India's Gunpla group buys. Members log in with Discord and claim kits. The app splits the deal price, shipping and customs per person in rupees, keeps a three-phase payment ledger with role-based access, and keeps each deal's Discord thread, messages and slash commands in sync.

I co-built it with Vinayak (who owns the repository and the domain) and Yash. Vinayak wrote the foundation, which was the schema, sign-in, split engine, bot base and release pipeline. Yash did a hardening pass and atomic claims. The project began in March 2026 and my first commit was in April.

2Constraints

  • Real money, in rupees, at a moving exchange rate.
  • Discord's deadline. A bot has 3 s to acknowledge a command.
  • Customs and weight-based shipping, with several parcels per order.
  • A second origin country without a second code path.

3What I built

How a deal splits. PlamoGB's split engine, which Vinayak wrote, shares each kit's price by its list price, the shipping by weight, and the customs by each kit's price plus shipping. It never rounds while it splits, so the shares always add up to the bill; amounts are only rounded when they are shown. When a deal ships in several parcels, each parcel's shipping and customs are split among its own kits, and that part is mine. Try it on the app's test deal below.

illustrative

KitPriceby list priceShippingby weightCustomsby price + shippingOwes
HG Schwarzette¥2,000 · 350 g₹3,356.08₹699.71₹350.58₹4,406.37
RG Hi-Nu Gundam¥4,500 · 720 g₹7,551.19₹1,439.39₹777.15₹9,767.73
Action Base 6¥700 · 120 g₹1,174.63₹239.90₹122.27₹1,536.80

Shares add up to ₹15,710.90, the whole bill is ₹15,710.90, left over ₹0.00.

FIG 05Split a group order by moving shipping and customs, and each kit's share follows the three rules. Whatever you choose, the shares add up to the whole bill.The app's own seeded test deal and its split rules. Illustrative, not real members or amounts.

Settlement with an invariant. When a kit changes owner mid-deal, payments are recorded per person, not per kit, so nobody can say which kit a payment covered. The rule first assigns the outgoing owner's payments to their other kits, then credits the transferred kit only with what is left, capped at its own share. This way, the outgoing owner's credit always equals the incoming owner's debt.

illustrative

Outgoing credit always equals incoming debtA kit changes owner during a group buy. The outgoing owner's payments settle their other kits first, so the transferred kit is credited with only what is left, never more than its own share. The incoming owner owes exactly that amount. Outgoing credit equals incoming debt. Amounts shown are illustrative.Outgoing ownerIncoming ownerPaid so far₹3,000Settles their other kits first₹2,200Kit's own share₹1,800Left over: credit on this kit₹800Takes over the kitIts own share₹1,800Owes for the credit moved₹800kit movescredit outdebt in=The two bars are always the same length.Outgoing credit always equals incoming debtA kit changes owner during a group buy. The outgoing owner's payments settle their other kits first, so the transferred kit is credited with only what is left, never more than its own share. The incoming owner owes exactly that amount. Outgoing credit equals incoming debt. Amounts shown are illustrative.Outgoing ownerPaid so far₹3,000Settles other kits first₹2,200Kit's own share₹1,800Credit on this kit₹800kit movesIncoming ownerIts own share₹1,800Owes for the credit moved₹800credit outdebt in=The two bars are alwaysthe same length.
FIG 06How a kit transfer settles. Both sides move together, so what one member is credited always equals what the other owes.Illustrative values, not real members or amounts.

One engine, two countries. China deals reuse the split engine unchanged. Every *_jpy column now means the amount in the deal's currency. An origin profile selects the currency, labels and which Japan-only features apply, and database triggers keep the deal price equal to the sum of the kit prices, so every write path stays correct.

Derived on read. The trophy cabinet is computed live from claimed kits joined to deals. There is no backfill and no copy that can drift. Build state (sealed, building, built) lives in its own rows, created lazily.

Tracking without an API. The app fetches Japan Post's public tracking page, pulls out each row of the history table, and matches its wording to one of six steps. A parcel only moves forward. Its step is the furthest any scan has reached, so a late or out-of-order scan can't send it backwards. Checks happen when someone asks, and are limited to one a minute per person per parcel. The result is saved on the deal, so everyone sees it without fetching again. When an organiser's check finds a new step, the deal moves on. It goes to customs as soon as the first parcel gets there, because the receiver now has a bill to pay, and to delivered only when every parcel has arrived. The thread hears about it, and each parcel's receiver gets a direct message. The price lookup follows the same rules, so it is read-only and rate-limited per person.

4Measurements

These are usage totals from the app's database on 12 Nov 2026, followed by repository numbers as of 10 Oct 2026.

ReadingWhat it shows
36 peopleActive on an average day over the last 30 days.
194 peopleSigned in during the last 30 days.
466 membersSigned in at least once since March.
397 dealsGroup buys that reached shipping or later.
4,972 paymentsPayments recorded between members.
47 lakh rupeesThe total of those payments.
134 releasesTagged releases.
52%My share of the code today, by git blame.

I am not quoting a share of lines added, because that also counts code later rewritten or deleted. Counting only the lines that survive in the code today (git blame), I wrote 52% of the code. Commit counts understate my part, because the release bot made 205 of them. The transfer-settlement rule, the tracking block, the cabinet loader and the origin profiles are the parts I wrote. The usage numbers are totals only, and no member's name, amount or id appears here.

5What broke

  • Discord's deadline. Recording a payment chained several sequential database round trips and could exceed the window. The payer could see "application did not respond" even though the payment had been saved, retry, and so record it twice. The fix acknowledges at once with a deferred response, does the work in waitUntil, and edits the original reply afterwards.
  • One huge route file. Every route lives in one file of 7,509 lines. It works, and it is hard to review.
  • No test suite. Type-checking and manual checks are the only gate. For a money engine that is the wrong way round.
  • Fragile lookups. Pages the app reads for tracking and customs can change without notice, and database read quotas shaped the September optimisation work.

6What I'd change

  • Split the route file by domain, and put tests around the money engine first, starting with the split and settlement functions and then the Discord payment path.
  • Write the settlement invariant as a property test: outgoing credit equals incoming debt for any sequence of transfers and payments.

7Credits and disclosures

  • People: Vinayak (repository owner), Yash and me. The Plamo India admins agreed to this page, and the community's name is used with their permission.
  • Tools: I design, decide and test; AI coding agents help me write code faster.
  • Disclosures: this is an unofficial community tool, and I make no revenue or advertising claims. No real members' names, amounts or ids appear here, and the screenshots use seeded test data or my own account.

hi@amogh.cloud · Resume