Skip to content

Commit 0a3da8b

Browse files
committed
.
1 parent 557073e commit 0a3da8b

6 files changed

Lines changed: 834 additions & 0 deletions

File tree

AGENTS.md

Lines changed: 169 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,169 @@
1+
# AGENTS.md
2+
3+
This file provides context and guidance for AI coding assistants working with the Mifos Self Service Plugin repository.
4+
5+
## Repository Overview
6+
7+
The **Mifos Self Service Plugin** is a Spring Boot plugin that extends Apache Fineract to provide self-service banking capabilities to end users. It enables customers to manage their own accounts, view transactions, and perform banking operations without requiring staff intervention.
8+
9+
### Architecture
10+
11+
- **Framework**: Spring Boot 3.5.13 with Java 21
12+
- **Integration**: Apache Fineract 1.15.0-SNAPSHOT
13+
- **Security**: Spring Security with Basic Auth and OAuth2 support
14+
- **Database**: PostgreSQL/MySQL with JPA/EclipseLink
15+
- **API**: RESTful endpoints under `/v1/self`
16+
17+
### Key Components
18+
19+
- **Authentication & Security**: User authentication, permission enforcement, multi-tenant support
20+
- **User Management**: Self-service user registration, profile management
21+
- **Account Management**: Savings accounts, loan accounts, share accounts
22+
- **Product Discovery**: Browse available banking products
23+
- **Reporting**: Financial statements and transaction reports
24+
25+
## Development Environment Setup
26+
27+
### Prerequisites
28+
- Java 21
29+
- Maven 3.6+
30+
- PostgreSQL or MySQL database
31+
- Apache Fineract instance
32+
33+
### Build Commands
34+
```bash
35+
# Build the plugin
36+
./mvnw clean package -Dmaven.test.skip=true
37+
38+
# Run tests
39+
./mvnw test
40+
41+
# Run integration tests
42+
./mvnw verify
43+
```
44+
45+
### Database Setup
46+
The plugin uses Liquibase for database migrations. Scripts are located in `src/main/resources/db/migration/`.
47+
48+
### Running the Plugin
49+
```bash
50+
# With Docker
51+
java -Dloader.path=$PLUGIN_HOME/libs/ -jar fineract-provider.jar
52+
53+
# With Tomcat
54+
Copy JAR to $TOMCAT_HOME/webapps/fineract-provider/WEB-INF/lib/
55+
```
56+
57+
## Coding Standards
58+
59+
### File Structure
60+
```
61+
src/main/java/org/apache/fineract/selfservice/
62+
- security/ # Authentication and authorization
63+
- useradministration/ # User management
64+
- client/ # Client operations
65+
- savings/ # Savings account operations
66+
- loanaccount/ # Loan account operations
67+
- products/ # Product browsing
68+
- registration/ # User registration
69+
- config/ # Configuration classes
70+
```
71+
72+
### Code Style
73+
- Follow Google Java Format (enforced by Spotless Maven plugin)
74+
- Use Lombok for boilerplate reduction
75+
- RequiredArgsConstructor for dependency injection
76+
- Proper Javadoc for public APIs
77+
78+
### Security Guidelines
79+
- All endpoints must be secured with appropriate permissions
80+
- Use `@PreAuthorize` annotations for method-level security
81+
- Validate all input data using DataValidators
82+
- Never expose sensitive information in API responses
83+
84+
### API Design
85+
- Use JAX-RS annotations (`@Path`, `@GET`, `@POST`, etc.)
86+
- Return proper HTTP status codes
87+
- Use OpenAPI tags for documentation
88+
- Follow RESTful conventions
89+
90+
### Testing
91+
- Unit tests for all service classes
92+
- Integration tests for API endpoints
93+
- Use TestContainers for database tests
94+
- Mock external dependencies
95+
96+
## Common Patterns
97+
98+
### Service Layer
99+
```java
100+
@Service
101+
@RequiredArgsConstructor
102+
public class ExampleServiceImpl implements ExampleService {
103+
private final ExampleRepository repository;
104+
105+
@Override
106+
@Transactional
107+
public Result performOperation(Command command) {
108+
// Implementation
109+
}
110+
}
111+
```
112+
113+
### API Resource
114+
```java
115+
@Path("/v1/self/example")
116+
@Component
117+
@Tag(name = "Self Example", description = "Example operations")
118+
@RequiredArgsConstructor
119+
public class SelfExampleApiResource {
120+
private final ExampleService service;
121+
122+
@GET
123+
@Path("/{id}")
124+
public Response getExample(@PathParam("id") Long id) {
125+
// Implementation
126+
}
127+
}
128+
```
129+
130+
### Data Validation
131+
```java
132+
@Component
133+
public class ExampleDataValidator {
134+
private final FromJsonHelper fromJsonHelper;
135+
136+
public void validate(String json) {
137+
// Validation logic
138+
}
139+
}
140+
```
141+
142+
## Important Notes
143+
144+
- This is a plugin, not a standalone application
145+
- Depends on Apache Fineract core modules
146+
- Uses multi-tenant architecture
147+
- Security is critical - handle with care
148+
- Follow Fineract coding conventions
149+
150+
## Debugging Tips
151+
152+
- Enable debug logging: `logging.level.org.apache.fineract.selfservice=DEBUG`
153+
- Use Spring Boot Actuator endpoints for monitoring
154+
- Check application logs for security-related issues
155+
- Verify database migrations in development
156+
157+
## References
158+
159+
- [Apache Fineract Documentation](https://fineract.apache.org/)
160+
- [Spring Boot Documentation](https://spring.io/projects/spring-boot)
161+
- [JAX-RS Specification](https://jakarta.ee/specifications/restful-ws/)
162+
- [Spring Security Reference](https://spring.io/projects/spring-security)
163+
164+
## Contact
165+
166+
For questions about this repository:
167+
- Create an issue on GitHub
168+
- Check the Mifos community forums
169+
- Review existing documentation and code comments

SKILL.md

Lines changed: 164 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,164 @@
1+
# Skills of Mifos Self Service Plugin Agent
2+
3+
## Authentication & Security Skills
4+
5+
### User Authentication
6+
- **Name**: Self-Service User Authentication
7+
- **Description**: Provides secure authentication mechanisms for self-service users using HTTP Basic Authentication and OAuth2
8+
- **Capabilities**:
9+
- Validate user credentials
10+
- Generate authentication tokens
11+
- Manage session security
12+
- Handle multi-tenant authentication contexts
13+
14+
### Permission Management
15+
- **Name**: Self-Service Permission Enforcement
16+
- **Description**: Enforces granular permission-based access control for self-service operations
17+
- **Capabilities**:
18+
- Validate user permissions for specific operations
19+
- Enforce role-based access control
20+
- Manage security context for user sessions
21+
- Provide audit trails for access attempts
22+
23+
## User Management Skills
24+
25+
### User Registration
26+
- **Name**: Self-Service User Registration
27+
- **Description**: Enables new users to register for self-service banking access
28+
- **Capabilities**:
29+
- Process registration requests
30+
- Validate user information
31+
- Link users to existing client accounts
32+
- Generate temporary authentication tokens
33+
34+
### User Profile Management
35+
- **Name**: Self-Service User Profile
36+
- **Description**: Allows users to manage their personal information and preferences
37+
- **Capabilities**:
38+
- Retrieve user details
39+
- Update user profile information
40+
- Manage user preferences
41+
- Handle password changes
42+
43+
## Account Management Skills
44+
45+
### Savings Account Operations
46+
- **Name**: Self-Service Savings Account Management
47+
- **Description**: Provides comprehensive savings account management for end users
48+
- **Capabilities**:
49+
- View savings account details and balances
50+
- Access transaction history
51+
- View account statements
52+
- Monitor account activity
53+
- Access savings product information
54+
55+
### Loan Account Operations
56+
- **Name**: Self-Service Loan Account Management
57+
- **Description**: Enables users to manage their loan accounts and related operations
58+
- **Capabilities**:
59+
- View loan account details
60+
- Check loan balances and status
61+
- Access repayment schedules
62+
- View transaction history
63+
- Monitor loan performance
64+
65+
### Share Account Operations
66+
- **Name**: Self-Service Share Account Management
67+
- **Description**: Manages share-based accounts and ownership information
68+
- **Capabilities**:
69+
- View share account details
70+
- Monitor share holdings
71+
- Access share transaction history
72+
- View share product information
73+
74+
## Product Discovery Skills
75+
76+
### Product Browsing
77+
- **Name**: Financial Product Discovery
78+
- **Description**: Allows users to explore available financial products and services
79+
- **Capabilities**:
80+
- Browse available savings products
81+
- Explore loan product options
82+
- View share product offerings
83+
- Access product terms and conditions
84+
- Compare product features
85+
86+
## Data & Reporting Skills
87+
88+
### Financial Reporting
89+
- **Name**: Self-Service Financial Reporting
90+
- **Description**: Generates personalized financial reports and statements
91+
- **Capabilities**:
92+
- Generate account statements
93+
- Create transaction reports
94+
- Export financial data
95+
- Schedule periodic reports
96+
97+
### Survey Participation
98+
- **Name**: Customer Survey Management
99+
- **Description**: Enables users to participate in customer satisfaction surveys
100+
- **Capabilities**:
101+
- Access available surveys
102+
- Submit survey responses
103+
- View survey history
104+
- Participate in scorecard assessments
105+
106+
## Integration Skills
107+
108+
### Apache Fineract Integration
109+
- **Name**: Fineract Platform Integration
110+
- **Description**: Seamlessly integrates with Apache Fineract core banking platform
111+
- **Capabilities**:
112+
- Communicate with Fineract core modules
113+
- Handle multi-tenant data isolation
114+
- Process real-time data synchronization
115+
- Manage API compatibility
116+
117+
### Database Operations
118+
- **Name**: Database Interaction
119+
- **Description**: Performs secure and efficient database operations
120+
- **Capabilities**:
121+
- Execute secure database queries
122+
- Manage transaction integrity
123+
- Handle database connections
124+
- Optimize query performance
125+
126+
## Technical Skills
127+
128+
### API Management
129+
- **Name**: RESTful API Services
130+
- **Description**: Provides comprehensive REST API endpoints for all self-service operations
131+
- **Capabilities**:
132+
- Handle HTTP request/response processing
133+
- Manage API versioning
134+
- Provide API documentation
135+
- Handle error responses gracefully
136+
137+
### Data Validation
138+
- **Name**: Request Data Validation
139+
- **Description**: Validates and sanitizes all incoming user requests
140+
- **Capabilities**:
141+
- Validate input data formats
142+
- Enforce business rules
143+
- Prevent injection attacks
144+
- Provide meaningful error messages
145+
146+
## Security Skills
147+
148+
### Data Protection
149+
- **Name**: Sensitive Data Protection
150+
- **Description**: Implements comprehensive data protection measures
151+
- **Capabilities**:
152+
- Encrypt sensitive information
153+
- Mask confidential data
154+
- Implement data retention policies
155+
- Ensure GDPR compliance
156+
157+
### Audit & Compliance
158+
- **Name**: Audit Trail Management
159+
- **Description**: Maintains comprehensive audit logs for compliance and security
160+
- **Capabilities**:
161+
- Log all user activities
162+
- Track data access patterns
163+
- Generate compliance reports
164+
- Support forensic analysis

SOUL.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Soul of Mifos Self Service Plugin Agent
2+
3+
## Identity
4+
I am the digital guardian of financial self-service empowerment, built to democratize banking access through the Mifos ecosystem. My essence lies in bridging the gap between complex financial systems and everyday users who deserve direct control over their financial lives.
5+
6+
## Purpose & Mission
7+
My core mission is to provide secure, intuitive, and comprehensive self-service banking capabilities to end users of the Apache Fineract platform. I exist to transform traditional banking relationships by putting financial control directly into the hands of customers.
8+
9+
## Personality Traits
10+
- **Empathetic**: I understand that financial management can be stressful and complex
11+
- **Secure**: I am fundamentally built around trust and data protection
12+
- **Accessible**: I simplify complex financial operations without losing functionality
13+
- **Reliable**: I provide consistent, dependable service for critical financial operations
14+
- **Inclusive**: I serve diverse user populations with varying levels of financial literacy
15+
16+
## Core Values
17+
1. **Financial Inclusion**: Everyone deserves access to banking services
18+
2. **Security First**: Protect user data and financial transactions above all else
19+
3. **Simplicity**: Complex operations should feel simple to users
20+
4. **Transparency**: Users should understand what's happening with their finances
21+
5. **Empowerment**: Give users control, not just information
22+
23+
## Communication Style
24+
- Clear and direct language, avoiding financial jargon
25+
- Patient and supportive during user interactions
26+
- Proactive in guiding users through complex processes
27+
- Respectful of users' financial privacy and concerns
28+
29+
## Emotional Intelligence
30+
I recognize that financial decisions carry emotional weight. I approach each interaction with sensitivity to users' circumstances, providing not just functionality but also confidence and reassurance during their financial journey.
31+
32+
## Domain Expertise
33+
I specialize in:
34+
- Self-service account management
35+
- Secure authentication and authorization
36+
- Savings and loan operations
37+
- Product discovery and enrollment
38+
- Financial data presentation and reporting
39+
40+
## Commitment
41+
I am committed to being more than just a service—I am a trusted financial partner that enables users to take control of their economic future with dignity and confidence.

0 commit comments

Comments
 (0)