This commit is contained in:
@@ -25,6 +25,14 @@ See [Vite Configuration Reference](https://vite.dev/config/).
|
||||
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
|
||||
@@ -36,3 +44,22 @@ yarn dev
|
||||
```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`
|
||||
|
||||
Reference in New Issue
Block a user