Skip to content

manu367/EcommerceAPIwithApp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

8 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Full stack Ecommerce Application

A complete E-Commerce System built with a modern full-stack architecture using Android (Frontend App), React.js (Admin Panel), Spring Boot (Backend), and MySQL (Database). This project demonstrates a robust, scalable, and real-world ready e-commerce ecosystem covering customer shopping experience, admin product management, and secure backend APIs.

Extra fetaures is that i am enabled GenAi featuresbthat help to purshase modals based cloths and also virtual wold clotheing review panels and suggestions best of the proeuct

Tech Stack OverView

Layer Technology Description
Frontend (User App) Android (Java/Kotlin) Customer-facing mobile application with product browsing, cart, orders, and payment.
Frontend (Admin Panel) React.js Web dashboard for product, category, and order management.
Backend (API) Spring Boot (Java) RESTful APIs for user authentication, order handling, and data persistence.
Database MySQL Relational database for storing user, product, and transaction data.
Payment Gateway Razorpay Secure payment integration for seamless checkout.
Authentication JWT Tokens Secure login/signup and API access using JSON Web Tokens.

System Architecture

All layers communicate by secure REST APIs. The backend validates requests and serves data to both Android and React admin interfaces.

flowchart TD
    A[Backend] --> B{API Development in Spring boot}
    B -->E[Database]
    B -- Yes --> C[Android App ]
    B -- No --> D[Admin Panel React js]
    D --> E[Database]
 
Loading

πŸ“± Android Application

Features

  1. User Registration & Login (JWT based)
  2. Product Browsing (Category-wise)
  3. Add to Cart / Remove from Cart
  4. Order Placement and Tracking
  5. Razorpay Payment Integration
  6. OTP Verification for Login
  7. Responsive and Minimal UI

Tech-stack

  • Language: Java (or Kotlin)
  • Architecture: MVVM + Repository Pattern
  • Networking: Retrofit2 + Gson
  • Async Tasks: WorkManager / Coroutines
  • Local Cache: Room Database
  • Dependency Injection: Dagger/Hilt
  • UI: Material Design Components

Screens


  • home screen




  • Add to Cart screen




  • Profile screen




  • Searchbar screen




  • Video Section screen




  • View Product screen




  • View Product screen




  • View Product screen




πŸ§‘β€πŸ’Ό React Admin Panel

Purpose

The Admin Dashboard allows store owners to manage products, categories, and orders efficiently.

✨ Features

  • Admin Authentication
  • Product CRUD (Create, Read, Update, Delete)
  • Category Management
  • Order Overview (Pending / Completed / Cancelled)
  • Sales Insights Dashboard
  • API Integration with Spring Boot backend

🧰 Tech Stack

  • React.js
  • Axios for API calls
  • React Router DOM for navigation
  • Tailwind CSS / Material UI for styling
  • Chart.js / Recharts for analytics
  • Tanstack

βš™οΈ Backend (Spring Boot)

Backend system help to connect and manage the datbaase operation and providing the security and we can create custom features using Backend System (Image management , Video Management , orders).

✨ Features

  • User and Admin Authentication (JWT)
  • Product, Category, and Order APIs
  • OTP Generation & Validation for Login
  • Integration with Razorpay for payment
  • Exception Handling and Input Validation
  • One-to-Many and Many-to-One Mappings
  • DTO pattern for request/response separation

🧩 Project Structure

src/
|-config 
|      |---CorsConfig.java
|      |---MainConfig
|      |---BotConfig
|- constants
|      |--- APIENDPOINTS.java
|      |---APICONSTANTS.java
|      |---ERRORCODE.java
|      |--- ErrorMessage.java
|      |--- OrderStatus.java
|      |--- Status.java
|      |--- UserType
|-controller
|      |--- AuthController.java
|      |---BotController.java
|      |---EmailController.java
|      |---ProductController.java
|      |---ReviewController.java
|      |--- UserController.java
|      |--- OrderController.java
|      |--PaymentController.java
|-- dTO
|      |-- requestsDTO/
|      |       |-- more classes      
|      |--- responseDTO/
|      |       |-- more response classes
|
|- exception
       |- controlleradvice/
       |       |-- GlobalExceptionHandler.java
       |       |-- ErrorModel.java
|      |-- custom-exception/
|- fIlters /
|- mappers /
|- models /
|- repo /
|- service /
|- serviceimpl /
|- util /more
|- mediahandler /more
|- paymenthandler /more
|- manager /more
|- apicode /more

🧰 Dependencies

  • Spring Boot Starter Web
  • Spring Boot Starter JPA
  • Redis
  • razorpay
  • Spring Security (JWT)
  • MySQL Connector
  • Lombok
  • Validation API
  • Gemini API

API ENDPOINTS

METHOD ENDPOINTS Description
POST /auth/login Login and get JWT token
POST /auth/login/forget-password forget request by user
POST /auth/login/reset-password show all Rest-Page and get details
POST /auth/register Register and get JWT token
POST /auth/register/otp send otp on phone for Mobile validation
POST /auth/register/email-validation/${uuid} user validation using email
POST /api/products/** manage product , wishlist , payment
POST /api/category/** get all category by products and sub-category apis
POST /api/profile/** Here manage profile and thier related task
POST /api/profile/user/** User and User Related APIs

Database

Schema Highlights

Setup Instructions

πŸ”Ή Prerequisites

  • JDK 17+
  • Node.js 18+
  • MySQL 8+
  • Android Studio (latest)
  • Maven or Gradle

πŸ”Ή Backend Setup

cd EcommAPI/EcommerceAPI_/
mvn clean install
mvn spring-boot:run

πŸ”Ή Database Setup

CREATE DATABASE ecommerce_app;

πŸ”Ή Update Application.properties file

#############################################
# 🌐 SERVER CONFIGURATION
#############################################
server.port=8080
server.servlet.context-path=/api
spring.application.name=ecommerce-app

#############################################
# πŸ’Ύ DATABASE CONFIGURATION (MySQL)
#############################################
spring.datasource.url=jdbc:mysql://localhost:3306/ecommerce_db?useSSL=false&allowPublicKeyRetrieval=true&serverTimezone=UTC
spring.datasource.username=root
spring.datasource.password=your_password
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver

# Hibernate / JPA
spring.jpa.hibernate.ddl-auto=update
spring.jpa.show-sql=true
spring.jpa.properties.hibernate.format_sql=true
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQL8Dialect

#############################################
# πŸ“§ EMAIL CONFIGURATION (SMTP)
#############################################
spring.mail.host=smtp.gmail.com
spring.mail.port=587
spring.mail.username=your_email@gmail.com
spring.mail.password=your_app_password
spring.mail.properties.mail.smtp.auth=true
spring.mail.properties.mail.smtp.starttls.enable=true
spring.mail.properties.mail.smtp.connectiontimeout=5000
spring.mail.properties.mail.smtp.timeout=5000
spring.mail.properties.mail.smtp.writetimeout=5000
spring.mail.default-encoding=UTF-8

#############################################
# πŸ” JWT SECURITY CONFIG
#############################################
jwt.secret=your_jwt_secret_key
jwt.expiration=86400000  # 1 day in milliseconds

#############################################
# 🧠 REDIS CONFIGURATION
#############################################
spring.data.redis.host=localhost
spring.data.redis.port=6379
spring.data.redis.password=
spring.data.redis.timeout=60000

#############################################
# πŸ“¨ KAFKA CONFIGURATION
#############################################
spring.kafka.bootstrap-servers=localhost:9092

# Producer Configuration
spring.kafka.producer.key-serializer=org.apache.kafka.common.serialization.StringSerializer
spring.kafka.producer.value-serializer=org.apache.kafka.common.serialization.StringSerializer
spring.kafka.producer.acks=all
spring.kafka.producer.retries=3

# Consumer Configuration
spring.kafka.consumer.group-id=ecommerce-group
spring.kafka.consumer.auto-offset-reset=earliest
spring.kafka.consumer.key-deserializer=org.apache.kafka.common.serialization.StringDeserializer
spring.kafka.consumer.value-deserializer=org.apache.kafka.common.serialization.StringDeserializer
spring.kafka.listener.missing-topics-fatal=false

#############################################
# πŸͺ£ FILE UPLOAD CONFIGURATION
#############################################
spring.servlet.multipart.max-file-size=10MB
spring.servlet.multipart.max-request-size=10MB

#############################################
# 🌍 LOGGING CONFIGURATION
#############################################
logging.level.root=INFO
logging.level.org.springframework.web=DEBUG
logging.file.name=logs/ecommerce-app.log
logging.pattern.console=%d{yyyy-MM-dd HH:mm:ss} - %msg%n

#############################################
# 🧩 OTHER COMMON SETTINGS
#############################################
spring.main.allow-bean-definition-overriding=true
spring.main.banner-mode=off

πŸ”Ή React Admin Setup

cd ecoomweb/
npm install
npm start

πŸ”’ Security

  • JWT Authentication & Authorization
  • Secure Password Hashing (BCrypt)
  • Role-based access (User/Admin)
  • Input Validation and Exception Handling
  • CORS Configuration for multi-origin access

πŸ’³ Payment Gateway Integration

  • Integrated Razorpay SDK for Android
  • Secure server-side verification through Spring Boot
  • Handles success/failure callbacks gracefully

πŸ“Š Future Improvements

  • Implement inventory management
  • Introduce AI-based product recommendations
  • Multi-vendor marketplace support
  • Machine Learning

Author

Manu Pathak Full Stack Developer | Tech Explorer

License

This project is licensed under the MIT License β€” you’re free to use, modify, and distribute it.

About

This is a complete E-commerce project that includes both a backend API and a frontend Android application. The main goal of this project is to provide a simple and functional platform for buying and selling products online. It is designed for learning, demonstration, and as a base for larger projects.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages