Skip to content

Commit c93e2b2

Browse files
committed
MX-263: Create Offices Self Service endpoints
1 parent a75a262 commit c93e2b2

253 files changed

Lines changed: 105 additions & 31651 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

AGENTS.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ Copy JAR to $TOMCAT_HOME/webapps/fineract-provider/WEB-INF/lib/
6161

6262
### File Structure
6363
```text
64-
src/main/java/org/apache/fineract/selfservice/
64+
src/main/java/org/apache/fineract/savings/
6565
- security/ # Authentication and authorization
6666
- useradministration/ # User management
6767
- client/ # Client operations
@@ -152,7 +152,7 @@ public class ExampleDataValidator {
152152

153153
## Debugging Tips
154154

155-
- Enable debug logging: `logging.level.org.apache.fineract.selfservice=DEBUG`
155+
- Enable debug logging: `logging.level.org.apache.fineract.savings=DEBUG`
156156
- Use Spring Boot Actuator endpoints for monitoring
157157
- Check application logs for security-related issues
158158
- Verify database migrations in development

CONTRIBUTING.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ Thank you for your interest in contributing! This guide will get you set up and
1818
### Build
1919

2020
```bash
21-
git clone https://github.com/openMF/selfservice-plugin.git
22-
cd selfservice-plugin
21+
git clone https://github.com/openMF/savings-plugin.git
22+
cd savings-plugin
2323
./mvnw clean package -Dmaven.test.skip=true
2424
```
2525

@@ -33,14 +33,14 @@ If you're building a project that depends on this plugin:
3333
```xml
3434
<dependency>
3535
<groupId>community.mifos</groupId>
36-
<artifactId>selfservice-plugin</artifactId>
36+
<artifactId>savings-plugin</artifactId>
3737
<version>1.15.0-SNAPSHOT</version>
3838
</dependency>
3939
```
4040

4141
**Gradle:**
4242
```groovy
43-
implementation 'community.mifos:selfservice-plugin:1.15.0-SNAPSHOT'
43+
implementation 'community.mifos:savings-plugin:1.15.0-SNAPSHOT'
4444
```
4545

4646
---

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Mifos® Self Service Plugin for Apache Fineract®
22

3-
[![Java CI](https://github.com/openMF/selfservice-plugin/actions/workflows/maven-build.yml/badge.svg)](https://github.com/openMF/selfservice-plugin/actions/workflows/maven-build.yml)
3+
[![Java CI](https://github.com/openMF/savings-plugin/actions/workflows/maven-build.yml/badge.svg)](https://github.com/openMF/savings-plugin/actions/workflows/maven-build.yml)
44
[![License: MPL 2.0](https://img.shields.io/badge/License-MPL_2.0-brightgreen.svg)](https://opensource.org/licenses/MPL-2.0)
55
![Java 21](https://img.shields.io/badge/Java-21-blue)
66
![Spring Boot 3](https://img.shields.io/badge/Spring_Boot-3-6DB33F)
@@ -103,12 +103,12 @@ Apache Fineract is an open-source core banking platform. Out of the box, its API
103103
### Build from Source
104104

105105
```bash
106-
git clone https://github.com/openMF/selfservice-plugin.git
107-
cd selfservice-plugin
106+
git clone https://github.com/openMF/savings-plugin.git
107+
cd savings-plugin
108108
./mvnw clean package -Dmaven.test.skip=true
109109
```
110110

111-
This produces a JAR at `target/selfservice-plugin-1.15.0-SNAPSHOT.jar`.
111+
This produces a JAR at `target/savings-plugin-1.15.0-SNAPSHOT.jar`.
112112

113113
### Deploy with Fineract (Docker)
114114

@@ -117,7 +117,7 @@ This produces a JAR at `target/selfservice-plugin-1.15.0-SNAPSHOT.jar`.
117117
mkdir -p /opt/fineract/plugins
118118

119119
# Copy the built plugin
120-
cp target/selfservice-plugin-*.jar /opt/fineract/plugins/
120+
cp target/savings-plugin-*.jar /opt/fineract/plugins/
121121

122122
# Start Fineract with the plugin on the classpath
123123
java -Dloader.path=/opt/fineract/plugins/ -jar fineract-provider.jar
@@ -127,7 +127,7 @@ java -Dloader.path=/opt/fineract/plugins/ -jar fineract-provider.jar
127127

128128
```bash
129129
# Copy the JAR into Fineract's library directory
130-
cp target/selfservice-plugin-*.jar $TOMCAT_HOME/webapps/fineract-provider/WEB-INF/lib/
130+
cp target/savings-plugin-*.jar $TOMCAT_HOME/webapps/fineract-provider/WEB-INF/lib/
131131

132132
# Restart Tomcat
133133
$TOMCAT_HOME/bin/shutdown.sh && $TOMCAT_HOME/bin/startup.sh
@@ -139,7 +139,7 @@ The plugin auto-registers its endpoints, runs its own Liquibase migrations again
139139

140140
Pre-built snapshots are published to JFrog Artifactory:
141141

142-
👉 [Download latest JAR](https://mifos.jfrog.io/ui/native/libs-snapshot-local/community/mifos/selfservice-plugin/1.15.0-SNAPSHOT/)
142+
👉 [Download latest JAR](https://mifos.jfrog.io/ui/native/libs-snapshot-local/community/mifos/savings-plugin/1.15.0-SNAPSHOT/)
143143

144144
## API Reference
145145

TESTING.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Testing Guide — Selfservice Plugin
1+
# Testing Guide — Savings Plugin
22

33
## Test Pyramid
44

@@ -19,7 +19,7 @@ Tier 1 │ *Test.java │ Mockito unit tests
1919
./mvnw clean verify
2020

2121
# Run a single integration test class
22-
./mvnw verify -Dit.test=SelfServiceAuthenticationIntegrationTest
22+
./mvnw verify -Dit.test=AuthenticationIntegrationTest
2323

2424
# Skip spotless formatting check (useful during local development)
2525
./mvnw verify -Dspotless.check.skip=true
@@ -42,15 +42,15 @@ Coverage reports are written to:
4242
## Adding a New Integration Test
4343

4444
1. Create your test file with the `*IntegrationTest.java` suffix.
45-
2. Extend `SelfServiceIntegrationTestBase`.
46-
3. Inject `@LocalServerPort int port` and use `SelfServiceTestUtils.requestSpec(port)` for RestAssured calls.
45+
2. Extend `SavingsIntegrationTestBase`.
46+
3. Inject `@LocalServerPort int port` and use `SavingsTestUtils.requestSpec(port)` for RestAssured calls.
4747

4848
```java
49-
class MyFeatureIntegrationTest extends SelfServiceIntegrationTestBase {
49+
class MyFeatureIntegrationTest extends SavingsIntegrationTestBase {
5050

5151
@Test
5252
void myEndpoint_withNoAuth_returns401() {
53-
given(SelfServiceTestUtils.requestSpec(port))
53+
given(SavingsTestUtils.requestSpec(port))
5454
.when().get("/api/v1/self/my-endpoint")
5555
.then().statusCode(401);
5656
}

agent.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ domain: "banking-fintech"
99
framework: "spring-ai-agent-skills"
1010

1111
# Agent identification
12-
agent_id: "mifos-selfservice-plugin"
13-
namespace: "org.apache.fineract.selfservice"
12+
agent_id: "mifos-savings-plugin"
13+
namespace: "org.apache.fineract.savings"
1414

1515
# Runtime configuration
1616
runtime:
@@ -77,7 +77,7 @@ features:
7777

7878
# Development metadata
7979
repository:
80-
url: "https://github.com/openMF/selfservice-plugin"
80+
url: "https://github.com/openMF/savings-plugin"
8181
license: "MPL-2.0"
8282
organization: "Mifos Initiative"
8383

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<!-- lookup parent from repository -->
1010
</parent>
1111
<groupId>community.mifos</groupId>
12-
<artifactId>selfservice-plugin</artifactId>
12+
<artifactId>savings-plugin</artifactId>
1313
<version>1.15.0-SNAPSHOT</version>
1414
<name>savings-plugin</name>
1515
<description>Mifos Savings Plugin for Apache Fineract</description>

skills.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@ All Java files must include the standard MPL-2.0 license header:
2222
* License, v. 2.0. If a copy of the MPL was not distributed with this
2323
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
2424
*/
25-
package org.apache.fineract.selfservice.example;
25+
package org.apache.fineract.savings.example;
2626
```
2727

2828
### Package Structure
2929
Follow the established package structure:
3030
```text
31-
org.apache.fineract.selfservice.*
31+
org.apache.fineract.savings.*
3232
- security/ # Authentication, authorization, security context
3333
- useradministration/ # User management and roles
3434
- client/ # Client operations and data
@@ -108,10 +108,10 @@ Inject and use the security context properly:
108108
```java
109109
@RequiredArgsConstructor
110110
public class SelfSavingsService {
111-
private final PlatformSelfServiceSecurityContext securityContext;
111+
private final PlatformSecurityContext securityContext;
112112

113113
public void validateAccess(Long accountId) {
114-
securityContext.validateSelfServiceUserAccess(accountId);
114+
securityContext.validateUserAccess(accountId);
115115
}
116116
}
117117
```
@@ -251,7 +251,7 @@ class SelfSavingsServiceImplTest {
251251
@SpringBootTest
252252
@AutoConfigureTestDatabase(replace = AutoConfigureTestDatabase.Replace.NONE)
253253
@Testcontainers
254-
class SelfSavingsApiResourceIntegrationTest extends SelfServiceIntegrationTestBase {
254+
class SavingsApiResourceIntegrationTest extends IntegrationTestBase {
255255

256256
@Container
257257
static PostgreSQLContainer<?> postgres = new PostgreSQLContainer<>("postgres:15")
@@ -272,8 +272,8 @@ class SelfSavingsApiResourceIntegrationTest extends SelfServiceIntegrationTestBa
272272
### Application Properties
273273
```properties
274274
# Self Service Plugin Configuration
275-
fineract.selfservice.enabled=true
276-
fineract.selfservice.base-path=/v1/self
275+
fineract.savings.enabled=true
276+
fineract.savings.base-path=/v1/self
277277
fineract.security.basicauth.enabled=true
278278
fineract.security.oauth.enabled=false
279279
```
@@ -282,10 +282,10 @@ fineract.security.oauth.enabled=false
282282
```java
283283
@Configuration
284284
@EnableWebSecurity
285-
public class SelfServiceSecurityConfig {
285+
public class SecurityConfig {
286286

287287
@Bean
288-
public SecurityFilterChain selfServiceFilterChain(HttpSecurity http) throws Exception {
288+
public SecurityFilterChain filterChain(HttpSecurity http) throws Exception {
289289
// Security configuration
290290
}
291291
}

src/main/java/org/apache/fineract/infrastructure/configuration/data/NationalIdCredentialsData.java

Lines changed: 0 additions & 32 deletions
This file was deleted.

src/main/java/org/apache/fineract/infrastructure/configuration/data/NotificationCredentialsData.java

Lines changed: 0 additions & 34 deletions
This file was deleted.

src/main/java/org/apache/fineract/infrastructure/configuration/domain/NotificationMessage.java

Lines changed: 0 additions & 18 deletions
This file was deleted.

0 commit comments

Comments
 (0)