Skip to content

intelikimu/ILOS-Mobile-App

Repository files navigation

πŸ“± ILOS EAMVU Mobile App

A React Native mobile application for EAMVU (External Asset Management & Verification Unit) officers to manage loan applications in the field.

πŸ—οΈ System Architecture

Mobile App (React Native) β†’ API Service β†’ Backend (Node.js/Express) β†’ Database (PostgreSQL)

πŸ”— Integration with ILOS Backend

This mobile app integrates with the existing ILOS backend system using the same APIs as the web application:

Backend APIs Used:

  • GET /api/applications/department/eamvu - Fetch EAMVU applications
  • GET /api/applications/form/:losId - Get application details
  • POST /api/applications/update-status - Update application status
  • POST /api/applications/update-comment - Update comments
  • GET /api/applications/comments/:losId - Get application comments
  • GET /api/documents/:losId - Get application documents
  • POST /api/upload-document - Upload documents

🎨 UBL Styling Integration

The mobile app matches the UBL branding and styling from the web application:

  • Primary Color: #1E40AF (UBL Blue)
  • Secondary Color: #3B82F6
  • Header Design: Matches web app navbar styling
  • Status Colors: Consistent with web app color scheme
  • Typography: UBL brand fonts and styling

πŸ“‹ Features

βœ… Implemented Features

  • βœ… Real-time application fetching from backend
  • βœ… Application details with full form data
  • βœ… Status updates (Submit to COPS/CIU/RRU)
  • βœ… Document management and status updates
  • βœ… Comments system per department
  • βœ… Pull-to-refresh functionality
  • βœ… Error handling and retry mechanisms
  • βœ… Offline-friendly with proper error states
  • βœ… UBL branding and styling
  • βœ… Phone call integration
  • βœ… Maps integration for addresses

πŸ”„ EAMVU Workflow

  1. View Assigned Applications - See all applications assigned to EAMVU
  2. Field Verification - Visit applicants and verify documents
  3. Status Updates - Submit to next department or return application
  4. Document Management - Update document collection status
  5. Comments - Add notes and observations

πŸš€ Quick Start

Prerequisites

  • Node.js 18+
  • React Native CLI
  • Android Studio / Xcode
  • Backend server running on localhost:5000

Installation

  1. Install Dependencies
cd ILOS-Mobile-App
npm install
  1. Configure Backend URL Edit src/utils/config.js:
development: {
  API_BASE_URL: 'http://localhost:5000', // Your backend URL
  API_TIMEOUT: 30000,
  DEBUG: true,
},
  1. Run the App
# Android
npm run android

# iOS
npm run ios

# Start Metro bundler
npm start

πŸ“± App Screens

1. Home Screen

  • Displays all EAMVU applications
  • Pull-to-refresh functionality
  • Application cards with key information
  • UBL header with officer details

2. Application Detail Screen

  • Complete application information
  • Document management
  • Status update options
  • Comments and notes
  • Quick actions (call, maps)

πŸ”§ Configuration

Environment Setup

The app uses a configuration system for different environments:

// src/utils/config.js
const ENV = {
  development: {
    API_BASE_URL: 'http://localhost:5000',
    DEBUG: true,
  },
  production: {
    API_BASE_URL: 'https://your-production-backend.vercel.app',
    DEBUG: false,
  },
};

API Configuration

All API endpoints are centralized in the configuration:

export const API_ENDPOINTS = {
  EAMVU_APPLICATIONS: '/api/applications/department/eamvu',
  APPLICATION_DETAILS: (losId) => `/api/applications/form/${losId}`,
  UPDATE_STATUS: '/api/applications/update-status',
  // ... more endpoints
};

πŸ“Š Data Flow

1. Application Fetching

Mobile App β†’ API Service β†’ Backend β†’ Database

2. Status Updates

User Action β†’ API Call β†’ Backend Update β†’ Database β†’ UI Refresh

3. Error Handling

API Error β†’ Error Handler β†’ User-Friendly Message β†’ Retry Option

πŸ› οΈ Development

File Structure

src/
β”œβ”€β”€ utils/
β”‚   β”œβ”€β”€ api.js          # API service layer
β”‚   β”œβ”€β”€ config.js       # Configuration
β”‚   β”œβ”€β”€ dataTransformer.js # Data transformation
β”‚   └── mockData.js     # Mock data for testing
β”œβ”€β”€ screens/
β”‚   β”œβ”€β”€ HomeScreen.jsx      # Main applications list
β”‚   β”œβ”€β”€ ApplicationDetailScreen.jsx # Application details
β”‚   β”œβ”€β”€ LoginScreen.jsx     # Login screen
β”‚   └── SplashScreen.jsx    # Splash screen
β”œβ”€β”€ components/
β”‚   └── StatusBadge.jsx     # Status badge component
└── navigation/
    └── AppNavigator.jsx    # Navigation setup

Key Components

API Service (src/utils/api.js)

  • Centralized API communication
  • Error handling and logging
  • Request/response interceptors
  • Batch operations support

Data Transformer (src/utils/dataTransformer.js)

  • Converts backend data to mobile format
  • Handles different application types
  • Status and priority mapping
  • Currency and date formatting

Configuration (src/utils/config.js)

  • Environment-specific settings
  • API endpoints
  • Error messages
  • App constants

πŸ” Testing

Backend Connection Test

import apiService from './src/utils/api';

// Test backend connection
const testConnection = async () => {
  const result = await apiService.testBackendConnection();
  console.log('Backend connection:', result);
};

API Endpoints Test

// Test EAMVU applications endpoint
const testApplications = async () => {
  try {
    const apps = await apiService.getEAMVUApplications();
    console.log('Applications:', apps);
  } catch (error) {
    console.error('Error:', error.message);
  }
};

🚨 Troubleshooting

Common Issues

  1. Backend Connection Failed

    • Check if backend is running on localhost:5000
    • Verify network connectivity
    • Check firewall settings
  2. No Applications Showing

    • Verify backend has EAMVU applications
    • Check API endpoint /api/applications/department/eamvu
    • Review backend logs for errors
  3. Status Update Failed

    • Verify application exists in database
    • Check status values match backend expectations
    • Review backend update logic

Debug Mode

Enable debug logging in src/utils/config.js:

development: {
  DEBUG: true, // Set to true for detailed logs
}

πŸ“ˆ Performance

Optimizations

  • βœ… Lazy loading of application details
  • βœ… Efficient data transformation
  • βœ… Proper error handling
  • βœ… Offline state management
  • βœ… Pull-to-refresh for updates

Memory Management

  • βœ… Proper component cleanup
  • βœ… Efficient list rendering
  • βœ… Image optimization
  • βœ… API response caching

πŸ” Security

Implemented Security

  • βœ… Input validation
  • βœ… Error message sanitization
  • βœ… Secure API communication
  • βœ… Environment-based configuration

πŸ“± Platform Support

  • βœ… Android (API 21+)
  • βœ… iOS (iOS 12+)
  • βœ… React Native 0.80.2
  • βœ… Expo compatibility (if needed)

πŸš€ Deployment

Android Build

cd android
./gradlew assembleRelease

iOS Build

cd ios
xcodebuild -workspace ILOS.xcworkspace -scheme ILOS -configuration Release

πŸ“ž Support

For issues or questions:

  1. Check the backend logs
  2. Verify API endpoints
  3. Test with Postman/curl
  4. Review mobile app logs

πŸ”„ Integration Status

βœ… Fully Integrated

  • Application fetching
  • Status updates
  • Document management
  • Comments system
  • Error handling
  • UBL styling

πŸ”„ Ready for Production

  • All core features implemented
  • Backend integration complete
  • Error handling robust
  • UI/UX polished

Mobile App Status: βœ… READY FOR EAMVU OFFICERS

The mobile app is fully integrated with the ILOS backend system and ready for EAMVU officers to use in the field for loan application verification and management.

About

This Mobile App is only for the EAMVU User End , to integrate him in the ILOS

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors