Free tutorials & notes in Hindi & English · Clean code examples 🧰 Free PDF & Image Tools →
🧭 Plan & Database  ·  Lesson 01

E-commerce App Project Overview

What you will build

In this course you build KartEasy, a complete shopping app like a small Flipkart or Meesho. It has three parts that you write yourself, line by line:

  1. A MySQL database with 14 tables (users, products, cart, orders …).
  2. A PHP REST API that the app calls, plus an admin panel where the shop owner adds products and ships orders.
  3. A native Android app in Kotlin + XML with a modern Material 3 design.
9:41▮▮ 85%☰KartEasy⋮🔍 Search for productsFestive SaleUp to 60% off on electronicsMobilesFashionBooks⌚Smart Watch Pro₹1,899🎧Earbuds X2₹1,099🏠Home🗂️Categories♡Wishlist🛒Cart👤Account9:41▮▮ 85%←Electronics⋮🖼️Smart Watch ProSmart Watch Pro62% off ₹4,999 ₹1,8994.5 ★ · 128 ratings · In stock🛒 Add to cartBuy now9:41▮▮ 85%☰Cart⋮🎉 You get FREE delivery⌚Smart Watch Pro₹1,899− 1 +📘Learn Kotlin₹349− 1 +Total amount₹2,248Checkout🏠Home🗂️Categories♡Wishlist🛒Cart👤Account
Home, product detail and cart in the finished KartEasy app

The shop comes with real sample data — 16 products in 6 categories, 3 home banners and 2 coupons — so the app looks complete the first time you run it:

KartEasy sample product images
The 16 sample product images included in the download (uploads/products/)

Feature list

AreaFeatures
AccountSplash, onboarding, register, login, logout, edit profile, change password, dark mode
BrowseHome banners (auto-slide), categories, featured, top deals, new arrivals, search, 6 sort options, price filter, endless scrolling
ProductImage gallery, price / MRP / % off, stock warning, quantity, reviews, similar products, share
BuyWishlist, cart with − / +, swipe to remove + Undo, free-delivery progress, coupons, saved addresses, Cash on Delivery
After buyingOrder success screen, notification, order list, tracking timeline, cancel, rate & review
Admin panelDashboard, orders + status, products with image upload, categories, banners, coupons, customers
QualityToken login, hashed passwords, transactions (no overselling), CSRF, offline cache, tablet layouts, R8 release

How the parts talk to each other

The Android app never touches the database directly. It sends HTTP requests to the PHP API, the API checks everything (login, stock, prices) and talks to MySQL, then answers in JSON. The admin panel uses the same database from the browser.

Android appKotlin + XMLRetrofitHTTPS + JSONPHP APIapi/*.phpMySQL14 tables
Every screen follows this path
AppPHP APIMySQLPOST cart/add.php {product_id: 7} + tokencheck token, stock → INSERT … ON DUPLICATE KEYOK{"success":true,"data":{cart with totals}}update list, badge and total
Example: tapping "Add to cart"

Inside the app we use the MVVM pattern so the code stays organised:

Fragment + XML layoutshows data, sends clicksViewModelholds screen state (StateFlow), survives rotationShopRepositorythe only class that calls the APIApiService (Retrofit) + OkHttpHTTP, token header, offline cache
App layers from top (UI) to bottom (network)

Tech stack

Backend (server)

  • PHP 7.2+ (also PHP 8.x)
  • MySQL 5.7+ / MariaDB with PDO
  • Token login (Bearer), password_hash
  • Admin panel: PHP sessions + CSRF
  • Runs on Hostinger, cPanel, XAMPP

Android app

  • Kotlin 2.0, XML layouts, Material 3
  • ViewModel + StateFlow + Coroutines
  • Retrofit + Gson + OkHttp cache
  • Navigation component, Glide, DataStore
  • minSdk 26, targetSdk 35
No framework on the server: plain PHP is easy to host and easy to understand

Project folders

📁 KartEasy-Project/
  📁 backend/                    ← upload to hosting (public_html/karteasy)
    database.sql              tables + 16 sample products
    📁 includes/                 config.php, db.php, helpers.php, cart.php …
    📁 api/                      home.php, products.php, product.php …
      📁 auth/  cart/  wishlist/  address/  coupons/  orders/  reviews/
    📁 admin/                    admin panel (login, orders, products …)
    📁 uploads/                  product, category and banner images
  📁 android/KartEasy/           ← open in Android Studio
    📁 app/src/main/java/com/codingeasily/karteasy/
      📁 data/  api/ model/ repo/ session/
      📁 ui/    home/ product/ cart/ checkout/ orders/ account/ …
      📁 util/  notify/
    📁 app/src/main/res/         layouts, drawables, navigation, values
The download ZIP: one folder for the server, one for Android Studio

Download the complete project from the course page (button Download App + API Code). Every file shown in these lessons is exactly the file inside the ZIP.

Tools you need

  1. 1Android Studio (Ladybug or newer) — see the setup lesson
  2. 2PHP 7.2+ and MySQL: install XAMPP (Windows) or use the PHP / MySQL that comes with your OS
  3. 3A code editor for PHP (VS Code works well)
  4. 4Postman or Thunder Client to test the API (optional — we also test with curl)
  5. 5Later: hosting with PHP + MySQL (for example Hostinger) to put the API online
Install these before Lesson 3
📚 Before you start

You should know basic Android views, RecyclerView, fragments and Retrofit. All of these are taught in the free Android (Kotlin) course. For PHP basics see the PHP tutorial.

Course plan

1. Plan & databasetables, keys, sample data2. PHP REST APIsetup → auth → products → cart → orders → coupons3. Admin panel + securitymanage shop, test every endpoint4. Android appsetup → theme → screens → checkout → orders5. Releasehost API, signed app bundle, viva questions
We build the server first, so the app always has a real API to call

Demo logins

WhereEmailPassword
Android app (customer)test@karteasy.inTest@123
Admin paneladmin@karteasy.inAdmin@123
⚠️ Change the admin password

These passwords are public because they are in this tutorial. Change the admin password before you put the backend online — the admin panel lesson shows how.

Frequently Asked Questions

Is this a real working app or only UI?
It is a full working project: a PHP + MySQL REST API with 27 endpoints, an admin panel, and a native Android app that uses every endpoint. The API was tested end to end on PHP 8.3 with MariaDB and checked for PHP 7.2 compatibility.
Can I run it without buying hosting?
Yes. Run the backend on your computer with XAMPP or "php -S 0.0.0.0:8000", and the Android emulator reaches it at http://10.0.2.2:8000/. Buy hosting only when you want to share the app.
Why Kotlin + XML and not Jetpack Compose?
XML layouts are still used in most existing Android apps and most college syllabi, and they make every view visible in the layout editor. Once you understand this project, moving to Compose is easy because the ViewModel, Retrofit and repository layers stay the same.
← E-commerce App Tutorial
🔗

Share this topic with a friend

यह topic किसी दोस्त को भेजें

Found it useful? Send it to a classmate learning the same thing.

अच्छा लगा? जो दोस्त यही सीख रहा है, उसे भेज दीजिए।

Next topicDatabase Design (MySQL Tables) Your progress: 1 / 28 (4%) · Lesson 2 / 28 Continue →

How was this lesson?

Your feedback helps us make the content better.

Write a review or suggestion (optional)

After approval, your name and city may appear publicly with your review. Please do not write your email or phone number.

▶ CodingEasily on YouTube

Learn with video lessons in easy Hindi

Featured video: RDBMS Part 3 – Class XI Commerce IT

▶ Subscribe – it’s free