Skip to content
 
 

Repository files navigation

Cleanmate Rush

coverage style: very good analysis License: MIT

Generated by the Very Good CLI 🤖

A web platformer game built with Flutter and Flame.


Play the game 🎮

Play directly in your browser.

Getting Started 🚀

This project contains 2 entry points (environments):

  • development — lib/main_dev.dart
  • production — lib/main_prod.dart

Run in Chrome:

# Development
flutter run -d chrome -t lib/main_dev.dart

# Production
flutter run -d chrome -t lib/main_prod.dart

Build for deployment:

flutter build web -t lib/main_prod.dart

Cleanmate Rush is web-only.

AWS Amplify Hosting

The app can be deployed to Amplify Hosting as static Flutter web output (same artifact as Firebase Hosting).

  1. Connect the cleanmate repository in Amplify (uses root amplify.yml with appRoot: nebula/cleanmate_rush), or connect only this folder and use the local amplify.yml here.

  2. amplify.yml installs Flutter stable, runs flutter build web, and publishes build/web.

  3. Branch → entry point (override with env var AMPLIFY_FLUTTER_TARGET):

    Branch Entry point
    main (default) lib/main_dev.dart
    production / prod lib/main_prod.dart
  4. After the first deploy, add the Amplify URL (e.g. https://main.d1234.amplifyapp.com) under Firebase Console → Authentication → Settings → Authorized domains.

  5. Ensure api.cleanmatedao.com allows CORS and WebSocket origins from your Amplify domain. customHttp.yml applies the same cache and font CORS headers as firebase.json.


Running Tests 🧪

To run all unit and widget tests use the following command:

flutter test --coverage --test-randomize-ordering-seed random

To view the generated coverage report you can use lcov.

# Generate Coverage Report
genhtml coverage/lcov.info -o coverage/

# Open coverage/index.html in your browser

Working with Translations 🌐

This project relies on flutter_localizations and follows the official internationalization guide for Flutter.

Adding Strings

  1. To add a new localizable string, open the app_en.arb file at lib/l10n/arb/app_en.arb.
{
    "@@locale": "en",
    "counterAppBarTitle": "Counter",
    "@counterAppBarTitle": {
        "description": "Text shown in the AppBar of the Counter Page"
    }
}
  1. Then add a new key/value and description
{
    "@@locale": "en",
    "counterAppBarTitle": "Counter",
    "@counterAppBarTitle": {
        "description": "Text shown in the AppBar of the Counter Page"
    },
    "helloWorld": "Hello World",
    "@helloWorld": {
        "description": "Hello World Text"
    }
}
  1. Regenerate localizations and use the new string
flutter gen-l10n
import 'package:cleanmate_rush/l10n/l10n.dart';

@override
Widget build(BuildContext context) {
  final l10n = context.l10n;
  return Text(l10n.helloWorld);
}

Adding Supported Locales

  1. For each supported locale, add a new ARB file in lib/l10n/arb.
├── l10n
│   ├── arb
│   │   ├── app_en.arb
│   │   └── app_es.arb
  1. Add the translated strings to each .arb file and run flutter gen-l10n.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages