# Geutebruck API Flutter App Flutter mobile application for managing Geutebruck surveillance systems (G-Core and GeViScope servers) with offline-first architecture. ## 📱 Features - 🔐 **Authentication**: Secure JWT-based login - 🖥️ **Server Management**: Full CRUD operations for G-Core and GeViScope servers - 📡 **Offline-First**: Local Hive storage with bidirectional sync - 🔄 **Sync**: Upload changes and download latest configuration - 🎨 **Modern UI**: Material Design 3 with responsive layout - 🧭 **Navigation**: App drawer with organized menu structure ## 🚀 Quick Start ### Prerequisites - Flutter SDK ^3.5.0 - Dart SDK ^3.5.0 - API server running at `http://100.81.138.77:8000` ### Installation ```bash # Clone the repository cd geutebruck_app # Install dependencies flutter pub get # Run code generation flutter pub run build_runner build --delete-conflicting-outputs # Run the app flutter run -d web-server --web-port=8081 --web-hostname=0.0.0.0 ``` ### Default Credentials - **Username**: `admin` - **Password**: `admin123` ## 📁 Project Structure ``` lib/ ├── core/ # Core functionality (constants, errors, network) ├── data/ # Data layer (repositories, data sources, models) ├── domain/ # Business logic (entities, use cases) └── presentation/ # UI layer (screens, widgets, BLoCs) ``` ## 🏗️ Architecture - **Clean Architecture**: Separation of concerns across layers - **BLoC Pattern**: State management with flutter_bloc - **Offline-First**: Hive local storage with sync capabilities - **Dependency Injection**: GetIt for IoC container - **Routing**: GoRouter with type-safe navigation ## 🔧 Development ### Hot Reload Press `r` in the Flutter terminal to hot reload changes without restarting. ### Code Generation ```bash flutter pub run build_runner watch ``` ### Running Tests ```bash flutter test ``` ## 📊 Current Status **Phase 2 Complete**: Server Management fully implemented - ✅ View all servers with filtering - ✅ Create G-Core and GeViScope servers - ✅ Update server configuration - ✅ Delete servers with confirmation - ✅ Offline-first with sync - ✅ Dirty change tracking See [STATUS.md](STATUS.md) for detailed progress. ## 🐛 Recent Fixes ### 2025-12-23: "No Data" Display Issue Fixed BlocBuilder fallback case to show loading indicator instead of "No data" during state transitions. ## 📚 Documentation - [Project Status](STATUS.md) - Detailed development status - [Tasks](../geutebruck-api/specs/001-flutter-app/tasks.md) - Implementation task list - [API Spec](../geutebruck-api/specs/001-surveillance-api/spec.md) - API documentation ## 🛠️ Tech Stack - **Flutter** - Cross-platform UI framework - **Dart** - Programming language - **flutter_bloc** - State management - **hive** - Local NoSQL database - **dio** - HTTP client - **go_router** - Declarative routing - **get_it** - Dependency injection ## 🤝 Contributing This is an AI-assisted development project. Changes should maintain: - Clean Architecture principles - BLoC pattern for state management - Offline-first data strategy - Comprehensive error handling ## 📝 License This project is part of the Geutebruck API integration suite.