공식 패키지 · 프레임워크
react-admin 실시간 기능: 목록 자동 갱신, 보고 있는 사람, 편집 잠금
무료 오픈 소스: 목록과 레코드가 저절로 갱신되고, 같은 레코드를 연 사람이 보이며, 한 번에 한 사람만 편집할 수 있습니다. react-admin 5, React 18과 19, 모든 데이터 프로바이더에서 동작합니다.
@hibira-io/react-adminnpm ↗GitHub ↗
가장 빠른 방법: Hibira 플러그인과 프롬프트 하나
AI 코딩 에이전트에 플러그인을 설치하고 프롬프트를 붙여 넣으세요. 에이전트가 로그인하고, 필요하면 무료 앱을 만들고, 코드를 작성한 뒤 테스트 이벤트를 보냅니다. GitHub ↗
플러그인 설치
claude plugin marketplace add hibira-io/agent-plugin claude plugin install hibira@hibira이 프롬프트 붙여 넣기
Add Hibira react-admin (@hibira-io/react-admin) to this project. Follow https://hibira.io/guides/react-admin, adapted to how this project is already set up. If I have no Hibira app yet, create a Free one that allows http://localhost so I can test right away. Keep the app key and secret in environment variables, add placeholders to .env.example, and never commit real values or send the secret to a browser. When you are done, send a test event, show me it arriving, and list the files you changed.
- <LiveRefresh />는 누군가 데이터를 바꾸면 목록, 레코드, 참조를 다시 가져옵니다.
- <RecordViewers />는 레코드를 연 다른 사람을 보여 주고, <RecordLockGuard>는 다른 사람이 편집하는 동안 폼을 읽기 전용으로 유지합니다. 잠금 테이블이 필요 없습니다.
- <LiveRecord />는 레코드가 다른 곳에서 저장되거나 삭제되면 편집 중인 사람에게 알리고, <NewRecordsBadge />는 메뉴에 새 레코드 수를 표시합니다.

로그인하면 예제 코드에 내 클러스터 호스트가 채워집니다. 로그인
설치
npm install @hibira-io/react-admin pusher-js # on your backend npm install pusher설정하기
import { Admin, Edit, List, Resource, SimpleForm } from 'react-admin'; import Pusher from 'pusher-js'; import { addRealtimeMethods, LiveRecord, LiveRefresh, RecordLockGuard, RecordViewers } from '@hibira-io/react-admin'; const pusher = new Pusher(import.meta.env.VITE_HIBIRA_KEY, { cluster: 'hkg', wsHost: 'ws.hibira.io', channelAuthorization: { endpoint: '/api/hibira/auth', transport: 'ajax' }, }); const realtime = addRealtimeMethods(dataProvider, pusher, { channelPrefix: 'private-' }); const OrderList = () => <List><LiveRefresh />{/* ... */}</List>; const OrderEdit = () => ( <Edit actions={<RecordViewers />}> <LiveRecord /> <RecordLockGuard><SimpleForm>{/* ... */}</SimpleForm></RecordLockGuard> </Edit> ); export const App = () => ( <Admin dataProvider={realtime}> <Resource name="orders" list={OrderList} edit={OrderEdit} /> </Admin> );사용하기
import Pusher from 'pusher'; import { authorizeChannel, publishResourceEvent } from '@hibira-io/react-admin/server'; const pusher = new Pusher({ appId: process.env.HIBIRA_APP_ID!, key: process.env.HIBIRA_KEY!, secret: process.env.HIBIRA_SECRET!, host: 'ws.hibira.io', useTLS: true, }); // POST /api/hibira/auth, after checking the session: signs private and presence channels authorizeChannel(pusher, socketId, channelName, { id: user.id, fullName: user.name }); // after updating order 42 await publishResourceEvent(pusher, { resource: 'orders', type: 'updated', ids: [42] }, { channelPrefix: 'private-', socketId: req.headers['x-socket-id'] });
시작하기 전에
- 프라이빗 채널과 프레즌스 채널에는 pusher-js와 마찬가지로, 앱 시크릿으로 구독에 서명하는 인증 엔드포인트가 백엔드에 필요합니다.
- 편집 잠금은 레코드를 가장 먼저 연 사람이 갖고, 그 사람이 나가면 바로 다음 사람에게 넘어갑니다. presence를 쓸 수 없으면 잠그지 않습니다.
대시보드의 앱 키를 사용하세요. 시크릿은 서버에만 둡니다. 채널, 이벤트, 인가 엔드포인트는 Pusher와 똑같이 동작합니다. 무료 계정 만들기 →