Platform
Pulse
Overview

Pulse (PBCP Pulse)

App URL: https://pulse.pcampus.co
Context API: https://pbcp-api.pcampus.co/context

Overview

PBCP Pulse คือ reference application ของ Pcampus Business Context Platform (PBCP) ทำหน้าที่แปลง Business Context ให้กลายเป็น Business Story ที่เจ้าของธุรกิจอ่านเข้าใจได้โดยไม่ต้องรู้ infrastructure

Every screen answers: What happened? · Why? · What next?

Pulse ไม่ได้เป็น ops dashboard — มันเป็น Story Explorer ที่ทำให้ธุรกิจเห็นตัวเองผ่านสายตาของ data

Who uses this

Personaใช้ทำอะไร
Business owner / Stakeholderดู Business Story — ลูกค้าทำอะไร, ยอดขายเป็นอย่างไร, โปรโมชั่นได้ผลไหม
Product Managerตรวจสอบความถูกต้องของ Business Context
Platform Engineerใช้ Developer Mode — Event Timeline, Pipeline, Health
Sales / DemoShow PBCP value ให้ prospective customers ใน 60 วินาที

Two modes

Story View — default experience สำหรับ business stakeholders: เห็น story ของแต่ละ entity ผ่าน timeline
Developer Mode — secondary, สำหรับ engineer ที่ต้องการดู raw events และ pipeline

Story View — how it works

Story types

Story คือ evolution ของ business entity ที่ reconstruct จาก Business Context — ไม่ใช่ log ของ raw events

Storyตอบคำถาม
Customer Storyลูกค้าคนนี้เป็นใคร ทำอะไรบ้าง มูลค่ารวมเท่าไหร่
Order Storyorder นี้เดินทางอย่างไร ติดขัดตรงไหน
Product Storyสินค้านี้ขายดีแค่ไหน ใครซื้อ ช่วงไหน
Campaign Storycampaign นี้ได้ผลไหม ใครตอบสนอง
Promotion Storyโปรโมชั่นนี้คุ้มค่าไหม เทียบกับยอดขาย

1 engine หลาย domain — pharmacy ใช้ Customer Story, Order Story ได้เลย domain อื่น (retail, school, factory) ใช้ engine เดียวกัน

Data flow

Story Timeline UX

Three-panel layout — เลือก entity → เห็น timeline → drill down รายละเอียด + recommended actions

Pilot — Pharmacy

Pharmacy Platform คือ first production implementation ของ PBCP

ร้านยาส่ง Business Events ผ่าน Event SDK:

  • customer.visited — คนไข้มาร้าน
  • prescription.dispensed — จ่ายยา
  • product.sold — ขายสินค้า
  • payment.completed — ชำระเงิน

Pulse แสดง Customer Story: คนไข้คนนี้มาร้านบ่อยแค่ไหน ซื้ออะไรบ้าง ใช้ยาต่อเนื่องไหม — โดยไม่ต้องเปิด database เอง

Technical overview

AreaChoice
FrameworkNext.js, React, TypeScript
UITailwind CSS, shadcn/ui
AnimationMotion (motion.dev) — timeline transitions
ChartsApache ECharts — funnel, sankey, time series
Story TimelineCustom StoryTimeline component (ไม่ใช้ chart library)
Context APIPBCP Context API v1 (required)
IntelligencePBCP Intelligence API v1 (optional enrich)
Deploymentcockpit.pcampus.local · demo env: COCKPIT_DEMO_MODE

Integration

Pulse อ่านข้อมูลผ่าน Context API เท่านั้น — ไม่เคย query Event Store โดยตรง ไม่ส่ง LINE/email/push เอง

Context API overview

MethodEndpointDescription
GET/context/pulseToday's business summary
GET/context/customersList customers with context
GET/context/customers/:idFull Customer Context + story
GET/context/ordersList orders with context
GET/context/orders/:idFull Order Story
GET/context/products/:idProduct Story
GET/context/campaigns/:idCampaign Story

Full PBCP Core API reference → API Reference →