Make E-Commerce using Kotlin MVVM

Last update: Feb 21, 2022

Kotlin E-Commerce MVVM

Make E-Commerce using Kotlin, and for backend i use Golang, and PHP

Feature

  • MVVM
  • Retrofit2
  • 15+ Screen
  • Payment Gateway (Razorpay & Midtrans)
  • Firebase Auth (Sign in with email & Google Sign in)
  • Live Data
  • Network API
  • Picasso
  • Shared Preference
  • CRUD API
  • Splash Screen, OnBoarding Screen, etc ...

Please change this, if not it will ERROR

use your own apiKey

  object Constant {
      const val MERCHAT_ID_MIDTRANS = "YOUR_API_KEY"
      const val CLIENT_KEY_MIDTRANS = "SB-Mid-client-YOUR_API_KEY"
      const val SERVER_KEY_MIDTRANS = "SB-Mid-server-YOUR_API_KEY"
      const val BASE_URL_MIDTRANS = "PHP API SERVER"

      const val KEY_ID_RAZORAPP = "rzp_test_YOUR_API_KEY";
      const val KEY_SECRET_RAZORAPP = "YOUR_API_KEY";
  }

Golang API

please check this https://github.com/achmadrizkin/golang_e-commerce_API

Php API (for midtrans payment)

please create, and deploy to your own server

  <?php
  // Set your server key (Note: Server key for sandbox and production mode are different)
  $server_key = 'SB-Mid-server-ADDYOURKEYHERE';
  // Set true for production, set false for sandbox
  $is_production = false;

  $api_url = $is_production ? 
    'https://app.midtrans.com/snap/v1/transactions' : 
    'https://app.sandbox.midtrans.com/snap/v1/transactions';

  // get the HTTP POST body of the request
  $request_body = file_get_contents('php://input');
  // set response's content type as JSON
  header('Content-Type: application/json');
  // call charge API using request body passed by mobile SDK
  $charge_result = chargeAPI($api_url, $server_key, $request_body);
  // set the response http status code
  http_response_code($charge_result['http_code']);
  // then print out the response body
  echo $charge_result['body'];

  /**
   * call charge API using Curl
   * @param string  $api_url
   * @param string  $server_key
   * @param string  $request_body
   */
  function chargeAPI($api_url, $server_key, $request_body){
    $ch = curl_init();
    $curl_options = array(
      CURLOPT_URL => $api_url,
      CURLOPT_RETURNTRANSFER => 1,
      CURLOPT_POST => 1,
      CURLOPT_HEADER => 0,
      // Add header to the request, including Authorization generated from server key
      CURLOPT_HTTPHEADER => array(
        'Content-Type: application/json',
        'Accept: application/json',
        'Authorization: Basic ' . base64_encode($server_key . ':')
      ),
      CURLOPT_POSTFIELDS => $request_body
    );
    curl_setopt_array($ch, $curl_options);
    $result = array(
      'body' => curl_exec($ch),
      'http_code' => curl_getinfo($ch, CURLINFO_HTTP_CODE),
    );
    return $result;
  }

Previrew App

Splash Screen On Boarding Screen 1 On Boarding Screen 2
On Boarding Screen 3 Login Screen Transaction Empty Screen
Empty My Product Screen Profile Screen Product details 1
Add/Edit Product Screen My Product Screen Home Screen 1
Home Screen 2 Product Details Screen Midtrans
Razorpay Transaction Screen User Profile (if name, and image null)

GitHub

https://github.com/achmadrizkin/kotlin_e-commerce_MVVM
You might also like...

Shopping List App Using MVVM

Shopping List App Using MVVM

Shopping_List-MVVM Shopping List App to add Shopping Items APK Link Here About The Project Uses Android Room Database to store Shopping Items Uses MVV

Dec 11, 2021

Android MVVM Base Architecture for Enterprise Mobile Application using Architectural Components

Android MVVM Base Architecture for Enterprise Mobile Application using Architectural Components

Android MVVM Base Architecture for Enterprise Mobile Application using Architectural Components Highlights MVVM Architectural pattern Offline Support

Apr 23, 2022

This repository contains a detailed sample app that implements MVVM architecture using Hilt, Coroutines, Retrofit and Compose

Saber News App sample project to explain how to build solid, clean architected App using MVVM and repository architecture Techniques Kotlin Clean arch

Dec 26, 2021

NY Times - New app built using MVVM and Hilt

NY Times - New app built using MVVM and Hilt

NYTimes A simple app to hit the NY Times Most Popular Articles API and show a li

Jan 30, 2022

Retrieve Data from an API using MVVM Clean Architecture and Jetpack Compose

Retrieve Data from an API using MVVM Clean Architecture and Jetpack Compose

MVVM Clean Architecture Demo Retrieve Data from an API using MVVM Clean Architecture and Jetpack Compose. It simply shows a list of movies fetched fro

Mar 27, 2022

A sample project in Kotlin to demonstrate AndroidX, MVVM, Coroutines, Hilt, Room, Data Binding, View Binding, Retrofit, Moshi, Leak Canary and Repository pattern.

This repository contains a sample project in Kotlin to demonstrate AndroidX, MVVM, Coroutines, Hilt, Room, Data Binding, View Binding, Retrofit, Moshi, Leak Canary and Repository pattern

May 9, 2022

Android Clean Architecture💎 Base Project Android with Kotlin and MVVM applying clean architecture

 Android Clean Architecture💎 Base Project Android with Kotlin and MVVM applying clean architecture

Android Clean Architecture💎 Base Project Android with Kotlin and MVVM applying clean architecture

May 18, 2022

A sample to showcase Kotlin, MVVM, Koin, Coroutines, StateFlow, Room, WorkManager, Retrofit and Unit test.

TVMaze-Cache A sample to showcase Kotlin, MVVM, Koin, Coroutines, StateFlow, Room, WorkManager, Retrofit and Unit test. Features MVVM Architecture + R

Mar 13, 2022
MVVM Redux is a lightweight lib to help you apply the redux concepts in your project based in MVVM.

MVVM Redux is a lightweight lib to help you apply the redux concepts in your project based in MVVM.

Apr 8, 2022
Chat App MVVM + Clean ArchitectureChat App MVVM + Clean Architecture
Chat App MVVM + Clean ArchitectureChat App MVVM + Clean Architecture

Chat App MVVM + Clean Architecture This Android application built using MVVM + Clean Architecture architecture approach and is written 100% in Kotlin.

Oct 14, 2021
Basic-MVVM-Example - Basic Android Application MVVM
Basic-MVVM-Example - Basic Android Application MVVM

Android's MVVM Architecture in Kotlin Why a simple app ? Because it's easier to

Jan 26, 2022
An android app built using Kotlin following Multi-Module Clean Architecture MVVM
An android app built using Kotlin following Multi-Module Clean Architecture MVVM

RickyandMorty An android app built using Kotlin that consumes RickyadMorty API to display characters.It has been built following Clean Architecture Pr

Feb 3, 2022
Android App using Kotlin, MVVM, ViewModel, LiveData, Coroutines, Room and DataBinding
Android App using Kotlin, MVVM, ViewModel, LiveData, Coroutines, Room and DataBinding

Words Android App using Kotlin, MVVM, ViewModel, LiveData, Coroutines, Room and

Mar 9, 2022
Simple news app using MVVM
Simple news app using MVVM

Simple News App Simple news app android using MVVM Screenshots News API key News App uses the News API to load news. To use the API, you will need to

Mar 11, 2022
Currency converter Android application using MVVM architecture
Currency converter Android application using MVVM architecture

Currency Converter Currency conversion using live exchange rates. Demo Screenshots API service

Oct 31, 2021
A simple Cat Search app, performed the search by cat breed name, using MVVM clean Architecture.
 A simple Cat Search app, performed the search by cat breed name, using MVVM clean Architecture.

CatSearchApp A simple Cat Search app, performed the search by cat breed name, using MVVM clean Architecture. The App is using the The Cat Api for sear

Oct 21, 2021
Group Messaging Chat (Discord Clone :eyes:) App Using Firebase Cloud-Firestore following MVVM Architecture
Group Messaging Chat (Discord Clone :eyes:) App Using Firebase Cloud-Firestore following MVVM Architecture

Nit Talk Nit Talk is a Group Chat Messaging (Discord Clone) App based on Modern Android Application tech-stacks and MVVM architecture. Techs Used ?? K

Apr 23, 2022
❤️ Android Ghibli using Hilt, Motion, Coroutines, Jetpack (ViewModel) based on MVVM architecture.

Glibhi ❤️ Android Ghibli using Hilt, Motion, Coroutines, Jetpack (ViewModel) based on MVVM architecture. Tech stack & Open-source libraries Minimum SD

Mar 11, 2022