belantara.net Open ↗ Has Plan
53
DOM 58 PLN 100 REV 10 EAS 30
plan.md
PREVIEW

Belantara.net — P2P Preloved Marketplace Indonesia

Tagline

"Jual Bekas, Tawar Langsung" — Indonesian P2P marketplace for preloved & unwanted items with AI-powered instant negotiation.

Positioning

Like Mercari/Poshmark/Carousell but Indonesian-native: COD-first, WA-integrated, bahasa Indonesia 100%, with AI @tawar agent that negotiates on buyer's behalf so they don't wait hours for seller response.

Key Differentiator vs belantara.com

belantara.com belantara.net
Product-centric (1 product, many sellers) Listing-centric (1 item = 1 listing, no stock)
New goods, stock-based Preloved/bekas/unwanted new-in-box
Compare prices across sellers Negotiate price with owner
Cart + checkout flow Single-item buy + offer flow
Scraped from Shopee/Tokped User-generated listings + seed data

Market Opportunity

  • Indonesia secondhand apparel: USD 5.2B (2025) -> USD 17.9B (2031), 22.8% CAGR
  • Average Indonesian has 57 unwanted items worth >Rp10M
  • Young buyers (18-24) search preloved 69% more than new
  • No dominant Indonesian-language P2P marketplace (FB Marketplace = generic, OLX = aging, Carousell = SG-centric)

Architecture: 100% Cloudflare

Resource Purpose
Worker Main app (SSR + API)
D1 Primary database
R2 User-uploaded photos
KV (CACHE) Page/query cache
KV (SESSIONS) Auth sessions
Workers AI @tawar negotiation agent, photo analysis, description gen
Cron Listing expiry, stale cleanup, stats

Fork from belantara.com worker-cf, rewrite schema + pages. Keep: layout system, CSS design system (with color palette change), auth (OTP), helpers, CDN image system.


Color Palette (distinct from belantara.com)

belantara.com = Emerald/Gold (marketplace prosperity) belantara.net = Coral/Teal (personal, friendly, P2P warmth)

--coral: #e8604c       (warm, approachable, "deal" energy)
--coral-dark: #c04a38
--coral-light: #fde8e4
--teal: #0d9488        (trust, communication)
--teal-dark: #0f766e
--teal-light: #ccfbf1
--cream: #fdf8f6       (warm background, not cold white)
--card-bg: #fefcfa

D1 Schema Design

Core Tables

-- USERS (buyers & sellers same table, everyone can sell)
users (
  id, phone UNIQUE, name, avatar, city, lat, lng,
  bio, rating_avg, rating_count, listing_count, sold_count,
  wa_verified, ktp_verified, badge_fast_shipper, badge_responsive,
  joined_at, last_active
)

-- LISTINGS (1 item = 1 listing, NO stock)
listings (
  id, slug UNIQUE, user_id (seller),
  title, description, category_id, subcategory_id,
  condition ENUM(baru_segel, seperti_baru, bagus, layak_pakai, butuh_perbaikan),
  price INTEGER (asking price in IDR),
  min_price INTEGER (lowest acceptable, private to seller),
  original_price INTEGER (optional, for "was Rp..." display),
  brand, size, color,
  images TEXT (JSON array of R2 keys, max 12),
  delivery_options TEXT (JSON: {cod: bool, kirim: bool, gosend: bool}),
  shipping_from_city, shipping_from_lat, shipping_from_lng,
  view_count, like_count, chat_count, offer_count,
  status ENUM(active, reserved, sold, deleted, expired),
  featured_until (paid bump expiry),
  expires_at (auto-expire after 30 days if not renewed),
  created_at, updated_at
)

-- CATEGORIES (2-level: parent + sub)
categories (
  id, parent_id, name, name_en, slug UNIQUE, icon,
  listing_count
)

-- OFFERS / NEGOTIATIONS
offers (
  id, listing_id, buyer_id, seller_id,
  amount INTEGER (offered price),
  counter_amount INTEGER (seller counter),
  status ENUM(pending, accepted, countered, declined, expired, withdrawn),
  message TEXT (buyer's note),
  ai_handled INTEGER DEFAULT 0 (was this auto-responded by @tawar agent?),
  ai_response TEXT (what AI said),
  expires_at (24h auto-expire),
  created_at, updated_at
)

-- CHATS (in-app messaging between buyer & seller per listing)
chats (
  id, listing_id, buyer_id, seller_id,
  created_at
)

chat_messages (
  id, chat_id, sender_id,
  message TEXT, type ENUM(text, offer, image, system),
  offer_id (link to offers table if type=offer),
  is_read INTEGER DEFAULT 0,
  created_at
)

-- ORDERS (after offer accepted or buy-now)
orders (
  id, order_code UNIQUE, listing_id,
  buyer_id, seller_id,
  amount INTEGER, shipping_cost INTEGER,
  delivery_method ENUM(cod, kirim, gosend),
  payment_method, payment_status ENUM(pending, paid, escrow, released, refunded),
  order_status ENUM(new, confirmed, shipped, delivered, completed, disputed, cancelled),
  midtrans_order_id, midtrans_payment_url,
  shipping_tracking, meetup_location, meetup_time,
  buyer_confirmed_at, auto_release_at (72h after delivery),
  notes, created_at, updated_at
)

-- REVIEWS (after order completed)
reviews (
  id, order_id, listing_id,
  reviewer_id (buyer), reviewed_id (seller),
  rating 1-5, comment, images,
  created_at
)

-- LIKES / SAVES (wishlist + "offer to likers")
likes (
  id, user_id, listing_id, created_at,
  UNIQUE(user_id, listing_id)
)

-- REPORTS (fraud/spam flagging)
reports (
  id, reporter_id, listing_id, user_id,
  reason ENUM(palsu, spam, penipuan, barang_terlarang, lainnya),
  description, status ENUM(pending, reviewed, actioned),
  created_at
)

-- WA CONVERSATIONS (AI chat state)
wa_conversations (phone PK, name, city, state, context, last_active)

-- OTP
otp_requests (id, phone, code_hash, expires_at, attempts, verified, purpose, created_at)

-- SEARCH HISTORY (for trending)
search_log (id, query, result_count, user_id, created_at)

@tawar AI Agent — The Killer Feature

How It Works

  1. Buyer opens listing -> sees asking price Rp500.000
  2. Buyer taps "Tawar" -> enters offer Rp350.000 + optional message
  3. System checks seller's min_price (private):
    • If offer >= min_price: AUTO-ACCEPT, notify both parties
    • If offer < min_price but within 20%: AI counter-offers at min_price
    • If offer < 50% of asking: AI politely declines with "harga terlalu rendah"
    • If seller is offline >1h: AI handles negotiation using seller's price preferences
  4. Seller gets WA notification with offer details + can override AI decision
  5. If accepted: listing status -> reserved, buyer has 24h to pay

AI Prompt Context

Kamu adalah agen negosiasi untuk {seller_name} di Belantara.net.
Barang: {title}, Kondisi: {condition}, Harga: Rp{price}
Harga minimum yang bisa diterima: Rp{min_price}
Pembeli menawar: Rp{offer_amount}
Pesan pembeli: {message}

Aturan:
- Jika tawaran >= harga minimum, TERIMA
- Jika tawaran 80-99% dari harga minimum, COUNTER di harga minimum
- Jika tawaran < 80% harga minimum, TOLAK dengan sopan
- Selalu gunakan bahasa Indonesia yang ramah dan kasual
- Jangan pernah ungkapkan harga minimum ke pembeli

@tawar via WhatsApp

Buyer can also send @tawar [listing-id] [harga] via WA to the Belantara.net bot.


Pages & Routes

Route Page Description
/ Home Hero, trending, newest, categories
/cari?q=&cat=&kondisi=&kota=&sort=&hmin=&hmax= Search Filtered listing grid
/kategori Categories All categories grid
/kategori/:slug Category Listings in category
/barang/:slug Listing Detail Photos, price, seller, offer button, similar items
/jual Post Listing Photo upload + AI auto-fill form
/jual/:id/edit Edit Listing Edit existing listing
/chat Inbox All conversations
/chat/:id Chat Thread Messages with buyer/seller
/profil/:slug User Profile Public profile, listings, reviews
/profil/saya My Profile Dashboard, my listings, orders, stats
/pesanan Orders Buy/sell order history
/pesanan/:code Order Detail Status tracking
/checkout/:listing_id Checkout Pay for accepted offer
/akun Account Settings Profile edit, preferences

API Routes

Endpoint Method Description
/api/listings GET Search/filter listings
/api/listings POST Create listing (auth)
/api/listings/:id GET Listing detail
/api/listings/:id PUT Update listing (auth, owner)
/api/listings/:id DELETE Delete listing (auth, owner)
/api/listings/:id/like POST Like/unlike toggle
/api/listings/:id/offer POST Make an offer
/api/offers/:id PUT Accept/counter/decline offer
/api/upload POST Upload photos to R2
/api/chat/:listing_id GET/POST Get/send messages
/api/orders POST Create order
/api/orders/:code GET/PUT Order detail/update
/api/users/me GET/PUT Profile
/api/users/:slug GET Public profile
/api/auth/otp/request POST Request OTP
/api/auth/otp/verify POST Verify OTP, get JWT
/api/tawar POST AI negotiation endpoint
/api/webhooks/midtrans POST Payment callback
/api/wa/webhook POST WA relay webhook
/api/admin/* * Admin endpoints

Seed Data Strategy

From Shopee & Tokopedia Preloved Sections

Scrape active preloved/bekas listings (NOT store inventory) from:

  1. Shopee — filter by condition=used or category "Preloved"

    • Fashion Wanita Preloved
    • Fashion Pria Preloved
    • HP & Gadget Bekas
    • Sepatu Bekas
    • Tas Preloved
  2. Tokopedia — filter by condition=2 (Bekas/Used)

    • Same categories as above

What to Scrape per Listing

  • title, description, price, images (1-4)
  • condition label
  • category
  • seller name, city, rating
  • sold count (if available)

Seed Import Strategy

  • Create synthetic users from seller data (name, city, rating)
  • Convert each scraped item to a listing (1 item each)
  • Mark as platform_source: shopee|tokopedia for attribution
  • ~2,000-5,000 listings across top 6 categories for launch

Top Categories for Seed (15 parent, ~60 sub)

1. Fashion Wanita (Atasan, Celana, Dress, Jaket, Sepatu, Tas, Aksesoris, Hijab)
2. Fashion Pria (Kemeja, Celana, Sepatu, Sneakers, Jaket, Tas, Jam Tangan)
3. HP & Gadget (Smartphone, Tablet, Earphone, Charger, Casing, Smartwatch)
4. Elektronik (Laptop, TV, Speaker, Kamera, Konsol Game)
5. Kecantikan (Skincare, Makeup, Parfum, Hair Care, Tools)
6. Bayi & Anak (Baju Bayi, Stroller, Mainan, Perlengkapan)
7. Rumah & Dapur (Perabot, Dekorasi, Alat Masak, Storage)
8. Buku & ATK (Novel, Buku Pelajaran, Komik, Majalah, ATK)
9. Olahraga (Sepeda, Gym, Outdoor, Jersey, Sepatu Olahraga)
10. Hobi & Koleksi (Action Figures, Lego, Board Games, Vinyl, Koin)
11. Otomotif (Sparepart, Aksesoris Mobil, Aksesoris Motor, Helm)
12. Gaming (Konsol, Game Bekas, Aksesoris, PC Parts)
13. Muslim Fashion (Gamis, Koko, Mukena, Sajadah, Peci)
14. Luxury & Vintage (Tas Branded, Jam Mewah, Antik, Vintage)
15. Lainnya (Tiket, Voucher, Alat Musik, Pet Supplies)

UI Design Spec (Mobile-Native, fork belantara.com patterns)

Bottom Nav (5 tabs)

  1. Beranda (home icon) — feed
  2. Cari (search icon) — search + filters
  3. + Jual (camera icon, coral FAB) — post listing (center, prominent)
  4. Chat (bubble icon + unread badge) — inbox
  5. Profil (person icon) — my profile/dashboard

Listing Card (2-col grid)

+------------------+
| [PHOTO 4:5]      |
| "SEPERTI BARU"   | (condition badge, top-left overlay)
| "2 jam lalu"     | (time badge, top-right)
+------------------+
| Rp 350.000       | (price, bold)
| ~~Rp 500.000~~   | (original price, strikethrough)
| Kaos Nike Dri... | (title, 2 lines max)
| Jakarta Selatan  | (city, small gray)
| ♡ 5  💬 2       | (likes, chats count)
+------------------+

Listing Detail Page

[PHOTO CAROUSEL with dots]
[Share] [Like ♡]

Rp 350.000  (kondisi: Seperti Baru)
~~Harga Asli: Rp 500.000~~ -30%

Kaos Nike Dri-FIT Original
"Beli di store, cuma pakai 2x, ukuran kebesaran..."

Kategori: Fashion Pria > Kaos
Ukuran: L | Warna: Hitam
Pengiriman: COD, JNE, GoSend

── Penjual ──
[Avatar] @budisport (★4.8, 23 terjual)
Jakarta Selatan | Online 5 menit lalu
[Chat] [Lihat Profil]

── Barang Serupa ──
[horizontal scroll of similar items]

═══════════════════════
[STICKY BOTTOM BAR]
[Chat Penjual] [Tawar 💬] [Beli Langsung]
═══════════════════════

Offer/Tawar Flow (bottom sheet)

┌─────────────────────────┐
│ Tawar Harga             │
│                         │
│ Harga penjual: Rp350.000│
│                         │
│ Tawaran kamu:           │
│ [Rp ___________]       │
│                         │
│ Pesan (opsional):       │
│ [_________________]     │
│                         │
│ [Kirim Tawaran]         │
│                         │
│ AI @tawar akan bantu    │
│ negosiasi jika penjual  │
│ tidak online             │
└─────────────────────────┘

Post Listing Flow (full-screen)

Step 1: [Take Photo / Gallery] (up to 12 photos)
        AI auto-analyzes first photo...

Step 2: [Title] (AI pre-filled)
        [Description] (AI pre-filled)
        [Category] (AI suggested)
        [Condition ▼] (5 options)
        [Brand] (optional)
        [Size] (optional)
        [Color] (optional)

Step 3: [Harga Jual: Rp ____]
        [Harga Minimum: Rp ____] (opsional, rahasia)
        "AI @tawar otomatis tolak tawaran di bawah harga minimum"

        [Harga Asli: Rp ____] (opsional, untuk diskon display)

Step 4: [Pengiriman ✓]
        ☑ COD / Ketemuan
        ☑ Kirim (JNE/J&T/SiCepat)
        ☑ GoSend/GrabExpress (sekota)

        Lokasi: [Kota ▼]

Step 5: [PASANG IKLAN] 🎉

Phases

Phase 1 — MVP Core (this session)

  • CF resources (D1, R2, KV x2)
  • Schema + seed categories
  • Fork belantara.com layout (new colors, new nav)
  • Homepage (trending, newest, categories)
  • Search/filter page
  • Listing detail page
  • Category pages
  • User profile page (public)
  • Auth (OTP via WA)
  • Post listing flow (photos to R2 + AI auto-fill)
  • @tawar offer system (core logic)
  • AI negotiation agent
  • Like/save listings
  • Scraper: Shopee + Tokped preloved data
  • Seed 2,000-5,000 listings
  • SEO (sitemap, robots, structured data, OG, llms.txt)
  • PWA manifest + SW
  • Deploy to belantara.net custom domain

Phase 2 — Chat & Orders

  • In-app chat (per-listing buyer<>seller)
  • Order flow (Midtrans Snap payments)
  • Escrow (hold funds until buyer confirms)
  • COD meetup coordination
  • Shipping tracking
  • Review system (post-order)
  • WA notifications (new offer, message, order update)

Phase 3 — Growth & Monetization

  • Listing bumps (paid promotion Rp5K-20K)
  • "Offer to Likers" (price drop notifications)
  • Trending search + autocomplete
  • Similar items (Workers AI embeddings)
  • Push notifications
  • User badges (Penjual Cepat, Responsif, Terpercaya)
  • KTP verification
  • Report/flag system
  • Admin dashboard

Phase 4 — Community & Viral

  • Share cards (auto-generated OG image per listing)
  • WA @tawar bot (negotiate via WhatsApp)
  • Stories-style "Just Listed" feed
  • Follower system
  • Seller analytics
  • Smart Pricing (auto price-drop over time)
  • Programmatic SEO (city x category pages)
  • TikTok-style vertical video listings

Monetization Model

Revenue Stream Price Notes
Listing bumps (Angkat) Rp5,000-20,000 Push to top of feed for 24-48h
Spotlight (Sorotan) Rp25,000 Featured banner on category page
Transaksi Aman fee 5% of sale Escrow protection on shipped items
COD/Direct FREE No fee, no protection

Tech Decisions

  1. Midtrans NOT Xendit — Midtrans Snap for payments (same as bitmine.id, better QRIS support)
  2. No cart — Single-item checkout only (P2P = 1 item at a time)
  3. R2 for photos — User uploads go to R2, served via Worker with wsrv.nl CDN
  4. Workers AI for everything — Photo analysis, description gen, @tawar negotiation (Llama 3.3 70B, free)
  5. OTP via japri-wa-relay — Same auth pattern as belantara.com
  6. JWT auth — Same as belantara.com (HS256, 7-day expiry)

⚙ HARD CONSTRAINTS (enforced for all sites)

This domain MUST operate within these constraints — no exceptions:

  • 100% Cloudflare serverless — Workers + D1 + R2 + KV + Workers AI + Vectorize. NEVER PM2, NEVER VPS, NEVER Docker in production path.
  • 100% AI-automated — every customer interaction, every moderation decision, every transaction reconcile = AI. No manual queue, no live human chat support, no physical fulfillment.
  • 1-operator solo — one person can run the entire operation from a phone. No team meetings, no shared inbox, no shift rotation.
  • WhatsApp AI bot for all support (24/7, instant response, no SLA promises that need humans).
  • Mayar QRIS for all Indonesian payments (subscription auto-renew, no manual invoicing).
  • Indonesian UI primary — bahasa-first, English fallback only where unavoidable.
  • Privacy — opt-in only, delete-on-request honored within 24h (cron-driven).
  • No physical goods, no inventory — digital products + affiliate referrals only.

If the plan above describes any flow that violates these constraints, treat the plan as ASPIRATIONAL only and rework before building. The constraint trifecta wins.

AI ASSISTANT

Ask AI to research, improve, or generate content.

Try: "Research competitors for this niche"

Actions