Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/aeecleclair/titan
A Frontend client for Hyperion
https://github.com/aeecleclair/titan
android dart flutter ios
Last synced: about 2 months ago
JSON representation
A Frontend client for Hyperion
- Host: GitHub
- URL: https://github.com/aeecleclair/titan
- Owner: aeecleclair
- License: mit
- Created: 2022-04-02T09:34:49.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2024-05-22T14:26:45.000Z (8 months ago)
- Last Synced: 2024-05-22T14:45:44.587Z (8 months ago)
- Topics: android, dart, flutter, ios
- Language: Dart
- Homepage:
- Size: 53.7 MB
- Stars: 8
- Watchers: 1
- Forks: 2
- Open Issues: 48
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Titan
Titan is a cross platform frontend written in Flutter for an open-source project launched by ÉCLAIR, the computer science association of Ecole Centrale de Lyon. This project aims to provide students of business and engineering schools a digital tool to simplify the association process.
Our builds of Titan are called MyECL and can be downloaded from the App Store and from the Google Play Store.
## Setup environment
Install Flutter:
https://docs.flutter.dev/get-started/installSetup VS Code for Flutter development:
https://docs.flutter.dev/get-started/editor?tab=vscodeTitan is designed to be launched on Web, Android and iOS platforms.
## Configure Titan
Update [`.env`](.env) to match your Hyperion's backend:
`PROD_HOST = "<>`
You can also specify an other host for debuging:
`DEV_HOST = "<>`
NB: a trailing slash is required.
## Development
### Formatting
To format code use `dart format .`
```
dart format .
```### Linting
Titan support linting according to the official [Flutter static analysis options](https://dart.dev/guides/language/analysis-options).
The linter can be launched using:
```
dart analyze
```Dart allows you to fix issues in your code with the dart command `dart fix`.
To preview proposed changes, use the `--dry-run` flag:
```
dart fix --dry-run
```To apply the proposed changes, use the --apply flag:
```
dart fix --apply
```### Testing
Titan's tests follow the official [Flutter documentation](https://docs.flutter.dev/testing).
Tests can be run using:
```bash
flutter test --flavor dev
```To run a specific test file :
```bash
flutter test --flavor dev path/to/file.dart
```### Flavors
Titan supports [flavors](https://docs.flutter.dev/deployment/flavors), which allows to easily switch between several versions of Titan for several use cases.
Titan includes 3 flavors: `dev`, `alpha`, `prod`. On VSCode, you can choose which flavor to use when launching the debugger
Each flavor is associated with a specific app package name (`fr.myecl.titan.dev`, `fr.myecl.titan.alpha`, `fr.myecl.titan`) allowing the three app to be installed on the same device. Each flavor use its own Hyperion url defined in the [dotenv](/.env)
#### Build with a flavor
To build Titan with a specific flavor use:
```
flutter build {target} --flavor={flavor}
```Currently flavor are not supported for Flutter for web, you should use:
```
flutter build web --dart-define=flavor={flavor}
```### Notifications setup
Notifications are handled using the Firebase Cloud Messaging API. On mobile platforms, a valid notification configuration is required to debug Titan. Notifications are disabled on web builds.
Please refer to the [documentation](https://pub.dev/packages/firebase_messaging) of the corresponding Flutter's package to correctly setup notifications.
Please follow [Android](https://firebase.google.com/docs/cloud-messaging/android/client) or [iOS](https://firebase.google.com/docs/cloud-messaging/ios/client) Firebase documentation to setup notifications.
#### Android FCM config file
For Android, add your `google-services.json` in `android/app/src//`.
#### iOS FCM config file
For iOS, add your `GoogleService-Info.plist` in `ios/config/
```#### iOS
Update [Info.plist](ios/Runner/Info.plist):
```
CADisableMinimumFrameDurationOnPhoneNSAppTransportSecurity
NSAllowsArbitraryLoads
NSExceptionDomains
yourdomain.com
NSIncludesSubdomains
NSThirdPartyExceptionRequiresForwardSecrecy
```
### Update Titan's icon
First update the icon's file and update [pubspec.yaml](./pubspec.yaml).
Then, `flutter_launcher_icons` must be updated:
```bash
flutter pub get
flutter pub run flutter_launcher_icons
```