Skip to content

Latest commit

 

History

77 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mourshid Mobile App

Mourshid is an Android mobile application (Kotlin + Java) implementing a multi-screen user experience with background data collection and local persistence. The codebase follows a modular, app-layered structure (activities, viewmodels, repository, network, db, workers) suitable for MVVM-style development and easy iteration in Android Studio.

Stack

  • Language(s): Kotlin (primary), Java (secondary)
  • Framework / runtime: Android SDK (AndroidX / Jetpack-style architecture inferred from package layout)
  • Notable structure and libraries:
    • Application entry point (MourshidApplication)
    • UI layer: activities under app/src/main/java/.../activities (HomepageActivity, MainActivity, GoalsActivity, InsightsActivity)
    • Architecture pieces: viewmodels, repository, db, network, workers, ui, navigation
    • Build system: Gradle with Gradle wrapper (gradlew / gradlew.bat) and Kotlin-based Gradle scripts

How it's organized

Top-level (important entries)

.gitignore
.idea/                      # IDE settings (optional)
README.md
app/                        # Android app module (source, manifests, resources)
build.gradle.kts            # root Gradle configuration (Kotlin DSL)
gradle.properties
gradle/                     # Gradle helper scripts/wrapper configuration
gradlew
gradlew.bat
settings.gradle.kts

app/ (important substructure)

app/
  src/
    main/
      AndroidManifest.xml
      java/com/example/mourshid_app/
        MourshidApplication.java
        activities/         # UI screens: MainActivity.kt, HomepageActivity.kt, GoalsActivity.kt, InsightsActivity.kt
        viewmodels/         # ViewModel classes
        repository/         # Repository layer: data access coordination
        network/            # Networking / API client code
        db/                 # Local persistence (database) code
        data_collection/    # Data collection utilities or flows
        workers/            # Background workers (WorkManager or similar)
        ui/                 # UI helpers, adapters, custom components
        models/             # Domain / data models
        utils/              # Utility classes and helpers
        interfaces/         # Interfaces for callbacks / repositories
        navigation/         # Navigation helpers/routes

How it fits together:

  • MourshidApplication initializes app-level components.
  • Activities in activities/ provide screens; viewmodels/ hold UI state and interact with repository/.
  • repository/ mediates between network/ (remote API) and db/ (local persistence); workers/ handle scheduled/background tasks and data collection.
  • The Gradle scripts configure dependencies and build settings; the Gradle wrapper allows reproducible builds.

How to run it

Important: Before building or running the Android app, you must set up and run the backend and point the app at the backend URL.

  1. Set up the backend

  2. Configure the app to use your backend URL

    • Replace the BASE_URL value in these two files with the backend URL you obtained in step 1:

      • app/src/main/java/com/example/mourshid_app/network/ActivityLogApiService.kt
        • Look for: private const val BASE_URL = "https://throw-bird-gpl-push.trycloudflare.com"
      • app/src/main/java/com/example/mourshid_app/utils/RetrofitInstance.kt
        • Look for: private val BASE_URL = "https://throw-bird-gpl-push.trycloudflare.com"
    • Example: if your backend is at https://my-backend.example.com, change the lines to:

// ActivityLogApiService.kt
private const val BASE_URL = "https://my-backend.example.com"

// RetrofitInstance.kt
private val BASE_URL = "https://my-backend.example.com"
  • Quick command-line replacement (from repository root, adjust the URL as needed):
# macOS / Linux (example)
sed -i '' 's|https://throw-bird-gpl-push.trycloudflare.com|https://my-backend.example.com|g' app/src/main/java/com/example/mourshid_app/network/ActivityLogApiService.kt
sed -i '' 's|https://throw-bird-gpl-push.trycloudflare.com|https://my-backend.example.com|g' app/src/main/java/com/example/mourshid_app/utils/RetrofitInstance.kt

# GNU sed variant (Linux)
sed -i 's|https://throw-bird-gpl-push.trycloudflare.com|https://my-backend.example.com|g' app/src/main/java/com/example/mourshid_app/network/ActivityLogApiService.kt
sed -i 's|https://throw-bird-gpl-push.trycloudflare.com|https://my-backend.example.com|g' app/src/main/java/com/example/mourshid_app/utils/RetrofitInstance.kt
  • Rebuild after editing so the change is included in the app.
  1. Prerequisites for building

    • JDK 11+ (or the version configured for the project)
    • Android Studio (recommended) or Android SDK + command-line build tools
    • An Android device or emulator
  2. Build & install

git clone https://github.com/Mourshid/Mourshid-Mobile-App.git
cd Mourshid-Mobile-App

# Build the debug APK
# Linux/macOS
./gradlew clean assembleDebug

# Windows (PowerShell)
.\gradlew.bat clean assembleDebug

# Install to a connected device/emulator
./gradlew installDebug

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages