Skip to content

opensoft/dartwing-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

35 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

DartWing Flutter Mobile

A Flutter mobile application for business application scaffolding, built on the DartWing open-source framework. This app provides enterprise-grade mobile solutions with Keycloak authentication, multi-tenant architecture, and comprehensive business workflows.

πŸ“± About DartWing

DartWing is an open-source Flutter framework designed for mobile business application scaffolding. The project consists of:

  • Flutter Mobile App (this repository) - Main mobile application
  • Gatekeeper Service - .NET backend API service
  • Shared Flutter Library - Core functionality, networking, and UI components

Key Features

  • πŸ” Keycloak Authentication - Enterprise-grade security
  • 🏒 Multi-tenant Architecture - Site-based data isolation
  • 🌐 Multi-backend Support - DartWing API and Healthcare (Frappe) integration
  • πŸ“Š Business Workflows - Organization management, document repository, barcode scanning
  • 🌍 Internationalization - English and German language support
  • πŸ“± Cross-platform - iOS and Android support

πŸš€ Quick Start (Warp Terminal - Recommended)

# Navigate to app directory (you're already here!)
cd /home/brett/projects/dartwingers/dartwing/app

# Check container status
beam-me-up status

# Start the development environment
beam-me-up start

# Connect to containerized environment
beam-me-up connect

πŸ“‹ Prerequisites

Required Software

  • Docker - Container runtime for development environment
  • VS Code with "Dev Containers" extension
  • Node.js (LTS version) - Required for DevContainer CLI
  • DevContainer CLI - npm install -g @devcontainers/cli
  • Git with SSH keys configured for Azure DevOps
  • Warp Terminal (recommended) - Enhanced development workflow

Complete Setup

  • Windows Users: See Windows Setup Guide
  • WSL Users: This project is optimized for WSL/Linux environments

πŸ›  Development Environment

This project uses a fully containerized development environment with:

  • Flutter SDK 3.24.0 - Latest stable Flutter version
  • Android SDK with emulator support
  • Dart SDK ^3.9.0 - Modern Dart language features
  • Warpified environment with Flutter shortcuts and productivity tools
  • Shared ADB server - Streamlined Android device debugging
  • Hot reload on port 8080
  • DevTools on port 9100

Container Configuration

  • Memory: 4GB allocated
  • CPU: 2 cores allocated
  • Network: Connected to dartnet shared infrastructure
  • Project Stack: dartwingers (groups with gatekeeper service)

πŸ— Project Architecture

Directory Structure

app/
β”œβ”€β”€ lib/
β”‚   β”œβ”€β”€ dart_wing/           # Symlinked shared library
β”‚   β”‚   β”œβ”€β”€ core/             # Core utilities and data models
β”‚   β”‚   β”œβ”€β”€ network/          # Network layer and API clients
β”‚   β”‚   β”œβ”€β”€ gui/              # Shared UI components
β”‚   β”‚   └── localization/     # i18n support
β”‚   └── main.dart             # App entry point
β”œβ”€β”€ .devcontainer/            # Development container configuration
β”œβ”€β”€ android/                  # Android-specific files
β”œβ”€β”€ ios/                      # iOS-specific files
└── test/                     # Unit and widget tests

Tech Stack

  • Framework: Flutter 3.24.0
  • Language: Dart ^3.9.0
  • State Management: Stateful widgets with global singletons
  • Authentication: Keycloak via keycloak_wrapper
  • Networking: HTTP with retry logic and comprehensive logging
  • Localization: easy_localization (EN/DE support)
  • Barcode Scanning: mobile_scanner
  • Image Processing: TensorFlow Lite integration

πŸ”§ Development Workflow

Starting Development

  1. Start containers: beam-me-up start
  2. Connect to environment: beam-me-up connect
  3. Install dependencies: flutter pub get
  4. Run the app: flutter run

Common Commands (Inside Container)

# Install dependencies
flutter pub get

# Run the app with hot reload
flutter run --hot

# Run tests
flutter test

# Generate code (JSON serialization)
flutter packages pub run build_runner build

# Analyze code quality
flutter analyze

# Format code
flutter format lib/

Working with Multiple Services

This app works alongside the DartWing gatekeeper service:

  • Flutter App: dartwing-app (port 8080)
  • Gatekeeper API: dartwing-gatekeeper (port 5000)
  • Both services run in the dartwingers Docker stack

πŸ§ͺ Testing

# Run all tests
flutter test

# Run tests with coverage
flutter test --coverage

# Run specific test file
flutter test test/widget_test.dart

πŸš€ Building and Deployment

Android Build

# Debug APK
flutter build apk --debug

# Release APK
flutter build apk --release

# App Bundle for Play Store
flutter build appbundle --release

iOS Build

# Debug build
flutter build ios --debug

# Release build
flutter build ios --release

🌐 Environment Configuration

Multi-Environment Support

  • QA Environment: https://*-qa.tech-corps.com
  • Production Environment: https://*.opensoft.one
  • Debug Mode: Automatic QA mode detection

Configuration Files

  • Container Config: .devcontainer/.env
  • Flutter Config: pubspec.yaml
  • Docker Compose: docker-compose.yml, docker-compose.override.yml

πŸ“š Documentation

Project Documentation

External Resources

πŸ”§ Troubleshooting

Common Issues

Container won't start:

# Check Docker status
docker ps -a

# Rebuild container
beam-me-up rebuild

Flutter dependencies issues:

# Clean and reinstall
flutter clean
flutter pub get

ADB connection problems:

# Check shared ADB server
docker ps | grep shared-adb-server

# Restart ADB
adb kill-server
adb start-server

Hot reload not working:

  • Ensure you're running flutter run from inside the container
  • Check that port 8080 is accessible
  • Verify VS Code is connected to the container

🀝 Contributing

Development Process

  1. Work in feature branches - Never commit directly to main or develop
  2. Follow Flutter conventions - Use flutter format and flutter analyze
  3. Write tests - Maintain test coverage for new features
  4. Update documentation - Keep README and code comments current

Code Standards

  • Follow Flutter style guide
  • Use meaningful commit messages
  • Maintain backwards compatibility where possible
  • Document public APIs

πŸ“Š Project Status

  • Version: 1.0.2
  • Flutter SDK: 3.24.0
  • Dart SDK: ^3.9.0
  • Platform Support: Android βœ…, iOS βœ…, Linux βœ…
  • Development Status: Active development

πŸ”— Related Projects


🌟 Enhanced with Warp Terminal integration for the ultimate Flutter development experience!

About

Example app for the Dartwing framework

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •