How ottunger/pasicrisie-client works
Project type and purpose
• This is a hybrid mobile application built with the Ionic framework and Angular (TypeScript).
• Purpose: A “Pasicrisie” search app that runs on Android (and other platforms via Cordova), featuring user authentication (AWS Cognito) and search capabilities (ElasticSearch).
File structure for architecture clues
• Top-level config: package.json, tsconfig.json, ionic.config.json, config.xml → client-side build & Cordova packaging.
• src/app → Angular root module (app.module.ts), root component (app.component.ts), main.ts bootstrap.
• src/pages → Feature UI components (Insert, Profile, Search, Settings, Unsubscribing).
• src/services → Business and integration layer:
• api.service.ts – generic HTTP client to your backend/ElasticSearch API
• application.service.ts – app-wide state & orchestration
• services/aws → Cognito & user-management wrappers
• src/pipes → Custom data-transform pipes (translate, safe-html).
• service-worker.js → PWA/offline support (caching, intercepting API calls).
Extract insights from README
• Build & signing instructions for Android APK.
• Emphasis on Ionic/Cordova for mobile packaging and elastic search backend.
Main components & their relationships
a. Client-side Ionic/Angular (mobile app)
• UI Layer: Pages & Components
• Presentation Layer: Angular Modules, SCSS Theme, Pipes (i18n, safe HTML)
• Service Layer: application.service, api.service, aws/**
• PWA Layer: service-worker.js
b. External Services
• AWS Cognito (authentication, user registration, login, user parameters)
• ElasticSearch cluster or search API (the actual search engine back end)
• Potential custom REST API endpoints behind api.service
c. Data flow
UI → Application Service → API Service → AWS / ElasticSearch → back to UI
Architectural patterns & design principles
• Modular Angular structure (feature modules under src/pages)
• Separation of concerns: UI vs business logic vs external integrations
• Dependency injection for services (Angular DI)
• PWA pattern (service-worker caches assets & API responses)
• OAuth-style flows via AWS Cognito