Pixel Place friend integration¶
Status¶
Active — integration guide for external sites that share the same Pixel Place board.
Description¶
Guide for connecting another website to your live Pixel Place API so both frontends read/write the same canvas in real time.
Integration steps¶
- Confirm the external site origin is added to
PLACE_ALLOWED_ORIGINS. - Fetch board config/state:
GET /api/place/configGET /api/place/state- Subscribe to SSE deltas:
GET /api/place/events- event name:
place - Submit draws:
POST /api/place/pixels- Keep a stable per-user
userIdin browserlocalStoragefor cooldown/quota tracking.
Frontend implementation notes¶
- Use one
API_BASEconsistently across all sites that should share the same board. - Initialize by loading
configthenstate, then open SSE stream. - Handle API errors explicitly:
- CORS errors: origin not allowlisted
- Missing live updates: SSE blocked by network/proxy
- Rejected draws: quota/cooldown reached, inspect
retryAfterMs
What collaborators need¶
- The live API base URL
- Confirmation their origin is allowlisted
- Current board rule values from
config(for UI text/timers)
Example values from raw guide¶
- API base:
https://canvas.kiefermenard.com - CORS example:
https://kiefermenard.com,https://yourfriendsite.com
Known issues¶
- None documented in this wiki yet.
Raw sources¶
raw/FRIEND_CANVAS_INTEGRATION.md
Related work¶
- projects/Pixel-Place-API — canonical endpoint and env-var reference.
- projects/Personal-Website — includes Pixel Place frontend route.