Skip to content

AI4Bharat/KathbathXFrontend

Repository files navigation

Kathbath

Initial Setup

  1. Install Flutter
    Follow the official Flutter installation guide to set up Flutter in your environment.

    • For VS Code users:
      • Add the Flutter extension to your editor.
      • Configure the Flutter SDK path in the environment variables.
  2. Clone the Repository
    Navigate to the project folder and clone the repository:
    (Repository URL to be added)

  3. Configure Base URL
    Open lib/services/api_services_baseUrl.dart and update the baseUrl to your server's URL.

  4. Install Dependencies
    Run the following command to install dependencies:

    flutter pub get
  5. Start the App
    Use the following command to start the app:

    flutter run
    • You will be prompted to select the device to run the app on.

    Note:

    • If testing on a physical phone:
      • Enable Developer Options > USB Debugging on your phone.
      • Allow installation via USB.
    • If using an emulator, set it up in Android Studio or Xcode.
  6. Locate APK Files

    • Debug APK: After a successful build, find it at:
      build/app/outputs/apk/debug/app-debug.apk
    • Release APK: Build the release version using:
      flutter build apk --release
      Output: build/app/outputs/flutter-apk/app-release.apk

.env File Setup

Create a .env file in the app's root directory to configure app credentials. Add the following parameters:

SERVER_URL='https://your_server_url'
ACCESS_ENCODER='84724' # Replace with your access-code encoder value
BOX_ID='--' # Replace with the respective box ID

Project Structure

The app's code follows this structure:

Main Folders

  • lib/data: Database-related code.
  • lib/enums: Enum values used throughout the app.
  • lib/models: Models for assignments and checkbox status.
  • lib/providers: Listeners for recorders, players, and checkboxes.
  • lib/screens: Screens for navigation (microtask screens are in the microtask folder).
  • lib/services: API calls and server-related functions.
  • lib/utils: Helper functions reused across tasks.
  • lib/widgets: Common widgets (e.g., players, recorders, cards).

Database Structure

  • database:
    • dao: Data access objects to interact with database tables.
    • models: Table structures.
    • repo: Repositories for managing JSON data.
    • utility: Utilities like JSON-to-object conversion.
  • manager: Contains karya_db, which handles tables and DAOs.

Assets

  • All assets and metadata are stored in the assets folder.

Note: Files with the .g.dart extension are autogenerated. Do not edit them directly. To regenerate these files after changes, run:

flutter pub run build_runner build

Plugins and Versions

Below are the external plugins used in the app:

cupertino_icons: ^1.0.6
fluttertoast: ^8.2.6
path: ^1.9.0
path_provider: ^2.1.4
drift: ^2.15.0
drift_flutter: ^0.1.0
file_picker: ^8.0.6
flutter_sound: ^9.9.5
provider: ^6.1.2
json_annotation: ^4.9.0
permission_handler: ^11.3.1
dio: ^5.5.0+1
shared_preferences: ^2.3.2
archive: ^3.6.1
crypto: ^3.0.5
audio_session: ^0.1.21
just_audio: ^0.9.28
video_player: ^2.9.2
chewie: ^1.8.5
camera: ^0.11.0+2
url_launcher: ^6.3.1
android_play_install_referrer: ^0.4.0
firebase_core: ^3.7.0
firebase_crashlytics: ^4.1.4
flutter_test:
  sdk: flutter
flutter_lints: ^3.0.0
build_runner: ^2.4.11
drift_dev: ^2.19.1
flutter_launcher_icons: ^0.14.1

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published