How leluza/appfullstackparaportfoliofront works
Project Type and Purpose
• This is a hybrid PWA + mobile front-end application built with Ionic React and Capacitor.
• It targets both web browsers (served at localhost:3000) and Android (packaged via Capacitor).
• It consumes data from an external backend REST API (not included in this repo), providing CRUD pages for customers, employees, and suppliers.
File Structure
Top-level:
• capacitor.config.ts, ionic.config.json – Ionic & Capacitor configuration
• Dockerfile, .env/.env.production – (potential) containerization & env setup
• android/ – Capacitor’s Android platform integration
• public/ – Static assets & PWA manifest for web
• src/ – React + TypeScript application code
• package.json / node_modules – build/runtime dependencies
Inside src/:
• pages/ – page-level components and “Api” modules for HTTP calls
• components/ – shared UI components (Menu, ExploreContainer, etc.)
• theme/ – global CSS variables & card styling
• serviceWorkerRegistration.ts & service-worker.ts – PWA caching layer
• reportWebVitals.ts – performance measuring
Key Architectural Patterns
• Single-Page Application (SPA) using React + Ionic UI components
• PWA with Service Worker for offline support & manifest.json for installability
• Capacitor native bridge to package the same codebase for Android
• Clean separation between UI pages and API modules (CustomerApi, EmployeeApi, SupplierApi)
Main Components and Their Interactions
a. User Interfaces
• Web Browser (served by npm start / React dev server)
• Android App (wrapped by Capacitor, running on Android OS)
b. Front-End Application
• Ionic/React SPA – UI pages & shared components
• Service Worker – caches assets & API responses (optional offline support)
c. Native Layer (Android)
• Capacitor Runtime – bridges web code to native Android APIs
d. External Backend
• REST API – provides JSON endpoints for Customers, Employees, Suppliers
Relationships & Data Flows
1. User → Browser/Android App: interacts with UI components (pages/forms).
2. SPA → API Modules: CustomerApi, EmployeeApi, SupplierApi make HTTP requests.
3. HTTP(s) → External Backend: returns JSON responses.
4. Service Worker (if active) intercepts requests for caching strategies.
5. Capacitor Bridge (Android only): if requesting native functionality (e.g., file system, camera), calls Android plugins.