docs: translate README files from French to English

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-06-03 13:17:04 +02:00
parent 4dc746514a
commit bc0973ccaa
2 changed files with 241 additions and 241 deletions
+125 -125
View File
@@ -1,48 +1,48 @@
# PostizMobile # PostizMobile
Application mobile React Native (Expo) pour piloter une instance **Postiz** auto-hébergée depuis votre téléphone Android ou iOS. React Native (Expo) mobile app to control a self-hosted **Postiz** instance from your Android or iOS device.
--- ---
## Sommaire ## Table of Contents
1. [Fonctionnalités](#fonctionnalités) 1. [Features](#features)
2. [Prérequis](#prérequis) 2. [Prerequisites](#prerequisites)
3. [Installation & veloppement](#installation--développement) 3. [Installation & Development](#installation--development)
4. [Configuration de l'application](#configuration-de-lapplication) 4. [App Configuration](#app-configuration)
5. [Architecture du projet](#architecture-du-projet) 5. [Project Architecture](#project-architecture)
6. [API Postiz utilisée](#api-postiz-utilisée) 6. [Postiz API](#postiz-api)
7. [Build APK Android (EAS)](#build-apk-android-eas) 7. [Android APK Build (EAS)](#android-apk-build-eas)
8. [Build iOS (Expo Launch)](#build-ios-expo-launch) 8. [iOS Build (Expo Launch)](#ios-build-expo-launch)
9. [Pousser les modifications sur Gitea](#pousser-les-modifications-sur-gitea) 9. [Pushing Changes to Gitea](#pushing-changes-to-gitea)
10. [Variables d'environnement & secrets](#variables-denvironnement--secrets) 10. [Environment Variables & Secrets](#environment-variables--secrets)
11. [Dépannage](#dépannage) 11. [Troubleshooting](#troubleshooting)
--- ---
## Fonctionnalités ## Features
| Écran | Description | | Screen | Description |
|-------|-------------| |--------|-------------|
| **Calendrier** | Vue mensuelle avec points de couleur par jour (indigo = planifié, vert = publié, rouge = erreur). Tap sur un jour pour voir les posts. | | **Calendar** | Monthly view with color dots per day (indigo = scheduled, green = published, red = error). Tap a day to see its posts. |
| **Posts** | Liste filtrée (Tous / Queue / Publié / Brouillon / Erreur) avec pull-to-refresh et swipe gauche pour supprimer. | | **Posts** | Filtered list (All / Queue / Published / Draft / Error) with pull-to-refresh and swipe left to delete. |
| **Composer** | Éditeur de texte, sélecteur de canaux, date/heure, importation d'image galerie + upload, publier maintenant ou planifier. | | **Compose** | Text editor, channel picker, date/time picker, gallery image import + upload, publish now or schedule. |
| **Paramètres** | Saisie de la clé API et de l'URL de base, test de connexion, sauvegarde sécurisée (SecureStore). | | **Settings** | API key and base URL input, connection test, secure storage (SecureStore). |
| **Notifications** | Alertes locales automatiques quand un post passe à PUBLISHED ou ERROR (polling toutes les 15 minutes). | | **Notifications** | Automatic local alerts when a post transitions to PUBLISHED or ERROR (polling every 15 minutes). |
**Thème** : dark forcé (`userInterfaceStyle: dark`). **Theme**: forced dark (`userInterfaceStyle: dark`).
**Authentification** : clé API stockée dans `expo-secure-store`, jamais en dur dans le code. **Authentication**: API key stored in `expo-secure-store`, never hardcoded.
--- ---
## Prérequis ## Prerequisites
| Outil | Version minimale | | Tool | Minimum version |
|-------|-----------------| |------|----------------|
| Node.js | 20 LTS | | Node.js | 20 LTS |
| pnpm | 10+ | | pnpm | 10+ |
| Expo Go (téléphone) | SDK 54 compatible | | Expo Go (phone) | SDK 54 compatible |
| Compte EAS (pour APK) | gratuit sur expo.dev | | EAS account (for APK) | free on expo.dev |
```bash ```bash
npm install -g pnpm npm install -g pnpm
@@ -51,53 +51,53 @@ npm install -g eas-cli
--- ---
## Installation & veloppement ## Installation & Development
### 1. Cloner le dépôt ### 1. Clone the repository
```bash ```bash
git clone ssh://gitea@homegit.gyozamancave.fr:2222/billisdead/Postiz-android.git git clone ssh://gitea@homegit.gyozamancave.fr:2222/billisdead/Postiz-android.git
cd Postiz-android cd Postiz-android
``` ```
### 2. Installer les dépendances ### 2. Install dependencies
```bash ```bash
pnpm install pnpm install
``` ```
### 3. Lancer le serveur de développement ### 3. Start the development server
```bash ```bash
pnpm --filter @workspace/postiz-mobile run dev pnpm --filter @workspace/postiz-mobile run dev
``` ```
Le terminal affiche un QR code. Scannez-le avec **Expo Go** (Android) ou l'app **Appareil photo** (iOS) pour voir l'app en direct. The terminal displays a QR code. Scan it with **Expo Go** (Android) or the **Camera** app (iOS) to see the app live.
### 4. Ouvrir dans le navigateur (web preview) ### 4. Open in the browser (web preview)
``` ```
http://localhost:<PORT> http://localhost:<PORT>
``` ```
Le port est assigné dynamiquement par l'environnement Replit. The port is dynamically assigned by the Replit environment.
--- ---
## Configuration de l'application ## App Configuration
Au premier lancement, l'écran **Paramètres** s'affiche car aucune clé n'est configurée. On first launch, the **Settings** screen is shown because no key is configured yet.
1. **URL de base** : `https://votre-instance-postiz.fr/public/v1` 1. **Base URL**: `https://your-postiz-instance.fr/public/v1`
2. **Clé API** : générée depuis votre instance Postiz *Settings → API Keys* 2. **API Key**: generated from your Postiz instance → *Settings → API Keys*
3. Appuyez sur **Test Connection** pour valider 3. Tap **Test Connection** to validate
4. Appuyez sur **Save Settings** 4. Tap **Save Settings**
La clé est chiffrée et stockée localement via `expo-secure-store`. Elle n'est jamais envoyée à un service tiers. The key is encrypted and stored locally via `expo-secure-store`. It is never sent to a third-party service.
--- ---
## Architecture du projet ## Project Architecture
``` ```
artifacts/postiz-mobile/ artifacts/postiz-mobile/
@@ -127,35 +127,35 @@ artifacts/postiz-mobile/
└── app.json # Config Expo (permissions, plugins, thème) └── app.json # Config Expo (permissions, plugins, thème)
``` ```
### Dépendances principales ### Main dependencies
| Package | Usage | | Package | Usage |
|---------|-------| |---------|-------|
| `expo-router` | Navigation file-based | | `expo-router` | File-based navigation |
| `axios` | Client HTTP vers l'API Postiz | | `axios` | HTTP client for the Postiz API |
| `expo-secure-store` | Stockage chiffré de la clé API | | `expo-secure-store` | Encrypted API key storage |
| `react-native-calendars` | Vue calendrier mensuelle | | `react-native-calendars` | Monthly calendar view |
| `@react-native-community/datetimepicker` | Sélecteur date/heure dans Composer | | `@react-native-community/datetimepicker` | Date/time picker in Compose |
| `expo-image-picker` | Accès galerie photos | | `expo-image-picker` | Gallery photo access |
| `expo-notifications` | Notifications locales de statut | | `expo-notifications` | Local status notifications |
| `expo-task-manager` | Tâche de fond pour le polling | | `expo-task-manager` | Background task for polling |
| `@tanstack/react-query` | Cache et refetch des données API | | `@tanstack/react-query` | API data cache and refetch |
--- ---
## API Postiz utilisée ## Postiz API
Base URL configurée par l'utilisateur (ex. `https://postiz.example.com/public/v1`). Base URL configured by the user (e.g. `https://postiz.example.com/public/v1`).
| Méthode | Endpoint | Usage | | Method | Endpoint | Usage |
|---------|----------|-------| |--------|----------|-------|
| `GET` | `/integrations` | Lister les canaux (Twitter, LinkedIn, etc.) | | `GET` | `/integrations` | List channels (Twitter, LinkedIn, etc.) |
| `GET` | `/posts?startDate=&endDate=` | Posts sur une plage de dates | | `GET` | `/posts?startDate=&endDate=` | Posts over a date range |
| `POST` | `/posts` | Créer / planifier un post | | `POST` | `/posts` | Create / schedule a post |
| `DELETE` | `/posts/:id` | Supprimer un post | | `DELETE` | `/posts/:id` | Delete a post |
| `POST` | `/upload` | Uploader une image (multipart) | | `POST` | `/upload` | Upload an image (multipart) |
### Exemple de payload POST /posts ### POST /posts payload example
```json ```json
{ {
@@ -171,34 +171,34 @@ Base URL configurée par l'utilisateur (ex. `https://postiz.example.com/public/v
} }
``` ```
Pour publier immédiatement, utilisez `"type": "now"`. To publish immediately, use `"type": "now"`.
--- ---
## Build APK Android (EAS) ## Android APK Build (EAS)
> **Prérequis** : compte gratuit sur [expo.dev](https://expo.dev) et `eas-cli` installé. > **Prerequisites**: free account on [expo.dev](https://expo.dev) and `eas-cli` installed.
### 1. Se connecter à EAS ### 1. Log in to EAS
```bash ```bash
npx eas login npx eas login
``` ```
### 2. Initialiser EAS dans le projet ### 2. Initialize EAS in the project
```bash ```bash
cd artifacts/postiz-mobile cd artifacts/postiz-mobile
npx eas init npx eas init
``` ```
Cela génère un `projectId` dans `app.json`. This generates a `projectId` in `app.json`.
### 3. Fichier de configuration EAS ### 3. EAS configuration file
> **Déjà inclus dans le dépôt** : `artifacts/postiz-mobile/eas.json` est présent, vous pouvez passer cette étape. > **Already included in the repository**: `artifacts/postiz-mobile/eas.json` is present, you can skip this step.
Si vous souhaitez le recréer manuellement : To recreate it manually:
```json ```json
{ {
@@ -223,7 +223,7 @@ Si vous souhaitez le recréer manuellement :
} }
``` ```
### 4. Lancer le build APK ### 4. Start the APK build
```bash ```bash
# APK de test (sideload) # APK de test (sideload)
@@ -233,9 +233,9 @@ npx eas build --platform android --profile preview
npx eas build --platform android --profile production npx eas build --platform android --profile production
``` ```
Le build se fait dans le cloud EAS (~10-15 min). À la fin, EAS affiche un **lien de téléchargement** et un **QR code** pour récupérer le fichier `.apk`. The build runs in the EAS cloud (~10-15 min). At the end, EAS displays a **download link** and a **QR code** to retrieve the `.apk` file.
### 5. Installer l'APK sur votre téléphone ### 5. Install the APK on your phone
```bash ```bash
# Via adb # Via adb
@@ -244,19 +244,19 @@ adb install postiz-mobile.apk
# Ou scannez le QR code affiché par EAS # Ou scannez le QR code affiché par EAS
``` ```
### 6. Publier l'APK comme Release Gitea ### 6. Publish the APK as a Gitea Release
Une fois le `.apk` téléchargé depuis EAS, attachez-le à une release Gitea pour le rendre disponible directement depuis le dépôt : Once the `.apk` is downloaded from EAS, attach it to a Gitea release to make it available directly from the repository:
1. Allez sur `https://homegit.gyozamancave.fr/billisdead/Postiz-android/releases` 1. Go to `https://homegit.gyozamancave.fr/billisdead/Postiz-android/releases`
2. Cliquez **New Release** 2. Click **New Release**
3. Choisissez un tag (ex. `v1.0.0`) et un titre 3. Choose a tag (e.g. `v1.0.0`) and a title
4. Glissez-déposez le fichier `.apk` dans la zone de pièces jointes 4. Drag and drop the `.apk` file into the attachments area
5. Cliquez **Publish Release** 5. Click **Publish Release**
L'APK sera alors téléchargeable directement depuis la page du dépôt Gitea. The APK will then be downloadable directly from the Gitea repository page.
### Permissions Android déclarées ### Declared Android permissions
```xml ```xml
READ_EXTERNAL_STORAGE READ_EXTERNAL_STORAGE
@@ -268,25 +268,25 @@ VIBRATE <!-- notifications -->
--- ---
## Build iOS (Expo Launch) ## iOS Build (Expo Launch)
> Disponible uniquement via **Replit Expo Launch** (soumission App Store automatisée). > Available only via **Replit Expo Launch** (automated App Store submission).
1. Dans Replit, cliquez sur le bouton **Publish** 1. In Replit, click the **Publish** button
2. Sélectionnez **Expo Launch** 2. Select **Expo Launch**
3. Suivez le wizard (compte Apple Developer requis) 3. Follow the wizard (Apple Developer account required)
**Note** : la publication Google Play n'est pas encore supportée par Expo Launch — utilisez EAS pour Android. **Note**: Google Play publishing is not yet supported by Expo Launch — use EAS for Android.
--- ---
## Pousser les modifications sur Gitea ## Pushing Changes to Gitea
Le dépôt distant est : `ssh://gitea@homegit.gyozamancave.fr:2222/billisdead/Postiz-android.git` The remote repository is: `ssh://gitea@homegit.gyozamancave.fr:2222/billisdead/Postiz-android.git`
La clé SSH utilisée est stockée dans la variable d'environnement `GITEA_SSH_KEY` (côté Replit). The SSH key used is stored in the `GITEA_SSH_KEY` environment variable (on the Replit side).
### Push depuis votre machine locale ### Push from your local machine
```bash ```bash
# Ajouter le remote (une seule fois) # Ajouter le remote (une seule fois)
@@ -296,11 +296,11 @@ git remote add gitea ssh://gitea@homegit.gyozamancave.fr:2222/billisdead/Postiz-
git push gitea main git push gitea main
``` ```
Assurez-vous que votre clé SSH publique est ajoutée dans Gitea → *Paramètres utilisateur → SSH / GPG Keys*. Make sure your public SSH key is added in Gitea → *User Settings → SSH / GPG Keys*.
### Push depuis Replit (via script) ### Push from Replit (via script)
Depuis Replit, les commandes `git push` directes sont protégées. Utilisez le script de bundle : From Replit, direct `git push` commands are restricted. Use the bundle script:
```bash ```bash
# Créer le bundle # Créer le bundle
@@ -316,48 +316,48 @@ GIT_SSH_COMMAND="ssh -i ~/.ssh/id_ed25519 -o StrictHostKeyChecking=no -p 2222" \
--- ---
## Variables d'environnement & secrets ## Environment Variables & Secrets
| Variable | Stockage | Description | | Variable | Storage | Description |
|----------|----------|-------------| |----------|---------|-------------|
| `GITEA_SSH_KEY` | Replit Secrets (shared) | Clé SSH privée pour push vers Gitea | | `GITEA_SSH_KEY` | Replit Secrets (shared) | Private SSH key for pushing to Gitea |
| `SESSION_SECRET` | Replit Secrets | Secret de session (API server) | | `SESSION_SECRET` | Replit Secrets | Session secret (API server) |
Les variables côté app (clé API Postiz, URL) sont **saisies par l'utilisateur** dans l'écran Paramètres et stockées dans `expo-secure-store` — elles ne transitent jamais dans le code source. App-side variables (Postiz API key, URL) are **entered by the user** in the Settings screen and stored in `expo-secure-store` — they never pass through the source code.
--- ---
## Dépannage ## Troubleshooting
### L'app affiche "Not Configured" sur tous les écrans ### The app shows "Not Configured" on all screens
Allez dans l'onglet **Paramètres**, entrez votre clé API et URL, puis tapez **Test Connection**. Go to the **Settings** tab, enter your API key and URL, then tap **Test Connection**.
### "Connection failed" dans les Paramètres ### "Connection failed" in Settings
- Vérifiez que l'URL se termine bien par `/public/v1` - Check that the URL ends with `/public/v1`
- Vérifiez que la clé API est valide (générée dans Postiz → API Keys) - Check that the API key is valid (generated in Postiz → API Keys)
- Vérifiez que votre instance Postiz est accessible depuis internet - Check that your Postiz instance is accessible from the internet
### Pas de notifications reçues ### No notifications received
- Acceptez les permissions de notification au premier lancement - Accept notification permissions on first launch
- Le polling se fait toutes les 15 minutes — attendez un cycle complet - Polling runs every 15 minutes — wait for a full cycle
- Sur Android, vérifiez que les notifications de l'app ne sont pas désactivées dans les paramètres système - On Android, check that the app's notifications are not disabled in system settings
### Erreur Metro "module not found" ### Metro error "module not found"
```bash ```bash
pnpm install pnpm install
# Puis redémarrer le workflow Expo # Puis redémarrer le workflow Expo
``` ```
### Le calendrier ne charge pas les posts ### Calendar does not load posts
- Vérifiez que l'API Postiz supporte les paramètres `startDate` / `endDate` sur `GET /posts` - Check that the Postiz API supports `startDate` / `endDate` parameters on `GET /posts`
- Consultez les logs réseau : dans Expo Go, secouez l'appareil*Open Debugger* - Check network logs: in Expo Go, shake the device*Open Debugger*
### Build EAS échoue ### EAS build fails
```bash ```bash
# Vérifier la version Expo # Vérifier la version Expo
@@ -369,13 +369,13 @@ npx expo install --check
--- ---
## Contribuer ## Contributing
1. Forkez sur Gitea : `https://homegit.gyozamancave.fr/billisdead/Postiz-android` 1. Fork on Gitea: `https://homegit.gyozamancave.fr/billisdead/Postiz-android`
2. Créez une branche feature : `git checkout -b feature/ma-fonctionnalite` 2. Create a feature branch: `git checkout -b feature/my-feature`
3. Committez vos changements 3. Commit your changes
4. Poussez et ouvrez une Pull Request 4. Push and open a Pull Request
--- ---
*Généré avec ❤️ sur Replit — PostizMobile v1.0.0* *Generated with ❤️ on Replit — PostizMobile v1.0.0*
+116 -116
View File
@@ -1,48 +1,48 @@
# PostizMobile # PostizMobile
Application mobile React Native (Expo) pour piloter une instance **Postiz** auto-hébergée depuis votre téléphone Android ou iOS. React Native (Expo) mobile app to control a self-hosted **Postiz** instance from your Android or iOS device.
--- ---
## Sommaire ## Table of Contents
1. [Fonctionnalités](#fonctionnalités) 1. [Features](#features)
2. [Prérequis](#prérequis) 2. [Prerequisites](#prerequisites)
3. [Installation & veloppement](#installation--développement) 3. [Installation & Development](#installation--development)
4. [Configuration de l'application](#configuration-de-lapplication) 4. [App Configuration](#app-configuration)
5. [Architecture du projet](#architecture-du-projet) 5. [Project Architecture](#project-architecture)
6. [API Postiz utilisée](#api-postiz-utilisée) 6. [Postiz API](#postiz-api)
7. [Build APK Android (EAS)](#build-apk-android-eas) 7. [Android APK Build (EAS)](#android-apk-build-eas)
8. [Build iOS (Expo Launch)](#build-ios-expo-launch) 8. [iOS Build (Expo Launch)](#ios-build-expo-launch)
9. [Pousser les modifications sur Gitea](#pousser-les-modifications-sur-gitea) 9. [Pushing Changes to Gitea](#pushing-changes-to-gitea)
10. [Variables d'environnement & secrets](#variables-denvironnement--secrets) 10. [Environment Variables & Secrets](#environment-variables--secrets)
11. [Dépannage](#dépannage) 11. [Troubleshooting](#troubleshooting)
--- ---
## Fonctionnalités ## Features
| Écran | Description | | Screen | Description |
|-------|-------------| |--------|-------------|
| **Calendrier** | Vue mensuelle avec points de couleur par jour (indigo = planifié, vert = publié, rouge = erreur). Tap sur un jour pour voir les posts. | | **Calendar** | Monthly view with color dots per day (indigo = scheduled, green = published, red = error). Tap a day to see its posts. |
| **Posts** | Liste filtrée (Tous / Queue / Publié / Brouillon / Erreur) avec pull-to-refresh et swipe gauche pour supprimer. | | **Posts** | Filtered list (All / Queue / Published / Draft / Error) with pull-to-refresh and swipe left to delete. |
| **Composer** | Éditeur de texte, sélecteur de canaux, date/heure, importation d'image galerie + upload, publier maintenant ou planifier. | | **Compose** | Text editor, channel picker, date/time picker, gallery image import + upload, publish now or schedule. |
| **Paramètres** | Saisie de la clé API et de l'URL de base, test de connexion, sauvegarde sécurisée (SecureStore). | | **Settings** | API key and base URL input, connection test, secure storage (SecureStore). |
| **Notifications** | Alertes locales automatiques quand un post passe à PUBLISHED ou ERROR (polling toutes les 15 minutes). | | **Notifications** | Automatic local alerts when a post transitions to PUBLISHED or ERROR (polling every 15 minutes). |
**Thème** : dark forcé (`userInterfaceStyle: dark`). **Theme**: forced dark (`userInterfaceStyle: dark`).
**Authentification** : clé API stockée dans `expo-secure-store`, jamais en dur dans le code. **Authentication**: API key stored in `expo-secure-store`, never hardcoded.
--- ---
## Prérequis ## Prerequisites
| Outil | Version minimale | | Tool | Minimum version |
|-------|-----------------| |------|----------------|
| Node.js | 20 LTS | | Node.js | 20 LTS |
| pnpm | 10+ | | pnpm | 10+ |
| Expo Go (téléphone) | SDK 54 compatible | | Expo Go (phone) | SDK 54 compatible |
| Compte EAS (pour APK) | gratuit sur expo.dev | | EAS account (for APK) | free on expo.dev |
```bash ```bash
npm install -g pnpm npm install -g pnpm
@@ -51,53 +51,53 @@ npm install -g eas-cli
--- ---
## Installation & veloppement ## Installation & Development
### 1. Cloner le dépôt ### 1. Clone the repository
```bash ```bash
git clone ssh://gitea@homegit.gyozamancave.fr:2222/billisdead/Postiz-android.git git clone ssh://gitea@homegit.gyozamancave.fr:2222/billisdead/Postiz-android.git
cd Postiz-android cd Postiz-android
``` ```
### 2. Installer les dépendances ### 2. Install dependencies
```bash ```bash
pnpm install pnpm install
``` ```
### 3. Lancer le serveur de développement ### 3. Start the development server
```bash ```bash
pnpm --filter @workspace/postiz-mobile run dev pnpm --filter @workspace/postiz-mobile run dev
``` ```
Le terminal affiche un QR code. Scannez-le avec **Expo Go** (Android) ou l'app **Appareil photo** (iOS) pour voir l'app en direct. The terminal displays a QR code. Scan it with **Expo Go** (Android) or the **Camera** app (iOS) to see the app live.
### 4. Ouvrir dans le navigateur (web preview) ### 4. Open in the browser (web preview)
``` ```
http://localhost:<PORT> http://localhost:<PORT>
``` ```
Le port est assigné dynamiquement par l'environnement Replit. The port is dynamically assigned by the Replit environment.
--- ---
## Configuration de l'application ## App Configuration
Au premier lancement, l'écran **Paramètres** s'affiche car aucune clé n'est configurée. On first launch, the **Settings** screen is shown because no key is configured yet.
1. **URL de base** : `https://votre-instance-postiz.fr/public/v1` 1. **Base URL**: `https://your-postiz-instance.fr/public/v1`
2. **Clé API** : générée depuis votre instance Postiz *Settings → API Keys* 2. **API Key**: generated from your Postiz instance → *Settings → API Keys*
3. Appuyez sur **Test Connection** pour valider 3. Tap **Test Connection** to validate
4. Appuyez sur **Save Settings** 4. Tap **Save Settings**
La clé est chiffrée et stockée localement via `expo-secure-store`. Elle n'est jamais envoyée à un service tiers. The key is encrypted and stored locally via `expo-secure-store`. It is never sent to a third-party service.
--- ---
## Architecture du projet ## Project Architecture
``` ```
artifacts/postiz-mobile/ artifacts/postiz-mobile/
@@ -127,35 +127,35 @@ artifacts/postiz-mobile/
└── app.json # Config Expo (permissions, plugins, thème) └── app.json # Config Expo (permissions, plugins, thème)
``` ```
### Dépendances principales ### Main dependencies
| Package | Usage | | Package | Usage |
|---------|-------| |---------|-------|
| `expo-router` | Navigation file-based | | `expo-router` | File-based navigation |
| `axios` | Client HTTP vers l'API Postiz | | `axios` | HTTP client for the Postiz API |
| `expo-secure-store` | Stockage chiffré de la clé API | | `expo-secure-store` | Encrypted API key storage |
| `react-native-calendars` | Vue calendrier mensuelle | | `react-native-calendars` | Monthly calendar view |
| `@react-native-community/datetimepicker` | Sélecteur date/heure dans Composer | | `@react-native-community/datetimepicker` | Date/time picker in Compose |
| `expo-image-picker` | Accès galerie photos | | `expo-image-picker` | Gallery photo access |
| `expo-notifications` | Notifications locales de statut | | `expo-notifications` | Local status notifications |
| `expo-task-manager` | Tâche de fond pour le polling | | `expo-task-manager` | Background task for polling |
| `@tanstack/react-query` | Cache et refetch des données API | | `@tanstack/react-query` | API data cache and refetch |
--- ---
## API Postiz utilisée ## Postiz API
Base URL configurée par l'utilisateur (ex. `https://postiz.example.com/public/v1`). Base URL configured by the user (e.g. `https://postiz.example.com/public/v1`).
| Méthode | Endpoint | Usage | | Method | Endpoint | Usage |
|---------|----------|-------| |--------|----------|-------|
| `GET` | `/integrations` | Lister les canaux (Twitter, LinkedIn, etc.) | | `GET` | `/integrations` | List channels (Twitter, LinkedIn, etc.) |
| `GET` | `/posts?startDate=&endDate=` | Posts sur une plage de dates | | `GET` | `/posts?startDate=&endDate=` | Posts over a date range |
| `POST` | `/posts` | Créer / planifier un post | | `POST` | `/posts` | Create / schedule a post |
| `DELETE` | `/posts/:id` | Supprimer un post | | `DELETE` | `/posts/:id` | Delete a post |
| `POST` | `/upload` | Uploader une image (multipart) | | `POST` | `/upload` | Upload an image (multipart) |
### Exemple de payload POST /posts ### POST /posts payload example
```json ```json
{ {
@@ -171,32 +171,32 @@ Base URL configurée par l'utilisateur (ex. `https://postiz.example.com/public/v
} }
``` ```
Pour publier immédiatement, utilisez `"type": "now"`. To publish immediately, use `"type": "now"`.
--- ---
## Build APK Android (EAS) ## Android APK Build (EAS)
> **Prérequis** : compte gratuit sur [expo.dev](https://expo.dev) et `eas-cli` installé. > **Prerequisites**: free account on [expo.dev](https://expo.dev) and `eas-cli` installed.
### 1. Se connecter à EAS ### 1. Log in to EAS
```bash ```bash
npx eas login npx eas login
``` ```
### 2. Initialiser EAS dans le projet ### 2. Initialize EAS in the project
```bash ```bash
cd artifacts/postiz-mobile cd artifacts/postiz-mobile
npx eas init npx eas init
``` ```
Cela génère un `projectId` dans `app.json`. This generates a `projectId` in `app.json`.
### 3. Créer le fichier de configuration EAS ### 3. Create the EAS configuration file
Créez `artifacts/postiz-mobile/eas.json` : Create `artifacts/postiz-mobile/eas.json`:
```json ```json
{ {
@@ -221,7 +221,7 @@ Créez `artifacts/postiz-mobile/eas.json` :
} }
``` ```
### 4. Lancer le build APK ### 4. Start the APK build
```bash ```bash
# APK de test (sideload) # APK de test (sideload)
@@ -231,9 +231,9 @@ npx eas build --platform android --profile preview
npx eas build --platform android --profile production npx eas build --platform android --profile production
``` ```
Le build se fait dans le cloud EAS. Vous recevez un lien de téléchargement à la fin (~10-15 min). The build runs in the EAS cloud. You receive a download link at the end (~10-15 min).
### 5. Installer l'APK sur votre téléphone ### 5. Install the APK on your phone
```bash ```bash
# Via adb # Via adb
@@ -242,7 +242,7 @@ adb install postiz-mobile.apk
# Ou scannez le QR code affiché par EAS # Ou scannez le QR code affiché par EAS
``` ```
### Permissions Android déclarées ### Declared Android permissions
```xml ```xml
READ_EXTERNAL_STORAGE READ_EXTERNAL_STORAGE
@@ -254,25 +254,25 @@ VIBRATE <!-- notifications -->
--- ---
## Build iOS (Expo Launch) ## iOS Build (Expo Launch)
> Disponible uniquement via **Replit Expo Launch** (soumission App Store automatisée). > Available only via **Replit Expo Launch** (automated App Store submission).
1. Dans Replit, cliquez sur le bouton **Publish** 1. In Replit, click the **Publish** button
2. Sélectionnez **Expo Launch** 2. Select **Expo Launch**
3. Suivez le wizard (compte Apple Developer requis) 3. Follow the wizard (Apple Developer account required)
**Note** : la publication Google Play n'est pas encore supportée par Expo Launch — utilisez EAS pour Android. **Note**: Google Play publishing is not yet supported by Expo Launch — use EAS for Android.
--- ---
## Pousser les modifications sur Gitea ## Pushing Changes to Gitea
Le dépôt distant est : `ssh://gitea@homegit.gyozamancave.fr:2222/billisdead/Postiz-android.git` The remote repository is: `ssh://gitea@homegit.gyozamancave.fr:2222/billisdead/Postiz-android.git`
La clé SSH utilisée est stockée dans la variable d'environnement `GITEA_SSH_KEY` (côté Replit). The SSH key used is stored in the `GITEA_SSH_KEY` environment variable (on the Replit side).
### Push depuis votre machine locale ### Push from your local machine
```bash ```bash
# Ajouter le remote (une seule fois) # Ajouter le remote (une seule fois)
@@ -282,11 +282,11 @@ git remote add gitea ssh://gitea@homegit.gyozamancave.fr:2222/billisdead/Postiz-
git push gitea main git push gitea main
``` ```
Assurez-vous que votre clé SSH publique est ajoutée dans Gitea → *Paramètres utilisateur → SSH / GPG Keys*. Make sure your public SSH key is added in Gitea → *User Settings → SSH / GPG Keys*.
### Push depuis Replit (via script) ### Push from Replit (via script)
Depuis Replit, les commandes `git push` directes sont protégées. Utilisez le script de bundle : From Replit, direct `git push` commands are restricted. Use the bundle script:
```bash ```bash
# Créer le bundle # Créer le bundle
@@ -302,48 +302,48 @@ GIT_SSH_COMMAND="ssh -i ~/.ssh/id_ed25519 -o StrictHostKeyChecking=no -p 2222" \
--- ---
## Variables d'environnement & secrets ## Environment Variables & Secrets
| Variable | Stockage | Description | | Variable | Storage | Description |
|----------|----------|-------------| |----------|---------|-------------|
| `GITEA_SSH_KEY` | Replit Secrets (shared) | Clé SSH privée pour push vers Gitea | | `GITEA_SSH_KEY` | Replit Secrets (shared) | Private SSH key for pushing to Gitea |
| `SESSION_SECRET` | Replit Secrets | Secret de session (API server) | | `SESSION_SECRET` | Replit Secrets | Session secret (API server) |
Les variables côté app (clé API Postiz, URL) sont **saisies par l'utilisateur** dans l'écran Paramètres et stockées dans `expo-secure-store` — elles ne transitent jamais dans le code source. App-side variables (Postiz API key, URL) are **entered by the user** in the Settings screen and stored in `expo-secure-store` — they never pass through the source code.
--- ---
## Dépannage ## Troubleshooting
### L'app affiche "Not Configured" sur tous les écrans ### The app shows "Not Configured" on all screens
Allez dans l'onglet **Paramètres**, entrez votre clé API et URL, puis tapez **Test Connection**. Go to the **Settings** tab, enter your API key and URL, then tap **Test Connection**.
### "Connection failed" dans les Paramètres ### "Connection failed" in Settings
- Vérifiez que l'URL se termine bien par `/public/v1` - Check that the URL ends with `/public/v1`
- Vérifiez que la clé API est valide (générée dans Postiz → API Keys) - Check that the API key is valid (generated in Postiz → API Keys)
- Vérifiez que votre instance Postiz est accessible depuis internet - Check that your Postiz instance is accessible from the internet
### Pas de notifications reçues ### No notifications received
- Acceptez les permissions de notification au premier lancement - Accept notification permissions on first launch
- Le polling se fait toutes les 15 minutes — attendez un cycle complet - Polling runs every 15 minutes — wait for a full cycle
- Sur Android, vérifiez que les notifications de l'app ne sont pas désactivées dans les paramètres système - On Android, check that the app's notifications are not disabled in system settings
### Erreur Metro "module not found" ### Metro error "module not found"
```bash ```bash
pnpm install pnpm install
# Puis redémarrer le workflow Expo # Puis redémarrer le workflow Expo
``` ```
### Le calendrier ne charge pas les posts ### Calendar does not load posts
- Vérifiez que l'API Postiz supporte les paramètres `startDate` / `endDate` sur `GET /posts` - Check that the Postiz API supports `startDate` / `endDate` parameters on `GET /posts`
- Consultez les logs réseau : dans Expo Go, secouez l'appareil*Open Debugger* - Check network logs: in Expo Go, shake the device*Open Debugger*
### Build EAS échoue ### EAS build fails
```bash ```bash
# Vérifier la version Expo # Vérifier la version Expo
@@ -355,13 +355,13 @@ npx expo install --check
--- ---
## Contribuer ## Contributing
1. Forkez sur Gitea : `https://homegit.gyozamancave.fr/billisdead/Postiz-android` 1. Fork on Gitea: `https://homegit.gyozamancave.fr/billisdead/Postiz-android`
2. Créez une branche feature : `git checkout -b feature/ma-fonctionnalite` 2. Create a feature branch: `git checkout -b feature/my-feature`
3. Committez vos changements 3. Commit your changes
4. Poussez et ouvrez une Pull Request 4. Push and open a Pull Request
--- ---
*Généré avec ❤️ sur Replit — PostizMobile v1.0.0* *Generated with ❤️ on Replit — PostizMobile v1.0.0*