Prerequisites
- Java: Ensure you have Java Development Kit (JDK) installed. Apache Fineract® requires Java 21.
- Git: You’ll need Git to clone the Apache Fineract® source code from the repository.
- IntelliJ IDEA: Install IntelliJ IDEA (Community or Ultimate edition).
Steps
- Clone the Apache Fineract® Repository:
- Open a terminal or command prompt and navigate to the directory where you want to store the Apache Fineract® source code.
- Run the following command to clone the repository:
git clone https://github.com/apache/fineract.git
- Import the Project into IntelliJ IDEA:
- Open IntelliJ IDEA.
- Click on
File>Open...and select thefineractdirectory you cloned in step 1. IntelliJ will recognize it as a Gradle project. - IntelliJ IDEA will analyze the project and download its dependencies.
- Configure JDK:
- Verify that IntelliJ IDEA is using the correct Java SDK. Go to
File>Project Structure. - In the Project Structure dialog, under
Project, make sure theProject SDKis set to the appropriate Java version (Java 21 is the latest supported).
- Verify that IntelliJ IDEA is using the correct Java SDK. Go to
- Gradle Configuration:
- Open the
build.gradlefile in the project root directory. - IntelliJ IDEA will automatically start downloading the dependencies, if not you can do it manually as well by opening the “Gradle” window and click on
Reload All Gradle Projects. - Further configurations can be found in the
settings.gradlefile
- Open the
- Set Up Run Configurations:
- Go to
Run>Edit Configurations. - Click the
+button and selectGradle. - In the configuration settings:
- Set the Name (e.g., “Fineract”).
- Choose the
fineractdirectory as Gradle project. - Set
bootRunas the Run command.
- Go to
- Create two databases
- Create
fineract_tenantsandfineract_defaultdatabases- MariaDB (default db engine)
- Execute
createDBgradle task with the following params:./gradlew createDB -PdbName=fineract_tenants ./gradlew createDB -PdbName=fineract_default
- Execute
- MySql
- Execute
createMySQLDBgradle task with the following params:./gradlew createMySQLDB -PdbName=fineract_tenants ./gradlew createMySQLDB -PdbName=fineract_default
- Execute
- Postgres
- Execute
createPGDBgradle task with the following params:./gradlew createPGDB -PdbName=fineract_tenants ./gradlew createPGDB -PdbName=fineract_default
- Execute
- MariaDB (default db engine)
- Create
- Build the Project:
- Go to
Run>Run 'Fineract'. - IntelliJ IDEA will build and run the Apache Fineract® server. You can access it using a web browser at
https://localhost:8443/fineract-provider.
- Go to
This should get you started with building and running Apache Fineract® using IntelliJ IDEA.
Default configuration
- By default the application will be using a self-signed TLS protocol (
https) and port:8443 - By default the application will connect to MariaDB on localhost (port:
3306).- Default credentials:
root/mysql - Default tenants storage database:
fineract_tenants- This database will store the tenant details and connection information to the tenant databases
- Database driver:
org.mariadb.jdbc.Driver(by default)- To override set the
FINERACT_HIKARI_DRIVER_SOURCE_CLASS_NAMEenvironment variable
- To override set the
- JDBC url:
jdbc:mariadb://localhost:3306/fineract_tenants- To override set the
FINERACT_HIKARI_JDBC_URLenvironment variable
- To override set the
- Database username:
root- To override set the
FINERACT_HIKARI_USERNAMEenvironment variable
- To override set the
- Database password:
password- To override set the
FINERACT_HIKARI_PASSWORDenvironment variable
- To override set the
- Default credentials:
- By default the liquibase scripts will create a new tenant with the below configurations
- Default tenant identifier:
default- To override set the
FINERACT_DEFAULT_TENANTDB_IDENTIFIERenvironment variable
- To override set the
- Default tenant database host:
localhost- To override set the
FINERACT_DEFAULT_TENANTDB_HOSTNAMEenvironment variable
- To override set the
- Default tenant database port:
3306- To override set the
FINERACT_DEFAULT_TENANTDB_PORTenvironment variable
- To override set the
- Default tenant database username:
root- To override set the
FINERACT_DEFAULT_TENANTDB_UIDenvironment variable
- To override set the
- Default tenant database password:
mysql- To override set the
FINERACT_DEFAULT_TENANTDB_PWDenvironment variable
- To override set the
- Default tenant timezone:
Asia/Kolkata- To override set the
FINERACT_DEFAULT_TENANTDB_TIMEZONEenvironment variable
- To override set the
- Default tenant name:
fineract_default- To override set the
FINERACT_DEFAULT_TENANTDB_NAMEenvironment variable
- To override set the
- Default tenant description:
Default Demo Tenant- To override set the
FINERACT_DEFAULT_TENANTDB_DESCRIPTIONenvironment variable
- To override set the
- Default tenant master password:
fineract- To override set the
FINERACT_DEFAULT_TENANTDB_MASTER_PASSWORDenvironment variable - IMPORTANT: During the first time the liquibase executed the plain text password got encrypted with the provided master password
- To override set the
- Default tenant encryption:
AES/CBC/PKCS5Padding- To override set the
FINERACT_DEFAULT_TENANTDB_ENCRYPTIONenvironment variable
- To override set the
- Default tenant identifier:
The list of configuration is not complete!
Optional extra configurations
- Use
httpinstead ofhttpsand use8080port instead of8443- Set the following
Environment variables:FINERACT_SERVER_SSL_ENABLED=false server.port=8080
- Set the following
- Use
Postgresas Database engine- Set the following
Environment variables:- Use Postgres Driver
FINERACT_HIKARI_DRIVER_SOURCE_CLASS_NAME=org.postgresql.Driver - Connecting to
fineract_tenantsdatabaseFINERACT_HIKARI_JDBC_URL=jdbc:postgresql://localhost:5432/fineract_tenants FINERACT_HIKARI_USERNAME=postgres FINERACT_HIKARI_PASSWORD=postgres - Connecting to
fineract_defaultdatabaseFINERACT_DEFAULT_TENANTDB_PORT=5432 FINERACT_DEFAULT_TENANTDB_PWD=postgres FINERACT_DEFAULT_TENANTDB_UID=postgres
- Use Postgres Driver
- Set the following
Important
Keep in mind that Apache Fineract® is a complex project, and you may encounter issues or need to configure additional settings based on your specific environment and requirements. It’s a good practice to refer to the official Apache Fineract® documentation and the project’s developer community for more details and troubleshooting!
