compass-app
Eric Windmill 1 month ago
parent 21c0151dbb
commit ae99a740da

@ -0,0 +1,59 @@
# compass_app
The Compass sample application is an app that helps users build and book
itineraries for trips. Its a robust sample application with many features, routes, and screens. The app communicates
with an HTTP server, has development and production environments, brand-specific styling, and high test coverage. In
these ways and more, it simulates a real-world, feature rich Flutter application.
The code in this application is used for explaining architecture in a Flutter application.
![compass app splash screen](./docs/Global%20—%20Splash.png)
![compass app activities screen](./docs/Legacy%20—%20Activities.png)
![compass app home screen](./docs/Legacy%20—%20Home.png)
![compass app booking screen](./docs/Legacy%20—%20Book.png)
The Compass app was originally [designed and built by the Firebase GenKit team](https://developers.googleblog.com/en/how-firebase-genkit-helped-add-ai-to-our-compass-app/).
## Running the app
This app contains multiple environments.
* Development environment - This environment uses data from a JSON file, which is stored in the `assets` directory, and simulates developing locally.
```bash
$ cd app
$ flutter run --target lib/main_development.dart
```
* Staging environment - This environment uses an HTTP server to get data, simulating a real app experience. This is a "dummy" server, that has endpoints that simply return fake data. The server can be found in the `compass_app/server` directory. You need to run the server locally before running the Flutter application.
```bash
$ cd server
$ dart run
# => Server listening on port 8080
$ cd ../compass_app/app
$ flutter run --target lib/main_staging.dart
```
## Integration Tests
Integration tests must be run from the `app` directory.
**Integration tests with local data**
```bash
cd app
$ flutter test integration_test/app_local_data_test.dart
```
**Integration tests with background server and remote data**
```bash
cd app
$ flutter test integration_test/app_server_data_test.dart
```
Running the tests together with `flutter test integration_test` will fail.
See: https://github.com/flutter/flutter/issues/101031

@ -1,22 +0,0 @@
# compass_app
A new Flutter project.
## Integration Tests
Run separately with:
**Integration tests with local data**
```
flutter test integration_test/app_local_data_test.dart
```
**Integration tests with background server and remote data**
```
flutter test integration_test/app_server_data_test.dart
```
Running the tests together with `flutter test integration_test` will fail.
See: https://github.com/flutter/flutter/issues/101031

Binary file not shown.

After

Width:  |  Height:  |  Size: 336 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 92 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 376 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

@ -1,13 +0,0 @@
A server app built using [Shelf](https://pub.dev/packages/shelf).
# Running the server
## Running with the Dart SDK
You can run the example with the [Dart SDK](https://dart.dev/get-dart)
like this:
```
$ dart run
Server listening on port 8080
```
Loading…
Cancel
Save