# photobooth

This template should help get you started developing with Vue 3 in Vite.

## Recommended IDE Setup

[VS Code](https://code.visualstudio.com/) + [Vue (Official)](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (and disable Vetur).

## Recommended Browser Setup

- Chromium-based browsers (Chrome, Edge, Brave, etc.):
  - [Vue.js devtools](https://chromewebstore.google.com/detail/vuejs-devtools/nhdogjmejiglipccpnnnanhbledajbpd)
  - [Turn on Custom Object Formatter in Chrome DevTools](http://bit.ly/object-formatters)
- Firefox:
  - [Vue.js devtools](https://addons.mozilla.org/en-US/firefox/addon/vue-js-devtools/)
  - [Turn on Custom Object Formatter in Firefox DevTools](https://fxdx.dev/firefox-devtools-custom-object-formatters/)

## Customize configuration

See [Vite Configuration Reference](https://vite.dev/config/).

## Project Setup

```sh
yarn
```

### Environment

Create `.env.local` (or copy from `.env.example`) and set:

```sh
VITE_API_BASE_URL=https://your-api.example.com
```

### Compile and Hot-Reload for Development

```sh
yarn dev
```

### Compile and Minify for Production

```sh
yarn build
```

## Backend requirements (for auth + saved strips)

This app expects a backend that implements:

- `POST /auth/signup`
- `POST /auth/login`
- `POST /auth/refresh` (uses HttpOnly refresh cookie)
- `POST /auth/logout`
- `GET /me`
- `GET /media?type=strip`
- `POST /media` (accepts `dataUrl` for strip PNG)
- `DELETE /media/:id`

If frontend and backend are on different domains, backend must support:

- CORS with an explicit `Access-Control-Allow-Origin` (not `*`)
- `Access-Control-Allow-Credentials: true`
- refresh cookie set with `HttpOnly; Secure; SameSite=None`
