Formosa ESG 2026 — User Flow Diagram

v2.0 | 2026-03-30 | paulkuo.tw | Pilgrim Side
LINE-Related
Main Flow
Data / Server
Level / Achievement
Carbon Footprint
1
Open Page
User enters Tracker via QR Code or LINE Rich Menu
📱 QR Code Scan
Physical posters / social sharing links
💬 LINE Rich Menu
LINE Bot @539fkwjd bottom buttons
2
LINE Login LIFF SDK
LIFF auto-triggers LINE Login, no password/registration needed
LIFF init → check login status → auto-fetch LINE avatar & name
First login auto-creates user in D1 (formosa_users upsert)
Locally store formosa_user_id + formosa_access_token
Already logged in?
✅ Yes
Auto-display avatar + name, enter directly
❌ No
Redirect to LINE auth page → return to Tracker after auth
3
Privacy Consent + AuthGate
Explain data collection, get user consent before unlocking features
Collection items: LINE personal data, GPS trajectory, survey responses, daily carbon reports
Photos only read EXIF GPS (not uploaded to server)
User can anytime tap "Complete Pilgrimage" to stop tracking
4
Survey (14 Questions)One question per card
Linear progress bar + saveable mid-fill (auto-save to localStorage)
Q1-Q3
Goodwill & inspiration moments, charitable understanding level
Q4-Q6
Post-activity life changes intent
Q7-Q8
Transportation mode + distance (walk/drive/scooter/bus/MRT/train/HSR)
Q9-Q14
Plastic bottles / recycling / lodging / phone / carbon estimate
⚡ Carbon estimate real-time calculated (SBTi Eco-Footprint / Ecoinvent 3.10)
📞 Phone field is one of three conditions to unlock achievement card
5
Submit Survey Server Sync
Survey answers bound to LINE userId, written to Cloudflare D1
Rate limit: max 2 submissions per 10 minutes
After submit, enter check-in mode (main page)
6
Check-in Mode (Check-in Mode)
Main interaction screen during pilgrimage, continuous GPS tracking
📍 Auto GPS Tracking
Background continuous route recording, KV buffer → batch write to D1
✋ Manual Check-in
Button trigger + location, accumulate distance & check-in count
📷 Photo Check-in
Select photo → read EXIF GPS → photo not uploaded (text indication only)
⏸️ Pause / Complete
Pause tracking without ending session; "Complete Pilgrimage" settles achievement card
Rate limit: 5 check-ins / 60 seconds (KV sliding window counter)
GPS points first write KV (TTL 24hr), nightly batch flush to D1
Continuous loop (repeat daily during activity)
6.5
Daily Carbon Footprint Report 🌱
Auto GPS-speed detection + manual supplement, real-time carbon conversion
🚶 Zero-Emission Movement (Auto)
Speed <15 km/h → determine walk/bike → CO₂ = 0
🚗 Transport Carbon (Manual)
Car 0.21 / scooter 0.10 / bus 0.05 / MRT 0.03 kg CO₂e/km
🧴 Daily Carbon
Plastic bottles 0.3 kg/bottle, lodging 2.5 kg/night
📊 Real-Time Estimate
Carbon footprint + carbon saved (vs. all-vehicle journey)
Data source: SBTi Eco-Footprint / Ecoinvent 3.10
Can resubmit daily (overwrites previous)
7
Level System + AI Mascot
Dual-condition upgrade (kilometers + check-ins), 9-level evolution
LevelNameKMCheck-inApprox
Lv.1🔥 Novice Pilgrim01Start
Lv.2🧱 Steadfast Walker153≈ Day 1
Lv.3💛 Trail Blazer455≈ Day 2
Lv.4👶 Road Warrior906≈ Day 3
Lv.5✨ Sacred Wanderer1358≈ Day 4
Lv.6🌀 Spirit Walker18010≈ Day 5
Lv.7🤝 Path Guardian22512≈ Day 6
Lv.8🏆 Enlightened Pilgrim27014≈ Day 7
Lv.9🚀 The Ascended30014+Full Journey
Each level has an AI-generated pink-headscarf mascot (1200px WebP)
Dual-condition logic: both distance AND check-in targets must be met to level up
8
Achievement Card Unlock 🏅
All three conditions must be met to unlock
Check-ins ≥ 3
Completed survey
Provided phone
🎴 Card Content
Mascot + level + distance + check-in count + carbon footprint + carbon saved + route map
📎 QR Code
Links to personal verification page /my/[userId], merchants can scan to verify
9
Share 📤 Web Share API
One-click share with auto-generated OG preview
📤 Native Share
Button triggers Web Share API → system menu (LINE / FB / copy link)
🖼️ OG Preview Image
html2canvas screenshot → upload to R2 → dynamic OG meta tag
🔗 Personal Page
Friends click link to see real-time data (distance / check-ins / carbon)
🤖 Crawler Detection
Pages Function intercepts LINE/FB crawler, rewrites OG meta
10
Complete Pilgrimage 🎉
User manually ends or auto-settles when activity ends (4/20)
Stop GPS tracking → settle final level → lock achievement card
Personal page permanently saved (QR code remains valid)
隱私權聲明問題回報
EN