photo-booth Svelte Themes

Photo Booth

A modern web-based photo booth built with Svelte 5, SvelteKit, and Tailwind CSS. Capture photo strips with customizable layouts and frames directly in your browser.

šŸ“ø Photo Booth

A modern web-based photo booth built with Svelte 5, SvelteKit, and Tailwind CSS. Capture photo strips with customizable layouts and frames directly in your browser.

🌐 Live Demo • Features • Getting Started • Development


✨ Features

šŸ“· Camera & Capture

  • Live camera preview with progress tracking
  • 3-second countdown timer for perfect photo timing
  • Camera switching between front and rear cameras
  • High-resolution captures at your camera's maximum quality
  • Demo mode - test with placeholder images when no camera available

šŸ–¼ļø Photo Strips

  • Two layout options:
    • 2Ɨ2 Grid - Compact square layout
    • 4Ɨ1 Strip - Full-size horizontal strip
  • 9 frame color options: None, White, Black, Gold, Silver, Rose, Blue, Green, Purple
  • High-resolution output - Downloads as PNG
  • View all saved photo strips
  • Download individual strips as PNG
  • Delete strips individually

šŸ“± Responsive Design

  • Mobile-first design that works on any device
  • Touch-friendly controls
  • Adaptive layouts for screens of all sizes
  • Fixed floating buttons for easy mobile access

šŸš€ Getting Started

Prerequisites

  • Node.js 18+ or Bun
  • A modern web browser with camera support

Installation

# Clone the repository
git clone https://github.com/AungMyoKyaw/photo-booth.git
cd photo-booth

# Install dependencies
bun install
# or
npm install

# Start development server
bun run dev
# or
npm run dev

Open http://localhost:5173 in your browser.

Building for Production

bun run build
bun run preview

Deployment

This project is deployed on Cloudflare Workers using @sveltejs/adapter-cloudflare.

# Deploy to Cloudflare Workers
bun run build
npx wrangler deploy

Live Demo: https://photo-booth.aungmyokyaw.workers.dev/


šŸ“ø Usage

  1. Allow camera access when prompted (or enable Demo Mode)
  2. Choose a layout (2Ɨ2 Grid or 4Ɨ1 Strip)
  3. Select a frame color (optional)
  4. Tap the capture button to take a photo with a 3-second countdown
  5. Take up to 4 photos for your strip
  6. Download your photo strip when complete!

šŸ› ļø Development

Project Structure

photo-booth/
ā”œā”€ā”€ src/
│   ā”œā”€ā”€ lib/
│   │   ā”œā”€ā”€ components/       # Svelte components
│   │   │   ā”œā”€ā”€ Camera.svelte         # Camera preview with switching
│   │   │   ā”œā”€ā”€ Countdown.svelte      # 3-second countdown timer
│   │   │   ā”œā”€ā”€ FrameSelector.svelte  # Frame color picker
│   │   │   ā”œā”€ā”€ Gallery.svelte        # Photo strip gallery
│   │   │   ā”œā”€ā”€ LayoutSelector.svelte # Layout picker (2Ɨ2 / 4Ɨ1)
│   │   │   └── PhotoStrip.svelte     # Current strip preview
│   │   ā”œā”€ā”€ stores/           # State management (Svelte 5 runes)
│   │   │   └── photos.svelte.ts
│   │   ā”œā”€ā”€ types/            # TypeScript types
│   │   │   └── photo.ts
│   │   └── utils/            # Utility functions
│   │       └── canvas.ts     # Photo strip generation
│   ā”œā”€ā”€ routes/               # SvelteKit routes
│   │   ā”œā”€ā”€ +layout.svelte    # Root layout
│   │   ā”œā”€ā”€ +page.svelte      # Main page
│   │   └── layout.css        # Global styles
│   └── app.html              # HTML template
ā”œā”€ā”€ static/                   # Static assets
ā”œā”€ā”€ package.json
ā”œā”€ā”€ svelte.config.js
ā”œā”€ā”€ tsconfig.json
└── vite.config.ts

Available Scripts

Command Description
npm run dev Start development server
npm run build Build for production
npm run preview Preview production build
npm run check Run type checking
npm run lint Run Prettier + ESLint
npm run format Format with Prettier
npm run test Run tests with Vitest

šŸŽØ Tech Stack


🌐 Browser Support

  • Chrome/Edge 90+
  • Firefox 88+
  • Safari 15+
  • Mobile browsers (iOS Safari, Chrome Mobile)

šŸ¤ Contributing

Contributions are welcome! Here's how you can help:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

šŸ“ License

This project is licensed under the MIT License - see the LICENSE file for details.


šŸ™ Acknowledgments


Made with ā¤ļø by Aung Myo Kyaw

Built with Svelte 5 • šŸ¤– GLM 4.7

🌐 Live Demo • šŸ“¦ GitHub

⬆ Back to Top

Top categories

Loading Svelte Themes