Skip to content

Repository files navigation

CCTeam Flutter

Flutter mobile application for the CCTeam motorcycle racing club

Version Static Badge

Version Version


Table of Contents

About

Dart logo Flutter logo CCTeam logo

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.

Features

  • 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.

Screenshots

Login page screenshot Passcode page screenshot Home page screenshot Home drawer page screenshot Account page screenshot Account statistics page screenshot Edit profile page screenshot Lap times page screenshot Lap time detail page screenshot Events page screenshot Event details page screenshot Members page screenshot Member details page screenshot Tracks page screenshot Track details page screenshot Photo gallery page screenshot

Prerequisites

Before starting, ensure you have the following installed on your system:

Java Development Kit (JDK)

  • 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

Android SDK

  • compileSdk: 37 (configured in build.gradle)
  • minSdk: 21 (or Flutter's default)
  • targetSdk: 36
  • Android Gradle Plugin (AGP): 9.1.1

Build Tools

  • 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+

Installation

To install the application, follow these steps:

  1. Clone the project
  2. 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"
    
  3. Install the flutter SDK on your machine
  4. Install the Flutter plugin (Intellij IDE)
  5. In the project settings, set the Flutter SDK path (Intellij IDE)
  6. Create a local.properties file inside the android folder and set:
     sdk.dir=C:\\android
     flutter.sdk=C:\\flutter
     flutter.buildMode=debug
  7. Run flutter pub get
  8. Run ./gradlew app:build (or gradlew.bat app:build on Windows)
  9. Run the application on an emulator or a physical device, see Usage section.

Firebase Configuration (Optional)

Push notifications require a Firebase configuration file:

  1. Create google-services.json in android/app/
  2. Download from Firebase Console
  3. The build will warn if this file is missing, but won't fail
  4. Without it, push notifications will be disabled at runtime

Usage

Install emulator

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 pixel

Then start it with:

emulator -avd flutter_x86_64

Run the backend

The 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.

Run the app

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=xxxxxxxxxx

For 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=xxxxxxxxxx

For 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=xxxxxxxxxx

To 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=xxxxxxxxxx

Contributing

If 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.

Play Store

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+6

This 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=xxxxxxxxxx

Important

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.

Tests

To run integration tests :

flutter drive --driver=test_driver/integration_test.dart --target=integration_test/login_test.dart

Data privacy

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.

AI disclosure

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".

License

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/.

About

Flutter mobile application for the CCTeam motorcycle racing club

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages