Version: 1.3.0 — see
CHANGELOG.mdfor history. Older snapshots live underversions/. The visual reference prototype is inreference/.
Kemah is a trip-planning app for group camping trips: packing checklist, budget tracking with split-bill settlement, participant management, invites, and social sharing. This package documents an interactive HTML prototype (reference/Kemah Travel App.dc.html, included for reference) so it can be rebuilt as a real iOS app.
The bundled HTML file is a design reference prototype, not production code. It was built as a single-file interactive mock to validate flows and logic (especially the split-bill math). The task is to recreate this experience in the target codebase’s real environment (SwiftUI recommended for iOS-only; React Native/Flutter if Android is also planned) using that platform’s native components and patterns — not to embed or wrap the HTML.
Note: the v1.1.0 personal-expense and personal-item-privacy features (see the changelog) are not shown in the reference prototype — they were added after it. Build them from this document, not the HTML.
High-fidelity for structure and logic, medium-fidelity for visual polish. Colors, type, spacing, and copy are final enough to build from directly, but treat them as a strong starting point rather than pixel law — prefer the target platform’s native controls (nav bars, sheets, share sheets, date pickers) over recreating custom HTML chrome.
Color (defined as CSS oklch(), convert to the nearest sRGB hex in-platform):
oklch(0.985 0.006 80) — warm off-whiteoklch(0.24 0.02 50) — warm near-blackoklch(0.55 0.02 50) / oklch(0.5 0.02 50)oklch(0.6 0.02 50)#fff on the warm backgroundoklch(0.68 0.19 45)oklch(0.62 0.15 150)oklch(0.6 0.16 250)oklch(0.95 0.03 45) (matching hue per theme)oklch(0.55 0.13 150) (green)oklch(0.6 0.17 45) (orange/red)oklch(0.7 0.19 45), oklch(0.65 0.15 150), oklch(0.65 0.15 240), oklch(0.62 0.16 320), oklch(0.6 0.14 20)oklch(0.6 0.02 50) (offline) / oklch(0.65 0.15 150) (online)Typography
ui-rounded, "SF Pro Rounded", system-ui (iOS: use SF Pro Rounded directly), weight 600–700system-ui (iOS: SF Pro Text/Display), weight 400–600Spacing / shape
0 1px 2px rgba(0,0,0,0.04–0.06) + occasional 0 6–8px 20px rgba(0,0,0,0.05–0.2) for elevated elements (FAB, trip cards)Sign in with Apple + Google Sign-In SDK buttons per each provider’s HIGwa.me/<phone> deep link) pill buttons. [v1.2.0] Cover height ~230pt, ScrollView ignores top safe area.Checklist tab
pic not null/empty). Caption: “Butuh PIC — yang bertanggung jawab bawa”. These are shared gear items where one participant is responsible.pic null/empty). Caption: “Dibawa masing-masing peserta sendiri — nggak perlu PIC”. Personal (isPersonal: true) items naturally land here since they never carry a PIC.isPersonal flag is now implicit: personal items (no PIC by definition) always appear in Pribadi.isPersonal: true carry a server-set owner and are returned only to that owner. Other participants never see them. Personal items count toward the owner’s own progress total only.isPersonal: true pre-set (private, no PIC).Budget tab
owner, filtered per token), tagged “Pribadi”, with a lock hint (“Hanya terlihat olehmu · tidak dibagi ke peserta lain”)[↔] Split Bill [›]. Casts an upward shadow. A floating “+” FAB (bottom-right, above the bar) opens the add expense sheet. Tapping the bar → pushes the dedicated Split Bill screen.Peserta tab
isPersonal: true) are excluded entirely from every calculation on this screen.Each expense item has: name, price, paidBy (who fronted the money — always set), pic (optional — who/what group the cost belongs to, only meaningful in “Per PIC” mode), splitMode ('orang' |
'pic'), and [v1.1.0] isPersonal (bool) + owner (set when personal). |
Step 0 — exclude personal (v1.1.0). Before any split math, drop every item with isPersonal: true. Personal expenses are private to their owner and never split, pooled, or netted. Only group expenses (isPersonal: false) enter the algorithm below.
Per Orang items (e.g. shared food): pooled together (sharedSpent). Each participant’s fair share = sharedSpent × (their headcount / sum of all participants' headcount). Bigger families/groups (higher headcount) pay proportionally more. Credited to whoever’s paidBy.
Per PIC items split into three cases based on pic and paidBy:
pic blank/nil) — e.g. a flat per-group cost like car rental. Pooled together (picSpent) and divided flatly by number of participants (picSpent / participantCount) — headcount is ignored here, every participant pays the same flat share regardless of group size.pic set and equal to paidBy, non-empty) — excluded from all settlement. The person already paid for their own cost; no redistribution to other participants. These items do not enter the pool and generate no transfer. Example: Irma pays her own ticket and marks pic = paidBy = "Irma".pic set and different from paidBy) — e.g. Dinda paid a specific expense that belongs entirely to Rangga’s family. NOT pooled or split — a fixed 1:1 debt: pic owes paidBy the full item price.Settlement calculation
pic == paidBy) — they are already settled and must not enter any pool or debt.balance = (Per-Orang contribution − Per-Orang fair share) + (pooled Per-PIC contribution − flat Per-PIC share).min(|debt|, credit), reduce both, continue until all balances are ~0. This minimizes the number of transactions (standard “splitwise” settlement algorithm).Thresholds: balances within ±1000 are considered “Lunas” (settled); the greedy matcher ignores amounts ≤ 500.
0 → 62 country code) and rendered as a WhatsApp deep link (https://wa.me/<number>)Trip {
id, name, location, dateLabel, mapLink, phone, coverId (photo ref),
status: 'upcoming' | 'selesai',
budgetTarget: number,
budgetMode: 'manual' | 'auto',
ownerId: string, // userId pembuat trip (v1.7.0)
participants: [{ id, userId?, name, picForLabel (role), headcount }], // userId added (v1.7.0)
items: [{ name, qty, pic, note, checked, isPersonal, owner? }], // owner set for personal items (v1.1.0)
budgetItems: [{ name, price, pic, paidBy, splitMode, isPersonal, owner? }] // isPersonal + owner added (v1.1.0)
}
items[].owner / budgetItems[].owner (v1.1.0): set (server-side, from the auth token) when isPersonal: true; null for shared/group entries. The backend must return personal entries only to their owner. The client must never render another user’s personal entries.Trip.ownerId (v1.7.0): userId dari pembuat trip, di-set saat POST /trips, tidak bisa diubah. Dipakai untuk enforce: hanya owner yang bisa hapus peserta lain, dan owner tidak bisa keluar dari trip (harus hapus trip).Participant.userId (v1.7.0): null untuk peserta yang ditambahkan manual by name. Diisi saat peserta join via invite link yang terauthentikasi. iOS client bandingkan userId peserta dengan store.user?.id untuk tahu siapa diri sendiri di list.[v1.7.0] Aturan manajemen peserta:
DELETE /participants/:id): hanya owner trip. Tidak bisa hapus diri sendiri via endpoint ini.DELETE /participants/me): semua peserta kecuali owner. iOS tampilkan tombol “Keluar dari Trip” di tab Peserta hanya untuk non-owner. Owner tidak tampilkan tombol ini.reference/Kemah Travel App.dc.html — the full interactive prototype (single file: template + state/logic). Read the <script data-dc-script> block for the exact settlement math (computeTransfers, buildTripView) if any behavior above is ambiguous. (Reflects v1.0.0 scope; no personal-privacy features.)Data di bawah adalah seed yang digunakan MockRepository di iOS app. Backend developer dapat menggunakan ini untuk seed database awal agar iOS app langsung bisa konek dan menghasilkan settlement yang deterministic dan bisa diverifikasi.
Logged-in user (default mock session)
{ "id": "u_irma", "name": "Irma", "email": "irma@example.com", "avatarUrl": null }
{
"id": "t1",
"name": "Camping Gunung Papandayan",
"location": "Garut, Jawa Barat",
"date": "2026-08-01",
"coverUrl": null,
"mapLink": "https://maps.google.com/?q=Gunung+Papandayan",
"phone": "081234567890",
"status": "upcoming",
"budgetTarget": 1200000,
"budgetMode": "manual"
}
Participants | id | name | picForLabel | headcount | |—|—|—|—| | p_irma | Irma | Koordinator | 3 | | p_yuki | Yuki | PIC Tenda | 4 | | p_pepi | Pepi | PIC Memasak | 4 | | p_ria | Ria | PIC Tiket & Logistik | 3 |
Checklist Items (group — visible to all) | id | name | qty | pic | note | checked | |—|—|—|—|—|—| | i1 | Tenda dome 4 orang | 1 | Yuki | cek patok & pasak lengkap | ✓ | | i2 | Matras alas tenda | 4 | Pepi | | | | i3 | Flysheet / terpal | 1 | Yuki | pinjam punya Doni | | | i4 | Palu & pasak cadangan | 1 | Yuki | | | | i5 | Kompor portable + gas | 1 | Pepi | | ✓ | | i6 | Nesting alat masak | 1 | Pepi | udah punya | ✓ | | i7 | Bahan makanan 3 hari | 1 | Ria | | | | i8 | Air minum galon | 2 | Pepi | | | | i9 | Tiket masuk kawasan | 4 | Ria | beli online H-3 | ✓ | | i10 | Tiket parkir kendaraan | 1 | Yuki | | | | i11 | Retribusi camp ground | 1 | Ria | | |
Checklist Items (personal — private, visible only to owner) | id | name | qty | owner | note | |—|—|—|—|—| | i12 | Baju ganti & jaket hangat | 3 | Irma | sesuaikan cuaca | | i13 | Alat mandi pribadi | 1 | Irma | | | i14 | Obat pribadi | 1 | Irma | jangan lupa obat alergi | | i15 | Kamera & tripod | 1 | Yuki | punya Yuki |
Budget Items (group) | id | name | price (Rp) | paidBy | pic | splitMode | keterangan | |—|—|—|—|—|—|—| | b1 | Tenda dome 4 orang | 150.000 | Irma | Yuki | pic | Direct debt — Yuki owes Irma | | b2 | Sewa mobil | 200.000 | Irma | null | pic | Pooled flat (per KK) | | b3 | Kompor portable + gas | 85.000 | Pepi | null | orang | Pooled per headcount | | b4 | Bahan makanan 3 hari | 250.000 | Ria | null | orang | | | b5 | Air minum galon | 30.000 | Pepi | null | orang | | | b6 | Tiket masuk kawasan | 320.000 | Ria | null | orang | | | b7 | Tiket parkir kendaraan | 20.000 | Yuki | null | orang | | | b8 | Retribusi camp ground | 50.000 | Ria | null | orang | | | b9 | Bensin & tol | 100.000 | Yuki | null | orang | |
Budget Items (personal — private, not split) | id | name | price (Rp) | paidBy | owner | |—|—|—|—|—| | bp1 | Jajan & kopi | 45.000 | Irma | Irma | | bp2 | Oleh-oleh keluarga | 120.000 | Irma | Irma | | bp3 | Sewa kamera | 90.000 | Yuki | Yuki |
Data riil dari CSV pengeluaran grup Zenk, Malang 19–21 Jun 2026.
{
"id": "t2",
"name": "Trip Zenk: Malang",
"location": "Malang, Jawa Timur",
"date": "2026-06-19",
"coverUrl": null,
"mapLink": "https://maps.google.com/?q=Malang+Jawa+Timur",
"phone": null,
"status": "selesai",
"budgetTarget": 9653877,
"budgetMode": "auto"
}
Participants | id | name | picForLabel | headcount | |—|—|—|—| | p_irma | Irma | Koordinator | 3 | | p_yuki | Yuki | PIC Dokumentasi | 4 | | p_devi | Devi | PIC Konsumsi | 4 | | p_ria | Ria | PIC Tiket & Logistik | 3 |
Checklist Items | id | name | qty | pic | note | checked | |—|—|—|—|—|—| | j1 | Tiket Jatim Park 3 | 14 | Ria | beli online H-3 | ✓ | | j2 | Tiket Museum Angkut | 14 | Ria | | ✓ | | j3 | Tiket Taman Safari Prigen | 14 | Ria | | ✓ | | j4 | Tiket Wisata Kebun Apel | 14 | Ria | | ✓ | | j5 | Villa | 1 | Devi | 3 malam | ✓ | | j6 | Bekal & bahan masak | 1 | Ria | | ✓ | | j7 | Snack & minuman | 1 | Yuki | | ✓ |
Budget Items — Pengeluaran Bersama (flat per KK → splitMode: "pic", pic: null)
| id | name | price (Rp) | paidBy |
|—|—|—|—|
| m1 | Villa | 1.000.000 | Devi |
| m2 | Bekal | 288.500 | Ria |
| m3 | Snack | 137.500 | Yuki |
| m4 | Perkap bento & masak | 97.500 | Yuki |
| m5 | Snack klethikan | 91.000 | Yuki |
| m6 | Makan sopir | 136.000 | Ria |
| m7 | Parkir | 95.000 | Ria |
| m8 | Aqua & rokok | 82.000 | Ria |
| m9 | Beras | 36.000 | Irma |
| m10 | Telur | 50.000 | Devi |
| m11 | Snack (Devi) | 30.000 | Devi |
| m12 | Parkir soto | 10.000 | Devi |
| m13 | Parkir apel | 15.000 | Devi |
| m14 | Parkir bebek | 5.000 | Devi |
| m15 | Wisata Kebun Apel | 325.000 | Ria |
Budget Items — Tiket HTM (splitMode: "pic", direct debt — semua dibayar Irma)
pic == paidBy= pooled per-PIC (Irma menanggung bagiannya sendiri).pic != paidBy= direct debt (pic owes Irma penuh).
| id | name | price (Rp) | paidBy | pic |
|---|---|---|---|---|
| m16a | Jatim Park 3 – Devi | 673.143 | Irma | Devi |
| m16b | Jatim Park 3 – Ria | 504.857 | Irma | Ria |
| m16c | Jatim Park 3 – Irma | 504.857 | Irma | Irma |
| m16d | Jatim Park 3 – Yuki | 673.143 | Irma | Yuki |
| m17a | Museum Angkut – Devi | 440.000 | Irma | Devi |
| m17b | Museum Angkut – Ria | 330.000 | Irma | Ria |
| m17c | Museum Angkut – Irma | 330.000 | Irma | Irma |
| m17d | Museum Angkut – Yuki | 440.000 | Irma | Yuki |
| m18a | Safari Prigen – Devi | 822.842 | Irma | Devi |
| m18b | Safari Prigen – Ria | 617.132 | Irma | Ria |
| m18c | Safari Prigen – Irma | 617.132 | Irma | Irma |
| m18d | Safari Prigen – Yuki | 766.272 | Irma | Yuki |
Budget Items — Makan (splitMode: "orang", per headcount)
| id | name | price (Rp) | paidBy |
|—|—|—|—|
| m20 | Ayam Rocket | 264.000 | Irma |
| m21 | Soto | 272.000 | Ria |
Total group budget Trip 2: Rp 9.653.877 (budgetMode: auto → target = sum aktual)