No description
Find a file
Tronax 729865be78
Feature: Settings screen with account, theme, profile, reset + credits
Backend:
- New GET/PUT /api/me endpoint to read and update the authenticated
  user's profile (currently display_name). UserStore.UpdateDisplayName.
- Wired into the authed router.

App:
- New SettingsScreen + SettingsViewModel with five sections:
  * Account & Sync: login status, email, server URL, logout, connect.
  * Profile: edit display name (pushed to PUT /api/me when logged in).
  * Appearance: System / Light / Dark theme switch, persisted in
    SessionManager and applied via MitbringslTheme(sessionManager).
  * Data: 'Reset local data' wipes Room tables (server data kept).
  * About: version, 'Developed by Janik Dietz', and credits to
    GLM-5.2 + Gemini 3.6 Flash.
- Theme.kt now reads the user's theme preference (StateFlow) instead
  of only the system default; MainActivity passes SessionManager in.
- Navigation: new SettingsNavKey; settings gear icon in ListsScreen
  top bar; Settings links back to the Sync/Account screen.
- DTOs/API: UpdateMeRequestDto + getMe()/updateMe() for /api/me.
2026-08-06 10:39:12 +02:00
android Feature: Settings screen with account, theme, profile, reset + credits 2026-08-06 10:39:12 +02:00
backend Feature: Settings screen with account, theme, profile, reset + credits 2026-08-06 10:39:12 +02:00
deploy Feature: Server-driven auth method discovery + OIDC-only enforcement 2026-08-06 10:28:12 +02:00
docs Phase F: NetworkMonitor, offline banner, README & architecture docs 2026-08-05 20:14:04 +02:00
.gitignore Fix: Critical sync, build and data-safety bugs in Android app 2026-08-06 10:01:57 +02:00
AGENTS.md Phase F: NetworkMonitor, offline banner, README & architecture docs 2026-08-05 20:14:04 +02:00
README.md Phase F: NetworkMonitor, offline banner, README & architecture docs 2026-08-05 20:14:04 +02:00

Mitbringsl 🛒

Local-First Einkaufslisten-App (Bring-Alternative, werbefrei & datensparsam).

Mitbringsl ist eine moderne, schnelle und werbefreie Einkaufslisten-App mit Local-First Synchronization. Die App funktioniert vollständig offline und synchronisiert Änderungen automatisch, sobald eine Verbindung besteht — ohne Datenverlust oder Konflikte.


🌟 Highlights & Features

  • 📱 Android App: Kotlin 2.x, Jetpack Compose Material 3, Room, Hilt, WorkManager.
  • Local-First Sync Engine: Hybrid Logical Clock (HLC), append-only op_log, Last-Write-Wins (LWW) Projektionen, Idempotente Push/Pull-Algorithmen.
  • 🔐 Datenschutz & Auth: Argon2id Passwort-Hashing, opaque Session-Tokens, OIDC-Unterstützung (Google & eigene IdPs).
  • 🚀 Go Backend: Stdlib net/http Routing (Go 1.26), PostgreSQL 16 (pgxpool), pg_trgm Fuzzy Autocomplete.
  • 🛡️ Deployment: Multi-Stage Docker Container, Caddy Reverse Proxy mit automatischem HTTPS / Standalone & Behind-Proxy Modi.

🏗️ Repository-Struktur

mitbringsl/
├── backend/            # Go REST API Backend
│   ├── cmd/            # Server & Migrate Binaries
│   ├── internal/       # Auth, Sync (HLC), Store (pgx), HTTP API
│   ├── migrations/     # SQL Migrationen (iofs-embedded)
│   └── Dockerfile      # Multi-Stage Build (golang:1.26 -> distroless)
├── android/            # Android Kotlin + Compose App
│   ├── app/src/        # Room DB, Retrofit API, WorkManager, Hilt, Compose UI
│   └── build.gradle.kts
├── deploy/             # Docker Compose & Caddy Setup
│   ├── docker-compose.yml
│   ├── Caddyfile / Caddyfile.behind-proxy
│   └── .env.example
└── docs/               # Architektur- & Protokoll-Dokumentation
    ├── ARCHITECTURE.md # Gesamtarchitektur & Systemdesign
    ├── SYNC.md         # Sync-Protokoll & HLC-Spezifikation
    └── API.md          # REST API Dokumentation

🚀 Quickstart: Backend & Stack lokal starten

1. Backend lokal bauen & testen

cd backend
go build ./...
go vet ./...
go test ./...

2. Stack per Docker Compose starten

cd deploy
cp .env.example .env
# Passwörter in .env anpassen
docker compose up -d --build

📱 Android App bauen

cd android
./gradlew assembleDebug
./gradlew test

📖 Dokumentation

  • ARCHITECTURE.md Architektur & Systemdesign
  • SYNC.md Synchronisationsprotokoll & HLC-Spezifikation
  • API.md REST API Endpoint-Referenz
  • AGENTS.md Projektstand & Architekturentscheidungen für KI-Agenten

📄 Lizenz

MIT License