How royceeealt/photobooth-website works
This repository implements a browser-based photo-strip creator with account access, strip setup, avatar design, image capture, and export, plus an Express backend for authentication, item retrieval, and optional strip persistence. The frontend’s route definitions establish the available stages, but sampled evidence does not show the pages’ internal transitions or how export communicates with the backend. Strip storage is explicitly marked optional and its upload implementation is unfinished; those limits are reflected in the graph.
Main entry points: App.jsx Route application · auth.controller.js Auth controller · strips.controller.js Strips controller · authGuard.js Auth guard
Components 32
Web app flow
- Route application
frontend/src/App.jsx - Home
frontend/src/pages/Home.jsx - Login
frontend/src/pages/Login.jsx - Signup
frontend/src/pages/Signup.jsx - Strip setup
frontend/src/pages/StripCount.jsx - Avatar design
frontend/src/pages/AvatarDesign.jsx - Image capture
frontend/src/pages/ImageCapture.jsx - Strip export
frontend/src/pages/Export.jsx
Browser state and tools
- Auth state
frontend/src/store/useAuthStore.js - Session state
frontend/src/store/useSessionStore.js - API client
frontend/src/lib/api.js - Canvas utilities
frontend/src/lib/canvasUtils.js - Strip assembler
frontend/src/lib/stripAssembler.js - Item catalog
frontend/src/lib/itemCatalog.js - Draggable avatar
frontend/src/components/DraggableAvatar.jsx - Strip preview
frontend/src/components/StripPreview.jsx
Backend HTTP
- Auth routes
server/routes/auth.routes.js - Item routes
server/routes/items.routes.js - Strip routes
server/routes/strips.routes.js
Backend services
- Auth controller
server/controllers/auth.controller.js - Items controller
server/controllers/items.controller.js - Strips controller
server/controllers/strips.controller.js - Auth guard
server/middleware/authGuard.js - Auth service
server/services/auth.service.js - Error handler
server/middleware/errorHandler.js
Data and storage
- User records
server/models/User.js - Item records
server/models/Item.js - Photo strips
server/models/PhotoStrip.js - Database config
server/config/db.js - Storage service
server/services/storage.service.js - Storage config
server/config/storage.js
Other components
- Visitor
Connections 21
- Visitor → Route application: opens
- Route application → Home: routes to
frontend/src/App.jsx - Route application → Login: routes to
frontend/src/App.jsx - Route application → Signup: routes to
frontend/src/App.jsx - Route application → Strip setup: routes to
frontend/src/App.jsx - Route application → Avatar design: routes to
frontend/src/App.jsx - Route application → Image capture: routes to
frontend/src/App.jsx - Route application → Strip export: routes to
frontend/src/App.jsx - Auth state → API client: requests
frontend/src/store/useAuthStore.js - Auth routes → Auth controller: dispatches
server/routes/auth.routes.js - Auth routes → Auth guard: guards
server/routes/auth.routes.js - Item routes → Items controller: dispatches
server/routes/items.routes.js - Strip routes → Strips controller: dispatches
server/routes/strips.routes.js - Strip routes → Auth guard: guards
server/routes/strips.routes.js - Auth controller → User records: reads and writes
server/controllers/auth.controller.js - Auth controller → Auth service: uses
server/controllers/auth.controller.js - Auth guard → Auth service: verifies token
server/middleware/authGuard.js - Items controller → Item records: reads
server/controllers/items.controller.js - Strips controller → Photo strips: reads and writes
server/controllers/strips.controller.js - Strips controller → Storage service: uploads image
server/controllers/strips.controller.js - Storage service → Storage config: reads config
server/services/storage.service.js