Skip to content

Repository files navigation

MKUPortal Logo

MKUPortal

The High-Performance, Community-Driven Android Client for Mekong University

Tra Cα»©u Học TαΊ­p & ThΓ΄ng Tin Sinh ViΓͺn Trường Đẑi Học Cα»­u Long

Latest Release APK Size Android Version License

Cloudflare Workers Telegram Bot Java 11 Material 3 GitHub Stars GitHub Forks

Empowering thousands of students at Mekong University with instantaneous academic lookups, offline schedule persistence, background grade change alerts, and edge telemetry.

About β€’ Benchmark β€’ Features β€’ Architecture β€’ Crash Telemetry β€’ Auto-Updates β€’ Quickstart β€’ Developer


πŸŽ“ About MKUPortal

Located along National Highway 1A in Phu Quoi, Long Ho District, Vinh Long Province, in the heart of the Mekong Delta, Vietnam, Mekong University (Trường Đẑi Học Cửu Long - MKU) is home to over 10,000 dynamic students across information technology, engineering, health sciences, economics, and law.

While the university's desktop educational portal provides comprehensive academic administration, students frequently face mobile browser hurdles: session timeouts, clunky navigation on small screens, and the hassle of repeatedly logging in just to check schedules or grades.

MKUPortal (Cα»•ng thΓ΄ng tin sinh viΓͺn Đẑi Học Cα»­u Long) is an independent, community-driven open-source mobile client crafted to solve these everyday challenges. From instantaneous grade lookups (tra cα»©u kαΊΏt quαΊ£ học tαΊ­p) and weekly timetables (lα»‹ch học) to examination timetables (lα»‹ch thi) and tuition management (tra cα»©u học phΓ­), MKUPortal ensures that essential student tools are always within reachβ€”fast, elegant, and fully accessible even when offline.


πŸ’‘ Why MKUPortal? (Performance Benchmark)

Traditional university web portals often struggle on mobile browsers: repetitive session logins, high data latency, zero offline capabilities, and lack of push alerts when new exam grades arrive. MKUPortal was engineered from the ground up to solve these pain points with modern mobile engineering:

Feature Dimension Standard University Mobile Web πŸš€ MKUPortal Native App
Initial Load & Display 3.5s – 5.8s (re-fetching complete HTML) 0ms (Zero-Copy RAM Cache)
Offline Operation ❌ Complete network failure / blank screen βœ… Instant Offline Mode (Persistent Fallback)
Grade Change Alert ❌ Students must manually refresh web pages βœ… Automated Background Diff Notification
Session & Form Safety ❌ Form inputs lost on navigation or tab switch βœ… Real-Time Draft State Preservation
Multi-Account Support ❌ Data cache overlaps between student logins βœ… Strict Student-ID Isolated Partitioning
Network Overhead Full desktop HTML + unminified assets (~2.4 MB) Ultra-light JSON payloads (~12 KB)
APK Binary Footprint N/A 3.8 MB (Optimized with R8/ProGuard)

✨ Key Features

πŸ“š Academic Dashboard & Records

  • Grade Explorer: Detailed visual breakdowns of Semester GPA, Cumulative GPA, 10-scale, 4-scale, and letter-grade equivalents.
  • Weekly & Period Timetable: Interactive class schedule viewer with period blocks, classroom locations, lecturer details, and seamless week-to-week navigation.
  • Exam Schedule & Regulations: Real-time examination timetable including room allocations, seating numbers, formats, and mandatory university guidelines.
  • Tuition & E-Invoice Management: Transparent review of tuition receivables, bank transaction receipts, and personal e-invoice tax declaration draft preservation.
  • Curriculum Roadmap: Official academic program catalog, course prerequisites, and department structures.
  • Direct Student Inquiries: In-app feedback channel to reach academic departments with auto-restoring draft safety.

⚑ Cutting-Edge Architecture & UX

  • Multi-Tier Stale-While-Revalidate Engine:
    • Level 1 (Memory): High-speed LruCache serving active views in 0ms with zero reflection overhead.
    • Level 2 (Persistent Disk): Gson-serialized offline snapshots with strict TTL expiration rules (2h for student records, 24h for static catalogs).
    • Level 3 (Stale Fallback): Automatically serves previous snapshots when network drops with prominent status banners.
  • Multi-Account Isolation: Partitions all local storage, form drafts, and grade snapshots by studentId to safeguard privacy on shared devices.
  • Smart Background Grade Checker: Native Android JobScheduler daemon that detects grade updates and fires high-priority notifications linking straight to student transcripts.
  • In-App GitHub Release Update Checker: Checks the GitHub Releases API for new versions and presents an optional, non-intrusive Material 3 update dialog with interactive changelogs.
  • Edge Crash Reporting Gateway: Edge microservice on Cloudflare Workers capturing uncaught exceptions and forwarding HTML diagnostic cards to Telegram in real-time.

πŸ›οΈ System Architecture

flowchart TD
    subgraph Client["πŸ“± MKUPortal Android App (Client Architecture)"]
        UI[Material 3 Activities & ViewModels]
        Repo[StudentRepository & AuthRepository]
        Cache[(AppCacheManager: RAM LruCache + Disk)]
        Draft[(DraftManager: Form Draft Storage)]
        Job[GradeCheckJobService Daemon]
        CrashEng[CrashReporter: Offline Queue + 3s Sync Thread]
        UpdateMgr[AppUpdateManager: GitHub Release Checker]
        
        UI --> Repo
        Repo --> Cache
        UI --> Draft
        Job --> Repo
    end

    subgraph SchoolServer["🏫 University Core Infrastructure"]
        APIGW[Mekong University Gateway & Edusoft ERP]
    end

    subgraph EdgeCloud["☁️ Cloudflare Edge & Community Telemetry"]
        CFWorker[Cloudflare Worker Gateway: mku-crash-reporter]
        TGBot[Telegram Bot API]
        AdminChat[Admin / Engineering Telegram Alert]
        GHRelease[GitHub Releases API: dev2k6/MKUPortal]
    end

    Repo <-->|HTTPS REST| APIGW
    CrashEng -->|POST /api/crash| CFWorker
    CFWorker -->|sendMessage HTML| TGBot
    TGBot --> AdminChat
    UpdateMgr <-->|GET /releases/latest| GHRelease
Loading

☁️ Telemetry & Edge Gateway (Cloudflare Worker)

MKUPortal comes equipped with an enterprise-grade, serverless diagnostic gateway deployed on Cloudflare Workers located in cloudflare-worker/:

  • Live Edge URL: https://mku-crash-reporter.dev2k6.workers.dev
  • Health Check: GET https://mku-crash-reporter.dev2k6.workers.dev/health
  • Zero Overhead: Eliminates any logging burden on Mekong University's university web servers.
  • Encrypted Secrets: Admin Telegram credentials (TELEGRAM_BOT_TOKEN, TELEGRAM_CHAT_ID) remain encrypted on the Cloudflare edge and are never exposed inside client binaries.
  • Intelligent Stack Truncation: Trims stacktraces to fit within Telegram's 4,096-character limit while escaping HTML entities for faultless message delivery.
🚨 [MKUPortal] APPLICATION CRASH REPORT 🚨
━━━━━━━━━━━━━━━━━━━━━━━━━━
βš™οΈ Severity: πŸ”΄ CRITICAL (FATAL CRASH)
πŸ‘€ Student ID: 2100123
πŸ“ Screen: vn.edu.mku.portal.ui.student.MarksActivity
πŸ“± Device: Samsung SM-S918B (Android 14 - API 34)
πŸ“Ά Network: WiFi | 🧠 Free RAM: 3.2 GB / 7.8 GB
🏷️ Version: v1.0.0 (Build 1) - release
⏰ Time: 10/09/2026, 06:30:00 (ICT)
━━━━━━━━━━━━━━━━━━━━━━━━━━
❌ Exception: java.lang.NullPointerException
πŸ’¬ Message: Attempt to invoke virtual method ...

πŸ”„ Auto-Update Engine (GitHub Releases)

MKUPortal features an automated, non-intrusive update delivery mechanism powered by GitHub Releases.

  • Centralized Configuration: Configured in AppUpdateConfig.java:
    public static final String GITHUB_OWNER = "dev2k6";
    public static final String GITHUB_REPO  = "MKUPortal";
  • Rate-Limit Throttling: Auto-check executes at most once every 4 hours to avoid GitHub API rate limits.
  • Semantic Versioning Comparison: Compares major.minor.patch arrays (1.0.1 > 1.0) while handling -beta or +build tags.
  • 100% Localized Dialog: Displays version badges (v1.0 βž” v1.0.1), publication date, APK file size, and scrollable release notes in both Vietnamese and English.
  • Flexible Options: Students can choose Update Now (direct APK download), Later, or Skip This Version.

πŸ› οΈ Tech Stack & Dependencies

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Layer           β”‚ Technology / Library                                   β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ OS & Target     β”‚ Android 7.0 (Nougat) to Android 15/16 (API 24 to 37)   β”‚
β”‚ Language        β”‚ Java 11 (Source & Target Compatibility)                β”‚
β”‚ Build Tool      β”‚ Gradle 8.9+, Kotlin DSL (build.gradle.kts)             β”‚
β”‚ UI & Design     β”‚ Material Components 3, Dynamic DayNight, Vector Drawablesβ”‚
β”‚ Networking      β”‚ Square Retrofit 2, OkHttp 4, HttpLoggingInterceptor    β”‚
β”‚ Serialization   β”‚ Google Gson 2.10+ with custom type adapters            β”‚
β”‚ Image & Assets  β”‚ Android Vector Assets, Adaptive Icons, WebP Compress   β”‚
β”‚ Quality & Opt   β”‚ R8 Code Shrinking, Resource Stripping (APK: 3.8 MB)    β”‚
β”‚ Edge Gateway    β”‚ Cloudflare Workers (Modern ES Module runtime)          β”‚
β”‚ Telemetry       β”‚ Telegram Bot API (HTML formatting)                     β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸš€ Building from Source

Prerequisites

  1. Android Studio: Ladybug (2024.2.1+) or newer.
  2. JDK: OpenJDK 17 or Android Studio Embedded JBR.
  3. Android SDK: Build Tools 35+, Platforms API 24–37.

Clone & Compile

# 1. Clone the repository
git clone https://github.com/dev2k6/MKUPortal.git
cd MKUPortal

# 2. Configure SDK location (if not set in environment)
echo "sdk.dir=$ANDROID_HOME" > local.properties

# 3. Run full unit test suite
./gradlew testDebugUnitTest

# 4. Build Debug APK (with full network logging enabled)
./gradlew assembleDebug

# 5. Build Production Release APK (R8 Minified & Resource Shrunk ~3.8 MB)
./gradlew assembleRelease

Generated APKs:

  • Debug APK: app/build/outputs/apk/debug/app-debug.apk
  • Optimized Release APK: app/build/outputs/apk/release/app-release-unsigned.apk

πŸ“‚ Project Structure

MKUPortal/
β”œβ”€β”€ app/
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ main/
β”‚   β”‚   β”‚   β”œβ”€β”€ java/vn/edu/mku/portal/
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ data/
β”‚   β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ crash/         # UncaughtExceptionHandler, Payload, Queue
β”‚   β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ local/         # AppCacheManager, DraftManager, Session
β”‚   β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ network/       # Retrofit ApiService, ApiClient, Models
β”‚   β”‚   β”‚   β”‚   β”‚   └── update/        # AppUpdateConfig, AppUpdateManager, ReleaseModel
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ service/           # GradeCheckJobService (Background Daemon)
β”‚   β”‚   β”‚   β”‚   └── ui/
β”‚   β”‚   β”‚   β”‚       β”œβ”€β”€ common/        # NetworkMonitor, SkeletonHelper, DiffManager
β”‚   β”‚   β”‚   β”‚       β”œβ”€β”€ login/         # LoginActivity, ViewModel, State
β”‚   β”‚   β”‚   β”‚       β”œβ”€β”€ forgotpassword/# Password recovery flow
β”‚   β”‚   β”‚   β”‚       └── student/       # Marks, Schedules, Fees, Exams, Profile
β”‚   β”‚   β”‚   └── res/                   # Material 3 layouts, drawables, strings (VI/EN)
β”‚   β”‚   └── test/                      # Unit tests (Diff, Isolation, Updates)
β”‚   β”œβ”€β”€ build.gradle.kts               # Android configuration & R8 rules
β”‚   └── proguard-rules.pro             # Optimized keep rules
β”œβ”€β”€ cloudflare-worker/
β”‚   β”œβ”€β”€ worker.js                      # Edge gateway ES Module
β”‚   β”œβ”€β”€ wrangler.toml                  # Cloudflare deployment manifest
β”‚   β”œβ”€β”€ package.json                   # Wrangler tooling scripts
β”‚   └── README.md                      # Comprehensive Worker documentation
└── README.md                          # Main project documentation

🀝 Contributing & Community Guidelines

Contributions make the open-source community an inspiring place to learn, inspire, and create. Any contributions you make to MKUPortal are greatly appreciated!

  1. Fork the Project (https://github.com/dev2k6/MKUPortal/fork).
  2. Create your Feature Branch (git checkout -b feat/AmazingFeature).
  3. Commit your Changes (git commit -m 'feat: add AmazingFeature').
  4. Push to the Branch (git push origin feat/AmazingFeature).
  5. Open a Pull Request.

Please ensure all tests pass (./gradlew testDebugUnitTest) before submitting PRs!


πŸ‘¨β€πŸ’» Developer & Maintainer

ThΓ‘i NguyΓͺn (dev2k6)

Lead Software Engineer & Open-Source Maintainer

Email GitHub

πŸ“ž Hotline / Zalo: 03333 499 48 β€’ 07777 63 858
πŸ“ Location: Vinh Long & Mekong Delta, Vietnam


🌟 Show Your Support

If MKUPortal made your university experience faster, saved you time, or inspired your Android projects, please consider giving this repository a Star ⭐️!


πŸ“„ License & Disclaimer

This project is licensed under the MIT License β€” see the LICENSE file for details.

Disclaimer: MKUPortal is an independent, community-driven open-source initiative created to optimize the mobile academic experience for students of Mekong University (Trường Đẑi học Cửu Long). All university trademarks, seals, and university API trademarks are the property of Mekong University.

About

πŸŽ“ Official open-source Android portal for Mekong University (Đẑi Học Cα»­u Long - MKU) students. Features offline caching, background grade alerts & Material 3 UI.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Contributors

Languages