How rafifnurfariz/photopip works
PhotoPip is a browser-based photo booth: users choose a print layout, capture or upload photos into its slots, decorate the resulting composition, and download a print-ready PNG or JPEG. The documented flow is split between capture and editing; the renderer and export helpers are an important internal layer. The README says photo processing stays in the browser and the server serves frame and sticker catalogs. Source excerpts and the index support several module links; unsampled UI and API wiring is not inferred.
Main entry points: studio.tsx Studio workflow · editor.tsx Editor workspace · render.ts Composition renderer · use-capture-session.ts Capture session
Components 27
Capture studio
- Studio workflow
src/features/studio/studio.tsx - Browser camera
src/features/studio/camera/use-camera.ts - Capture session
src/features/studio/hooks/use-capture-session.ts - Photo upload
src/shared-tools/image-upload.ts - Layout selector
src/features/studio/components/template-selector.tsx - Export controls
src/features/studio/components/export-bar.tsx
Composition editor
- Editor workspace
src/features/editor/editor.tsx - Interactive canvas
src/features/editor/hooks/use-editor-canvas.ts - Edit controls
src/features/editor/components - Undo history
src/features/editor/history.ts
Rendering and export
- Print geometry
src/shared-tools/composition/geometry.ts - Composition renderer
src/shared-tools/composition/render.ts - Image export
src/shared-tools/composition/export.ts
Catalogs and assets
- Print layouts
src/shared-tools/catalog/templates.ts - Frame catalog
src/shared-tools/catalog/frames.ts - Frame packs
src/shared-tools/catalog/frame-pack.ts - Sticker catalog
src/shared-tools/catalog/stickers.ts - Font catalog
src/shared-tools/catalog/fonts.ts - Photo filters
src/shared-tools/catalog/photo-filters.ts
Catalog services
- Frame catalog API
src/app/api/frames/route.ts - Frame discovery
src/app/api/frames/scan.ts - Sticker catalog API
src/app/api/stickers/route.ts - Sticker discovery
src/app/api/stickers/scan.ts - Font catalog API
src/app/api/fonts/route.ts - Font discovery
src/app/api/fonts/scan.ts
Other components
- Photo booth user
- Browser
Connections 28
- Photo booth user → Studio workflow: uses
- Studio workflow → Browser camera: starts camera
src/features/studio/studio.tsx - Studio workflow → Capture session: manages capture
src/features/studio/studio.tsx - Capture session → Browser camera: captures photos
src/features/studio/hooks/use-capture-session.ts - Capture session → Photo upload: reads uploads
src/features/studio/hooks/use-capture-session.ts - Studio workflow → Layout selector: shows layouts
src/features/studio/studio.tsx - Layout selector → Print layouts: lists layouts
src/features/studio/components/template-selector.tsx - Studio workflow → Editor workspace: opens editor
src/features/studio/studio.tsx - Editor workspace → Interactive canvas: controls canvas
src/features/editor/editor.tsx - Editor workspace → Edit controls: shows controls
src/features/editor/editor.tsx - Editor workspace → Undo history: uses history
src/features/editor/editor.tsx - Interactive canvas → Print geometry: uses layout
src/features/editor/hooks/use-editor-canvas.ts - Interactive canvas → Composition renderer: renders composition
src/features/editor/hooks/use-editor-canvas.ts - Composition renderer → Print geometry: calculates placement
src/shared-tools/composition/render.ts - Studio workflow → Export controls: shows export
src/features/studio/studio.tsx - Export controls → Image export: downloads image
- Composition renderer → Frame catalog: uses frame data
src/shared-tools/composition/render.ts - Composition renderer → Font catalog: resolves fonts
src/shared-tools/composition/render.ts - Editor workspace → Frame catalog: uses frames
src/features/editor/editor.tsx - Editor workspace → Sticker catalog: uses stickers
src/features/editor/editor.tsx - Frame discovery → Frame packs: discovers packs
src/app/api/frames/scan.ts - Frame catalog API → Frame discovery: routes to
src/app/api/frames/route.ts - Sticker catalog API → Sticker discovery: routes to
src/app/api/stickers/route.ts - Font catalog API → Font discovery: routes to
src/app/api/fonts/route.ts - Font discovery → Font catalog: reads catalog
src/app/api/fonts/scan.ts - Browser → Frame catalog API: requests catalog
- Browser → Sticker catalog API: requests catalog
- Photo booth user → Browser: downloads result