Skip to content

Basith-08/Tailor-Management-System-Mobile

Repository files navigation

🧵 Tailor Management System

Tailor Management System Logo

Aplikasi Android untuk Manajemen Bisnis Jahit Rumahan

Platform Language Min SDK Target SDK License


📱 Tentang Aplikasi

Tailor Management System adalah aplikasi Android native yang dirancang untuk membantu bisnis jahit rumahan dalam mengelola operasional harian mereka. Dibangun dengan arsitektur MVVM dan Room Database untuk penyimpanan offline-first, aplikasi ini menyediakan solusi lengkap dari manajemen pelanggan hingga tracking pembayaran.

✨ Fitur Utama

  • 👥 Manajemen Pelanggan - Kelola data pelanggan regular dan walk-in
  • 📏 Manajemen Ukuran - Simpan ukuran badan untuk berbagai tipe pakaian
  • 📋 Manajemen Pesanan - Jahit baru dan reparasi dengan status tracking lengkap
  • 💰 Invoice & Pembayaran - Sistem DP dan tracking pembayaran multi-metode
  • Quick Repair - 8 preset reparasi untuk entry cepat
  • 📊 Dashboard Statistik - Real-time metrics (pesanan, pendapatan, dll)
  • 💾 Backup & Restore - Keamanan data dengan backup database
  • 💬 WhatsApp Integration - Chat pelanggan dan share invoice via WhatsApp

🎯 Screenshots

Note: Screenshots akan tersedia setelah aplikasi dijalankan. Lihat Demo Video untuk preview lengkap.


🛠️ Tech Stack

Core

  • Language: Kotlin 1.9.10
  • Min SDK: 24 (Android 7.0 Nougat)
  • Target SDK: 33 (Android 13)
  • Build System: Gradle 8.1.4 with Kotlin DSL

Architecture & Libraries

  • Architecture Pattern: MVVM (Model-View-ViewModel)
  • Database: Room 2.5.2 (SQLite)
  • Async Processing: Kotlin Coroutines 1.7.1
  • DI: Manual Dependency Injection
  • Navigation: Navigation Component 2.6.0
  • UI Framework: Material Design 3

AndroidX Libraries

- androidx.core:core-ktx:1.10.1
- androidx.appcompat:appcompat:1.6.1
- androidx.lifecycle:lifecycle-viewmodel-ktx:2.6.1
- androidx.lifecycle:lifecycle-livedata-ktx:2.6.1
- androidx.navigation:navigation-fragment-ktx:2.6.0
- androidx.room:room-ktx:2.5.2
- com.google.android.material:material:1.9.0

📋 Prerequisites

Sebelum memulai, pastikan Anda sudah menginstall:

  • Android Studio Hedgehog (2023.1.1) atau lebih baru
  • JDK 17 (Java Development Kit)
  • Android SDK dengan:
    • Android SDK Platform 33
    • Android SDK Build-Tools 33.0.0+
    • Android Emulator atau Physical Device
  • Git untuk clone repository

Verifikasi Prerequisites

# Cek Java version
java -version
# Output: openjdk version "17.0.x" atau lebih baru

# Cek Android Studio
# Buka Android Studio > Help > About

# Cek Git
git --version

🚀 Quick Start

1. Clone Repository

# HTTPS
git clone https://github.com/yourusername/tailor-management-system.git

# Atau SSH
git clone git@github.com:yourusername/tailor-management-system.git

# Masuk ke direktori project
cd tailor-management-system

2. Buka di Android Studio

  1. Buka Android Studio
  2. Pilih Open an Existing Project
  3. Navigate ke folder tailor-management-system
  4. Klik OK
  5. Tunggu Gradle sync selesai (pertama kali akan download dependencies)

3. Konfigurasi SDK (Jika Diperlukan)

Jika Android Studio meminta SDK configuration:

  1. FileProject StructureSDK Location
  2. Pastikan Android SDK Location sudah di-set
  3. Pastikan JDK Location point ke JDK 17

4. Sync Project

# Atau via terminal di dalam project directory
./gradlew clean build

5. Run Aplikasi

Opsi A: Via Android Studio

  1. Pilih device/emulator dari dropdown
  2. Klik tombol Run (▶️) atau tekan Shift + F10

Opsi B: Via Command Line

# Build APK Debug
./gradlew assembleDebug

# Install ke device yang terconnect
./gradlew installDebug

# Atau build + install + run
./gradlew installDebug && adb shell am start -n com.tailor.app/.ui.splash.SplashActivity

🔧 Build Configuration

Gradle Properties

Edit file gradle.properties jika diperlukan:

# JVM Heap Size
org.gradle.jvmargs=-Xmx4096m

# Java Home (sesuaikan dengan lokasi JDK 17 Anda)
org.gradle.java.home=/usr/lib/jvm/java-17-openjdk-amd64

# Parallel builds
org.gradle.parallel=true

# Gradle caching
org.gradle.caching=true

Local Properties

File local.properties otomatis dibuat oleh Android Studio. Jika belum ada, buat manual:

# Path ke Android SDK (sesuaikan dengan sistem Anda)
sdk.dir=/home/username/Android/Sdk

# Atau di Windows
# sdk.dir=C\:\\Users\\Username\\AppData\\Local\\Android\\Sdk

# Atau di macOS
# sdk.dir=/Users/username/Library/Android/sdk

📚 Project Structure

tailor-management-system/
├── app/
│   ├── src/
│   │   └── main/
│   │       ├── java/com/tailor/app/
│   │       │   ├── data/              # Data Layer
│   │       │   │   ├── database/      # Room Database
│   │       │   │   ├── dao/           # Data Access Objects (8 DAOs)
│   │       │   │   ├── entity/        # Database Entities (8 tables)
│   │       │   │   └── repository/    # Repositories (6 repos)
│   │       │   ├── viewmodel/         # ViewModels (8 ViewModels)
│   │       │   ├── ui/                # UI Layer
│   │       │   │   ├── splash/        # Splash Screen
│   │       │   │   ├── login/         # Login Screen
│   │       │   │   ├── main/          # Main Container
│   │       │   │   ├── dashboard/     # Dashboard
│   │       │   │   ├── customer/      # Customer Management
│   │       │   │   ├── order/         # Order Management
│   │       │   │   ├── invoice/       # Invoice & Payment
│   │       │   │   └── settings/      # Settings
│   │       │   └── util/              # Utility Classes
│   │       ├── res/                   # Resources
│   │       │   ├── layout/            # Layout XMLs (21 files)
│   │       │   ├── drawable/          # Icons & Drawables
│   │       │   ├── values/            # Strings, Colors, Themes
│   │       │   ├── menu/              # Menu XMLs
│   │       │   └── navigation/        # Navigation Graph
│   │       └── AndroidManifest.xml
│   ├── build.gradle.kts               # Module build config
│   └── proguard-rules.pro
├── build.gradle.kts                   # Project build config
├── settings.gradle.kts                # Settings
├── gradle.properties                  # Gradle properties
├── gradlew                            # Gradle wrapper (Unix)
├── gradlew.bat                        # Gradle wrapper (Windows)
├── README.md                          # This file
├── LICENSE                            # License
└── docs/                              # Documentation & Screenshots

🏗️ Architecture

Aplikasi ini menggunakan MVVM (Model-View-ViewModel) pattern dengan Repository Pattern untuk data abstraction.

Architecture Diagram

┌─────────────────────────────────────────┐
│         VIEW (UI Layer)                 │
│  - Activities (3)                       │
│  - Fragments (6+)                       │
│  - Layout XML (21)                      │
│  - RecyclerView Adapters                │
└──────────────┬──────────────────────────┘
               │
               │ observes LiveData
               │ calls ViewModel methods
               ↓
┌─────────────────────────────────────────┐
│      VIEWMODEL (Presentation)           │
│  - Business Logic                       │
│  - LiveData Exposure                    │
│  - Coroutine Scope Management           │
└──────────────┬──────────────────────────┘
               │
               │ uses Repository
               ↓
┌─────────────────────────────────────────┐
│     REPOSITORY (Business Logic)         │
│  - Data Source Abstraction              │
│  - Single Source of Truth               │
└──────────────┬──────────────────────────┘
               │
               │ calls DAO
               ↓
┌─────────────────────────────────────────┐
│         DAO (Data Access)               │
│  - SQL Query Definitions                │
│  - CRUD Operations                      │
└──────────────┬──────────────────────────┘
               │
               │ operates on
               ↓
┌─────────────────────────────────────────┐
│      ENTITY (Data Model)                │
│  - Database Table Definitions           │
│  - 8 Tables with Relationships          │
└──────────────┬──────────────────────────┘
               │
               ↓
┌─────────────────────────────────────────┐
│    ROOM DATABASE (SQLite)               │
│  - Offline-First Storage                │
└─────────────────────────────────────────┘

Data Flow

  1. User Interaction → View (Fragment/Activity)
  2. View calls → ViewModel methods
  3. ViewModel uses → Repository
  4. Repository calls → DAO
  5. DAO queries → Room Database
  6. Database returns → LiveData
  7. LiveData flows back → View (automatically updates UI)

💾 Database Schema

8 Entity Tables

  1. User - Admin/user authentication
  2. Customer - Customer data (regular & walk-in)
  3. Measurement - Body measurements per customer
  4. Order - Tailoring orders (new & repair)
  5. OrderItem - Items within orders (multi-item support)
  6. Invoice - Invoices and billing
  7. Payment - Payment transaction history
  8. RepairPreset - Preset repair types with prices

Relationships

Customer (1) ──┬─→ (N) Measurement
               ├─→ (N) Order
               └─→ (N) Invoice

Order (1) ──┬─→ (N) OrderItem
            └─→ (1) Invoice

Invoice (1) ──→ (N) Payment

ER Diagram

┌─────────────┐      ┌─────────────┐      ┌─────────────┐
│   Customer  │─────<│Measurement  │      │    Order    │
│             │      │             │      │             │
│  - id       │      │  - id       │      │  - id       │
│  - name     │      │  - customerId│     │  - customerId│
│  - phone    │      │  - type     │      │  - orderNo  │
│  - address  │      │  - measure  │      │  - type     │
│  - isWalkIn │      └─────────────┘      │  - status   │
└──────┬──────┘                           │  - deadline │
       │                                  └──────┬──────┘
       │                                         │
       │         ┌─────────────┐                │
       └────────<│   Invoice   │>───────────────┘
                 │             │
                 │  - id       │
                 │  - invoiceNo│
                 │  - total    │
                 │  - dp       │
                 │  - remaining│
                 └──────┬──────┘
                        │
                        │
                 ┌──────▼──────┐
                 │   Payment   │
                 │             │
                 │  - id       │
                 │  - invoiceId│
                 │  - amount   │
                 │  - method   │
                 └─────────────┘

🔐 Default Credentials

Untuk login pertama kali:

Username: admin
Password: admin123

⚠️ Security Note: Untuk production, ganti credentials dan implement password hashing (BCrypt/Argon2).


📖 Usage Guide

1. Login

  • Buka aplikasi → Splash screen (2 detik)
  • Masukkan credentials default
  • Klik tombol Login

2. Dashboard

  • Lihat statistik real-time (pesanan, pendapatan)
  • Filter pesanan (Semua / Terlambat / Urgent)
  • Toggle view mode (Grid / List)
  • Akses quick actions:
    • Tambah Pelanggan
    • Tambah Pesanan
    • Backup Database

3. Manajemen Pelanggan

  • Navigate ke menu Pelanggan (via bottom nav atau drawer)
  • Tambah: Klik FAB (+), isi form, save
  • Edit: Tap customer item, edit data
  • Delete: Long press customer item
  • Search: Gunakan search bar di atas
  • Filter: Pilih Semua / Tetap / Walk-in
  • WhatsApp: Tap icon WhatsApp untuk chat

4. Tambah Pesanan

  • Navigate ke menu Pesanan
  • Klik FAB (+)
  • Pilih pelanggan
  • Pilih tipe: Jahit Baru atau Reparasi
  • Set prioritas: Normal / Urgent
  • Pilih deadline dengan DatePicker
  • Pilih waktu dengan TimePicker
  • Input harga dan catatan
  • Save

5. Manajemen Ukuran

  • Drawer menu → Ukuran
  • Tambah ukuran untuk pelanggan
  • Pilih tipe pakaian
  • Input measurements
  • Upload foto referensi (optional)

6. Invoice & Pembayaran

  • Navigate ke menu Invoice
  • Generate invoice dari order
  • Input DP (Down Payment)
  • Record pembayaran dengan metode: Cash / Transfer / E-Wallet
  • Share invoice via WhatsApp

7. Backup & Restore

  • Drawer menu → Backup/Restore
  • Backup: Database disimpan ke /sdcard/TailorBackup/
  • Restore: Pilih file backup untuk restore

🧪 Testing

Unit Tests

./gradlew test

Instrumented Tests

./gradlew connectedAndroidTest

Generate Test Coverage Report

./gradlew jacocoTestReport

🐛 Troubleshooting

1. Gradle Sync Failed

Problem: Gradle sync error atau dependencies tidak terdownload

Solution:

# Clean project
./gradlew clean

# Invalidate caches (Android Studio)
File → Invalidate Caches / Restart → Invalidate and Restart

# Delete .gradle folder dan sync ulang
rm -rf .gradle/
./gradlew --refresh-dependencies

2. Build Error: SDK Version

Problem: Android SDK 33 not found

Solution:

  • Android Studio → Tools → SDK Manager
  • Install Android 13.0 (Tiramisu) SDK Platform 33
  • Sync project

3. App Crash on Launch

Problem: App crash saat pertama kali dibuka

Solution:

# Check logcat
adb logcat | grep "com.tailor.app"

# Clear app data
adb shell pm clear com.tailor.app

# Reinstall
./gradlew installDebug

4. Room Database Error

Problem: Cannot access database atau migration error

Solution:

# Uninstall app
adb uninstall com.tailor.app

# Reinstall fresh
./gradlew installDebug

5. JDK Version Mismatch

Problem: Unsupported class file major version

Solution:

  • Pastikan menggunakan JDK 17
  • Set di gradle.properties:
    org.gradle.java.home=/path/to/jdk-17

6. Permission Denied (Linux/Mac)

Problem: ./gradlew: Permission denied

Solution:

chmod +x gradlew
./gradlew build

📝 Development Guide

Adding New Feature

  1. Create Entity (if needed) di data/entity/
  2. Create DAO di data/dao/
  3. Add to Database di TailorDatabase.kt
  4. Create Repository di data/repository/
  5. Create ViewModel di viewmodel/
  6. Create Fragment/Activity di ui/
  7. Create Layout di res/layout/
  8. Add Navigation di nav_graph.xml
  9. Test functionality

Code Style

  • Language: Kotlin
  • Convention: Follow Kotlin Coding Conventions
  • Naming:
    • Classes: PascalCase (e.g., CustomerViewModel)
    • Functions: camelCase (e.g., getAllCustomers())
    • Variables: camelCase (e.g., customerId)
    • Constants: UPPER_SNAKE_CASE (e.g., MAX_RETRY_COUNT)
  • Indentation: 4 spaces
  • Package: by feature/layer, not by type

Git Workflow

# Create feature branch
git checkout -b feature/your-feature-name

# Make changes and commit
git add .
git commit -m "feat: add new feature"

# Push to remote
git push origin feature/your-feature-name

# Create Pull Request

Commit Message Convention

feat: Add new feature
fix: Fix bug
docs: Update documentation
style: Format code
refactor: Refactor code
test: Add tests
chore: Update dependencies

🚧 Roadmap

Version 1.0 (Current) ✅

  • Complete MVVM architecture
  • Room Database with 8 tables
  • Customer management
  • Order management (New & Repair)
  • Invoice & Payment tracking
  • Dashboard statistics
  • Backup & Restore
  • WhatsApp integration

Version 1.1 (Planned) 🚀

  • Dark mode support
  • PDF export for invoices
  • Advanced search & filtering
  • Multi-currency support
  • Custom notification system
  • Image gallery for orders

Version 2.0 (Future) 💡

  • Cloud sync (Firebase/Backend API)
  • Multi-user support
  • Role-based access control
  • Push notifications
  • Customer portal app
  • Inventory management
  • Financial reports & analytics
  • WhatsApp Business API integration

🤝 Contributing

Contributions are welcome! Please follow these steps:

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'feat: Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

Contribution Guidelines

  • Follow existing code style and conventions
  • Write clear commit messages
  • Add unit tests for new features
  • Update documentation as needed
  • Ensure all tests pass before submitting PR

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

MIT License

Copyright (c) 2025 Tailor Management System

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

👥 Authors

  • [Your Name] - Initial work - GitHub

Contributors

See the list of contributors who participated in this project.


🙏 Acknowledgments

  • ITTS - Institut Teknologi Telkom Surabaya
  • Dosen Pengampu - Mata Kuliah Pemrograman Android Semester 5
  • Google - Android Development Documentation
  • Material Design - UI/UX Guidelines
  • JetBrains - Kotlin Programming Language
  • Square - Room Database inspiration

📞 Support

Jika ada pertanyaan atau issue:


📊 Project Statistics

  • Total Kotlin Files: 43
  • Total Lines of Code: ~4,096 (Kotlin) + ~2,749 (XML)
  • Activities: 3
  • Fragments: 6+
  • Database Tables: 8
  • ViewModels: 8
  • Repositories: 6
  • DAOs: 8
  • Layout Files: 21
  • String Resources: 100+

🎬 Demo Video

Tailor Management System Demo

Click the image above to watch the demo video

Atau lihat SKRIP_VIDEO_PRESENTASI.md untuk detailed walkthrough.


📚 Additional Documentation


⭐ Show Your Support

Jika project ini membantu Anda, berikan ⭐️!

Star History

Star History Chart


Made with ❤️ for ITTS Android Programming Course

© 2025 Tailor Management System. All Rights Reserved.

About

Tailor Management System adalah aplikasi Android native yang dirancang untuk membantu bisnis jahit rumahan dalam mengelola operasional harian mereka. Dibangun dengan arsitektur MVVM dan Room Database untuk penyimpanan offline-first, aplikasi ini menyediakan solusi lengkap dari manajemen pelanggan hingga tracking pembayaran.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages