Nexus-DevelopmentHub / mobile-app

1 stars 6 forks source link

Bussiness logic checklist #42

Closed triandamai closed 1 year ago

triandamai commented 1 year ago

Modul data akan di mulai setelah UI selesai Persiapan sebelum masuk ke data

Di aplikasi data apa saja yang perlu disimpan di database?:

Fungsi apa saja yang perlu dibuat?

triandamai commented 1 year ago
USER[col]--------+
            +- uid[doc](random)
                +- name
                +- email
                +- address
                +- photoProfile
                +- dateOfBirth
                +- active
                +- updatedAt
                +- isActive
                +- gender
                    +- TOPICS[col]
                        +- id_topic[doc]
                            +- name
                            +- image
                            +- key
                            +- color
                    +- HISTORY_SEARCH[col]
                        +-uid[doc](random)
                            +- id
                            +- query
                            +- createdAt
                    +- LISTENING[col]
                        +- id_episode[doc]
                            +- title
                            +- description
                            +- progressInSecond
                            +- thumbnail

PODCAST[col]-----+ 
            +- uid[doc](random)
                +- title
                +- description
                +- thumbnail
                +- likes
                +- createdAt
                +- createdBy
                +- updatedAt

EPISODES[col]----+ 
            +- uid[doc](random)
                +- title
                +- description
                +- thumbnail
                +- createdBy
                +- durationInSeconds
                +- likes
                +- audioUrl
                +- updatedAt
                +- podcastId
                    +- TOPIC[col]
                        +- uid[doc](randoom)
                            +- name
                            +- image
                            +- key
                            +- color

TOPICS[col]------+
            +- uid[doc](randoom)
                +- id
                +- name
                +- image
                +- key
                +- color
triandamai commented 1 year ago

Referensi

Untuk Autentikasi(Login,Register) https://firebase.google.com/docs/auth/flutter/password-auth?hl=en&authuser=0 https://firebase.google.com/docs/auth/flutter/federated-auth?hl=en&authuser=0

Untuk database(data user,podcast,topic, dll) https://firebase.google.com/docs/firestore/manage-data/add-data?hl=en&authuser=0 https://firebase.google.com/docs/firestore/query-data/get-data?hl=en&authuser=0

Untuk file(simpan audio,gambar dll) https://firebase.google.com/docs/storage/flutter/upload-files?hl=en&authuser=0 https://firebase.google.com/docs/storage/flutter/download-files?hl=en&authuser=0 https://firebase.google.com/docs/storage/flutter/delete-files?hl=en&authuser=0

marioprasetyo commented 1 year ago

Schema data playlist:

  1. ~fungsi ketika user follow creator akan mendapatkan update notifikasi podcast yang baru di upload (mirip fitur subscriber youtube dengan notifikasi~ -> enhancement
  2. fungsi trending minggu ini berdasarkan jumlah share dan jumlah listening podcast
  3. fungsi top episode berdasarkan jumlah love semua user.
  4. ~fungsi panduan gapai cita cita berdasarkan random data audiobook~ -> enhancement
  5. ~fungsi download offline?~ -> enhancement(nice to have)
triandamai commented 1 year ago

pindah halaman dengan argument

Navigator.of(context).pushNamed(Routes.detailDetailEpisode,
    arguments: {
         'id':""
    });

ambil argument:

    final routes=ModalRoute.of(context)?.settings.arguments as Map<String,String>;

    if(routes['id'] == null){

      context.read<EpisodeProvider>().getDetailEpisode(routes['id']!);
    }

Jika di initState:


  @override
  void initState() {

    WidgetsBinding.instance.addPostFrameCallback((timeStamp) {
      final routes=ModalRoute.of(context)?.settings.arguments as Map<String,String>;

       if(routes['id'] == null){

         context.read<EpisodeProvider>().getDetailEpisode(routes['id']!);
        }
    });

    super.initState();
  }

watching state changes:


context.watch<ProviderName>().topics