614a353b3c
- Simplify dev script (drop Replit-specific env vars) - Remove REPLIT_* fallbacks from scripts/build.js - Rewrite root README for GitHub (local build, no EAS, no homegit URLs) - Update clone URL in artifacts README → GitHub - Remove replit.md (Replit workspace descriptor, no longer needed) - Untrack scripts/push-to-gitea.sh (internal-only, added to .gitignore) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
111 lines
3.3 KiB
Markdown
111 lines
3.3 KiB
Markdown
# PostizMobile
|
||
|
||
React Native (Expo) mobile app to control a self-hosted [Postiz](https://postiz.com) instance from Android.
|
||
|
||
Build is fully local — no expo.dev account or EAS cloud required.
|
||
|
||
---
|
||
|
||
## Features
|
||
|
||
| Screen | Description |
|
||
|--------|-------------|
|
||
| **Calendar** | Monthly view with color dots per day (indigo = scheduled, green = published, red = error). Tap a day to see its posts. |
|
||
| **Posts** | Filtered list (All / Queue / Published / Draft / Error) with sort toggle, pull-to-refresh, swipe left to delete, swipe right to reschedule. |
|
||
| **Compose** | Text editor with per-network character limit, channel picker, date/time picker, gallery image pick + upload, publish now or schedule. Local draft save/restore. |
|
||
| **Settings** | API key and base URL, connection test, secure storage. 401 auto-redirect to Settings. |
|
||
| **Notifications** | Local alerts when a post transitions to PUBLISHED or ERROR (polling every 15 min). |
|
||
|
||
**Theme**: forced dark. **Auth**: API key in `expo-secure-store`, never hardcoded.
|
||
|
||
---
|
||
|
||
## Prerequisites
|
||
|
||
| Tool | Version |
|
||
|------|---------|
|
||
| Node.js | 20 LTS |
|
||
| pnpm | 10+ |
|
||
| Java (JDK) | 17–24 (Java 25+ not yet supported by Gradle 8) |
|
||
| Android SDK | see below |
|
||
|
||
---
|
||
|
||
## Installation & Development
|
||
|
||
```bash
|
||
git clone https://github.com/pirona/postiz-android.git
|
||
cd postiz-android
|
||
pnpm install
|
||
```
|
||
|
||
Start the dev server (requires Expo Go on the device):
|
||
|
||
```bash
|
||
pnpm --filter @workspace/postiz-mobile run dev
|
||
```
|
||
|
||
---
|
||
|
||
## Building an APK (local, no EAS)
|
||
|
||
See **[artifacts/postiz-mobile/README.md](artifacts/postiz-mobile/README.md)** for the full build guide.
|
||
|
||
Quick start:
|
||
|
||
```bash
|
||
cd artifacts/postiz-mobile
|
||
./install-android-sdk.sh # first time only
|
||
cp ~/.config/postiz-mobile/signing.env.example ~/.config/postiz-mobile/signing.env
|
||
$EDITOR ~/.config/postiz-mobile/signing.env # fill in keystore credentials
|
||
./build-apk.sh # → dist/postiz-mobile-YYYYMMDD-HHMM.apk
|
||
```
|
||
|
||
### GitHub Actions release
|
||
|
||
Pushing a tag triggers an automated signed APK release:
|
||
|
||
```bash
|
||
git tag v1.0.0
|
||
git push origin --tags
|
||
```
|
||
|
||
The workflow builds the APK on GitHub's infrastructure and attaches it to a GitHub Release.
|
||
Required secrets: `KEYSTORE_B64`, `KEYSTORE_ALIAS`, `KEYSTORE_STORE_PASSWORD`, `KEYSTORE_KEY_PASSWORD`.
|
||
|
||
---
|
||
|
||
## App Configuration
|
||
|
||
On first launch, go to **Settings**:
|
||
|
||
1. **Base URL**: `https://your-postiz-instance/api/public/v1`
|
||
2. **API Key**: generated in Postiz → Settings → API Keys
|
||
3. Tap **Test Connection**, then **Save Settings**
|
||
|
||
---
|
||
|
||
## Postiz API
|
||
|
||
| Method | Endpoint | Usage |
|
||
|--------|----------|-------|
|
||
| `GET` | `/integrations` | List channels |
|
||
| `GET` | `/posts?startDate=&endDate=` | Posts over a date range |
|
||
| `POST` | `/posts` | Create / schedule a post |
|
||
| `DELETE` | `/posts/:id` | Delete a post |
|
||
| `POST` | `/upload` | Upload an image (multipart) |
|
||
|
||
---
|
||
|
||
## Troubleshooting
|
||
|
||
**"Not Configured" on all screens** → Settings tab → enter API key and URL → Test Connection.
|
||
|
||
**"Connection failed"** → URL must end with `/api/public/v1` — check Postiz is reachable.
|
||
|
||
**No notifications** → Accept permissions on first launch. Polling runs every 15 min.
|
||
|
||
**Build fails at Gradle** → Make sure `ANDROID_HOME` is set and Java is ≤ 24 (the script auto-detects `~/jdk21`).
|
||
|
||
**`expo prebuild` fails** → Run `pnpm install` from the repo root first.
|