Show original
Try the app

LINEだけで完結する飲み会アプリ|まるっと飲み会くん
Enjoyed this article?
Support しん@インフラエンジニア

AI translation
This is an app that handles everything from scheduling to splitting bills within LINE alone. I will explain how we achieved the key point of not requiring participants to install anything.
Try the app

LINEだけで完結する飲み会アプリ|まるっと飲み会くん
Enjoyed this article?
Support しん@インフラエンジニア
Drinking parties don't go by the textbook. Someone shows up late, or someone who said they'd come can't make it. Different people pay in the first round versus the second round, and sometimes seniors contribute more. Some people hand over cash on the spot, while others send money later.
But tools usually only handle one of these things. They schedule dates, or they calculate splits. So the moment reality deviates even slightly, you end up back to doing things by hand.
What I wanted to build was something that wouldn't break even when things went off-script. From deciding the date, to picking a restaurant, to splitting the bill, to completing transfers, to confirming everyone received their money. I wanted to bundle all of that into one thing, and without making participants install anything—just have it arrive in their regular LINE. Making these two things work at the same time was the goal.
The spark came from a friend's comment: "Scheduling is such a pain, just make an app that does it quick."
So I think it wasn't so much about making the organizer's job easier, but lowering the barrier to opening a drinking party in the first place. When someone thinks "I want to grab drinks soon," I didn't want the hassle afterward to stop them.
Scheduling and settling money—these are usually done with separate tools, and participants have to open the URLs they're sent each time. The money side is even more primitive; reading reviews of split-bill apps, you see comments like "I wrote amounts in a memo and calculated with a calculator." And when advances cross between the first and second rounds, you can't calculate on the spot who owes whom how much.
The goal was to finish all of it within LINE, the one app everyone opens every day.
When you add the bot as a friend, a scheduling card arrives in LINE. You answer the candidate dates with "going / maybe / not going," and the day with the most people gets decided. You can search for restaurants too. When you enter the bill, the split gets calculated and a settlement card arrives, and you can proceed straight to the PayPay transfer screen. Participants don't install an app.
I focused on two things. One is completing both scheduling and splitting in the same LINE chat. Most apps only do one, and they send URLs for people to open. The other is withstanding reality's chaos. If people are added or drop out, if there's unequal splits, if non-LINE guests are mixed in, if advances cross—the calculation doesn't break.
Making this "doesn't break" work was the hardest part.
Cancellation across multiple rounds. If A pays for the first round and B pays for the second, they both end up billing each other. At first I had people return money directly to whoever advanced it, but then the same person had to send to multiple people separately. Now I combine everyone's amounts, cancel them out, and only one person sends the remaining difference.
Guaranteeing money correctness. When people are added or removed, splits are unequal, there are rounding issues, and treats are mixed in, several paths emerge where the totals don't match. So the split calculation has a test that runs massive randomly-generated inputs to verify "the amount collected always equals the amount distributed." I also set it up so CI turns red if a screen handling money gets added without verification.
Amounts don't change after confirmation. The moment the organizer presses confirm, "who owes whom how much" is locked in, and no one's actions can change it afterward. This prevents accidents where the amount to send and the amount to receive diverge during settlement.
飲み会は、教科書どおりには進みません。あとから1人増えるし、直前に来られなくなる人も出ます。1次会と2次会で払った人が違うこともあれば、先輩が多めに出すこともあります。その場で現金を渡した人と、あとで送る人が混ざることもあります。
ところが道具の側は、たいていそのうちの1つしか面倒を見てくれません。日程を決めるだけ、割り勘を計算するだけ。だから現実が少しでもそこから外れた瞬間に、結局は手作業へ戻ることになります。
作りたかったのは、そこから外れても崩れないものでした。日程を決めるところから、店を選んで、割り勘して、送金が終わって、全員が受け取ったと分かるまで。その全部を1つにまとめて、しかも参加する人には何もインストールさせず、いつものLINEに届くようにする。この2つを同時に成立させることが目標でした。
きっかけは、友だちの一言でした。「日程調整とかだるいから、パッとできるアプリ作ってよ」。
だから、幹事をラクにしたかったというより、飲み会を開くハードルそのものを下げたかったんだと思います。誰かが「そろそろ飲みたいな」と思ったときに、そこから先の面倒で止まらないようにしたかった。
日程を決めるところと、お金を精算するところ。この2つは別々のツールでやることが多くて、参加する人はそのたびに送られてきたURLを開きに行きます。お金の方はもっと素朴で、割り勘アプリのレビューを読むと「メモ帳にお金をつけて、電卓で計算していた」という声が並びます。しかも立て替えが1次会と2次会で交差すると、誰が誰にいくら返すのかは、その場では計算しきれません。
その全部を、みんなが毎日開いているLINEの中だけで終わらせたい、というのが目標でした。
友だち追加すると、日程調整のカードがLINEに届きます。候補日に「行く・キープ・行かない」で答えると、一番集まる日が決まります。お店も探せます。会計を入れると割り勘が計算されて精算のカードが届き、そのままPayPayの送金画面へ進めます。参加する人はアプリを入れません。
こだわったのは2つです。1つは、日程と割り勘を同じLINEのトークで完結させること。多くのアプリは片方だけで、しかもURLを配って相手に開いてもらいます。もう1つは、現実の崩れに耐えること。人が増えても減っても、傾斜割り勘でも、LINEにいないゲストが混ざっても、立て替えが交差しても、計算が崩れません。
この「崩れない」を成立させる所が、一番難しかったです。
何次会もまたぐ相殺。 1次会をAが、2次会をBが払うと、2人はお互いに請求し合います。最初は立て替えた人に直接返す形にしましたが、同じ人が何人にも別々に送る羽目になりました。いまは全員ぶんをまとめて打ち消してから、残った差額だけを1回送ります。
お金の正しさの保証。 人の増減・傾斜・端数・おごりが混ざると、合計が合わなくなる筋がいくつも生まれます。だから割り勘の計算には、乱数で作った大量の入力を流して「集めた額と配った額が常に一致するか」を確かめるテストを置いています。お金が動く画面が検証されないまま増えると、CIが赤くなる仕組みも入れました。
確定後に金額が動かないこと。 幹事が確定を押した瞬間に「誰が誰にいくら」が固定され、以後は誰の操作でも変わりません。精算の途中で金額が編集されて、送る額と受け取る額が食い違う事故を防ぐためです。