chore: durcit la configuration pour la production

- mobile: externalise l'URL d'API via EXPO_PUBLIC_API_URL (repli localhost en dev)
- backend: .env.example adapté au projet (PostgreSQL, JWT, FRONTEND_URL, Redis)
- frontend/mobile: ajoute .env.example (+ exception gitignore front)
- mobile: supprime les 4 `any` (helper getApiError, type Feed, glyphMap Ionicons)
- backend: normalise le style PSR-12 via Pint (13 fichiers)

Tests backend 15/15, mobile tsc 0, Pint pass.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Azmog
2026-06-17 17:00:33 +02:00
parent 052e2f22cd
commit 6f5b8182ca
22 changed files with 122 additions and 95 deletions
+5 -3
View File
@@ -3,6 +3,7 @@ import { View, Text, TextInput, TouchableOpacity, StyleSheet, Alert, KeyboardAvo
import { Link, useRouter } from 'expo-router';
import { Ionicons } from '@expo/vector-icons';
import { useAuthStore } from '@/lib/auth-store';
import { getApiError } from '@/lib/api';
import { Colors } from '@/lib/colors';
const EMAIL_REGEX = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
@@ -43,9 +44,10 @@ export default function RegisterScreen() {
consentement_rgpd: consentement,
});
router.replace('/(tabs)');
} catch (error: any) {
const msg = error.response?.data?.message || 'Erreur lors de l\'inscription';
const apiErrors = error.response?.data?.errors;
} catch (error) {
const data = getApiError(error);
const msg = data.message || 'Erreur lors de l\'inscription';
const apiErrors = data.errors;
if (apiErrors) {
const mapped: Record<string, string> = {};
Object.entries(apiErrors).forEach(([k, v]) => { mapped[k] = Array.isArray(v) ? v[0] as string : String(v); });