-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Welcome to the Developer Wiki for the Green FinTech Banking-as-a-Service (BaaS).
This project delivers a high-performance, asynchronous REST API designed to ingest corporate environmental metrics, calculate ESG (Environmental, Social, and Governance) scores, and dynamically simulate sustainable green loans.
Context: Traditional banks and lenders often lack the specialised data and models to accurately assess the financial risk and opportunity of sustainability-focused businesses. This creates a "green financing gap" where worthy environmental projects cannot secure favourable loan rates, and banks miss out on a rapidly growing market sector.
The API's Role: This BaaS acts as a specialised data and analytics layer that traditional banking platforms can integrate. While it does not process real fiat payments, it provides the critical, automated intelligence required to underwrite and enable green financial products.
To understand the API's utility, consider a fictional client: EcoTech Manufacturing Ltd.
- Business: Manufactures energy-efficient heating systems.
-
Data Points: Located in Birmingham, registered at Companies House (
12345678), consumes 1,380 MWh of energy annually, and has reduced carbon emissions year-over-year.
The Traditional Process (The Problem): EcoTech applies for a Β£1,000,000 factory expansion loan. The bank checks standard financials (revenue, credit score, assets). Because the traditional risk model does not factor in EcoTech's carbon reduction, energy efficiency, or the growing regulatory demand for green tech, EcoTech is offered a standard market-rate loan, or viewed as riskier than it truly is.
The Green FinTech BaaS Process (The Solution): The bank's loan officer utilises a platform powered by this API to augment their assessment:
-
Onboarding: The bank registers EcoTech via the API (
POST /api/v1/companies/). -
ESG Ingestion: The bank uploads EcoTech's yearly environmental reports (
POST /api/v1/companies/{id}/metrics). -
Dynamic Simulation: The bank requests a Β£1,000,000 loan simulation (
POST /api/v1/companies/{id}/simulate-loan). The API's internal engine evaluates the metrics, calculates a proprietary ESG score, and automatically applies a "Green Discount" to the base interest rate. -
Quote Generation: The loan officer instantly downloads a dynamically generated, formatted PDF quote directly from the API (
GET /api/v1/companies/{id}/simulate-loan/{id}/pdf) to present to the client. -
Portfolio Analytics: The bank's management team exports a bulk CSV (
GET /api/v1/companies/export/csv), instantly retrieved from the Redis cache, to analyse the carbon footprint of their entire loan portfolio.
- Environmental Metric Ingestion: Secure endpoints for tracking yearly carbon emissions, water usage, and waste generation.
- Green Loan Simulation: Dynamic financial calculations tied to corporate sustainability performance, outputting dynamic PDF quotes.
- High-Performance Caching: Redis implementation for instant retrieval of heavy data exports (CSV) and simulated documents.
- Deterministic Deployment: Fully containerised architecture using Docker, orchestrated via GitHub Actions.
As per the coursework requirements, the formal academic justifications and endpoint specifications are provided as standalone PDF documents located in the sub directory docs/ of this repository:
- π
Technical_Report.pdf- Academic justification of the tech stack, GenAI usage analysis, and evaluation of limitations. - π
API_Documentation.pdf- The formal OpenAPI specification, documenting all endpoints, parameters, request/response JSON payloads, and authentication methods.
This Wiki serves as the operational manual for deploying, testing, and maintaining the platform. Use the sidebar to navigate through the technical domains:
-
User & Technical Documentation: Step-by-step guides for spinning up the local environment (
uv, Docker Compose) and contributing to the codebase. - Research & Requirements: The foundational research defining the scope of the FinTech service.
- API Design & Usage: Instructions on navigating the Swagger UI and understanding the PDF/CSV generation logic.
- Technical Design Documentation: Deep dives into the system architecture, database schema (Alembic/PostgreSQL), and component interaction.
- Testing Strategy & Results: Comprehensive overview of the Pytest suite, coverage metrics, and integration testing approach.
- DevOps & Security: Documentation of the automated CI/CD pipelines, container registry publishing, and proactive secret scanning.
Green FinTech BaaS Simulator β v1.3.0
Developed for COMP3011 | University of Leeds
Leveraging open data from OpenCorporates and the UK Government.
β¬οΈ Back to Top