<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Marwa Eltayeb</title>
    <description>The latest articles on DEV Community by Marwa Eltayeb (@marwaeltayeb).</description>
    <link>https://dev.to/marwaeltayeb</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F254144%2F6247401d-8d1d-4cda-804c-2af2b029b011.png</url>
      <title>DEV Community: Marwa Eltayeb</title>
      <link>https://dev.to/marwaeltayeb</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/marwaeltayeb"/>
    <language>en</language>
    <item>
      <title>Build an E-commerce Store App like Souq.com for Android</title>
      <dc:creator>Marwa Eltayeb</dc:creator>
      <pubDate>Mon, 08 Mar 2021 03:03:58 +0000</pubDate>
      <link>https://dev.to/marwaeltayeb/build-an-e-commerce-store-app-like-souq-com-for-android-30ne</link>
      <guid>https://dev.to/marwaeltayeb/build-an-e-commerce-store-app-like-souq-com-for-android-30ne</guid>
      <description>&lt;p&gt;Many developers want to know how to create an e-commerce store app, and so am I. Therefore, I have decided to build an E-commerce Store app that looks like souq.com. When I shared it, so many developers liked it and asked me about it, so I decided to write about it and give you an idea about its features. My app is implemented using &lt;strong&gt;MVVM Architecture&lt;/strong&gt;. I have written the Back-end rest API in &lt;strong&gt;MySQL&lt;/strong&gt; and &lt;strong&gt;Node.js&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;It is a clone of &lt;em&gt;Souq.com&lt;/em&gt;, but it is not identical. As you know, to build an app like Souq.com, you need to have a big team to collaborate. However, I have made this app myself, and it includes lots of features that you can implement in your app.&lt;/p&gt;

&lt;p&gt;First of all, the user can sign up for getting a new account if he/she does not have one, or log in to their existing accounts. The app enables them to add other products if they have admin accounts. They can browse products and see details about them like product name, picture, image, price, etc.&lt;/p&gt;

&lt;p&gt;Besides, the user can search for products using keywords or categories. They can add a product to the shopping cart or remove it. The product can be added to their wish list or removed from it.&lt;/p&gt;

&lt;p&gt;The user can review a product, give feedback about it, and check other users’ reviews. They can check all products in their shopping cart or wish list.&lt;/p&gt;

&lt;p&gt;The user can sign out or delete his/her account if they wish. For the profile picture, the user can take a picture via camera or upload it from Gallery.&lt;/p&gt;

&lt;p&gt;Users can update password and get OTP via email to verify their identity if they forget their password. Moreover, users can change the language of the application if they wish.&lt;/p&gt;

&lt;p&gt;There is an ability to share the application with friends and rate it on Google Play store. Furthermore, users get a news feed about new offers. The app also provides support through the help center.&lt;/p&gt;

&lt;p&gt;Finally, users can add their shipping address and track the status of their orders.&lt;/p&gt;

&lt;h3&gt;
  
  
  Libraries included in Android side:
&lt;/h3&gt;

&lt;p&gt;(Paging / Glide / Retrofit / Data Binding / Live Data / ViewModel / RecyclerView / CardView / GSON / CircleImageView)&lt;/p&gt;

&lt;h3&gt;
  
  
  Libraries included in Server Side:
&lt;/h3&gt;

&lt;p&gt;(Express/ Multer/ Bcrypt/ JWT/ Body Parser/ Nodemailer)&lt;/p&gt;

&lt;h3&gt;
  
  
  Steps to run the application:
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;Start Server and MySql from Xampp.&lt;/li&gt;
&lt;li&gt;Import Database from SQL_Database to PhpMyAdmin &lt;a href="https://help.dreamhost.com/hc/en-us/articles/214395768-phpMyAdmin-How-to-import-or-restore-a-database-or-table"&gt;How to import&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Create three folders inside Souq_Backend to store images.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;code&gt;mkdir storage_poster&lt;/code&gt;&lt;br&gt;
&lt;code&gt;mkdir storage_product&lt;/code&gt;&lt;br&gt;
&lt;code&gt;mkdir storage_user&lt;/code&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Click the Souq_Backend folder and run npm install command to install server dependencies.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;To start the server, run npm start command.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Open Android Studio and Run the project.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Hooray, NOW you can use it, and apply any feature you like in your E-commerce Store app.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Get the app through&lt;/strong&gt; &lt;a href="https://github.com/Marwa-Eltayeb/Souq_ShopOnline"&gt;Souq_ShopOnline&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Follow me on:&lt;/strong&gt; &lt;a href="https://github.com/Marwa-Eltayeb"&gt;GitHub&lt;/a&gt; and &lt;a href="https://www.linkedin.com/in/marwa-eltayeb/"&gt;LinkedIn&lt;/a&gt;&lt;/p&gt;

</description>
      <category>android</category>
      <category>java</category>
      <category>ecommerce</category>
      <category>onlinestore</category>
    </item>
    <item>
      <title>Hide and Keep your API key out of GitHub repository</title>
      <dc:creator>Marwa Eltayeb</dc:creator>
      <pubDate>Sun, 13 Dec 2020 15:12:43 +0000</pubDate>
      <link>https://dev.to/marwaeltayeb/hide-and-keep-your-api-key-out-of-github-repository-5768</link>
      <guid>https://dev.to/marwaeltayeb/hide-and-keep-your-api-key-out-of-github-repository-5768</guid>
      <description>&lt;p&gt;When you upload your Android app on GitHub, you need to hide it as no one has access to it except you. It is considered a security glitch, so that’s why it is important to hide your API key. I am going to show you how you can do that easily.&lt;/p&gt;

&lt;p&gt;Some Developers store their API key in a String variable like this.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;private static final String APK_KEY = "asjsdakf4d3ggs2ytm4x";&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;It is not good to push your secret things into public repository as other people could use up your limited API calls. That’s probably the least concerning situation. Sharing of API keys becomes more of a concern if the API key authenticates someone for access to a subset of data.&lt;/p&gt;

&lt;p&gt;So, let’s see how we can do that.&lt;/p&gt;

&lt;h4&gt;
  
  
  1- Create a file called gradle.properties in .gradle folder.
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;   -Drive C
    -Users folder
     -your user folder
      -.gradle folder
      Create it here
      -gradle.properties
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then, write your APPNAME_API_KEY = "asjsdakf4d3ggs2ytm4x" inside it. Save it as PROPERTIES File by enclosing with double quotes like this "gradle.properties"&lt;/p&gt;

&lt;h4&gt;
  
  
  2. Next step, Go to module level build.gradle file in your project
&lt;/h4&gt;

&lt;p&gt;Then, put your API key for debug and release purposes under buildTypes tree.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;buildConfigField ‘String’, “ApiKey”, APPNAME_API_KEY&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;It will be like that&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;buildTypes {
        debug{
            buildConfigField 'String', "ApiKey", APPNAME_API_KEY
        }
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
            buildConfigField 'String', "ApiKey", APPNAME_API_KEY
        }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Sync it&lt;/p&gt;

&lt;h4&gt;
  
  
  3. Last Step, access your APK key in your Java file like that
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;private static final String API_KEY = BuildConfig.ApiKey;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If ApiKey goes red, press Make Project button or use &lt;strong&gt;Ctrl+F9&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Another Way to do that:&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;1. Add the API key to your local.properties file:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;apiKey="Your Key"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;2. Add these two lines to the root level of your app-level build.gradle file:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;def localProperties = new Properties()
localProperties.load(new FileInputStream(rootProject.file("local.properties")))
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;3. Add this following line to your app-level build.gradle file:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;android {

  defaultConfig {
      // ...   

      buildConfigField "String", "API_KEY",localProperties['apiKey']

  }   
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;4. Sync Gradle and build the project. You can now reference the key:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;String apiKey = BuildConfig.API_KEY;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Sounds pretty easy, does it?. Whenever you upload your Android project on GitHub, the person that uses your repository will not be able to figure out what your API key is. Therefore, you are secure NOW.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Follow me on:&lt;/strong&gt; &lt;a href="https://github.com/Marwa-Eltayeb"&gt;GitHub&lt;/a&gt; and &lt;a href="https://www.linkedin.com/in/marwa-eltayeb/"&gt;LinkedIn&lt;/a&gt;&lt;/p&gt;

</description>
      <category>programming</category>
      <category>android</category>
      <category>github</category>
      <category>java</category>
    </item>
  </channel>
</rss>
