Skip to content

Monster-Spawned-Studios/Flutter-App-Template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

7 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Flutter Template

A comprehensive Flutter app template for Monster Spawned Studios with CI/CD, localization, security, and best practices.

Features

  • 🌍 Multi-language Support: English, Spanish, French, German
  • 🎨 Theme Support: Light, Dark, and System themes
  • πŸ” Biometric Authentication: Secure fingerprint/face unlock
  • πŸ”” Local Notifications: Push notification system
  • πŸ›‘οΈ Security Features: PIN lock and secure storage
  • ✨ Smooth Animations: Beautiful UI transitions
  • πŸš€ CI/CD Ready: GitHub Actions for iOS/Android builds
  • πŸ“ Code Quality: Pre-commit hooks and linting
  • πŸ”’ Security Scanning: Git secrets detection
  • πŸ“„ Copyright Headers: Automatic copyright insertion

Quick Start

  1. Clone the template:

    git clone <repository-url>
    cd flutter-template
  2. Install dependencies:

    flutter pub get
  3. Run the app:

    flutter run

Setup Instructions

Prerequisites

  • Flutter SDK 3.24.0 or higher
  • Dart SDK 3.9.2 or higher
  • Android Studio / VS Code
  • Xcode (for iOS development)
  • Git

Platform Setup

Android

  1. Install Android Studio
  2. Set up Android SDK
  3. Create virtual device or connect physical device
  4. Run flutter doctor to verify setup

iOS

  1. Install Xcode from App Store
  2. Install Xcode command line tools: xcode-select --install
  3. Install CocoaPods: sudo gem install cocoapods
  4. Run flutter doctor to verify setup

Web

  1. Install Chrome browser
  2. Enable web support: flutter config --enable-web
  3. Run flutter doctor to verify setup

Desktop (Windows/macOS/Linux)

  1. Enable desktop support: flutter config --enable-windows-desktop (or macos/linux)
  2. Install platform-specific dependencies
  3. Run flutter doctor to verify setup

Development

Code Quality

The template includes several tools to maintain code quality:

  • Dart Format: Automatic code formatting
  • Flutter Analyze: Static analysis and linting
  • Git Secrets: Security scanning for sensitive data
  • Copyright Headers: Automatic copyright insertion

Pre-commit Hooks

Install lefthook to enable pre-commit hooks:

# Install lefthook
dart pub global activate lefthook

# Install git hooks
lefthook install

Adding New Languages

  1. Add translation file to assets/translations/
  2. Update main.dart supported locales
  3. Add language option to LocaleProvider

Example:

// assets/translations/it.json
{
  "app_title": "Modello Flutter",
  "welcome": "Benvenuto nel Modello Flutter"
}

Customizing Themes

Modify lib/providers/theme_provider.dart to customize:

  • Color schemes
  • Typography
  • Component themes
  • Dark/light mode differences

CI/CD Workflows

iOS IPA Build

The template includes a GitHub Actions workflow for building iOS IPAs:

File: .github/workflows/build-ipa.yml

Triggers:

  • Version tags (e.g., v1.0.0)
  • Manual dispatch

Requirements:

  • Apple Developer Account
  • iOS Distribution Certificate
  • Provisioning Profile

Setup:

  1. Export your certificate as .p12 file
  2. Export your provisioning profile as .mobileprovision file
  3. Add GitHub secrets:
    • CERTIFICATE_BASE64: Base64 encoded certificate
    • CERTIFICATE_PASSWORD: Certificate password
    • PROVISIONING_PROFILE_BASE64: Base64 encoded provisioning profile

Android APK/AAB Build

File: .github/workflows/build-android.yml

Triggers:

  • Version tags (e.g., v1.0.0)
  • Manual dispatch

Outputs:

  • Release APK
  • Android App Bundle (AAB)

Security

Git Secrets

The template includes git-secrets for scanning commits:

# Install git-secrets
git secrets --install

# Add patterns
git secrets --add 'AKIA[0-9A-Z]{16}'
git secrets --add 'sk_live_[0-9a-zA-Z]{24}'

Copyright Headers

Automatic copyright header insertion:

# Run manually
dart tools/add_copyright.dart

# Or via pre-commit hook (automatic)

Project Structure

lib/
β”œβ”€β”€ main.dart                 # App entry point
β”œβ”€β”€ providers/               # State management
β”‚   β”œβ”€β”€ theme_provider.dart
β”‚   β”œβ”€β”€ locale_provider.dart
β”‚   β”œβ”€β”€ auth_provider.dart
β”‚   └── notification_provider.dart
β”œβ”€β”€ screens/                 # UI screens
β”‚   β”œβ”€β”€ splash_screen.dart
β”‚   β”œβ”€β”€ home_screen.dart
β”‚   β”œβ”€β”€ settings_screen.dart
β”‚   β”œβ”€β”€ about_screen.dart
β”‚   └── lock_screen.dart
β”œβ”€β”€ widgets/                 # Reusable widgets
β”‚   β”œβ”€β”€ animated_card.dart
β”‚   β”œβ”€β”€ language_selector.dart
β”‚   └── theme_selector.dart
└── services/               # Business logic
    └── (to be implemented)

assets/
β”œβ”€β”€ translations/           # Localization files
β”‚   β”œβ”€β”€ en.json
β”‚   β”œβ”€β”€ es.json
β”‚   β”œβ”€β”€ fr.json
β”‚   └── de.json
└── images/                # App assets
    └── (to be added)

tools/
└── add_copyright.dart      # Copyright header script

.github/
└── workflows/             # CI/CD workflows
    β”œβ”€β”€ build-ipa.yml
    └── build-android.yml

Contributing

Please read CONTRIBUTING.md for details on our code of conduct and the process for submitting pull requests.

License

This project is licensed under the Monster Spawned Studios License - see the LICENSE.md file for details.

Support

For support and questions:

Acknowledgments

  • Flutter team for the amazing framework
  • Provider package for state management
  • Easy Localization for i18n support
  • Flutter Animate for smooth animations
  • All contributors and the open-source community

About

A flutter app template for Monster Spawned Studios apps

Resources

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

Sponsor this project

Packages

Contributors

Languages