A cross-platform Flutter app that brings together personal and household
utilities. The release version is managed in pubspec.yaml.
- Market news: gold, silver, and cryptocurrency prices; JPY/VND exchange rates; price charts; and scheduled AI-generated gold market digests.
- Chicken management: batches, vaccination schedules, multiple sales per batch, fighting/meat chicken sales, shared expenses, yearly statistics, JSON data import, and Supabase synchronization.
- My Life: sign in, capture or select photos and videos, trim videos, and add weather overlays.
- Electricity: sign in to Central Power Corporation's customer service, monitor consumption and usage history, and schedule monthly meter-reading reminders.
- Lunar calendar and feng shui: solar/lunar date conversion, Can Chi, lucky hours, solar terms, tide information, and a feng shui compass.
- Local network: manage the router/Wi-Fi connection, run speed tests, and scan for devices on the LAN.
- Movies: connect to multiple movie servers, browse, filter, search, stream, use a mini player, and synchronize watch history and favorites by account.
- Light and dark themes, Vietnamese and English localization, configurable tab visibility/order, and Android update checks through GitHub Releases.
The repository includes platform runners for Android, iOS, macOS, Windows, and Web.
CI publishes Android APKs, an unsigned iOS IPA, a macOS DMG, and a Windows
setup .exe. The Web app
is deployed through Netlify.
- Flutter
3.47.6and Dart>=3.10.0 <4.0.0, pinned with FVM - Provider and AutoRoute
- Firebase Core, Crashlytics, and the Firebase APIs behind My Life
- Supabase Auth, Postgres, RLS, RPC, Edge Functions, and Cron
- Dio,
video_player, camera/image picker, and local notifications json_serializable,build_runner, Flutter Gen, and Flutter localization
- FVM
- JDK 17 for Android builds
- Xcode 26.6 for iOS and macOS builds
- CocoaPods for iOS and macOS
make(optional; the underlying commands can also be run directly)- Supabase CLI only when changing or deploying the backend
- FlutterFire CLI only when regenerating Firebase configuration
git clone <repository-url>
cd do_x
fvm install
fvm flutter pub getCreate envs/dev/ (this directory is excluded from Git) with the following
structure:
envs/dev/
├── dart-define.env
├── google-services.json
└── GoogleService-Info.plist
Example envs/dev/dart-define.env:
FLAVOR=dev
ML_API_KEY=
ML_API_URL=
ML_BUNDLE_ID=
ML_STORAGE_URL=
FIREBASE_API_KEY_IOS=
FIREBASE_API_KEY_ANDROID=
FIREBASE_API_KEY_WEB=
MARKET_API_URL=
MARKET_WS_URL=
SUPABASE_URL=
SUPABASE_KEY=
ELECTRIC_API_URL=The backends the app talks to are configured here, not in the source — see
lib/constants/env.dart. MARKET_API_URL / MARKET_WS_URL are the market data
REST and websocket hosts. Fixed addresses stay in the code that calls them: the
public APIs (Google, open-meteo, Cloudflare), the GitHub releases endpoint the
updater polls, and the companion site in AuthLinks, which the platform
manifests have to agree with anyway.
Never commit real values. Restore the Firebase files to their platform runners, then start the app:
make env
fvm flutter run --dart-define-from-file envs/dev/dart-define.envThe do_ai (dev) VS Code launch configuration automatically runs the env
restore script and passes the dart-define file. For Web development, it also
adds --disable-web-security to the browser so the app can work with APIs that
do not fully support CORS.
Environment-specific Firebase files are kept out of Git. To create or update them with FlutterFire CLI:
fvm dart pub global activate flutterfire_cli
flutterfire configurePlace the resulting google-services.json and GoogleService-Info.plist files
in envs/<environment>/, then run
scripts/restore-env-configs.sh <environment>. The
lib/firebase_options.dart file contains non-secret FlutterFire configuration;
platform API keys are still supplied through dart-define.env.
Generated files for JSON models, routes, assets, and localization are committed to the repository. After changing annotations, routes, assets, or ARB files, run:
make genIndividual commands:
make l10n # Generate localization only
make gen-app-icon # Generate launcher icons
make clean # Clean, fetch packages, and regenerate codefvm flutter analyze
fvm flutter testThe current test suite covers lunar-calendar and chicken-date logic, chicken data import, merged electricity data, and key widgets.
The Makefile targets use envs/dev/ by default:
make build-apk
make build-ipa
make build-macosBefore building for iOS, apply the repository-maintained patches for
easy_video_editor:
fvm flutter pub get
bash scripts/patch-easy-video-editor.shThe script is idempotent and already runs from ios/Podfile and CI, so this is
only needed when building without a pod install. It carries three fixes, none
of which have an upstream release to move to - 0.1.6 is the latest published
version:
| Fix | Why |
|---|---|
| iOS crop | Wrong crop rect on portrait video. |
| Swift imports | Missing import Dispatch. |
workItem |
Swift 6.2 (Xcode 27) rejects a local lazy var whose initializer refers to itself, failing every command handler with "Use of local variable 'workItem' before its declaration". |
Build on Windows x64 with Visual Studio's Desktop development with C++
workload, a Windows SDK and Inno Setup 6
(winget install JRSoftware.InnoSetup). Use the Flutter version pinned by FVM.
From PowerShell in the repository root:
fvm install
./scripts/build-windows-installer.ps1 -Environment devThe script reads envs/dev/dart-define.env, builds the release runner, copies
the MSVC runtime DLLs next to do_x.exe, and compiles
windows/installer/do-x.iss into build/windows/installer/do-x-setup.exe. Its
four-part version comes from pubspec.yaml, including the build number.
make build-windows-installer invokes the same script when Make is available.
make build-windows builds the unpackaged executable only.
The installer needs no certificate and no administrator rights: it installs per
user into %LOCALAPPDATA%\Programs\Do X, adds Start menu and optional desktop
shortcuts, and registers the vn.dox.app:// URL scheme used by sign-in
callbacks. Because it is unsigned, SmartScreen shows "Windows protected your
PC" on first run; choose More info → Run anyway. Keep the AppId in the
.iss file fixed so newer installers upgrade the existing install in place.
The Windows CI job uses DART_DEFINE_BASE64 from the selected GitHub
environment and publishes do-x-setup.exe as a workflow artifact and a release
asset. It runs on windows-2025; macOS cannot compile the Windows runner.
Windows video playback uses Media Kit; Android, Apple, and Web keep their existing player backends. Firebase initialization, Crashlytics, push messages, and local reminders are currently enabled only on their existing supported platforms. Camera capture, video editing/export, and other native device features still need validation on a physical Windows PC.
Build the Web app locally:
fvm flutter build web --release \
--dart-define-from-file envs/dev/dart-define.envscripts/netlify_build.sh reads the Flutter version from pubspec.yaml,
creates the dart-define file from Netlify environment variables, and builds the
app into build/web.
The app currently connects to Supabase project fyyrgwohjgvsmwqgxiga.
Chicken-management and movie routes require email/password authentication, and
user data is protected with auth.uid()-based RLS policies.
The repository follows an imperative migration workflow under
supabase/migrations/. Existing migrations cover:
- chicken-management schemas and RPC functions;
- the
gold_newstable and a Cron schedule that generates three digests daily; - the
movie_librarytable for watch history and favorites.
Link the project and apply existing migrations with:
supabase login
supabase link --project-ref fyyrgwohjgvsmwqgxiga
supabase db pushThe gold-news Edge Function requires a Supabase secret. Do not put this value in
dart-define.env:
supabase secrets set GEMINI_API_KEY=<your-key>
# Optional: supabase secrets set GEMINI_MODEL=<model-name>
supabase functions deploy summarize-gold-newsSee
supabase/functions/summarize-gold-news/README.md
for RSS sources, the Cron schedule, and manual testing instructions.
Note: the app also reads the existing remote
fx_ratestable, but its schema and refresh job are not currently included in this repository's migrations. Applying only the checked-in migrations is therefore not enough to reproduce the complete production backend in a new project.
The .github/workflows/flutter_build.yml workflow runs on pushes to main or
through a manual dispatch using the dev, staging, or prod environment. It:
- generates environment and Firebase files from GitHub Environment Secrets;
- builds an Android arm64 APK, an unsigned iOS IPA, and a macOS DMG;
- uploads artifacts to the GitHub Release tagged from
pubspec.yaml; - updates the release notes from commit history.
Required CI secrets include DART_DEFINE_BASE64, GOOGLE_SERVICES_BASE64,
GOOGLE_SERVICE_INFO_BASE64, and the Android signing secrets
(PLAY_STORE_UPLOAD_KEY, KEYSTORE_KEY_ALIAS, KEYSTORE_KEY_PASSWORD, and
KEYSTORE_STORE_PASSWORD).
lib/
├── screen/ # Feature UI
├── view_model/ # State and presentation logic
├── services/ # APIs, Supabase, storage, notifications, and devices
├── repository/ # Data access and HTTP client
├── model/ # Domain and API models
├── router/ # AutoRoute configuration and generated routes
├── widgets/ # Shared components
├── l10n/ # ARB and generated localization files
└── utils/ # Algorithms and utilities
supabase/
├── migrations/ # Postgres schema history
└── functions/ # Supabase Edge Functions
scripts/ # Env restore, CI web build, iOS patches, and helper tools
test/ # Unit and widget tests
tool/ # Import-data verification and conversion scripts
import_data/ # Historical chicken data and import documentation
import_data/chicken_import_2023_2026.json contains digitized historical data.
See import_data/README.md for its format, import steps,
and reconciliation notes.
Community contributions are welcome. Bug reports, feature proposals, documentation improvements, tests, and code changes all help improve the project.
Before opening a pull request:
- open an issue first for substantial changes so the approach can be agreed upon;
- fork the repository and create a focused branch;
- follow the existing project structure and code style;
- regenerate and commit affected generated files when changing routes, models, assets, or localization;
- run
fvm flutter analyzeandfvm flutter test; - describe the problem, solution, platforms tested, and any setup or migration steps in the pull request.
Keep pull requests small and focused when possible. Never include credentials, API keys, private user data, signing files, or environment-specific Firebase configuration in commits, issues, logs, or screenshots.
Do X is an independent, community-maintained project provided on an “as is” and “as available” basis, without warranties of any kind. It is not affiliated with, endorsed by, or sponsored by Supabase, Firebase, Central Power Corporation, Gemini, movie providers, market-data providers, or any other third-party service used by the app.
- Market prices, exchange rates, charts, news summaries, electricity data, and other displayed information may be delayed, incomplete, or inaccurate. They are provided for informational purposes only and are not financial, investment, legal, or professional advice.
- Third-party APIs, websites, and services may change, become unavailable, or impose their own terms, fees, rate limits, and privacy practices. Users are responsible for reviewing and complying with those terms.
- The project does not host or supply movie content. Users must configure their own sources and are solely responsible for ensuring they have the right to access and view any content.
- Network discovery and router-management features must only be used on networks and devices the user owns or is explicitly authorized to manage.
- Users are responsible for protecting their credentials, API keys, imported data, and backups. Review the code and configuration before using the app with sensitive or production data.
By using or contributing to the project, you accept responsibility for your use of the software and any resulting data loss, service disruption, account action, legal obligation, or other consequence to the extent permitted by applicable law.
This project is available under the MIT License.