tree: 9901fe18f298876bf37ef4842cee35c9a9583e52 [path history] [tgz]
  1. assets/
  2. integration_test/
  3. lib/
  4. test/
  5. test_driver/
  6. web/
  7. .metadata
  8. analysis_options.yaml
  9. build.gradle.kts
  10. firebase.json
  11. pubspec.lock
  12. pubspec.yaml
  13. README.md
learning/tour-of-beam/frontend/README.md

Tour of Beam

These are the main sources of the Tour of Beam website.

About

Getting started

This project relies on generated code for some functionality: deserializers, test mocks, constants for asset files, extracted Beam symbols for the editor, etc.

All generated files are version-controlled, so after checkout the project is immediately runnable. However, after changes you may need to re-run code generation:

cd beam
./gradlew :playground:frontend:playground_components:generateCode
cd learning/tour-of-beam/frontend
flutter pub run build_runner build --delete-conflicting-outputs

Run

The following command is used to build and serve the frontend app locally:

flutter run -d chrome

Backend Selection

To change the Google Project that is used as the backend:

  1. Update Firebase configuration: https://firebase.google.com/docs/flutter/setup?platform=web

  2. In /lib/config.dart, update:

    1. Google Project ID and region.
    2. Playground's backend URLs.

Deployment

Integration Tests

Prerequisites

  1. Install Google Chrome: https://www.google.com/chrome/
  2. Install Chrome Driver: https://chromedriver.chromium.org/downloads
  3. Retrieve the required dependencies for each project subdirectory by running the following commands:
cd playground/frontend/playground_components && flutter pub get && cd -
cd playground/frontend/playground_components_dev && flutter pub get && cd -
cd learning/tour-of-beam/frontend && flutter pub get && cd -

Running Tests

  1. Run the Chrome Driver on port 4444: chromedriver --port=4444
  2. Run the integration tests:
# To run in a visible Chrome window:
./gradlew :learning:tour-of-beam:frontend:integrationTest

# Headless run without a browser window:
./gradlew :learning:tour-of-beam:frontend:integrationTest -PdeviceId=web-server

Packages

flutter pub get

Contribution guide

For checks: ./gradlew rat Exclusions for file checks can be added in the Tour of Beam section of this file: beam/build.gradle.kts

Additional resources

Troubleshooting