Update documentation for Simple Notes Sync
- Revamped QUICKSTART.md for clearer installation and setup instructions, including detailed steps for server setup and app configuration. - Revised README.md to reflect new features and streamlined installation process, emphasizing offline capabilities and auto-sync functionality. - Removed outdated README.old.md to maintain a clean repository. [skip ci]
This commit is contained in:
@@ -1,188 +0,0 @@
|
||||
# GitHub Actions Setup Guide
|
||||
|
||||
This guide explains how to set up the GitHub Actions workflow for automated APK builds with proper signing.
|
||||
|
||||
## Overview
|
||||
|
||||
The workflow in `.github/workflows/build-production-apk.yml` automatically:
|
||||
- Builds signed APKs on every push to `main`
|
||||
- Generates version numbers using `YYYY.MM.DD` + build number
|
||||
- Creates 3 APK variants (universal, arm64-v8a, armeabi-v7a)
|
||||
- Creates GitHub releases with all APKs attached
|
||||
|
||||
## Prerequisites
|
||||
|
||||
- GitHub CLI (`gh`) installed
|
||||
- Java 17+ installed (for keytool)
|
||||
- Git repository initialized with GitHub remote
|
||||
|
||||
## Step 1: Generate Signing Keystore
|
||||
|
||||
⚠️ **IMPORTANT**: Store the keystore securely! Without it, you cannot publish updates to your app.
|
||||
|
||||
```bash
|
||||
# Navigate to project root
|
||||
cd /path/to/simple-notes-sync
|
||||
|
||||
# Generate keystore (replace values as needed)
|
||||
keytool -genkey -v \
|
||||
-keystore android/app/simple-notes-release.jks \
|
||||
-keyalg RSA \
|
||||
-keysize 2048 \
|
||||
-validity 10000 \
|
||||
-alias simple-notes
|
||||
|
||||
# You will be prompted for:
|
||||
# - Keystore password (remember this!)
|
||||
# - Key password (remember this!)
|
||||
# - Your name, organization, etc.
|
||||
```
|
||||
|
||||
**Store these securely:**
|
||||
- Keystore password
|
||||
- Key password
|
||||
- Alias: `simple-notes`
|
||||
- Keystore file: `android/app/simple-notes-release.jks`
|
||||
|
||||
⚠️ **BACKUP**: Make a backup of the keystore file in a secure location (NOT in the repository).
|
||||
|
||||
## Step 2: Base64 Encode Keystore
|
||||
|
||||
```bash
|
||||
# Create base64 encoded version
|
||||
base64 android/app/simple-notes-release.jks > simple-notes-release.jks.b64
|
||||
|
||||
# Or on macOS:
|
||||
base64 -i android/app/simple-notes-release.jks -o simple-notes-release.jks.b64
|
||||
```
|
||||
|
||||
## Step 3: Set GitHub Secrets
|
||||
|
||||
Using GitHub CLI (recommended):
|
||||
|
||||
```bash
|
||||
# Set KEYSTORE_BASE64 secret
|
||||
gh secret set KEYSTORE_BASE64 < simple-notes-release.jks.b64
|
||||
|
||||
# Set KEYSTORE_PASSWORD (will prompt for input)
|
||||
gh secret set KEYSTORE_PASSWORD
|
||||
|
||||
# Set KEY_PASSWORD (will prompt for input)
|
||||
gh secret set KEY_PASSWORD
|
||||
|
||||
# Set KEY_ALIAS (value: simple-notes)
|
||||
printf "simple-notes" | gh secret set KEY_ALIAS
|
||||
```
|
||||
|
||||
Or manually via GitHub web interface:
|
||||
1. Go to repository Settings → Secrets and variables → Actions
|
||||
2. Click "New repository secret"
|
||||
3. Add these secrets:
|
||||
- `KEYSTORE_BASE64`: Paste content of `simple-notes-release.jks.b64`
|
||||
- `KEYSTORE_PASSWORD`: Your keystore password
|
||||
- `KEY_PASSWORD`: Your key password
|
||||
- `KEY_ALIAS`: `simple-notes`
|
||||
|
||||
## Step 4: Verify Setup
|
||||
|
||||
```bash
|
||||
# Check secrets are set
|
||||
gh secret list
|
||||
|
||||
# Expected output:
|
||||
# KEYSTORE_BASE64 Updated YYYY-MM-DD
|
||||
# KEYSTORE_PASSWORD Updated YYYY-MM-DD
|
||||
# KEY_PASSWORD Updated YYYY-MM-DD
|
||||
# KEY_ALIAS Updated YYYY-MM-DD
|
||||
```
|
||||
|
||||
## Step 5: Cleanup
|
||||
|
||||
```bash
|
||||
# Remove sensitive files (they're in .gitignore, but double-check)
|
||||
rm simple-notes-release.jks.b64
|
||||
rm -f android/key.properties # Generated by workflow
|
||||
|
||||
# Verify keystore is NOT tracked by git
|
||||
git status | grep -i jks
|
||||
# Should return nothing
|
||||
```
|
||||
|
||||
## Step 6: Trigger First Build
|
||||
|
||||
```bash
|
||||
# Commit and push to main
|
||||
git add .
|
||||
git commit -m "🚀 feat: Add GitHub Actions deployment workflow"
|
||||
git push origin main
|
||||
|
||||
# Or manually trigger workflow
|
||||
gh workflow run build-production-apk.yml
|
||||
```
|
||||
|
||||
## Verification
|
||||
|
||||
1. Go to GitHub repository → Actions tab
|
||||
2. Check workflow run status
|
||||
3. Once complete, go to Releases tab
|
||||
4. Verify release was created with 3 APK variants
|
||||
5. Download and test one of the APKs
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
### Build fails with "Keystore not found"
|
||||
- Check `KEYSTORE_BASE64` secret is set correctly
|
||||
- Verify base64 encoding was done without line breaks
|
||||
|
||||
### Build fails with "Incorrect password"
|
||||
- Verify `KEYSTORE_PASSWORD` and `KEY_PASSWORD` are correct
|
||||
- Re-set secrets if needed
|
||||
|
||||
### APK files not found
|
||||
- Check build logs for errors in assembleRelease step
|
||||
- Verify APK output paths match workflow expectations
|
||||
|
||||
### Updates don't work
|
||||
- Ensure you're using the same keystore for all builds
|
||||
- Verify `applicationId` in build.gradle.kts matches
|
||||
|
||||
## Security Notes
|
||||
|
||||
- ✅ Keystore is base64-encoded in GitHub secrets (secure)
|
||||
- ✅ Passwords are stored in GitHub secrets (encrypted)
|
||||
- ✅ `key.properties` and `.jks` files are in `.gitignore`
|
||||
- ⚠️ Never commit keystore files to repository
|
||||
- ⚠️ Keep backup of keystore in secure location
|
||||
- ⚠️ Don't share keystore passwords
|
||||
|
||||
## Versioning
|
||||
|
||||
Versions follow this pattern:
|
||||
- **Version Name**: `YYYY.MM.DD` (e.g., `2025.01.15`)
|
||||
- **Version Code**: GitHub run number (e.g., `42`)
|
||||
- **Release Tag**: `vYYYY.MM.DD-prod.BUILD` (e.g., `v2025.01.15-prod.42`)
|
||||
|
||||
This ensures:
|
||||
- Semantic versioning based on release date
|
||||
- Incremental version codes for Play Store compatibility
|
||||
- Clear distinction between builds
|
||||
|
||||
## APK Variants
|
||||
|
||||
The workflow generates 3 APK variants:
|
||||
|
||||
1. **Universal APK** (~5 MB)
|
||||
- Works on all devices
|
||||
- Larger file size
|
||||
- Recommended for most users
|
||||
|
||||
2. **arm64-v8a APK** (~3 MB)
|
||||
- For modern devices (2018+)
|
||||
- Smaller, faster
|
||||
- 64-bit ARM processors
|
||||
|
||||
3. **armeabi-v7a APK** (~3 MB)
|
||||
- For older devices
|
||||
- 32-bit ARM processors
|
||||
|
||||
Users can choose based on their device - Obtanium auto-updates work with all variants.
|
||||
2338
IMPROVEMENT_PLAN.md
2338
IMPROVEMENT_PLAN.md
File diff suppressed because it is too large
Load Diff
465
QUICKSTART.md
465
QUICKSTART.md
@@ -1,208 +1,267 @@
|
||||
# 🚀 Quick Start Guide
|
||||
# Quick Start Guide - Simple Notes Sync 📝
|
||||
|
||||
## ✅ Server ist bereits gestartet!
|
||||
|
||||
Der WebDAV-Server läuft bereits auf:
|
||||
- **Lokal:** `http://localhost:8080/`
|
||||
- **Im Netzwerk:** `http://192.168.0.188:8080/`
|
||||
|
||||
### Credentials
|
||||
- **Username:** `noteuser`
|
||||
- **Password:** `SimpleNotes2025!`
|
||||
|
||||
## 📱 Nächste Schritte: Android App erstellen
|
||||
|
||||
### Option 1: Mit Android Studio (Empfohlen)
|
||||
|
||||
1. **Android Studio öffnen**
|
||||
```
|
||||
File → New → New Project
|
||||
```
|
||||
|
||||
2. **Template wählen:**
|
||||
- Empty Views Activity
|
||||
|
||||
3. **Projekt konfigurieren:**
|
||||
```
|
||||
Name: Simple Notes
|
||||
Package: com.example.simplenotes
|
||||
Save location: /home/liq/gitProjects/simple-notes-sync/android/
|
||||
Language: Kotlin
|
||||
Minimum SDK: API 24 (Android 7.0)
|
||||
Build configuration: Kotlin DSL
|
||||
```
|
||||
|
||||
4. **Dependencies hinzufügen:**
|
||||
|
||||
Öffne `app/build.gradle.kts` und füge hinzu:
|
||||
```kotlin
|
||||
dependencies {
|
||||
// ... existing dependencies
|
||||
|
||||
// WebDAV
|
||||
implementation("com.github.thegrizzlylabs:sardine-android:0.8")
|
||||
|
||||
// Coroutines
|
||||
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.3")
|
||||
|
||||
// JSON
|
||||
implementation("com.google.code.gson:gson:2.10.1")
|
||||
|
||||
// WorkManager
|
||||
implementation("androidx.work:work-runtime-ktx:2.9.0")
|
||||
}
|
||||
```
|
||||
|
||||
Und in `settings.gradle.kts`:
|
||||
```kotlin
|
||||
dependencyResolutionManagement {
|
||||
repositories {
|
||||
google()
|
||||
mavenCentral()
|
||||
maven { url = uri("https://jitpack.io") } // Für Sardine
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
5. **Code implementieren:**
|
||||
|
||||
Alle Code-Beispiele findest du in:
|
||||
- [ANDROID_GUIDE.md](https://github.com/inventory69/project-docs/blob/main/simple-notes-sync/ANDROID_GUIDE.md)
|
||||
|
||||
Kopiere der Reihe nach:
|
||||
- `models/Note.kt`
|
||||
- `models/SyncStatus.kt`
|
||||
- `storage/NotesStorage.kt`
|
||||
- `utils/DeviceIdGenerator.kt`
|
||||
- `utils/NotificationHelper.kt`
|
||||
- `utils/Extensions.kt`
|
||||
- `utils/Constants.kt`
|
||||
- UI Layouts aus dem Guide
|
||||
- Activities (MainActivity, NoteEditorActivity, SettingsActivity)
|
||||
- `sync/WebDavSyncService.kt`
|
||||
- `sync/WifiSyncReceiver.kt`
|
||||
- `sync/SyncWorker.kt`
|
||||
- `adapters/NotesAdapter.kt`
|
||||
|
||||
6. **AndroidManifest.xml anpassen:**
|
||||
```xml
|
||||
<uses-permission android:name="android.permission.INTERNET" />
|
||||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
||||
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
|
||||
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
|
||||
|
||||
<application
|
||||
...
|
||||
android:usesCleartextTraffic="true">
|
||||
```
|
||||
|
||||
7. **Build & Run:**
|
||||
```
|
||||
Build → Make Project
|
||||
Run → Run 'app'
|
||||
```
|
||||
|
||||
8. **In der App konfigurieren:**
|
||||
- Einstellungen öffnen
|
||||
- Server URL: `http://192.168.0.188:8080/`
|
||||
- Username: `noteuser`
|
||||
- Password: `SimpleNotes2025!`
|
||||
- Heim-WLAN SSID: `DeinWLANName`
|
||||
- "Verbindung testen" → sollte erfolgreich sein ✓
|
||||
|
||||
### Option 2: Schritt-für-Schritt Implementation
|
||||
|
||||
Folge dem [IMPLEMENTATION_PLAN.md](https://github.com/inventory69/project-docs/blob/main/simple-notes-sync/IMPLEMENTATION_PLAN.md) mit 6 Sprints:
|
||||
|
||||
1. **Sprint 1:** Server & Foundation (bereits done ✓)
|
||||
2. **Sprint 2:** Basic UI (4-6h)
|
||||
3. **Sprint 3:** Settings & WebDAV (6h)
|
||||
4. **Sprint 4:** Auto-Sync (6h)
|
||||
5. **Sprint 5:** Conflicts & Errors (6h)
|
||||
6. **Sprint 6:** Polish & Testing (6h)
|
||||
|
||||
## 🧪 Server testen
|
||||
|
||||
Der Server läuft bereits. Teste ihn:
|
||||
|
||||
```bash
|
||||
# Einfacher Test
|
||||
curl -u noteuser:SimpleNotes2025! http://localhost:8080/
|
||||
|
||||
# Test-Notiz hochladen
|
||||
echo '{"id":"test-123","title":"Test","content":"Hello World","createdAt":1703001234567,"updatedAt":1703001234567,"deviceId":"test","syncStatus":"SYNCED"}' > test.json
|
||||
|
||||
curl -u noteuser:SimpleNotes2025! \
|
||||
-T test.json \
|
||||
http://localhost:8080/test.json
|
||||
|
||||
# Test-Notiz abrufen
|
||||
curl -u noteuser:SimpleNotes2025! http://localhost:8080/test.json
|
||||
|
||||
# Löschen
|
||||
curl -u noteuser:SimpleNotes2025! \
|
||||
-X DELETE \
|
||||
http://localhost:8080/test.json
|
||||
```
|
||||
|
||||
## 📊 Server Management
|
||||
|
||||
```bash
|
||||
cd /home/liq/gitProjects/simple-notes-sync/server
|
||||
|
||||
# Status
|
||||
docker-compose ps
|
||||
|
||||
# Logs
|
||||
docker-compose logs -f
|
||||
|
||||
# Stoppen
|
||||
docker-compose down
|
||||
|
||||
# Neu starten
|
||||
docker-compose up -d
|
||||
|
||||
# Daten ansehen
|
||||
ls -la notes-data/
|
||||
```
|
||||
|
||||
## 🔧 Troubleshooting
|
||||
|
||||
### Server nicht erreichbar von Android
|
||||
|
||||
1. **Firewall prüfen:**
|
||||
```bash
|
||||
sudo ufw status
|
||||
sudo ufw allow 8080
|
||||
```
|
||||
|
||||
2. **Ping-Test:**
|
||||
```bash
|
||||
ping 192.168.0.188
|
||||
```
|
||||
|
||||
3. **Port-Test:**
|
||||
```bash
|
||||
telnet 192.168.0.188 8080
|
||||
```
|
||||
|
||||
### Permission Denied in Android
|
||||
|
||||
- Android 13+: POST_NOTIFICATIONS Permission akzeptieren
|
||||
- Internet Permission in Manifest vorhanden?
|
||||
- `usesCleartextTraffic="true"` gesetzt?
|
||||
|
||||
## 📚 Weitere Hilfe
|
||||
|
||||
- **Vollständige Doku:** [project-docs/simple-notes-sync](https://github.com/inventory69/project-docs/tree/main/simple-notes-sync)
|
||||
- **Android Code:** [ANDROID_GUIDE.md](https://github.com/inventory69/project-docs/blob/main/simple-notes-sync/ANDROID_GUIDE.md)
|
||||
- **Server Setup:** [SERVER_SETUP.md](https://github.com/inventory69/project-docs/blob/main/simple-notes-sync/SERVER_SETUP.md)
|
||||
- **Notifications:** [NOTIFICATIONS.md](https://github.com/inventory69/project-docs/blob/main/simple-notes-sync/NOTIFICATIONS.md)
|
||||
> Schritt-für-Schritt Anleitung zur Installation und Einrichtung
|
||||
|
||||
---
|
||||
|
||||
**Server Status:** ✅ Running on `http://192.168.0.188:8080/`
|
||||
**Next:** Android App in Android Studio erstellen
|
||||
**Estimated Time:** 18-24 Stunden für vollständige App
|
||||
## Voraussetzungen
|
||||
|
||||
Viel Erfolg! 🚀
|
||||
- ✅ Android 8.0+ Smartphone/Tablet
|
||||
- ✅ WLAN-Verbindung
|
||||
- ✅ Eigener Server mit Docker (optional - für Self-Hosting)
|
||||
|
||||
---
|
||||
|
||||
## Option 1: Mit eigenem Server (Self-Hosted) 🏠
|
||||
|
||||
### Schritt 1: WebDAV Server einrichten
|
||||
|
||||
Auf deinem Server (z.B. Raspberry Pi, NAS, VPS):
|
||||
|
||||
```bash
|
||||
# Repository klonen
|
||||
git clone https://github.com/inventory69/simple-notes-sync.git
|
||||
cd simple-notes-sync/server
|
||||
|
||||
# Umgebungsvariablen konfigurieren
|
||||
cp .env.example .env
|
||||
nano .env
|
||||
```
|
||||
|
||||
**In `.env` anpassen:**
|
||||
```env
|
||||
WEBDAV_PASSWORD=dein-sicheres-passwort-hier
|
||||
```
|
||||
|
||||
**Server starten:**
|
||||
```bash
|
||||
docker compose up -d
|
||||
```
|
||||
|
||||
**IP-Adresse finden:**
|
||||
```bash
|
||||
ip addr show | grep "inet " | grep -v 127.0.0.1
|
||||
```
|
||||
|
||||
➡️ **Notiere dir:** `http://DEINE-SERVER-IP:8080/`
|
||||
|
||||
---
|
||||
|
||||
### Schritt 2: App installieren
|
||||
|
||||
1. **APK herunterladen:** [Neueste Version](https://github.com/inventory69/simple-notes-sync/releases/latest)
|
||||
- Wähle: `simple-notes-sync-vX.X.X-standard-universal.apk`
|
||||
|
||||
2. **Installation erlauben:**
|
||||
- Android: Einstellungen → Sicherheit → "Unbekannte Quellen" für deinen Browser aktivieren
|
||||
|
||||
3. **APK öffnen und installieren**
|
||||
|
||||
---
|
||||
|
||||
### Schritt 3: App konfigurieren
|
||||
|
||||
1. **App öffnen**
|
||||
|
||||
2. **Einstellungen öffnen** (⚙️ Icon oben rechts)
|
||||
|
||||
3. **Server-Einstellungen konfigurieren:**
|
||||
|
||||
| Feld | Wert |
|
||||
|------|------|
|
||||
| **WebDAV Server URL** | `http://DEINE-SERVER-IP:8080/` |
|
||||
| **Benutzername** | `noteuser` |
|
||||
| **Passwort** | (dein Passwort aus `.env`) |
|
||||
| **Gateway SSID** | Name deines WLAN-Netzwerks |
|
||||
|
||||
4. **"Verbindung testen"** drücken
|
||||
- ✅ Erfolg? → Weiter zu Schritt 4
|
||||
- ❌ Fehler? → Siehe [Troubleshooting](#troubleshooting)
|
||||
|
||||
5. **Auto-Sync aktivieren** (Toggle Switch)
|
||||
|
||||
6. **Sync-Intervall wählen:**
|
||||
- **15 Min** - Maximale Aktualität (~0.8% Akku/Tag)
|
||||
- **30 Min** - Empfohlen (~0.4% Akku/Tag) ⭐
|
||||
- **60 Min** - Maximale Akkulaufzeit (~0.2% Akku/Tag)
|
||||
|
||||
---
|
||||
|
||||
### Schritt 4: Erste Notiz erstellen
|
||||
|
||||
1. Zurück zur Hauptansicht (← Pfeil)
|
||||
|
||||
2. **"Notiz hinzufügen"** (+ Icon)
|
||||
|
||||
3. Titel und Text eingeben
|
||||
|
||||
4. **Speichern** (💾 Icon)
|
||||
|
||||
5. **Warten auf Auto-Sync** (oder manuell: ⚙️ → "Jetzt synchronisieren")
|
||||
|
||||
🎉 **Fertig!** Deine Notizen werden automatisch synchronisiert!
|
||||
|
||||
---
|
||||
|
||||
## Option 2: Nur lokale Notizen (kein Server) 📱
|
||||
|
||||
Du kannst Simple Notes auch **ohne Server** nutzen:
|
||||
|
||||
1. **App installieren** (siehe Schritt 2 oben)
|
||||
|
||||
2. **Ohne Server-Konfiguration verwenden:**
|
||||
- Notizen werden nur lokal gespeichert
|
||||
- Kein Auto-Sync
|
||||
- Perfekt für reine Offline-Nutzung
|
||||
|
||||
---
|
||||
|
||||
## 🔋 Akku-Optimierung deaktivieren
|
||||
|
||||
Für zuverlässigen Auto-Sync:
|
||||
|
||||
1. **Einstellungen** → **Apps** → **Simple Notes Sync**
|
||||
|
||||
2. **Akku** → **Akkuverbrauch**
|
||||
|
||||
3. Wähle: **"Nicht optimieren"** oder **"Unbeschränkt"**
|
||||
|
||||
💡 **Hinweis:** Android Doze Mode kann trotzdem Sync im Standby verzögern (~60 Min). Das ist normal und betrifft alle Apps.
|
||||
|
||||
---
|
||||
|
||||
## 📊 Sync-Intervalle im Detail
|
||||
|
||||
| Intervall | Syncs/Tag | Akku/Tag | Akku/Sync | Anwendungsfall |
|
||||
|-----------|-----------|----------|-----------|----------------|
|
||||
| **15 Min** | ~96 | ~0.8% (~23 mAh) | ~0.008% | ⚡ Maximal aktuell (mehrere Geräte) |
|
||||
| **30 Min** | ~48 | ~0.4% (~12 mAh) | ~0.008% | ✓ **Empfohlen** - ausgewogen |
|
||||
| **60 Min** | ~24 | ~0.2% (~6 mAh) | ~0.008% | 🔋 Maximale Akkulaufzeit |
|
||||
|
||||
---
|
||||
|
||||
## 🐛 Troubleshooting
|
||||
|
||||
### Verbindungstest schlägt fehl
|
||||
|
||||
**Problem:** "Verbindung fehlgeschlagen" beim Test
|
||||
|
||||
**Lösungen:**
|
||||
|
||||
1. **Server läuft?**
|
||||
```bash
|
||||
docker compose ps
|
||||
# Sollte "Up" zeigen
|
||||
```
|
||||
|
||||
2. **Gleiche WLAN?**
|
||||
- Smartphone und Server müssen im selben Netzwerk sein
|
||||
- Prüfe SSID in App-Einstellungen
|
||||
|
||||
3. **IP-Adresse korrekt?**
|
||||
```bash
|
||||
ip addr show | grep "inet "
|
||||
# Prüfe ob IP in URL stimmt
|
||||
```
|
||||
|
||||
4. **Firewall?**
|
||||
```bash
|
||||
# Port 8080 öffnen (falls Firewall aktiv)
|
||||
sudo ufw allow 8080/tcp
|
||||
```
|
||||
|
||||
5. **Server-Logs prüfen:**
|
||||
```bash
|
||||
docker compose logs -f
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### Auto-Sync funktioniert nicht
|
||||
|
||||
**Problem:** Notizen werden nicht automatisch synchronisiert
|
||||
|
||||
**Lösungen:**
|
||||
|
||||
1. **Auto-Sync aktiviert?**
|
||||
- ⚙️ Einstellungen → Toggle "Auto-Sync" muss **AN** sein
|
||||
|
||||
2. **Akku-Optimierung deaktiviert?**
|
||||
- Siehe [Akku-Optimierung](#-akku-optimierung-deaktivieren)
|
||||
|
||||
3. **Im richtigen WLAN?**
|
||||
- Sync funktioniert nur wenn SSID = Gateway SSID
|
||||
- Prüfe aktuelle SSID in Android-Einstellungen
|
||||
|
||||
4. **Manuell testen:**
|
||||
- ⚙️ Einstellungen → "Jetzt synchronisieren"
|
||||
- Funktioniert das? → Auto-Sync sollte auch funktionieren
|
||||
|
||||
---
|
||||
|
||||
### Notizen werden nicht angezeigt
|
||||
|
||||
**Problem:** Nach Installation sind keine Notizen da, obwohl welche auf dem Server liegen
|
||||
|
||||
**Lösung:**
|
||||
|
||||
1. **Einmalig manuell synchronisieren:**
|
||||
- ⚙️ Einstellungen → "Jetzt synchronisieren"
|
||||
|
||||
2. **Server-Daten prüfen:**
|
||||
```bash
|
||||
docker compose exec webdav ls -la /data/
|
||||
# Sollte .json Dateien zeigen
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### Fehler beim Sync
|
||||
|
||||
**Problem:** Fehlermeldung beim Synchronisieren
|
||||
|
||||
**Lösungen:**
|
||||
|
||||
1. **"401 Unauthorized"** → Passwort falsch
|
||||
- Prüfe Passwort in App-Einstellungen
|
||||
- Vergleiche mit `.env` auf Server
|
||||
|
||||
2. **"404 Not Found"** → URL falsch
|
||||
- Sollte enden mit `/` (z.B. `http://192.168.1.100:8080/`)
|
||||
|
||||
3. **"Network error"** → Keine Verbindung
|
||||
- Siehe [Verbindungstest schlägt fehl](#verbindungstest-schlägt-fehl)
|
||||
|
||||
---
|
||||
|
||||
## 📱 Updates
|
||||
|
||||
### Automatisch mit Obtainium (empfohlen)
|
||||
|
||||
1. **[Obtainium installieren](https://github.com/ImranR98/Obtanium/releases/latest)**
|
||||
|
||||
2. **App hinzufügen:**
|
||||
- URL: `https://github.com/inventory69/simple-notes-sync`
|
||||
- Auto-Update aktivieren
|
||||
|
||||
3. **Fertig!** Obtainium benachrichtigt dich bei neuen Versionen
|
||||
|
||||
### Manuell
|
||||
|
||||
1. Neue APK von [Releases](https://github.com/inventory69/simple-notes-sync/releases/latest) herunterladen
|
||||
|
||||
2. Installieren (überschreibt alte Version)
|
||||
|
||||
3. Alle Daten bleiben erhalten!
|
||||
|
||||
---
|
||||
|
||||
## 🆘 Weitere Hilfe
|
||||
|
||||
- **GitHub Issues:** [Problem melden](https://github.com/inventory69/simple-notes-sync/issues)
|
||||
- **Vollständige Docs:** [DOCS.md](DOCS.md)
|
||||
- **Server Setup Details:** [server/README.md](server/README.md)
|
||||
|
||||
---
|
||||
|
||||
**Version:** 1.1.0 · **Erstellt:** Dezember 2025
|
||||
|
||||
131
README.md
131
README.md
@@ -1,130 +1,65 @@
|
||||
# Simple Notes Sync 📝
|
||||
|
||||
> **Minimalistische Android Notiz-App mit automatischer WLAN-Synchronisierung**
|
||||
> Minimalistische Offline-Notizen mit Auto-Sync zu deinem eigenen Server
|
||||
|
||||
[](https://www.android.com/)
|
||||
[](https://kotlinlang.org/)
|
||||
[](https://m3.material.io/)
|
||||
[](LICENSE)
|
||||
|
||||
Schlanke Offline-Notizen ohne Schnickschnack - deine Daten bleiben bei dir. Automatische Synchronisierung zu deinem eigenen WebDAV-Server, kein Google, kein Microsoft, keine Cloud.
|
||||
|
||||
## ✨ Features
|
||||
|
||||
- 📝 **Offline-First** - Notizen lokal gespeichert, immer verfügbar
|
||||
- 🔄 **Auto-Sync** - Konfigurierbare Intervalle (15/30/60 Min.) mit ~0.2-0.8% Akku/Tag
|
||||
- 🏠 **Self-Hosted** - Deine Daten auf deinem Server (WebDAV)
|
||||
- 🎨 **Material Design 3** - Modern & Dynamic Theming
|
||||
- 🔋 **Akkuschonend** - Optimiert für Hintergrund-Synchronisierung
|
||||
- 🔐 **Privacy-First** - Kein Tracking, keine Analytics, keine Cloud
|
||||
- 🚫 **Keine Berechtigungen** - Nur Internet für WebDAV Sync
|
||||
|
||||
## 📥 Quick Download
|
||||
|
||||
**Android APK:** [📱 Neueste Version herunterladen](https://github.com/inventory69/simple-notes-sync/releases/latest)
|
||||
|
||||
💡 **Tipp:** Nutze [Obtainium](https://github.com/ImranR98/Obtainium) für automatische Updates!
|
||||
**📱 [APK Download](https://github.com/inventory69/simple-notes-sync/releases/latest)** · **📖 [Dokumentation](DOCS.md)** · **🚀 [Quick Start](QUICKSTART.md)**
|
||||
|
||||
---
|
||||
|
||||
## 🚀 Schnellstart
|
||||
## Features
|
||||
|
||||
### 1️⃣ WebDAV Server starten
|
||||
- 📝 Offline-First - Notizen immer verfügbar
|
||||
- 🔄 Auto-Sync - Konfigurierbare Intervalle (15/30/60 Min)
|
||||
- 🏠 Self-Hosted - WebDAV auf deinem Server
|
||||
- 🔐 Privacy-First - Keine Cloud, kein Tracking
|
||||
- 🔋 Akkuschonend - ~0.2-0.8% pro Tag
|
||||
|
||||
```fish
|
||||
---
|
||||
|
||||
## 🚀 Quick Start
|
||||
|
||||
### 1. Server Setup
|
||||
|
||||
```bash
|
||||
cd server
|
||||
cp .env.example .env
|
||||
# Passwort in .env anpassen
|
||||
# Passwort in .env setzen
|
||||
docker compose up -d
|
||||
```
|
||||
|
||||
### 2️⃣ App installieren & konfigurieren
|
||||
➡️ **Details:** [Server Setup Guide](server/README.md)
|
||||
|
||||
1. APK herunterladen und installieren
|
||||
2. App öffnen → **Einstellungen** (⚙️)
|
||||
3. Server konfigurieren:
|
||||
- URL: `http://192.168.0.XXX:8080/notes`
|
||||
- Benutzername: `noteuser`
|
||||
- Passwort: (aus `.env`)
|
||||
4. **Auto-Sync aktivieren**
|
||||
5. **Sync-Intervall wählen** (15/30/60 Min.)
|
||||
### 2. App Installation
|
||||
|
||||
**Fertig!** Notizen werden automatisch synchronisiert 🎉
|
||||
1. [APK herunterladen](https://github.com/inventory69/simple-notes-sync/releases/latest)
|
||||
2. Installieren & öffnen
|
||||
3. ⚙️ Einstellungen → Server konfigurieren
|
||||
4. Auto-Sync aktivieren
|
||||
|
||||
➡️ **Details:** [Vollständige Anleitung](QUICKSTART.md)
|
||||
|
||||
---
|
||||
|
||||
## ⚙️ Sync-Intervalle
|
||||
## 📚 Dokumentation
|
||||
|
||||
| Intervall | Akku/Tag | Anwendungsfall |
|
||||
|-----------|----------|----------------|
|
||||
| **15 Min** | ~0.8% (~23 mAh) | ⚡ Maximale Aktualität |
|
||||
| **30 Min** | ~0.4% (~12 mAh) | ✓ Empfohlen - Ausgewogen |
|
||||
| **60 Min** | ~0.2% (~6 mAh) | 🔋 Maximale Akkulaufzeit |
|
||||
|
||||
💡 **Hinweis:** Android Doze Mode kann Sync im Standby auf ~60 Min. verzögern (betrifft alle Apps).
|
||||
- **[Quick Start Guide](QUICKSTART.md)** - Schritt-für-Schritt Anleitung für Endbenutzer
|
||||
- **[Server Setup](server/README.md)** - WebDAV Server konfigurieren
|
||||
- **[Vollständige Docs](DOCS.md)** - Features, Troubleshooting, Build-Anleitung
|
||||
|
||||
---
|
||||
|
||||
## 🎉 Neue Features in v1.1.0
|
||||
## 🛠️ Entwicklung
|
||||
|
||||
### Konfigurierbare Sync-Intervalle
|
||||
- ⏱️ Wählbare Intervalle: 15/30/60 Minuten
|
||||
- 📊 Transparente Akkuverbrauchs-Anzeige
|
||||
- ⚡ Sofortige Anwendung ohne App-Neustart
|
||||
|
||||
### Über-Sektion
|
||||
- 📱 App-Version & Build-Datum
|
||||
- 🌐 Links zu GitHub Repo & Entwickler
|
||||
- ⚖️ Lizenz-Information
|
||||
|
||||
### Verbesserungen
|
||||
- 🎯 Benutzerfreundliche Doze-Mode Erklärung
|
||||
- 🔕 Keine störenden Sync-Fehler Toasts im Hintergrund
|
||||
- 📝 Erweiterte Debug-Logs für Troubleshooting
|
||||
|
||||
---
|
||||
|
||||
## 🛠️ Selbst bauen
|
||||
|
||||
```fish
|
||||
```bash
|
||||
cd android
|
||||
./gradlew assembleStandardRelease
|
||||
# APK: android/app/build/outputs/apk/standard/release/
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 🐛 Troubleshooting
|
||||
|
||||
### Auto-Sync funktioniert nicht
|
||||
|
||||
1. **Akku-Optimierung deaktivieren**
|
||||
- Einstellungen → Apps → Simple Notes → Akku → Nicht optimieren
|
||||
2. **WLAN-Verbindung prüfen**
|
||||
- Funktioniert nur im selben Netzwerk wie Server
|
||||
3. **Server-Status checken**
|
||||
- Settings → "Verbindung testen"
|
||||
|
||||
### Server nicht erreichbar
|
||||
|
||||
```fish
|
||||
# Status prüfen
|
||||
docker compose ps
|
||||
|
||||
# Logs ansehen
|
||||
docker compose logs -f
|
||||
|
||||
# IP-Adresse finden
|
||||
ip addr show | grep "inet " | grep -v 127.0.0.1
|
||||
```
|
||||
|
||||
Mehr Details: [📖 Dokumentation](DOCS.md)
|
||||
|
||||
---
|
||||
|
||||
## 🤝 Contributing
|
||||
|
||||
Contributions sind willkommen! Bitte öffne ein Issue oder Pull Request.
|
||||
➡️ **Details:** [Build-Anleitung in DOCS.md](DOCS.md)
|
||||
|
||||
---
|
||||
|
||||
@@ -132,6 +67,4 @@ Contributions sind willkommen! Bitte öffne ein Issue oder Pull Request.
|
||||
|
||||
MIT License - siehe [LICENSE](LICENSE)
|
||||
|
||||
---
|
||||
|
||||
**Version:** 1.1.0 · **Status:** ✅ Produktiv · **Gebaut mit:** Kotlin + Material Design 3
|
||||
**v1.1.0** · Gebaut mit Kotlin + Material Design 3
|
||||
|
||||
335
README.old.md
335
README.old.md
@@ -1,335 +0,0 @@
|
||||
# Simple Notes Sync 📝
|
||||
|
||||
> Minimalistische Android-App für Offline-Notizen mit automatischer WLAN-Synchronisierung
|
||||
|
||||
Eine schlanke Notiz-App ohne Schnickschnack - perfekt für schnelle Gedanken, die automatisch zu Hause synchronisiert werden.
|
||||
|
||||
---
|
||||
|
||||
## ✨ Features
|
||||
|
||||
- 📝 **Offline-first** - Notizen werden lokal gespeichert und sind immer verfügbar
|
||||
- 🔄 **Auto-Sync** - Automatische Synchronisierung wenn du im Heimnetzwerk bist
|
||||
- 🏠 **WebDAV Server** - Deine Daten bleiben bei dir (Docker-Container)
|
||||
- 🔋 **Akkuschonend** - Nur ~0.4% Akkuverbrauch pro Tag
|
||||
- 🚫 **Keine Cloud** - Keine Google, keine Microsoft, keine Drittanbieter
|
||||
- 🔐 **Privacy** - Keine Tracking, keine Analytics, keine Standort-Berechtigungen
|
||||
|
||||
---
|
||||
|
||||
## 📥 Installation
|
||||
|
||||
### Android App
|
||||
|
||||
**Option 1: APK herunterladen**
|
||||
|
||||
1. Neueste [Release](../../releases/latest) öffnen
|
||||
2. `app-debug.apk` herunterladen
|
||||
3. APK auf dem Handy installieren
|
||||
|
||||
**Option 2: Selbst bauen**
|
||||
|
||||
```bash
|
||||
cd android
|
||||
./gradlew assembleDebug
|
||||
# APK: android/app/build/outputs/apk/debug/app-debug.apk
|
||||
```
|
||||
|
||||
### WebDAV Server
|
||||
|
||||
Der Server läuft als Docker-Container und speichert deine Notizen.
|
||||
|
||||
```bash
|
||||
cd server
|
||||
cp .env.example .env
|
||||
nano .env # Passwort anpassen!
|
||||
docker-compose up -d
|
||||
```
|
||||
|
||||
**Server testen:**
|
||||
```bash
|
||||
curl -u noteuser:dein_passwort http://192.168.0.XXX:8080/
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 🚀 Schnellstart
|
||||
|
||||
1. **Server starten** (siehe oben)
|
||||
2. **App installieren** und öffnen
|
||||
3. **Einstellungen öffnen** (⚙️ Symbol oben rechts)
|
||||
4. **Server konfigurieren:**
|
||||
- Server-URL: `http://192.168.0.XXX:8080/notes`
|
||||
- Benutzername: `noteuser`
|
||||
- Passwort: (aus `.env` Datei)
|
||||
- Auto-Sync: **AN**
|
||||
5. **Fertig!** Notizen werden jetzt automatisch synchronisiert
|
||||
|
||||
---
|
||||
|
||||
## 💡 Wie funktioniert Auto-Sync?
|
||||
|
||||
Die App prüft **alle 30 Minuten**, ob:
|
||||
- ✅ WLAN verbunden ist
|
||||
- ✅ Server im gleichen Netzwerk erreichbar ist
|
||||
- ✅ Neue Notizen vorhanden sind
|
||||
|
||||
Wenn alle Bedingungen erfüllt → **Automatische Synchronisierung**
|
||||
|
||||
**Wichtig:** Funktioniert nur im selben Netzwerk wie der Server (kein Internet-Zugriff nötig!)
|
||||
|
||||
---
|
||||
|
||||
## 🔋 Akkuverbrauch
|
||||
|
||||
| Komponente | Verbrauch/Tag |
|
||||
|------------|---------------|
|
||||
| WorkManager (alle 30 Min) | ~0.3% |
|
||||
| Netzwerk-Checks | ~0.1% |
|
||||
| **Total** | **~0.4%** |
|
||||
|
||||
Bei einem 3000 mAh Akku entspricht das ~12 mAh pro Tag.
|
||||
|
||||
---
|
||||
|
||||
## 📱 Screenshots
|
||||
|
||||
_TODO: Screenshots hinzufügen_
|
||||
|
||||
---
|
||||
|
||||
## 🛠️ Technische Details
|
||||
|
||||
Mehr Infos zur Architektur und Implementierung findest du in der [technischen Dokumentation](DOCS.md).
|
||||
|
||||
**Stack:**
|
||||
- **Android:** Kotlin, Material Design 3, WorkManager
|
||||
- **Server:** Docker, WebDAV (bytemark/webdav)
|
||||
- **Sync:** Sardine Android (WebDAV Client)
|
||||
|
||||
---
|
||||
|
||||
## 📄 Lizenz
|
||||
|
||||
[Lizenz hier einfügen]
|
||||
|
||||
---
|
||||
|
||||
## 🤝 Beitragen
|
||||
|
||||
Contributions sind willkommen! Bitte öffne ein Issue oder Pull Request.
|
||||
|
||||
---
|
||||
|
||||
## 📄 Lizenz
|
||||
|
||||
MIT License - siehe [LICENSE](LICENSE)
|
||||
|
||||
---
|
||||
|
||||
**Projekt Start:** 19. Dezember 2025
|
||||
**Status:** ✅ Funktional & Produktiv
|
||||
|
||||
## 📖 Dokumentation
|
||||
|
||||
### In diesem Repository:
|
||||
|
||||
- **[QUICKSTART.md](QUICKSTART.md)** - Schnellstart-Anleitung
|
||||
- **[server/README.md](server/README.md)** - Server-Verwaltung
|
||||
|
||||
### Vollständige Dokumentation (project-docs):
|
||||
|
||||
- [README.md](https://github.com/inventory69/project-docs/blob/main/simple-notes-sync/README.md) - Projekt-Übersicht & Architektur
|
||||
- [IMPLEMENTATION_PLAN.md](https://github.com/inventory69/project-docs/blob/main/simple-notes-sync/IMPLEMENTATION_PLAN.md) - Detaillierter Sprint-Plan
|
||||
- [SERVER_SETUP.md](https://github.com/inventory69/project-docs/blob/main/simple-notes-sync/SERVER_SETUP.md) - Server-Setup Details
|
||||
- [ANDROID_GUIDE.md](https://github.com/inventory69/project-docs/blob/main/simple-notes-sync/ANDROID_GUIDE.md) - 📱 Kompletter Android-Code
|
||||
- [NOTIFICATIONS.md](https://github.com/inventory69/project-docs/blob/main/simple-notes-sync/NOTIFICATIONS.md) - Notification-System Details
|
||||
- [WINDOWS_SETUP.md](https://github.com/inventory69/project-docs/blob/main/simple-notes-sync/WINDOWS_SETUP.md) - 🪟 Windows + Android Studio Setup
|
||||
- [CODE_REFERENCE.md](https://github.com/inventory69/project-docs/blob/main/simple-notes-sync/CODE_REFERENCE.md) - Schnelle Code-Referenz
|
||||
|
||||
## ⚙️ Server Konfiguration
|
||||
|
||||
**Standard-Credentials:**
|
||||
- Username: `noteuser`
|
||||
- Password: Siehe `.env` im `server/` Verzeichnis
|
||||
|
||||
**Server-URL:**
|
||||
- Lokal: `http://localhost:8080/`
|
||||
- Im Netzwerk: `http://YOUR_IP:8080/`
|
||||
|
||||
IP-Adresse finden:
|
||||
```bash
|
||||
ip addr show | grep "inet " | grep -v 127.0.0.1
|
||||
```
|
||||
|
||||
## 📱 Android App Setup
|
||||
|
||||
### Vorraussetzungen
|
||||
|
||||
- Android Studio Hedgehog (2023.1.1) oder neuer
|
||||
- JDK 17
|
||||
- Min SDK 24 (Android 7.0)
|
||||
- Target SDK 34 (Android 14)
|
||||
|
||||
### In App konfigurieren
|
||||
|
||||
1. App starten
|
||||
2. Einstellungen öffnen
|
||||
3. Server-URL eintragen (z.B. `http://192.168.1.100:8080/`)
|
||||
4. Username & Passwort eingeben
|
||||
5. Heim-WLAN SSID eingeben
|
||||
6. "Verbindung testen"
|
||||
|
||||
## 🔧 Entwicklung
|
||||
|
||||
### Server-Management
|
||||
|
||||
```bash
|
||||
# Status prüfen
|
||||
docker-compose ps
|
||||
|
||||
# Logs anschauen
|
||||
docker-compose logs -f
|
||||
|
||||
# Neustarten
|
||||
docker-compose restart
|
||||
|
||||
# Stoppen
|
||||
docker-compose down
|
||||
```
|
||||
|
||||
### Android-Build
|
||||
|
||||
```bash
|
||||
cd android
|
||||
./gradlew assembleDebug
|
||||
|
||||
# APK Location:
|
||||
# app/build/outputs/apk/debug/app-debug.apk
|
||||
```
|
||||
|
||||
## 🧪 Testing
|
||||
|
||||
### Server-Test
|
||||
|
||||
```bash
|
||||
# Testdatei hochladen
|
||||
echo '{"id":"test","title":"Test","content":"Hello"}' > test.json
|
||||
curl -u noteuser:password -T test.json http://localhost:8080/test.json
|
||||
|
||||
# Datei abrufen
|
||||
curl -u noteuser:password http://localhost:8080/test.json
|
||||
|
||||
# Datei löschen
|
||||
curl -u noteuser:password -X DELETE http://localhost:8080/test.json
|
||||
```
|
||||
|
||||
### Android-App
|
||||
|
||||
1. Notiz erstellen → speichern → in Liste sichtbar ✓
|
||||
2. WLAN verbinden → Auto-Sync ✓
|
||||
3. Server offline → Fehlermeldung ✓
|
||||
4. Konflikt-Szenario → Auflösung ✓
|
||||
|
||||
## 📦 Deployment
|
||||
|
||||
### Server (Production)
|
||||
|
||||
**Option 1: Lokaler Server (Raspberry Pi, etc.)**
|
||||
```bash
|
||||
docker-compose up -d
|
||||
```
|
||||
|
||||
**Option 2: VPS (DigitalOcean, Hetzner, etc.)**
|
||||
```bash
|
||||
# Mit HTTPS (empfohlen)
|
||||
# Zusätzlich: Reverse Proxy (nginx/Caddy) + Let's Encrypt
|
||||
```
|
||||
|
||||
### Android App
|
||||
|
||||
```bash
|
||||
# Release Build
|
||||
./gradlew assembleRelease
|
||||
|
||||
# APK signieren
|
||||
# Play Store Upload oder Direct Install
|
||||
```
|
||||
|
||||
## 🔐 Security
|
||||
|
||||
**Entwicklung:**
|
||||
- ✅ HTTP Basic Auth
|
||||
- ✅ Nur im lokalen Netzwerk
|
||||
|
||||
**Produktion:**
|
||||
- ⚠️ HTTPS mit SSL/TLS (empfohlen)
|
||||
- ⚠️ Starkes Passwort
|
||||
- ⚠️ Firewall-Regeln
|
||||
- ⚠️ VPN für externen Zugriff
|
||||
|
||||
## 🐛 Troubleshooting
|
||||
|
||||
### Server startet nicht
|
||||
|
||||
```bash
|
||||
# Port bereits belegt?
|
||||
sudo netstat -tlnp | grep 8080
|
||||
|
||||
# Logs checken
|
||||
docker-compose logs webdav
|
||||
```
|
||||
|
||||
### Android kann nicht verbinden
|
||||
|
||||
- Ist Android im gleichen WLAN?
|
||||
- Ist die Server-IP korrekt?
|
||||
- Firewall blockiert Port 8080?
|
||||
- Credentials korrekt?
|
||||
|
||||
```bash
|
||||
# Ping zum Server
|
||||
ping YOUR_SERVER_IP
|
||||
|
||||
# Port erreichbar?
|
||||
telnet YOUR_SERVER_IP 8080
|
||||
```
|
||||
|
||||
## 📝 TODO / Roadmap
|
||||
|
||||
### Version 1.0 (MVP)
|
||||
- [x] Docker WebDAV Server
|
||||
- [ ] Android Basic CRUD
|
||||
- [ ] Auto-Sync bei WLAN
|
||||
- [ ] Error Handling
|
||||
- [ ] Notifications
|
||||
|
||||
### Version 1.1
|
||||
- [ ] Suche
|
||||
- [ ] Dark Mode
|
||||
- [ ] Markdown-Support
|
||||
|
||||
### Version 2.0
|
||||
- [ ] Desktop-Client (Flutter Desktop)
|
||||
- [ ] Tags/Kategorien
|
||||
- [ ] Verschlüsselung
|
||||
- [ ] Shared Notes
|
||||
|
||||
## 📄 License
|
||||
|
||||
MIT License - siehe [LICENSE](LICENSE)
|
||||
|
||||
## 👤 Author
|
||||
|
||||
Created for personal use - 2025
|
||||
|
||||
## 🙏 Acknowledgments
|
||||
|
||||
- [bytemark/webdav](https://hub.docker.com/r/bytemark/webdav) - Docker WebDAV Server
|
||||
- [Sardine Android](https://github.com/thegrizzlylabs/sardine-android) - WebDAV Client
|
||||
- [Android WorkManager](https://developer.android.com/topic/libraries/architecture/workmanager) - Background Tasks
|
||||
|
||||
---
|
||||
|
||||
**Project Start:** 19. Dezember 2025
|
||||
**Status:** 🚧 In Development
|
||||
Reference in New Issue
Block a user