Flutter mobile application for the CCTeam motorcycle racing club
|
|
|
|
CCTeam is a motorcycle racing club that organizes events and activities for motorcycle racing enthusiasts.
The CCTeam Flutter application provides a platform for admins to manage the club, and members to stay updated on club news, events, and activities. It also allows members to manage their profiles, bikes, lap records, and organize their riding sessions.
-
Admin functionalities (also have member functionalities) :
- Manage news, events, members and tracks (create / edit / delete).
- Manage membership status and board roles of members.
-
Member functionalities:
- View news, events, members and tracks details (lap records, bike servicing, etc.).
- Manage their profile (avatar, contact details, etc.).
- Manage their bikes, including specifications and servicing records.
- Organize their riding sessions by joining or leaving sessions.
- Record and manage lap times on different tracks.
- View statistics and performance metrics.
- View the photo gallery of the club's events and activities.
- Push notifications for event reminders and new news items.
Before starting, ensure you have the following installed on your system:
- Minimum: Java 21 (LTS recommended)
- Gradle 9.6.1 requires Java 21 or higher
- NOT compatible with Java 25+ (will fail with "Incompatible Gradle JVM version" error)
- Download from Adoptium or use your IDE's bundled JBR
- compileSdk: 37 (configured in
build.gradle) - minSdk: 21 (or Flutter's default)
- targetSdk: 36
- Android Gradle Plugin (AGP): 9.1.1
- Gradle: 9.6.1 (defined in
gradle-wrapper.properties) - Kotlin: 2.4.10 (defined in
settings.gradle) - Dart: 3.12.2+
- Flutter: 3.44.8+
To install the application, follow these steps:
- Clone the project
- Install the Android SDK on your machine (i.e. command line tools) :
sdkmanager --install "platform-tools" "platforms;android-34" "build-tools;34.0.0" sdkmanager "emulator" "system-images;android-34;google_apis;x86_64" - Install the flutter SDK on your machine
- Install the Flutter plugin (Intellij IDE)
- In the project settings, set the Flutter SDK path (Intellij IDE)
- Create a local.properties file inside the
androidfolder and set:sdk.dir=C:\\android flutter.sdk=C:\\flutter flutter.buildMode=debug
- Run
flutter pub get - Run
./gradlew app:build(orgradlew.bat app:buildon Windows) - Run the application on an emulator or a physical device, see Usage section.
Push notifications require a Firebase configuration file:
- Create
google-services.jsoninandroid/app/ - Download from Firebase Console
- The build will warn if this file is missing, but won't fail
- Without it, push notifications will be disabled at runtime
Install a proper system image and create an emulator :
sdkmanager "platforms;android-34" "system-images;android-34;google_apis;x86_64" "emulator"
avdmanager create avd -n flutter_x86_64 -k "system-images;android-34;google_apis;x86_64" -d pixelThen start it with:
emulator -avd flutter_x86_64The backend is a Spring Boot application that provides a REST and GraphQL APIs for the Flutter application.
You can find the backend source code in the ccteam-graphql repository, follow the instructions in the README file to run it.
You must be an authorized member to use the application.
You must set the API_BASE_URL, LYCHEE_BASE_URL AND LYCHEE_ROOT_ALBUM_ID variables when executing the application :
For production :
flutter run lib/main.dart --dart-define=API_BASE_URL=https://ccteam.example.com/ccteam-gql --dart-define=LYCHEE_BASE_URL=https://lychee.example.com/ --dart-define=LYCHEE_ROOT_ALBUM_ID=xxxxxxxxxxFor connected mobile device with local backend :
flutter run lib/main.dart --dart-define=API_BASE_URL=http://192.168.0.11:5001/ccteam-gql --dart-define=LYCHEE_BASE_URL=https://lychee.example.com/ --dart-define=LYCHEE_ROOT_ALBUM_ID=xxxxxxxxxxFor local emulator with local backend :
flutter run lib/main.dart --dart-define=API_BASE_URL=http://10.0.2.2:5001/ccteam-gql --dart-define=LYCHEE_BASE_URL=https://lychee.example.com/ --dart-define=LYCHEE_ROOT_ALBUM_ID=xxxxxxxxxxTo deploy the app in release mode :
flutter run --release --dart-define=API_BASE_URL=https://ccteam.example.com/ccteam-gql --dart-define=LYCHEE_BASE_URL=https://lychee.example.com/ --dart-define=LYCHEE_ROOT_ALBUM_ID=xxxxxxxxxxIf you want to contribute to this repository, please first discuss the change you wish to make via issue, email, or any other method with the owners.
See Installation and Usage sections to set up the project on your machine and make sure the Tests are passing.
To publish the app on the Play Store, you need to create a signed APK or AAB file. You can follow the official Flutter documentation for building and releasing an Android app.
Once done, on each release, in pubspec.yaml, upgrade version code and name
in the format <versionName>+<versionCode>, i.e. :
version: 1.0.1+6This is read by the build.gradle file (drives the Play Store + Android system settings).
[!info] Version code is a monotonically increasing integer required by the Play Store for each upload, bump it per release.
Build the application bundle :
flutter build appbundle --dart-define=API_BASE_URL=https://ccteam.example.com/ccteam-gql --dart-define=LYCHEE_BASE_URL=https://lychee.example.com/ --dart-define=LYCHEE_ROOT_ALBUM_ID=xxxxxxxxxxImportant
Don't forget to set the API_BASE_URL, LYCHEE_BASE_URL and LYCHEE_ROOT_ALBUM_ID environment variables when building the app for release, otherwise the app won't work properly.
Then, you can upload the generated AAB file to the Google Play Console and follow the instructions to publish your app.
The aab file will be available in \build\app\outputs\bundle\release\app-release.aab directory.
To run integration tests :
flutter drive --driver=test_driver/integration_test.dart --target=integration_test/login_test.dart
The data collected by the application is stored securely in a database and is not shared with any third parties.
Data is stored in Switzerland and is protected by the Swiss Federal Data Protection Act (DPA) and the Swiss Federal Data Protection Ordinance (DPO).
The only data stored on the device is the user's e-mail, which is used for authentication purposes.
Most of this project was built without AI assistance (codebase is from 2019).
I only started using AI recently for a limited set of improvements.
All AI-assisted changes were carefully reviewed before being kept in the codebase.
I can explain every line of code in this project, including the parts where AI was used. This project was not "vibe coded".
General Public License (GPL) v3
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.















