develop #1

Merged
eliott merged 12 commits from develop into main 2026-05-20 09:03:03 +02:00
Owner
No description provided.
- Expo Router + NativeWind v5 + TypeScript strict
- Palette DSFR officielle (Bleu France #000091, Rouge Marianne #e1000f)
- Fonts Marianne et Spectral (TTF) chargées via expo-font
- Assets DSFR : icônes SVG, pictogrammes, images app
- Config pnpm, metro, eslint, postcss
- services/api.ts: base fetch client with SecureStore token management, silent refresh on 401, JWT decode
- services/auth.ts: login, register, password reset, logout with French error parsing
- context/AuthContext.tsx: AuthProvider + useAuth hook, hydrates user from stored JWT on startup
- Add ThemeContext with dark/light mode persisted via SecureStore
- Add DSFR color tokens (lightColors / darkColors) in constants/colors.ts
- Rewrite root layout with RootLayoutNav: redirects index → tabs,
  authenticated users away from auth screens
- Wrap stack with ThemeProvider + AuthProvider
Inline styles throughout (NativeWind className not supported on these routes).
Register collects firstName, lastName, email, address and password fields.
Three tabs: Accueil, Ressources (placeholder), Compte.
Tab bar colors driven by ThemeContext.
Home screen mirrors the web design with hero block, info box and
how-it-works cards. Account screen shows login/register CTAs when
logged out and user actions when logged in, both with theme toggle.
Resources service wraps all API calls (list, listMine, get, create,
submit, comments). List screen shows a segmented filter (Toutes /
Mes ressources) for authenticated users; filter switches are non-blocking
(inline spinner, no full-page reload). Draft and awaiting-validation
badges visible on own resources.
Bottom-sheet modals for category, relation type and resource type
selectors. Custom toggle for isPrivate. Two submit actions: save as
draft or submit for moderation.
Displays status banner (draft / awaiting validation), tags, content
and a threaded comment section. Authenticated users can comment and
reply. Resource load and comment load are decoupled so a comment
failure never blocks the resource view.
Footer component includes RF tricolor flag, République Française mention,
site description, government links and license notice. Displayed at the
bottom of the home screen scroll content.
- Change email: PUT /users/me/email, auto-logout on success
- Change password: PATCH /users/me/password with show/hide toggle,
  auto-logout on success
- Delete account: DELETE /users/me, requires typing SUPPRIMER to confirm,
  button activates only when confirmed
- Fix compte.tsx action cards navigation (were no-ops)
- Fix "Voir mes ressources" link → navigates to Ressources tab
- remove colliding /login and / routes by deleting (auth)/, (main)/ and
  loose app/index.tsx; only (tabs) and the canonical screens remain
- harden auth: decodeJwt handles base64url padding + utf8, isJwtExpired
  guards bootstrap, login/refresh read tokens from body first then cookies
  (set-cookie is unreliable on react-native), logout revokes server-side
- replace setTimeout(logout, 2000) on email/password change with
  await logout() + redirect carrying a notice param shown on login
- wire "mot de passe oublié" link to a new screen and add a
  verification-email-envoyee screen routed to after registration
- add route guard in root layout: /compte/* and /creer-ressource redirect
  to /login when unauthenticated
- fix unmount race in resource detail (cancellation flag); surface
  comment + reply send errors instead of swallowing them
- reset resources list on filter switch, depend on load in effect deps
- replace colors: any / user: any / route as any with Colors, AuthUser
  and Href types; drop unused useRef
- use Platform.OS === 'ios' ? 'padding' : undefined on Android KAV
- extract formatDate to utils/format and Tag to components/Tag (DRY);
  add warningBg/warningText/successBg tokens and replace hardcoded hex
- rename Republique-francaise-logo.svg.png to .png
- write README with env vars + platform-specific API URLs, add .env.example
eliott merged commit f7e6cdf124 into main 2026-05-20 09:03:03 +02:00
Commenting is not possible because the repository is archived.
No reviewers
No milestone
No project
No assignees
1 participant
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
cda-solutions/resources-relationnelles-mobile!1
No description provided.