This project is a Flutter application designed to manage a waitlist for a perfume product.
It was an 8-hour non-commercial hackathon project.
It includes features such as localization and integration with Firebase for saving waitlist data.
Click Fragrance Website to see the results.
- lib/main.dart: The entry point of the application. Initializes Firebase and sets up localization.
- lib/pages/landing/landing_page.dart: The landing page of the application.
- lib/components/: Contains (reusable) components used throughout the application.
- lib/utils/constants.dart: Contains constant values used throughout the application.
- test/: Contains test files to showcase unit testing.
- .github/: Contains GitHub Actions workflow files for testing, building, and deploying the application.
- lib/i18n/strings.g.dart: Generated localization strings.
- lib/i18n/en.i18n.json: English localization strings.
- lib/i18n/de.i18n.json: German localization strings.
- Flutter SDK: Install Flutter
- Firebase Project: Create a Firebase project
This project uses environment variables to configure Firebase options. You can set these variables in a .env
file or directly in your environment.
Create a .env
file in the root of your project with the following content:
APIKEY=your_api_key
AUTHDOMAIN=your_auth_domain
PROJECTID=your_project_id
STORAGEBUCKET=your_storage_bucket
MESSAGINGSENDERID=your_messaging_sender_id
APPID=your_app_id
MEASUREMENTID=your_measurement_id
To use the .env file, you need to pass the environment variables to the Flutter build command:
flutter run --dart-define-from-file=.env
# or
flutter build web --dart-define-from-file=.env
I recommend adding --dart-define-from-file
as argument to the run confiuration.
This way, you can run the application via the IDE/GUI.
- Install dependencies:
flutter pub get
- Run the application:
flutter run --dart-define-from-file=.env
To use the pipeline for testing, building or deploying, you need to set up a GitHub Actions workflow and add the necessary secrets to your repository.
Important: To set the secrets, the environment must be called
debug-environment
. Alternatively change this name in the .github/ files.
Note: The pipeline is set up to run on pushes to the
main
branch. You can change this in the.github/workflows/main.yml
file.