Meeting 18 Maret 2019:

ALI

1. Migrate ChinaBuyBuy -> ALI

  • Create new tables in API-2 based on CBB
  • Change API calls mechanism
  • Modifying Requests-Responses
  • Catalogs
  • My Products
  • Etc.
  • Sync ChinaBuyBuy Data
  • Commands & Seeders (Cron)
  • Webhook calls from ChinaBuyBuy to ALI
  • Change API calls mechanism
  • Modifying Requests-Responses
  • Catalogs
  • My Products
  • Etc.

2. Merge API 1 -> API 2

  • Orders
  • Users
  • Rules
  • Global Settings
  • Trackings
  • Invoices
  • Form Validation

3. Documentation

  • API-2
  • API-1

4. Frontend Optimization

  • Lazy Load
  • Invalidate older build
  • Form Validation
  • Reduce API Calls (caches, includes, etc.)
  • Communicate with API Team (edited)

4. Frontend Optimization:

Lazy Load:

- Components yang perlu dibikin lazy load:

  • Pages
  • Images
  • Tabs (in My Product)
  • Cart Details, Order Details (on expand click)

Invalidate older build:

Mengkonfigurasi webpack supaya saat ke re-deploy, cache, cookies and other sttuff doesn't affect the code

Form Validation:

  • Rule for Prices:

    • Cannot be empty
    • Must be Number
    • Decimal allowed maximum 2
  • Rules for Regular Text:

    • Cannot be empty
  • Rule for Number:

    • Must be Number only

  • [Catalogs]

    • Search Product: Rules for Regular Text
  • [My Products]

    • Search Product: Rules for Regular Text
    • Description: Rules for Regular Text
    • Variant Title: Rules for Regular Text
    • Variant Price: Rule for Prices
    • Settings Multiplier: Rule for Prices
    • Settings Fixed Price: Rule for Prices
  • [Carts]

    • Quantity: Rule for Number
  • [Add To Cart]

    • Quantity: Rule for Number
  • [Tracking]

    • Inputan Tracking Code: Rule for Regular Text

API Calls (includes)

Menginclude kan data data lainnya yang diperlukan sebuah page jadi satu request.

  • Di Page Catalogs pada saat fetch data catalog, include-kan:

    • Categories
    • My Products
  • Di Page My Products pada saat fetch data my products, include-kan:

    • Rules
    • Categories Owned (buat filter)
  • Di Page Carts pada saat fetch data my products, include-kan:

    • Rules

Vuex Optimization

Mengoptimasi penggunaan vuex. Mungkin beberpaa yang perlu dilakukan:

  • Harus ada initial state dan method untuk reset state
  • Mutation names harus berupa constants untuk mencegah typo mutation name
  • STATE HARUS IMMUTABLE:
    • Selalu cloneDeep data sebelum di ubah
    • Untuk push array jangan pake .push() tapi gunakan .concat()
  • Clear all state saat logout instead of doing refresh

Last but not least...

Always comment your code and make a clear description so that other developers can know what the hell that you did 😈