# emi-checkout - Overview ## Introduction The `emi-checkout` repository is a backend application developed in Python (using Flask). It acts as the core API service for processing EMI checkout requests, handling customer loan applications, user verification (VKYC, Digio), document management (S3 integration), and integrating with various third-party services (Bureaus, Karza, Pirimid). ## Architecture The application follows a modular and service-oriented architecture, relying on Dependency Injection (`dependency-injector`) to manage components. ### Key Components - **API Routing**: Uses Flask blueprints (`applications/routes.py`, `applications/no_touch.py`) to map incoming HTTP requests to business logic. - **Service Layer (`emi_service.py`)**: Contains the core business logic, validation, and orchestration for application creation, document uploads, and third-party integrations. - **Repository Layer (`emi_repository.py`)**: Handles data persistence and database interactions using raw SQL queries and a custom repository pattern. - **Container (`emi_containers.py`)**: Manages the dependency injection of the Repository into the Service layer. - **Accessors (`accessor/`)**: Handles communications with external APIs such as Bureau services, Digio (for KYC), Karza, and Pirimid. ## Documentation Structure The documentation is mirrored exactly as the project's folder structure to ensure scalability and ease of navigation: - `SETUP.md` - Setup and running instructions. - `*.md` files directly correspond to their `.py` counterparts. #### NOTE: The emi_repository.py and emi_service.py files need to be restructured carefully. Or atleast when any feature is added, note should be taken to not append in the same file as these files are becoming a bit monolithic.