Skip to main content

Development Guidelines

Panduan development untuk kontributor MStore Mobile.

๐ŸŽฏ Development Workflow

1. Setup Development Environment

2. Branch Strategy

Branch Naming:
  • feature/cashier-barcode-scan - New features
  • fix/inventory-sync-issue - Bug fixes
  • hotfix/payment-crash - Critical production fixes
  • refactor/bloc-architecture - Code refactoring
  • docs/api-documentation - Documentation updates

3. Commit Convention

Gunakan Conventional Commits:
Types:
  • feat: New feature
  • fix: Bug fix
  • docs: Documentation
  • style: Code style (formatting, etc)
  • refactor: Code refactoring
  • perf: Performance improvement
  • test: Adding tests
  • chore: Maintenance tasks
Examples:

4. Pull Request Process

Before Creating PR

PR Template

๐Ÿ—๏ธ Project Structure

Feature Module Structure

Core Module Structure

๐Ÿ“ Coding Standards

Dart Style Guide

BLoC Pattern

Repository Pattern

๐Ÿงช Testing

Unit Tests

Widget Tests

Integration Tests

๐Ÿ” Code Review Checklist

For Authors

  • Code follows project style guide
  • All tests pass
  • No compiler warnings
  • Documentation updated
  • Self-review completed
  • Complex logic has comments
  • No hardcoded values
  • Error handling implemented
  • Logging added where appropriate

For Reviewers

  • Code is readable and maintainable
  • Logic is correct
  • Edge cases handled
  • Performance considerations
  • Security implications checked
  • Tests are adequate
  • Documentation is clear
  • No code duplication

๐Ÿš€ Performance Guidelines

1. Widget Optimization

2. State Management

3. Network Optimization

๐Ÿ“Š Monitoring & Logging

Logging Best Practices

Error Tracking

๐Ÿ” Security Guidelines

  1. No Hardcoded Secrets
  2. Validate User Input
  3. Secure Storage

๐Ÿ“ฑ Platform-Specific Guidelines

iOS

  • Follow iOS Human Interface Guidelines
  • Use Cupertino widgets when appropriate
  • Test on multiple iOS versions
  • Handle safe area insets

Android

  • Follow Material Design guidelines
  • Test on different screen sizes
  • Handle back button properly
  • Request permissions properly

Next Steps


Remember:
  • โœ… Write clean, readable code
  • โœ… Test your changes
  • โœ… Document complex logic
  • โœ… Follow conventions
  • โœ… Ask for help when needed