Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Format mobile Markdown

Manav Rathid3fe5cad5f5f
diff --git a/mobile/apps/auth/README.md b/mobile/apps/auth/README.md
index e61b8ca074..045f9f7d09 100644
--- a/mobile/apps/auth/README.md
+++ b/mobile/apps/auth/README.md
@@ -1,9 +1,6 @@
# Ente Auth
-Ente's 2FA app. An end-to-end encrypted, cross platform and free app for
-storing your 2FA codes with cloud backups. Works offline. You can even use it
-without signing up for an account if you don't want the cloud backups or
-multi-device sync.
+Ente's 2FA app. An end-to-end encrypted, cross platform and free app for storing your 2FA codes with cloud backups. Works offline. You can even use it without signing up for an account if you don't want the cloud backups or multi-device sync.
![App Screenshots](./docs/assets/screenshots.png)
@@ -11,10 +8,7 @@ multi-device sync.
### Android
-This repository's [GitHub
-releases](https://github.com/ente-io/ente/releases?q=tag%3Aauth-v4)
-contains APKs, built straight from source. These builds keep themselves updated,
-without relying on third party stores.
+This repository's [GitHub releases](https://github.com/ente-io/ente/releases?q=tag%3Aauth-v4) contains APKs, built straight from source. These builds keep themselves updated, without relying on third party stores.
You can alternatively install the build from PlayStore or F-Droid.
@@ -33,14 +27,11 @@ You can alternatively install the build from PlayStore or F-Droid.
### Desktop
-You can [**download**](https://github.com/ente-io/ente/releases?q=tag%3Aauth-v4)
-a native desktop app from this repository's GitHub releases. The desktop app
-works on Windows, Linux and macOS.
+You can [**download**](https://github.com/ente-io/ente/releases?q=tag%3Aauth-v4) a native desktop app from this repository's GitHub releases. The desktop app works on Windows, Linux and macOS.
### Web
-You can view your 2FA codes at [auth.ente.com](https://auth.ente.com). For adding
-or managing your secrets, please use our mobile or desktop app.
+You can view your 2FA codes at [auth.ente.com](https://auth.ente.com). For adding or managing your secrets, please use our mobile or desktop app.
## πŸ§‘β€πŸ’» Build from source
@@ -59,40 +50,30 @@ or managing your secrets, please use our mobile or desktop app.
To build a release APK, [setup your keystore](https://docs.flutter.dev/deployment/android#create-an-upload-keystore) and run `flutter build apk --release --flavor independent`. For iOS, use `flutter build ios`.
-If the code you're working needs to modify user facing strings, see
-[docs/localization](docs/localization.md).
+If the code you're working needs to modify user facing strings, see [docs/localization](docs/localization.md).
## πŸ”© Architecture
-The architecture that powers end-to-end encrypted storage and sync of your
-tokens has been documented [here](../../../architecture/README.md#token-encryption).
+The architecture that powers end-to-end encrypted storage and sync of your tokens has been documented [here](../../../architecture/README.md#token-encryption).
## 🌍 Translate
[![Crowdin](https://badges.crowdin.net/ente-authenticator-app/localized.svg)](https://crowdin.com/project/ente-authenticator-app)
-If you're interested in helping out with translation, please visit our [Crowdin
-project](https://crowdin.com/project/ente-authenticator-app) to get started. Thank you
-for your support.
+If you're interested in helping out with translation, please visit our [Crowdin project](https://crowdin.com/project/ente-authenticator-app) to get started. Thank you for your support.
-If your language is not listed for translation, please [create a GitHub
-issue](https://github.com/ente-io/ente/issues/new?title=Request+for+New+Language+Translation&body=Language+name%3A)
-to have it added.
+If your language is not listed for translation, please [create a GitHub issue](https://github.com/ente-io/ente/issues/new?title=Request+for+New+Language+Translation&body=Language+name%3A) to have it added.
## πŸ§‘β€πŸŽ¨ Icons
-Ente Auth supports the icon pack provided by
-[simple-icons](https://github.com/simple-icons/simple-icons). If you wish to add
-more, see [docs/adding-icons](docs/adding-icons.md).
+Ente Auth supports the icon pack provided by [simple-icons](https://github.com/simple-icons/simple-icons). If you wish to add more, see [docs/adding-icons](docs/adding-icons.md).
## πŸ’š Contribute
-The best way to support this project is by checking out [Ente
-Photos](../mobile/README.md) or spreading the word.
+The best way to support this project is by checking out [Ente Photos](../mobile/README.md) or spreading the word.
For more ways to contribute, see [CONTRIBUTING.md](../../../CONTRIBUTING.md).
## ⭐️ About
-To know more about Ente and the ways to get in touch or seek help, see [our main
-README](../../../README.md) or visit [ente.com](https://ente.com).
+To know more about Ente and the ways to get in touch or seek help, see [our main README](../../../README.md) or visit [ente.com](https://ente.com).
diff --git a/mobile/apps/auth/docs/adding-icons.md b/mobile/apps/auth/docs/adding-icons.md
index 94390f348b..4bcb484648 100644
--- a/mobile/apps/auth/docs/adding-icons.md
+++ b/mobile/apps/auth/docs/adding-icons.md
@@ -1,27 +1,20 @@
## Icons
-Ente Auth supports the icon pack provided by
-[simple-icons](https://github.com/simple-icons/simple-icons).
+Ente Auth supports the icon pack provided by [simple-icons](https://github.com/simple-icons/simple-icons).
-If you would like to add your own custom icon, please open a pull-request with
-the relevant SVG placed within `mobile/apps/auth/assets/custom-icons/icons` and add the
-corresponding entry within `mobile/apps/auth/assets/custom-icons/_data/custom-icons.json`. Please note icon names may only contain lowercase characters.
+If you would like to add your own custom icon, please open a pull-request with the relevant SVG placed within `mobile/apps/auth/assets/custom-icons/icons` and add the corresponding entry within `mobile/apps/auth/assets/custom-icons/_data/custom-icons.json`. Please note icon names may only contain lowercase characters.
Please be careful to upload small and optimized icon files. Icons exceeding 20KB will not be accepted.
-Note that the correspondence between the icon and the issuer is based on the name
-of the issuer provided by the user, excluding spaces. Only the text before the
-first dot "." or left parentheses "(" will be used for icon matching.
-e.g. Issuer name provided: "github.com (Main account)" - Then "github" will be
-used for matching.
+Note that the correspondence between the icon and the issuer is based on the name of the issuer provided by the user, excluding spaces. Only the text before the first dot "." or left parentheses "(" will be used for icon matching. e.g. Issuer name provided: "github.com (Main account)" - Then "github" will be used for matching.
This JSON file contains the following attributes:
-| Attribute | Usecase | Required |
-|---|---|---|
-| `title` | Name of the service. | Yes |
-| `slug` | If the icon's SVG file has a name different from the `title` | No |
-| `hex` | Color code for the icon | No |
-| `altNames` | If the same service goes by different names or has different instances (e.g. Mastodon) | No |
+| Attribute | Usecase | Required |
+| ---------- | -------------------------------------------------------------------------------------- | -------- |
+| `title` | Name of the service. | Yes |
+| `slug` | If the icon's SVG file has a name different from the `title` | No |
+| `hex` | Color code for the icon | No |
+| `altNames` | If the same service goes by different names or has different instances (e.g. Mastodon) | No |
Here is an [example PR](https://github.com/ente-io/ente/pull/9121).
diff --git a/mobile/apps/auth/docs/localization.md b/mobile/apps/auth/docs/localization.md
index e2206f236e..b1b52ae27a 100644
--- a/mobile/apps/auth/docs/localization.md
+++ b/mobile/apps/auth/docs/localization.md
@@ -1,20 +1,17 @@
## Localization
-If the feature requires adding new strings, you can do that by following these
-steps:
+If the feature requires adding new strings, you can do that by following these steps:
-1. Add a new entry inside
- [app_en.arb](https://github.com/ente-io/ente/blob/main/auth/lib/l10n/arb/app_en.arb)
- (remember to save!)
+1. Add a new entry inside [app_en.arb](https://github.com/ente-io/ente/blob/main/auth/lib/l10n/arb/app_en.arb) (remember to save!)
-2. In your dart file, add the following import
+2. In your dart file, add the following import
- ```dart
- import "package:ente_auth/l10n/l10n.dart";
- ```
+ ```dart
+ import "package:ente_auth/l10n/l10n.dart";
+ ```
3. Refer to the string using `context.l10n.<keyName>`. For example
- ```dart
- context.l10n.account
- ```
+ ```dart
+ context.l10n.account
+ ```
diff --git a/mobile/apps/auth/docs/release.md b/mobile/apps/auth/docs/release.md
index 12bbd5f5d1..244f3fe279 100644
--- a/mobile/apps/auth/docs/release.md
+++ b/mobile/apps/auth/docs/release.md
@@ -6,9 +6,7 @@ On minor or major bumps, also add a new `<release>` entry to the Flathub metadat
> [!NOTE]
>
-> Use [semver](https://semver.org/) for the tags, with `auth-` as a prefix.
-> Multiple beta releases for the same upcoming version can be done by adding
-> build metadata at the end, e.g. `auth-v1.2.3-beta+3`.
+> Use [semver](https://semver.org/) for the tags, with `auth-` as a prefix. Multiple beta releases for the same upcoming version can be done by adding build metadata at the end, e.g. `auth-v1.2.3-beta+3`.
Once that is merged, tag main, and push the tag.
@@ -19,10 +17,9 @@ git push origin auth-v1.2.3
This'll trigger a GitHub workflow that:
-* Creates a new draft GitHub release and attaches all the build artifacts to it
- (mobile APKs and various desktop packages),
+- Creates a new draft GitHub release and attaches all the build artifacts to it (mobile APKs and various desktop packages),
-* Creates a new release in the internal track on Play Store.
+- Creates a new release in the internal track on Play Store.
Once the workflow completes, go to the draft GitHub release that was created.
@@ -30,7 +27,4 @@ Once the workflow completes, go to the draft GitHub release that was created.
>
> Keep the title of the release same as the tag.
-Set "Previous tag" to the last release of auth and press "Generate release
-notes". The generated release note will contain all PRs and new contributors
-from all the releases in the monorepo, so you'll need to filter them to keep
-only the things that relate to the auth.
+Set "Previous tag" to the last release of auth and press "Generate release notes". The generated release note will contain all PRs and new contributors from all the releases in the monorepo, so you'll need to filter them to keep only the things that relate to the auth.
diff --git a/mobile/apps/auth/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md b/mobile/apps/auth/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md
index 89c2725b70..b5b843ad3b 100644
--- a/mobile/apps/auth/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md
+++ b/mobile/apps/auth/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md
@@ -2,4 +2,4 @@
You can customize the launch screen with your own desired assets by replacing the image files in this directory.
-You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images.
\ No newline at end of file
+You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images.
diff --git a/mobile/apps/auth/migration-guides/README.md b/mobile/apps/auth/migration-guides/README.md
index 2bcf3200f7..3978929174 100644
--- a/mobile/apps/auth/migration-guides/README.md
+++ b/mobile/apps/auth/migration-guides/README.md
@@ -1,4 +1 @@
-Migration guides have moved to the [help
-docs](https://ente.com/help/auth/migration-guides/). This folder just contains
-redirects for old links.
-
+Migration guides have moved to the [help docs](https://ente.com/help/auth/migration-guides/). This folder just contains redirects for old links.
diff --git a/mobile/apps/auth/migration-guides/authy.md b/mobile/apps/auth/migration-guides/authy.md
index 2c95c163e3..f3b35789dc 100644
--- a/mobile/apps/auth/migration-guides/authy.md
+++ b/mobile/apps/auth/migration-guides/authy.md
@@ -1,2 +1 @@
-Moved to
-[ente.com/help/auth/migration-guides/authy](https://ente.com/help/auth/migration-guides/authy/)
+Moved to [ente.com/help/auth/migration-guides/authy](https://ente.com/help/auth/migration-guides/authy/)
diff --git a/mobile/apps/auth/migration-guides/encrypted_export.md b/mobile/apps/auth/migration-guides/encrypted_export.md
index 447a5d1be5..36fddd0fdb 100644
--- a/mobile/apps/auth/migration-guides/encrypted_export.md
+++ b/mobile/apps/auth/migration-guides/encrypted_export.md
@@ -1,2 +1 @@
-Moved to
-[ente.com/help/auth/migration-guides/export](https://ente.com/help/auth/migration-guides/export/)
+Moved to [ente.com/help/auth/migration-guides/export](https://ente.com/help/auth/migration-guides/export/)
diff --git a/mobile/apps/auth/plugins/qr/CHANGELOG.md b/mobile/apps/auth/plugins/qr/CHANGELOG.md
index 85703b72ea..7104fdcae1 100644
--- a/mobile/apps/auth/plugins/qr/CHANGELOG.md
+++ b/mobile/apps/auth/plugins/qr/CHANGELOG.md
@@ -1,8 +1,8 @@
## 0.0.1
-* Initial release of ente_auth_qr plugin
-* Support for scanning QR codes from image files
-* Android implementation using ZXing library
-* iOS implementation using Core Image framework
-* Comprehensive error handling
-* Example app demonstrating usage with file picker
+- Initial release of ente_auth_qr plugin
+- Support for scanning QR codes from image files
+- Android implementation using ZXing library
+- iOS implementation using Core Image framework
+- Comprehensive error handling
+- Example app demonstrating usage with file picker
diff --git a/mobile/apps/auth/plugins/qr/README.md b/mobile/apps/auth/plugins/qr/README.md
index 3419e44958..56f5733b08 100644
--- a/mobile/apps/auth/plugins/qr/README.md
+++ b/mobile/apps/auth/plugins/qr/README.md
@@ -13,7 +13,7 @@ A Flutter plugin for scanning QR codes from image files. This plugin provides a
## Platform Support
| Platform | Support |
-|----------|---------|
+| -------- | ------- |
| Android | βœ… |
| iOS | βœ… |
| Web | ❌ |
@@ -75,10 +75,10 @@ class _QrScannerPageState extends State<QrScannerPage> {
if (fileResult != null && fileResult.files.single.path != null) {
final imagePath = fileResult.files.single.path!;
-
+
// Scan QR code from the selected image
final qrResult = await _enteQr.scanQrFromImage(imagePath);
-
+
setState(() {
if (qrResult.success) {
_result = 'QR Code: ${qrResult.content}';
@@ -120,9 +120,11 @@ The main class for QR code scanning operations.
Scans a QR code from an image file.
**Parameters:**
+
- `imagePath` (String): The file path to the image containing the QR code
**Returns:**
+
- `Future<QrScanResult>`: A result object containing either the QR code content or an error
### QrScanResult
@@ -130,11 +132,13 @@ Scans a QR code from an image file.
The result object returned by QR scanning operations.
**Properties:**
+
- `content` (String?): The QR code content if successful, null otherwise
-- `error` (String?): Error message if scanning failed, null otherwise
+- `error` (String?): Error message if scanning failed, null otherwise
- `success` (bool): Whether the scanning operation was successful
**Factory Constructors:**
+
- `QrScanResult.success(String content)`: Creates a successful result
- `QrScanResult.error(String error)`: Creates an error result
@@ -143,6 +147,7 @@ The result object returned by QR scanning operations.
### Android
The Android implementation uses the ZXing library (com.google.zxing) for QR code detection:
+
- `com.journeyapps:zxing-android-embedded:4.3.0`
- `com.google.zxing:core:3.5.1`
@@ -153,6 +158,7 @@ The iOS implementation uses Core Image framework's built-in QR code detection ca
## Error Handling
The plugin provides comprehensive error handling for common scenarios:
+
- File not found
- Invalid image format
- No QR code found in image
diff --git a/mobile/apps/locker/CLAUDE.md b/mobile/apps/locker/CLAUDE.md
index 77161e3fb1..87c1cf020a 100644
--- a/mobile/apps/locker/CLAUDE.md
+++ b/mobile/apps/locker/CLAUDE.md
@@ -5,6 +5,7 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
## Project Philosophy
Ente is focused on privacy, transparency and trust. It's a fully open-source, end-to-end encrypted platform for storing data in the cloud. When contributing, always prioritize:
+
- User privacy and data security
- End-to-end encryption integrity
- Transparent, auditable code
@@ -89,6 +90,7 @@ flutter analyze lib/path/to/file.dart
### Testing
There are currently no tests in the `test/` directory. When adding tests:
+
```sh
flutter test # Run all tests
flutter test test/path/to/file_test.dart # Run specific test
@@ -101,6 +103,7 @@ flutter test test/path/to/file_test.dart # Run specific test
Locker is one of multiple apps in `/apps/` that share common packages from `/packages/`:
**Shared Packages:**
+
- `ente_accounts` - User authentication and account management
- `ente_base` - Base utilities and common code
- `ente_configuration` - App configuration (extended by local `services/configuration.dart`)
@@ -143,6 +146,7 @@ All major services follow the singleton pattern with `instance` getters:
### Database Layer
SQLite databases managed via `sqflite`:
+
- **CollectionDB** (`lib/services/collections/collections_db.dart`) - Collections and files
- **TrashDB** (`lib/services/trash/trash_db.dart`) - Deleted items
@@ -153,6 +157,7 @@ Both databases track sync times to enable incremental syncing.
The app uses an event bus (`ente_events` package) for cross-component communication:
**Key Events:**
+
- `SignedInEvent` / `SignedOutEvent` - Authentication state changes
- `CollectionsUpdatedEvent` - Triggers UI refresh when collections change
- `BackupUpdatedEvent` - File upload progress/completion
@@ -162,6 +167,7 @@ The app uses an event bus (`ente_events` package) for cross-component communicat
### UI Structure
**Main Pages:**
+
- `HomePage` - Main dashboard with collections grid, recents, and FAB
- `CollectionPage` - Single collection view with files
- `AllCollectionsPage` - Full collection list (by type: home/incoming/outgoing)
@@ -169,6 +175,7 @@ The app uses an event bus (`ente_events` package) for cross-component communicat
- `InformationPage` - Add/edit structured information (notes, credentials, contacts, etc.)
**Key UI Patterns:**
+
- Pages extend `StatefulWidget` with mixins for reusable behavior (e.g., `SearchMixin`)
- `UploaderPage`/`UploaderPageState` - Base class for pages that handle file uploads
- Collections use `CollectionFlexGridView` for responsive grid layouts
@@ -185,6 +192,7 @@ The app uses an event bus (`ente_events` package) for cross-component communicat
### Crypto & Encryption
Files and collections are end-to-end encrypted:
+
- **Collection keys:** Encrypted with user's master key
- **File keys:** Encrypted with collection key
- `CryptoHelper` (`utils/crypto_helper.dart`) provides key derivation utilities
@@ -193,11 +201,13 @@ Files and collections are end-to-end encrypted:
### Platform-Specific Code
**Desktop (Windows/Linux/macOS):**
+
- Window management via `window_manager` package
- System tray support via `tray_manager` package
- Initialized in `main.dart` before `runApp()`
**Mobile (iOS/Android):**
+
- Share intent handling via `listen_sharing_intent` package
- `HomePage.initializeSharing()` processes shared files from other apps
- High refresh rate support on Android via `flutter_displaymode`
@@ -215,6 +225,7 @@ Files and collections are end-to-end encrypted:
The project uses strict linting rules defined in `ente/mobile/analysis_options.yaml`:
**Key enforced rules:**
+
- `require_trailing_commas` (ERROR) - All function/constructor calls must have trailing commas
- `always_use_package_imports` (WARNING) - Use `package:` imports, not relative
- `prefer_final_fields` (ERROR) - Prefer `final` for non-reassigned fields
@@ -230,6 +241,7 @@ The project uses strict linting rules defined in `ente/mobile/analysis_options.y
### Service Initialization
Services are initialized in `main.dart` in a specific order:
+
1. Crypto initialization (`CryptoUtil.init()`)
2. Database initialization (CollectionDB, TrashDB)
3. Configuration with databases
@@ -239,6 +251,7 @@ Services are initialized in `main.dart` in a specific order:
### Sync Pattern
Many operations follow this pattern:
+
```dart
// 1. Call API
await _apiClient.someOperation(params);
@@ -255,6 +268,7 @@ Bus.instance.fire(CollectionsUpdatedEvent());
### File References
When referencing code locations in messages, use the format:
+
```
lib/services/collections/collections_service.dart:123
```
@@ -262,6 +276,7 @@ lib/services/collections/collections_service.dart:123
## Known TODOs
From README.md:
+
- Verify `PackageInfoUtil.getPackageName()` correctness on Linux and Windows
- Update `file_url.dart` to download only via CF worker when necessary
@@ -276,7 +291,9 @@ From README.md:
## Critical Coding Requirements
### 1. Code Quality - MANDATORY
+
**Every code change MUST pass `dart format .` and `flutter analyze` with zero issues**
+
- Run `dart format .` first to format all Dart code
- Run `flutter analyze` after EVERY code modification
- Resolve ALL issues (info, warning, error) - no exceptions
@@ -284,13 +301,17 @@ From README.md:
- DO NOT commit or consider work complete until both commands pass cleanly
### 2. Component Reuse - MANDATORY
+
**Always try to reuse existing components**
+
- Use a subagent to search for existing components before creating new ones
- Only create new components if none exist that meet the requirements
- Check both UI components in `lib/ui/` and shared components in `../../packages/`
### 3. Design System - MANDATORY
+
**Never hardcode colors or text styles**
+
- Always use the Ente design system for colors and typography
- Use a subagent to find the appropriate design tokens
- Access colors via theme: `getEnteColorScheme(context)`
@@ -299,6 +320,8 @@ From README.md:
- If you MUST use custom colors/styles (extremely rare), explicitly inform the user with a clear warning
### 4. Database Methods - BEST PRACTICE
+
**Prioritize readability in database methods**
+
- For small result sets (e.g., 1-2 stale entries), prefer filtering in Dart for cleaner, more readable code
- For large datasets, use SQL WHERE clauses for performance - they're much more efficient in SQLite
diff --git a/mobile/apps/locker/README.md b/mobile/apps/locker/README.md
index ddd986b67c..88fd9b6bf8 100644
--- a/mobile/apps/locker/README.md
+++ b/mobile/apps/locker/README.md
@@ -1,7 +1,6 @@
# Ente Locker
-Ente's secure document storage app. An end-to-end encrypted app for storing
-important documents in the cloud with secure sharing capabilities.
+Ente's secure document storage app. An end-to-end encrypted app for storing important documents in the cloud with secure sharing capabilities.
## πŸ§‘β€πŸ’» Build from source
@@ -21,10 +20,6 @@ To build a release APK, [setup your keystore](https://docs.flutter.dev/deploymen
[![Crowdin](https://badges.crowdin.net/ente-locker/localized.svg)](https://crowdin.com/project/ente-locker)
-If you're interested in helping out with translation, please visit our [Crowdin
-project](https://crowdin.com/project/ente-locker) to get started. Thank you for
-your support.
+If you're interested in helping out with translation, please visit our [Crowdin project](https://crowdin.com/project/ente-locker) to get started. Thank you for your support.
-If your language is not listed for translation, please [create a GitHub
-issue](https://github.com/ente-io/ente/issues/new?title=Request+for+New+Language+Translation&body=Language+name%3A)
-to have it added.
+If your language is not listed for translation, please [create a GitHub issue](https://github.com/ente-io/ente/issues/new?title=Request+for+New+Language+Translation&body=Language+name%3A) to have it added.
diff --git a/mobile/apps/locker/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md b/mobile/apps/locker/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md
index 89c2725b70..b5b843ad3b 100644
--- a/mobile/apps/locker/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md
+++ b/mobile/apps/locker/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md
@@ -2,4 +2,4 @@
You can customize the launch screen with your own desired assets by replacing the image files in this directory.
-You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images.
\ No newline at end of file
+You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images.
diff --git a/mobile/apps/photos/AGENTS.md b/mobile/apps/photos/AGENTS.md
index 191b0bf7db..f1dc2af837 100644
--- a/mobile/apps/photos/AGENTS.md
+++ b/mobile/apps/photos/AGENTS.md
@@ -1,38 +1,48 @@
# Repository Guidelines
## Project Philosophy
+
- Protect user privacy and preserve end-to-end encryption integrity in every change.
- Keep implementations transparent and auditable to sustain user trust.
- Design with zero-knowledge architecture assumptions so sensitive data never leaves the user’s control.
## Monorepo Context
+
- This Photos app lives inside the Ente monorepo alongside Auth, Locker, web, desktop, CLI, and backend code.
- Shared Flutter packages sit under `mobile/packages/`; Photos-specific Flutter plugins live in `mobile/apps/photos/plugins/`.
## Project Structure & Module Organization
+
`lib/` houses the Flutter client (`core/`, `services/`, `ui/`, `db/`). Tests live in `test/` (unit & widget) and `integration_test/`. Platform shells are `android/` and `ios/`; the Photos Rust bridge crate lives at repo-root `rust/bindings/frb/photos/`, with local build glue in `rust_builder/`. Assets, fonts, and localization configs are in `assets/`, `fonts/`, `l10n.yaml`, with generated code in `lib/generated/`. Automation scripts live under `scripts/`.
## Build, Test & Development Commands
+
Run `flutter pub get` after dependency edits. Launch the app with `flutter run --flavor independent`. Regenerate Rust bindings from `rust/` with `cargo codegen frb` before builds. Android releases rely on `flutter build apk --release --flavor independent`; for iOS run `cd ios && pod install` then `flutter build ios`.
## Coding Style & Naming Conventions
+
Use 2-space indentation and format with `dart format .` (trailing commas preserved). `analysis_options.yaml` enforces rules such as `prefer_const_constructors`, `require_trailing_commas`, and `always_use_package_imports`. Keep files `snake_case.dart`, classes `PascalCase`, private members `_camelCase`. Avoid `print`; rely on the log utilities under `lib/core/`.
## Testing Guidelines
+
Mirror source names with `*_test.dart`. Run only suites that cover your changesβ€”`flutter test` (or a filtered target) when relevant tests exist, and skip it if no tests touch your work. Device flows stay in `integration_test/` (`flutter test integration_test`). Rust-facing updates should extend coverage with `cargo test` plus Dart adapter checks. Document new fixtures or goldens in `docs/`.
## Commit & Pull Request Guidelines
+
Commits should stay concise and imperative, summarising all substantial code changes. PR titles must tag the scope: `[mob][photos] …` for this app, else `[mob][auth]`, `[mob][locker]`, `[mob][packages]`, `[web]`, `[desktop]`, `[server]`, `[infra]`, or package-specific tags like `[mob][native_video_editor]`. Use `.github/pull_request_template.md` as your outline. Populate the Tests section with Markdown checkboxes covering only the validations needed pre-merge (keep it tight, relevant, and ≀5 items); omit the entire section when nothing needs to run. Add QA notes and UI captures when applicable, and verify `flutter analyze .` plus only the applicable tests from above before submitting.
## Rust & Localization Notes
+
Regenerate Dart bindings when Rust APIs change and keep generated code in `lib/src/rust/`. Exercise Rust crates with `cargo test` during such updates. For copy edits, update `lib/l10n/intl_en.arb` then run `flutter gen-l10n` (configured by `l10n.yaml`) to refresh `lib/generated/`, and coordinate Crowdin syncs through `crowdin.yml`.
## Development Setup Requirements
+
1. Install Flutter `3.38.10` with a Dart SDK between `>=3.10.0 <4.0.0`.
2. Install Rust.
3. Regenerate Rust bindings whenever native APIs shift from `rust/` using `cargo codegen frb`.
## Critical Practices
+
- `dart format .` must run before you commit so the tree stays uniformly formatted.
- Follow each edit with `flutter analyze` and resolve every warning or info message introduced by the change.
- Reuse existing UI and service components; search both `lib/ui/` and `../../packages/` before creating new primitives.
diff --git a/mobile/apps/photos/CLAUDE.md b/mobile/apps/photos/CLAUDE.md
index fa4c981e62..a32d702b40 100644
--- a/mobile/apps/photos/CLAUDE.md
+++ b/mobile/apps/photos/CLAUDE.md
@@ -5,6 +5,7 @@ This file provides guidance to Claude, Codex, and any other agent when working w
## Project Philosophy
Ente is focused on privacy, transparency and trust. It's a fully open-source, end-to-end encrypted platform for storing data in the cloud. When contributing, always prioritize:
+
- User privacy and data security
- End-to-end encryption integrity
- Transparent, auditable code
@@ -13,12 +14,15 @@ Ente is focused on privacy, transparency and trust. It's a fully open-source, en
## Monorepo Context
This is the Ente Photos mobile app within the Ente monorepo. The monorepo contains:
+
- Mobile apps (Photos, Auth, Locker) at `mobile/apps/`
- Shared packages at `mobile/packages/`
- Web, desktop, CLI, and server components in parent directories
### Package Architecture
+
The Photos app uses two types of packages:
+
- **Shared packages** (`../../packages/`): Common code shared across multiple Ente apps (Photos, Auth, Locker)
- **Photos-specific plugins** (`./plugins/`): Custom Flutter plugins specific to Photos app for separation and testability
@@ -62,6 +66,7 @@ flutter analyze
## Development Commands
### Using Melos (Monorepo Management)
+
```sh
# From mobile/ directory - bootstrap all packages
melos bootstrap
@@ -77,6 +82,7 @@ melos clean:photos
```
### Direct Flutter Commands
+
```sh
# Development run
flutter run --flavor independent
@@ -90,6 +96,7 @@ flutter build ios
```
### Code Quality
+
```sh
# Static analysis and linting
flutter analyze .
@@ -101,7 +108,9 @@ flutter test
## Architecture Overview
### Service-Oriented Architecture
+
The app uses a service layer pattern with 28+ specialized services:
+
- **collections_service.dart**: Album and collection management
- **search_service.dart**: Search functionality with ML support
- **smart_memories_service.dart**: AI-powered memory curation
@@ -109,12 +118,14 @@ The app uses a service layer pattern with 28+ specialized services:
- **Machine Learning Services**: Face recognition, semantic search, similar images
### Key Patterns
+
- **Service Locator**: Dependency injection via `lib/service_locator.dart`
- **Event Bus**: Loose coupling via `lib/core/event_bus.dart`
- **Repository Pattern**: Database abstraction in `lib/db/`
- **Rust Integration**: Performance-critical operations via Flutter Rust Bridge
### Security Architecture
+
- End-to-end encryption with `ente_crypto` package
- BIP39 mnemonic-based key generation (24 words)
- Secure storage using platform-specific implementations
@@ -160,7 +171,9 @@ lib/
## Critical Coding Requirements
### 1. Code Quality - MANDATORY
+
**Every code change MUST pass `dart format .` and `flutter analyze` with zero issues**
+
- Run `dart format .` first to format all Dart code
- Run `flutter analyze` after EVERY code modification
- Resolve ALL issues (info, warning, error) - no exceptions
@@ -168,13 +181,17 @@ lib/
- DO NOT commit or consider work complete until both commands pass cleanly
### 2. Component Reuse - MANDATORY
+
**Always try to reuse existing components**
+
- Use a subagent to search for existing components before creating new ones
- Only create new components if none exist that meet the requirements
- Check both UI components in `lib/ui/` and shared components in `../../packages/`
### 3. Design System - MANDATORY
+
**Never hardcode colors or text styles**
+
- Always use the Ente design system for colors and typography
- Use a subagent to find the appropriate design tokens
- Access colors via theme: `getEnteColorScheme(context)`
@@ -183,14 +200,18 @@ lib/
- If you MUST use custom colors/styles (extremely rare), explicitly inform the user with a clear warning
### 4. Documentation Sync - MANDATORY
+
**Keep spec documents synchronized with code changes**
+
- When modifying code, also update any associated spec documents
- Check for related spec files in `docs/` or project directories
- Ensure documentation reflects the current implementation
- Update examples in specs if behavior changes
### 5. Database Methods - BEST PRACTICE
+
**Prioritize readability in database methods**
+
- For small result sets (e.g., 1-2 stale entries), prefer filtering in Dart for cleaner, more readable code
- For large datasets, use SQL WHERE clauses for performance - they're much more efficient in SQLite
@@ -203,4 +224,5 @@ lib/
- Always follow existing code conventions and patterns in neighboring files
# Individual Preferences
+
- @~/.claude/ente-photos-instructions.md
diff --git a/mobile/apps/photos/README.md b/mobile/apps/photos/README.md
index addff4f7d2..6b4810df24 100644
--- a/mobile/apps/photos/README.md
+++ b/mobile/apps/photos/README.md
@@ -1,8 +1,6 @@
# Mobile app for Ente Photos
-Source code for our flagship mobile app. For us, this is our most important
-client app. This is where Ente started. This is what had the [first
-commit](https://github.com/ente-io/ente/commit/a8cdc811fd20ca4289d8e779c97f08ef5d276e37).
+Source code for our flagship mobile app. For us, this is our most important client app. This is where Ente started. This is what had the [first commit](https://github.com/ente-io/ente/commit/a8cdc811fd20ca4289d8e779c97f08ef5d276e37).
commit a8cdc811fd20ca4289d8e779c97f08ef5d276e37
Author: Vishnu Mohandas <v****@****.***>
@@ -10,12 +8,9 @@ commit](https://github.com/ente-io/ente/commit/a8cdc811fd20ca4289d8e779c97f08ef5
Hello world
-To know more about Ente, see [our main README](../../../README.md) or visit
-[ente.com](https://ente.com).
+To know more about Ente, see [our main README](../../../README.md) or visit [ente.com](https://ente.com).
-To use Ente Photos on the web, see [web](../../../web/README.md). To use Ente
-Photos on the desktop, see [desktop](../../../desktop/README.md). There is a also a
-[CLI tool](../../../cli/README.md) for easy / automated exports.
+To use Ente Photos on the web, see [web](../../../web/README.md). To use Ente Photos on the desktop, see [desktop](../../../desktop/README.md). There is a also a [CLI tool](../../../cli/README.md) for easy / automated exports.
If you're looking for Ente Auth instead, see [auth](../auth/README.md).
@@ -23,11 +18,7 @@ If you're looking for Ente Auth instead, see [auth](../auth/README.md).
### Android
-The [GitHub
-releases](https://github.com/ente-io/ente/releases?q=photos-v1) contain
-APKs, built straight from source. The latest build is available at
-[ente.com/apk](https://ente.com/apk). These builds keep themselves updated,
-without relying on third party stores.
+The [GitHub releases](https://github.com/ente-io/ente/releases?q=photos-v1) contain APKs, built straight from source. The latest build is available at [ente.com/apk](https://ente.com/apk). These builds keep themselves updated, without relying on third party stores.
You can alternatively install the build from PlayStore or F-Droid.
@@ -87,13 +78,9 @@ City coordinates from [Simple Maps](https://simplemaps.com/data/world-cities)
[![Crowdin](https://badges.crowdin.net/ente-photos-app/localized.svg)](https://crowdin.com/project/ente-photos-app)
-If you're interested in helping out with translation, please visit our [Crowdin
-project](https://crowdin.com/project/ente-photos-app) to get started. Thank you
-for your support.
+If you're interested in helping out with translation, please visit our [Crowdin project](https://crowdin.com/project/ente-photos-app) to get started. Thank you for your support.
-If your language is not listed for translation, please [create a GitHub
-issue](https://github.com/ente-io/ente/issues/new?title=Request+for+New+Language+Translation&body=Language+name%3A)
-to have it added.
+If your language is not listed for translation, please [create a GitHub issue](https://github.com/ente-io/ente/issues/new?title=Request+for+New+Language+Translation&body=Language+name%3A) to have it added.
## πŸ’š Contribute
diff --git a/mobile/apps/photos/android/permissions.md b/mobile/apps/photos/android/permissions.md
index 05ceb9ccf2..792e2e4892 100644
--- a/mobile/apps/photos/android/permissions.md
+++ b/mobile/apps/photos/android/permissions.md
@@ -2,7 +2,7 @@
> android.permission.READ_EXTERNAL_STORAGE
- **Used to read photos and videos from the device.**
+**Used to read photos and videos from the device.**
> android.permission.ACCESS_MEDIA_LOCATION
@@ -30,4 +30,4 @@ Used to optionally lock the app behind the default lock screen.
> android.permission.SET_WALLPAPER
-**This allows the user to set a particular photo as wallpaper.**
\ No newline at end of file
+**This allows the user to set a particular photo as wallpaper.**
diff --git a/mobile/apps/photos/docs/release.md b/mobile/apps/photos/docs/release.md
index 6aef6e961d..ee9c7609fd 100644
--- a/mobile/apps/photos/docs/release.md
+++ b/mobile/apps/photos/docs/release.md
@@ -4,9 +4,7 @@ Create a PR to bump up the version in `pubspec.yaml`.
> [!NOTE]
>
-> Use [semver](https://semver.org/) for the tags, with `photos-` as a prefix.
-> Multiple beta releases for the same upcoming version can be done by adding
-> build metadata at the end, e.g. `photos-v1.2.3-beta+3`.
+> Use [semver](https://semver.org/) for the tags, with `photos-` as a prefix. Multiple beta releases for the same upcoming version can be done by adding build metadata at the end, e.g. `photos-v1.2.3-beta+3`.
Once that is merged, tag main, and push the tag.
@@ -17,8 +15,7 @@ git push origin photos-v1.2.3
This'll trigger a GitHub workflow that:
-* Creates a new draft GitHub release and attaches the build artifacts to it
- (mobile APKs),
+- Creates a new draft GitHub release and attaches the build artifacts to it (mobile APKs),
Once the workflow completes, go to the draft GitHub release that was created.
@@ -26,10 +23,7 @@ Once the workflow completes, go to the draft GitHub release that was created.
>
> Keep the title of the release same as the tag.
-Set "Previous tag" to the last release of auth and press "Generate release
-notes". The generated release note will contain all PRs and new contributors
-from all the releases in the monorepo, so you'll need to filter them to keep
-only the things that relate to the Photos mobile app.
+Set "Previous tag" to the last release of auth and press "Generate release notes". The generated release note will contain all PRs and new contributors from all the releases in the monorepo, so you'll need to filter them to keep only the things that relate to the Photos mobile app.
## F-Droid
diff --git a/mobile/apps/photos/docs/translations.md b/mobile/apps/photos/docs/translations.md
index 0b03b7f129..44f145c10a 100644
--- a/mobile/apps/photos/docs/translations.md
+++ b/mobile/apps/photos/docs/translations.md
@@ -1,34 +1,25 @@
# Translations
-We use Crowdin for translations, and the `intl` package to load these at
-runtime.
+We use Crowdin for translations, and the `intl` package to load these at runtime.
-Within our project we have the _source_ strings - these are the key value pairs
-in the `lib/l10n/intl_en.arb` file.
+Within our project we have the _source_ strings - these are the key value pairs in the `lib/l10n/intl_en.arb` file.
-Volunteers can add a new _translation_ in their language corresponding to each
-such source key-value to our
-[Crowdin project](https://crowdin.com/project/ente-photos-app).
+Volunteers can add a new _translation_ in their language corresponding to each such source key-value to our [Crowdin project](https://crowdin.com/project/ente-photos-app).
-When a new source string is added, a [GitHub workflow](../../../../.github/workflows/mobile-photos-crowdin-push-sources.yml)
-runs to upload sources to Crowdin, so any new key value pair we add in the
-source `intl_en.arb` becomes available to translators to translate.
+When a new source string is added, a [GitHub workflow](../../../../.github/workflows/mobile-photos-crowdin-push-sources.yml) runs to upload sources to Crowdin, so any new key value pair we add in the source `intl_en.arb` becomes available to translators to translate.
-Every Monday, we run a [GitHub workflow](../../../../.github/workflows/mobile-crowdin-sync.yml)
-that
+Every Monday, we run a [GitHub workflow](../../../../.github/workflows/mobile-crowdin-sync.yml) that
-- Downloads translations from Crowdin - So any new translations that
- translators have made on the Crowdin dashboard (for existing sources) will
- be added to the corresponding `intl_XX.arb`.
+- Downloads translations from Crowdin - So any new translations that translators have made on the Crowdin dashboard (for existing sources) will be added to the corresponding `intl_XX.arb`.
-The sync workflow also uploads the current source strings before downloading
-translations.
+The sync workflow also uploads the current source strings before downloading translations.
## Adding a new string
1. Add the key-value pair to `lib/l10n/intl_en.arb`
Example:
+
```json
{
"existingKey": "Existing translation",
@@ -61,11 +52,9 @@ translations.
AppLocalizations.of(context).newStringKey
```
-1. Commit the changes and create a PR in which it is advised to tag at least one
-of the developers (i.e. [laurenspriem](https://github.com/laurenspriem))
+1. Commit the changes and create a PR in which it is advised to tag at least one of the developers (i.e. [laurenspriem](https://github.com/laurenspriem))
-1. After the PR is merged, the source-push workflow will upload new source
-strings to Crowdin's dashboard, allowing translators to translate it.
+1. After the PR is merged, the source-push workflow will upload new source strings to Crowdin's dashboard, allowing translators to translate it.
## Plurals
@@ -80,16 +69,11 @@ Use plural categories `one` and `other` in source ARBs, not `=1`.
## Updating an existing string
1. Update the existing value for the key in the source `intl_en.arb`.
-1. Commit the changes and create a PR in which it is advised to tag at least one of
-the developers (i.e. [laurenspriem](https://github.com/laurenspriem))
-1. After the PR is merged, the source-push workflow will upload the changed
-source strings to Crowdin's dashboard, allowing translators to translate it.
+1. Commit the changes and create a PR in which it is advised to tag at least one of the developers (i.e. [laurenspriem](https://github.com/laurenspriem))
+1. After the PR is merged, the source-push workflow will upload the changed source strings to Crowdin's dashboard, allowing translators to translate it.
## Deleting an existing string
1. Remove the key value pair from the source `intl_en.arb`.
-1. Commit the changes and create a PR in which it is advised to tag at least one of
-the developers (i.e. [laurenspriem](https://github.com/laurenspriem))
-1. After the PR is merged, the source-push workflow will update Crowdin. During
- the next sync, the workflow will remove that source item from the other
- `intl_XX.arb` files in the repository.
+1. Commit the changes and create a PR in which it is advised to tag at least one of the developers (i.e. [laurenspriem](https://github.com/laurenspriem))
+1. After the PR is merged, the source-push workflow will update Crowdin. During the next sync, the workflow will remove that source item from the other `intl_XX.arb` files in the repository.
diff --git a/mobile/apps/photos/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md b/mobile/apps/photos/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md
index 89c2725b70..b5b843ad3b 100644
--- a/mobile/apps/photos/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md
+++ b/mobile/apps/photos/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md
@@ -2,4 +2,4 @@
You can customize the launch screen with your own desired assets by replacing the image files in this directory.
-You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images.
\ No newline at end of file
+You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images.
diff --git a/mobile/apps/photos/plugins/ente_qr/CHANGELOG.md b/mobile/apps/photos/plugins/ente_qr/CHANGELOG.md
index b5e7771fe5..2677363d9e 100644
--- a/mobile/apps/photos/plugins/ente_qr/CHANGELOG.md
+++ b/mobile/apps/photos/plugins/ente_qr/CHANGELOG.md
@@ -1,8 +1,8 @@
## 0.0.1
-* Initial release of ente_qr plugin
-* Support for scanning QR codes from image files
-* Android implementation using ZXing library
-* iOS implementation using Core Image framework
-* Comprehensive error handling
-* Example app demonstrating usage with file picker
+- Initial release of ente_qr plugin
+- Support for scanning QR codes from image files
+- Android implementation using ZXing library
+- iOS implementation using Core Image framework
+- Comprehensive error handling
+- Example app demonstrating usage with file picker
diff --git a/mobile/apps/photos/plugins/ente_qr/README.md b/mobile/apps/photos/plugins/ente_qr/README.md
index 741fdc38bb..e52899ccb2 100644
--- a/mobile/apps/photos/plugins/ente_qr/README.md
+++ b/mobile/apps/photos/plugins/ente_qr/README.md
@@ -13,7 +13,7 @@ A Flutter plugin for scanning QR codes from image files. This plugin provides a
## Platform Support
| Platform | Support |
-|----------|---------|
+| -------- | ------- |
| Android | βœ… |
| iOS | βœ… |
| Web | ❌ |
@@ -75,10 +75,10 @@ class _QrScannerPageState extends State<QrScannerPage> {
if (fileResult != null && fileResult.files.single.path != null) {
final imagePath = fileResult.files.single.path!;
-
+
// Scan QR code from the selected image
final qrResult = await _enteQr.scanQrFromImage(imagePath);
-
+
setState(() {
if (qrResult.success) {
_result = 'QR Code: ${qrResult.content}';
@@ -120,9 +120,11 @@ The main class for QR code scanning operations.
Scans a QR code from an image file.
**Parameters:**
+
- `imagePath` (String): The file path to the image containing the QR code
**Returns:**
+
- `Future<QrScanResult>`: A result object containing either the QR code content or an error
### QrScanResult
@@ -130,11 +132,13 @@ Scans a QR code from an image file.
The result object returned by QR scanning operations.
**Properties:**
+
- `content` (String?): The QR code content if successful, null otherwise
-- `error` (String?): Error message if scanning failed, null otherwise
+- `error` (String?): Error message if scanning failed, null otherwise
- `success` (bool): Whether the scanning operation was successful
**Factory Constructors:**
+
- `QrScanResult.success(String content)`: Creates a successful result
- `QrScanResult.error(String error)`: Creates an error result
@@ -143,6 +147,7 @@ The result object returned by QR scanning operations.
### Android
The Android implementation uses the ZXing library (com.google.zxing) for QR code detection:
+
- `com.journeyapps:zxing-android-embedded:4.3.0`
- `com.google.zxing:core:3.5.1`
@@ -153,6 +158,7 @@ The iOS implementation uses Core Image framework's built-in QR code detection ca
## Error Handling
The plugin provides comprehensive error handling for common scenarios:
+
- File not found
- Invalid image format
- No QR code found in image
diff --git a/mobile/apps/photos/rust_builder/README.md b/mobile/apps/photos/rust_builder/README.md
index 922615f9c1..bc160a960a 100644
--- a/mobile/apps/photos/rust_builder/README.md
+++ b/mobile/apps/photos/rust_builder/README.md
@@ -1 +1 @@
-Please ignore this folder, which is just glue to build Rust with Flutter.
\ No newline at end of file
+Please ignore this folder, which is just glue to build Rust with Flutter.
diff --git a/mobile/native/android/apps/ensu/README.md b/mobile/native/android/apps/ensu/README.md
index 300c812f75..54dcce62f5 100644
--- a/mobile/native/android/apps/ensu/README.md
+++ b/mobile/native/android/apps/ensu/README.md
@@ -10,10 +10,10 @@ To know more about Ente, see [our main README](../../../../../README.md) or visi
2. Generate the Kotlin bindings:
- ```sh
- cd rust
- cargo codegen native
- ```
+ ```sh
+ cd rust
+ cargo codegen native
+ ```
3. Open the project in Android Studio and run the `app-ui` module. If the Android NDK is missing, Android Studio will prompt to install it.
diff --git a/mobile/native/darwin/Apps/Ensu/README.md b/mobile/native/darwin/Apps/Ensu/README.md
index dad212908f..345bbca1c7 100644
--- a/mobile/native/darwin/Apps/Ensu/README.md
+++ b/mobile/native/darwin/Apps/Ensu/README.md
@@ -8,10 +8,10 @@ Source code for the Ensu iOS app.
2. Generate the Swift bindings:
- ```sh
- cd rust
- cargo codegen native
- ```
+ ```sh
+ cd rust
+ cargo codegen native
+ ```
3. Open `Ensu.xcodeproj` in Xcode and run the `Ensu` scheme.
diff --git a/mobile/packages/ente_components/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md b/mobile/packages/ente_components/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md
index 89c2725b70..b5b843ad3b 100644
--- a/mobile/packages/ente_components/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md
+++ b/mobile/packages/ente_components/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md
@@ -2,4 +2,4 @@
You can customize the launch screen with your own desired assets by replacing the image files in this directory.
-You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images.
\ No newline at end of file
+You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images.
diff --git a/mobile/packages/log_viewer/README.md b/mobile/packages/log_viewer/README.md
index ae794d6649..9b885ae87d 100644
--- a/mobile/packages/log_viewer/README.md
+++ b/mobile/packages/log_viewer/README.md
@@ -21,13 +21,13 @@ import 'package:log_viewer/log_viewer.dart';
void main() async {
WidgetsFlutterBinding.ensureInitialized();
-
+
// Initialize log viewer (basic)
await LogViewer.initialize();
-
+
// Or with a prefix for multi-process apps
await LogViewer.initialize(prefix: '[MAIN]');
-
+
runApp(MyApp());
}
```
diff --git a/mobile/packages/log_viewer/example_integration.md b/mobile/packages/log_viewer/example_integration.md
index ea34540b3c..6a4bb2ddd3 100644
--- a/mobile/packages/log_viewer/example_integration.md
+++ b/mobile/packages/log_viewer/example_integration.md
@@ -13,15 +13,15 @@ import 'package:logging/logging.dart';
void main() async {
WidgetsFlutterBinding.ensureInitialized();
-
+
// Initialize the log viewer
await LogViewer.initialize();
-
+
// Set up logging
Logger.root.level = Level.ALL;
-
+
// Log viewer automatically captures all logs - no manual setup needed!
-
+
runApp(MyApp());
}
@@ -42,7 +42,7 @@ class MyHomePage extends StatefulWidget {
class _MyHomePageState extends State<MyHomePage> {
final Logger _logger = Logger('MyHomePage');
-
+
@override
Widget build(BuildContext context) {
return Scaffold(
@@ -110,7 +110,7 @@ class LogConfig {
final bool enableInDebugMode;
final FutureOrVoidCallback? body;
final String prefix;
-
+
LogConfig({
this.logDirPath,
this.maxLogFiles = 10,
@@ -123,13 +123,13 @@ class LogConfig {
class SuperLogging {
static final Logger _logger = Logger('SuperLogging');
static late LogConfig config;
-
+
static Future<void> main([LogConfig? appConfig]) async {
appConfig ??= LogConfig();
SuperLogging.config = appConfig;
-
+
WidgetsFlutterBinding.ensureInitialized();
-
+
// Initialize log viewer in debug mode with prefix
if (kDebugMode) {
try {
@@ -139,23 +139,23 @@ class SuperLogging {
_logger.warning("Failed to initialize log viewer: $e");
}
}
-
+
Logger.root.level = kDebugMode ? Level.ALL : Level.INFO;
Logger.root.onRecord.listen(onLogRecord);
-
+
if (appConfig.body != null) {
await appConfig.body!();
}
}
-
+
static Future<void> onLogRecord(LogRecord rec) async {
final str = "${config.prefix} ${rec.toString()}";
-
+
// Print to console
if (kDebugMode) {
print(str);
}
-
+
// Log viewer automatically captures all logs - no manual integration needed!
}
}
@@ -278,6 +278,7 @@ Once integrated, users will have access to:
## Troubleshooting
If logs aren't appearing:
+
1. Ensure `LogViewer.initialize()` is called early in app initialization
2. Check that the app has write permissions for the database
3. Verify that `Logger.root.level` is set appropriately (not OFF)
@@ -288,4 +289,4 @@ If logs aren't appearing:
- Logs are buffered and batch-inserted for optimal performance
- Database is indexed for fast filtering
- UI updates are debounced to avoid excessive refreshes
-- Old logs are automatically cleaned up
\ No newline at end of file
+- Old logs are automatically cleaned up
diff --git a/mobile/packages/log_viewer/example_logger_filter.md b/mobile/packages/log_viewer/example_logger_filter.md
index 13230eedd2..0f41e94385 100644
--- a/mobile/packages/log_viewer/example_logger_filter.md
+++ b/mobile/packages/log_viewer/example_logger_filter.md
@@ -5,14 +5,17 @@ The log viewer now supports filtering logs by logger names directly through the
## Search Syntax
### Basic Logger Filtering
+
- `logger:AuthService` - Shows only logs from the AuthService logger
- `logger:UserService` - Shows only logs from the UserService logger
### Wildcard Support
+
- `logger:Auth*` - Shows logs from all loggers starting with "Auth" (e.g., AuthService, Authentication, AuthManager)
- `logger:*Service` - Not supported yet (only prefix wildcards are supported)
### Combined Search
+
- `logger:AuthService error` - Shows logs from AuthService that contain "error" in the message
- `login logger:UserService` - Shows logs from UserService that contain "login"
- `logger:Auth* failed` - Shows logs from loggers starting with "Auth" that contain "failed"
@@ -37,4 +40,4 @@ The log viewer now supports filtering logs by logger names directly through the
2. **Intuitive Syntax**: Similar to GitHub and Google search operators
3. **Quick Navigation**: Tap logger names in analytics to instantly filter
4. **Powerful Combinations**: Mix logger filters with text search
-5. **Wildcard Support**: Filter multiple related loggers with prefix patterns
\ No newline at end of file
+5. **Wildcard Support**: Filter multiple related loggers with prefix patterns