# Integração Flutter

O app mobile consumirá os mesmos endpoints do frontend web.

## Autenticação

1. `POST /api/v1/auth/login` → receber `accessToken`
2. Enviar header `Authorization: Bearer {accessToken}` em todas as requisições
3. `POST /api/v1/auth/logout` ao encerrar sessão

## Cliente HTTP (exemplo)

```dart
final dio = Dio(BaseOptions(
  baseUrl: 'http://localhost:8000/api/v1',
  headers: {'Accept': 'application/json'},
));

dio.interceptors.add(InterceptorsWrapper(
  onRequest: (options, handler) {
    final token = authStorage.token;
    if (token != null) {
      options.headers['Authorization'] = 'Bearer $token';
    }
    handler.next(options);
  },
));
```

## Próximos endpoints (roadmap)

- `GET /projects` — listagem de projetos do cliente
- `GET /projects/{id}` — detalhe
- `POST /projects` — solicitação de novo app
