|
1 |
| -# HMDA Platform |
2 |
| - |
3 |
| -## Introduction |
4 |
| - |
5 |
| -For more information on HMDA, checkout the [About HMDA page](http://www.consumerfinance.gov/data-research/hmda/learn-more) on the CFPB website. |
6 |
| - |
7 |
| -## The HMDA Platform |
8 |
| - |
9 |
| -The new HMDA Platform (“V2”) was totally updated over the past year to utilize a more flexible and resilient approach (Kubernetes Microservices) in order to better serve our customers. This repository contains the code for the entirety of the HMDA platform backend. This platform has been designed to accommodate the needs of the HMDA filing process by financial institutions, as well as the data management and publication needs of the HMDA data asset. |
10 |
| - |
11 |
| -The HMDA Platform uses sbt's multi-project builds, each project representing a specific task. The platform is an Akka Cluster application that can be deployed on a single node or as a distributed application. For more information on how Akka Cluster is used, see the documentation [here](Documents/cluster.md) |
| 1 | +# [HMDA Platform](../README.md) |
12 | 2 |
|
13 | 3 | The HMDA Platform is composed of the following modules:
|
14 |
| - |
15 | 4 | ### Parser (JS/JVM)
|
16 | 5 |
|
17 | 6 | Module responsible for reading incoming data and making sure that it conforms to the HMDA File Specification
|
18 | 7 |
|
19 | 8 | ### Data Validation
|
20 |
| - |
21 | 9 | Module responsible for validating incoming data by executing validation rules as per the Edit Checks documentation
|
22 | 10 |
|
23 | 11 | ### Persistence
|
24 |
| - |
25 | 12 | Module responsible for persisting information into the system. It becomes the system of record for HMDA data
|
26 | 13 |
|
27 | 14 | ### Cluster
|
28 |
| - |
29 | 15 | Module responsible for managing the various cluster roles, as well as starting the Hmda Platform
|
30 | 16 |
|
31 | 17 | ### API
|
32 |
| - |
33 | 18 | This module contains both public APIs for HMDA data for general use by third party clients and web applications, as well as endpoints for receiving data and providing information about the filing process for Financial Institutions
|
34 | 19 |
|
35 | 20 | ### API Model
|
36 |
| - |
37 | 21 | This module contains objects and JSON protocols for use by the API project
|
38 | 22 |
|
39 | 23 | ### Query
|
40 |
| - |
41 | 24 | This module is responsible for interacting with the back-end database, as well as conversion between model objects and database objects.
|
42 | 25 |
|
43 | 26 | ### Panel
|
44 |
| - |
45 | 27 | This module is responsible for parsing and persisting a CSV-format panel file
|
46 | 28 |
|
47 | 29 | ### Model (JS/JVM)
|
48 |
| - |
49 | 30 | This module is responsible for maintaining the objects used in our platform
|
50 | 31 |
|
51 | 32 | ### Census
|
52 |
| - |
53 | 33 | This module is responsible for geographic translation (e.g. state number -> state code)
|
54 | 34 |
|
55 | 35 | ### Publication
|
56 |
| - |
57 | 36 | This module generates Aggregate and Disclosure reports, as required by HMDA statute.
|
58 | 37 |
|
59 |
| -## Dependencies |
60 |
| - |
61 |
| - |
62 |
| -## Dependencies |
63 |
| - |
64 |
| -### Java 19 SDK |
65 |
| - |
66 |
| -The HMDA Platform runs on the Java Virtual Machine (JVM), and requires the Java 19 JDK to build and run the project. This project is currently being built and tested on [Oracle JDK 19](https://www.oracle.com/java/technologies/javase/jdk19-archive-downloads.html). See [Oracle's JDK Install Overview](https://docs.oracle.com/en/java/javase/19/install/index.html) for install instructions. |
67 |
| - |
68 |
| -The HMDA Platform should also run on JDK 8. |
69 |
| - |
70 |
| -### Scala |
71 |
| - |
72 |
| -The HMDA Platform is written in [Scala](http://www.scala-lang.org/). To build it, you will need to [download](http://www.scala-lang.org/download/) and [install](http://www.scala-lang.org/download/install.html) Scala 2.12.x |
73 |
| - |
74 |
| -In addition, you'll need Scala's interactive build tool [sbt](https://www.scala-sbt.org/). Please refer to sbt's [installation instructions](https://www.scala-sbt.org/1.x/docs/Setup.html) to get started. |
75 |
| - |
76 |
| -## Project structure |
77 |
| - |
78 |
| -The HMDA Platform is divided into individual projects, each responsible for a subset of the functionality, as follows: |
79 |
| - |
80 |
| -### hmda-platform |
81 |
| - |
82 |
| -This is the main filing application, exposing the APIs necessary to upload, validate and store HMDA files. |
83 |
| - |
84 |
| -### check-digit |
85 |
| - |
86 |
| -Microservice that exposes functionality to create a check digit from a loan id, and to validate `Univeral Loan Identifiers` |
87 |
| - |
88 |
| - |
89 |
| -## Building and Running |
90 |
| - |
91 |
| -### Running from the SBT prompt |
92 |
| - |
93 |
| -* To run the project from the `SBT` prompt for development purposes, issue the following commands on a terminal: |
94 |
| - |
95 |
| -```shell |
96 |
| -$ sbt |
97 |
| -sbt:root> project hmda-platform |
98 |
| -sbt:hmda-platform> reStart |
99 |
| -``` |
100 |
| - |
101 |
| - |
102 |
| -### Building and running the .jar |
103 |
| - |
104 |
| -* To build JVM artifacts, from the sbt prompt first choose the project you want to build and use the assembly command: |
105 |
| - |
106 |
| -```shell |
107 |
| -$ sbt |
108 |
| -sbt:root> project check-digit |
109 |
| -sbt:check-digit>assembly |
110 |
| -``` |
111 |
| -This task will create a `fat jar`, which can be executed on any `JDK9` compliant `JVM`: |
112 |
| - |
113 |
| -`java -jar target/scala-2.12/check-digit.jar` |
114 |
| - |
115 |
| -### Building and running the Docker image |
116 |
| - |
117 |
| -* To build a `Docker` image that runs the `hmda-platform` as a single node cluster, from the sbt prompt: |
118 |
| - |
119 |
| -```shell |
120 |
| -$sbt |
121 |
| -sbt:root> project hmda-platform |
122 |
| -sbt:hmda-platform> docker:publishLocal |
123 |
| -``` |
124 |
| -This task will create a `Docker` image. To run a container with the `HMDA Platform` filing application as a single node cluster: |
125 |
| - |
126 |
| -`docker run -e CASSANDRA_CLUSTER_HOSTS=localhost --rm -ti -p 8080:8080 -p 8081:8081 -p 8082:8082 -p 19999:19999 hmda/hmda-platform` |
127 |
| - |
128 |
| -The same approach can be followed to build and run Docker containers for the other microservices that form the HMDA Platform. |
129 |
| - |
130 |
| -Certain environment variables can be passed in to set the log level of the micro service |
131 |
| - |
132 |
| -``` |
133 |
| -ZOOKEEPER_LOG_LEVEL (Defaulted to WARN) |
134 |
| -KAFKA_LOG_LEVEL (Defaulted to INFO) |
135 |
| -CASSANDRA_LOG_LEVEL (Defaulted to INFO) |
136 |
| -PLATFORM_LOG_LEVEL (Defaulted to WARN) |
137 |
| -INSTITUTION_LOG_LEVEL (Defaulted to INFO) |
138 |
| -CHECKDIGIT_LOG_LEVEL (Defaulted to DEBUG) |
139 |
| -``` |
| 38 | +### Docker run |
| 39 | +To run a container with the `HMDA Platform` filing application as a single node cluster: |
| 40 | +`docker run -e CASSANDRA_CLUSTER_HOSTS=localhost --rm -ti -p 8080:8080 -p 8081:8081 -p 8082:8082 hmda/hmda-platform` |
140 | 41 |
|
141 | 42 | ## Resources
|
142 | 43 |
|
143 | 44 | ### API Documentation
|
144 | 45 |
|
145 |
| -* [HMDA Platform Public API Documentation](api/public-api.md) |
146 |
| -* [HMDA Platform ULI API Documentation](api/uli.md) |
147 |
| -* [HMDA Platform Filers API Documentation](api/filers-api.md) |
148 |
| - |
149 | 46 | ### Development
|
150 |
| - |
151 |
| -* [Local Kubernetes CI/CD](development/kubernetes.md) |
| 47 | +* [Local development](development/local-platform.md) |
| 48 | +* [Kubernetes](development/kubernetes.md) |
| 49 | +* [Specific MSK and Keyspaces configuration](development/platform-msk-keyspaces.md) |
| 50 | +* [Postman configuration](development/postman.md) |
152 | 51 |
|
153 | 52 | ### Data Specifications
|
154 | 53 |
|
|
0 commit comments