How sachinvishegithub/clothing-mobile-app-ionic works
Project type and purpose
• This is a hybrid mobile e-commerce clothing app built with Ionic 3 (Angular + Cordova) as the front end, communicating via REST APIs to a Java/Spring Boot backend (with Hibernate + Elasticsearch) for catalog and search functionality.
• Purpose: Allow users to browse categories, view items, search, and view store info on iOS/Android devices.
File structure
• Root:
• config.xml, ionic.config.json, my-release-key.keystore → Cordova/Ionic build & signing
• package.json, tsconfig.json, tslint.json → Node-based build & linting
• store.json, product.json → sample API payloads
• src/
• app/ → bootstrap (app.module.ts), root component (app.component.ts + app.html)
• pages/ → feature modules & lazy-loaded pages (home, category, cloth-list, item-view, search, storeinfo, tabs)
• providers/ → injectable services for server URL and HTTP fetching (fetch-api.ts, server-url.ts)
• assets/, theme/, index.html, manifest.json, service-worker.js → static assets, global styling, PWA setup
README for additional insights
• Confirms Ionic 3 front end; backend uses Java, Spring Boot, Hibernate, Elasticsearch (not provided).
• API is RESTful, simple CRUD and search endpoints.
• Demo video and sample JSON files show payload structure.
Main components & relationships
a. Mobile App (Ionic/Angular)
• UI Layer: pages (category, cloth-list, item-view, search, storeinfo, tabs)
• Core Module: app.module, routing, theming
• Providers: HTTP wrapper (FetchApiProvider), configuration (ServerUrlProvider)
• PWA/Service Worker for offline caching
b. Cordova Bridge
• Translates web view calls to native Android/iOS
c. Backend Service (Java/Spring Boot)
• REST Controllers, Service Layer, Hibernate for relational DB
• Elasticsearch for full-text search
d. Persistence
• Primary RDBMS (MySQL/Postgres)
• Elasticsearch cluster for search indices
e. External Services (optional)
• Push notifications, analytics (not in code but common)
Data flow:
Mobile UI → FetchApiProvider → HTTP calls → Spring Boot REST API → Hibernate → DB / Elasticsearch → back to mobile
Architectural patterns & design principles
• Front-end: Angular module & component architecture, lazy-loaded feature modules (pages), provider (service) DI pattern.
• Back-end: layered architecture (controllers → services → repositories), repository pattern (Hibernate), CQRS-style search with Elasticsearch.
• Separation of concerns: presentation (Ionic UI), business logic (providers & backend services), persistence (DB & ES).
Technologies & frameworks
• Ionic 3, Angular 5, TypeScript, Sass
• Cordova (Android/iOS)
• Node.js (npm) for build toolchain
• Spring Boot, Hibernate (JPA), Elasticsearch
• Optional: MySQL/PostgreSQL, service-worker for PWA