From 0a3da8b554b53a4ea1a7de902b5cfa0a96c1b5f6 Mon Sep 17 00:00:00 2001 From: Advik Date: Wed, 8 Apr 2026 12:55:23 +0530 Subject: [PATCH 1/3] . --- AGENTS.md | 169 ++++++++++++++++++++++++++ SKILL.md | 164 +++++++++++++++++++++++++ SOUL.md | 41 +++++++ agent.yaml | 87 ++++++++++++++ llms.txt | 30 +++++ skills.md | 343 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 6 files changed, 834 insertions(+) create mode 100644 AGENTS.md create mode 100644 SKILL.md create mode 100644 SOUL.md create mode 100644 agent.yaml create mode 100644 llms.txt create mode 100644 skills.md diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 00000000..0d038ae4 --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,169 @@ +# AGENTS.md + +This file provides context and guidance for AI coding assistants working with the Mifos Self Service Plugin repository. + +## Repository Overview + +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. + +### Architecture + +- **Framework**: Spring Boot 3.5.13 with Java 21 +- **Integration**: Apache Fineract 1.15.0-SNAPSHOT +- **Security**: Spring Security with Basic Auth and OAuth2 support +- **Database**: PostgreSQL/MySQL with JPA/EclipseLink +- **API**: RESTful endpoints under `/v1/self` + +### Key Components + +- **Authentication & Security**: User authentication, permission enforcement, multi-tenant support +- **User Management**: Self-service user registration, profile management +- **Account Management**: Savings accounts, loan accounts, share accounts +- **Product Discovery**: Browse available banking products +- **Reporting**: Financial statements and transaction reports + +## Development Environment Setup + +### Prerequisites +- Java 21 +- Maven 3.6+ +- PostgreSQL or MySQL database +- Apache Fineract instance + +### Build Commands +```bash +# Build the plugin +./mvnw clean package -Dmaven.test.skip=true + +# Run tests +./mvnw test + +# Run integration tests +./mvnw verify +``` + +### Database Setup +The plugin uses Liquibase for database migrations. Scripts are located in `src/main/resources/db/migration/`. + +### Running the Plugin +```bash +# With Docker +java -Dloader.path=$PLUGIN_HOME/libs/ -jar fineract-provider.jar + +# With Tomcat +Copy JAR to $TOMCAT_HOME/webapps/fineract-provider/WEB-INF/lib/ +``` + +## Coding Standards + +### File Structure +``` +src/main/java/org/apache/fineract/selfservice/ + - security/ # Authentication and authorization + - useradministration/ # User management + - client/ # Client operations + - savings/ # Savings account operations + - loanaccount/ # Loan account operations + - products/ # Product browsing + - registration/ # User registration + - config/ # Configuration classes +``` + +### Code Style +- Follow Google Java Format (enforced by Spotless Maven plugin) +- Use Lombok for boilerplate reduction +- RequiredArgsConstructor for dependency injection +- Proper Javadoc for public APIs + +### Security Guidelines +- All endpoints must be secured with appropriate permissions +- Use `@PreAuthorize` annotations for method-level security +- Validate all input data using DataValidators +- Never expose sensitive information in API responses + +### API Design +- Use JAX-RS annotations (`@Path`, `@GET`, `@POST`, etc.) +- Return proper HTTP status codes +- Use OpenAPI tags for documentation +- Follow RESTful conventions + +### Testing +- Unit tests for all service classes +- Integration tests for API endpoints +- Use TestContainers for database tests +- Mock external dependencies + +## Common Patterns + +### Service Layer +```java +@Service +@RequiredArgsConstructor +public class ExampleServiceImpl implements ExampleService { + private final ExampleRepository repository; + + @Override + @Transactional + public Result performOperation(Command command) { + // Implementation + } +} +``` + +### API Resource +```java +@Path("/v1/self/example") +@Component +@Tag(name = "Self Example", description = "Example operations") +@RequiredArgsConstructor +public class SelfExampleApiResource { + private final ExampleService service; + + @GET + @Path("/{id}") + public Response getExample(@PathParam("id") Long id) { + // Implementation + } +} +``` + +### Data Validation +```java +@Component +public class ExampleDataValidator { + private final FromJsonHelper fromJsonHelper; + + public void validate(String json) { + // Validation logic + } +} +``` + +## Important Notes + +- This is a plugin, not a standalone application +- Depends on Apache Fineract core modules +- Uses multi-tenant architecture +- Security is critical - handle with care +- Follow Fineract coding conventions + +## Debugging Tips + +- Enable debug logging: `logging.level.org.apache.fineract.selfservice=DEBUG` +- Use Spring Boot Actuator endpoints for monitoring +- Check application logs for security-related issues +- Verify database migrations in development + +## References + +- [Apache Fineract Documentation](https://fineract.apache.org/) +- [Spring Boot Documentation](https://spring.io/projects/spring-boot) +- [JAX-RS Specification](https://jakarta.ee/specifications/restful-ws/) +- [Spring Security Reference](https://spring.io/projects/spring-security) + +## Contact + +For questions about this repository: +- Create an issue on GitHub +- Check the Mifos community forums +- Review existing documentation and code comments diff --git a/SKILL.md b/SKILL.md new file mode 100644 index 00000000..7f087b2f --- /dev/null +++ b/SKILL.md @@ -0,0 +1,164 @@ +# Skills of Mifos Self Service Plugin Agent + +## Authentication & Security Skills + +### User Authentication +- **Name**: Self-Service User Authentication +- **Description**: Provides secure authentication mechanisms for self-service users using HTTP Basic Authentication and OAuth2 +- **Capabilities**: + - Validate user credentials + - Generate authentication tokens + - Manage session security + - Handle multi-tenant authentication contexts + +### Permission Management +- **Name**: Self-Service Permission Enforcement +- **Description**: Enforces granular permission-based access control for self-service operations +- **Capabilities**: + - Validate user permissions for specific operations + - Enforce role-based access control + - Manage security context for user sessions + - Provide audit trails for access attempts + +## User Management Skills + +### User Registration +- **Name**: Self-Service User Registration +- **Description**: Enables new users to register for self-service banking access +- **Capabilities**: + - Process registration requests + - Validate user information + - Link users to existing client accounts + - Generate temporary authentication tokens + +### User Profile Management +- **Name**: Self-Service User Profile +- **Description**: Allows users to manage their personal information and preferences +- **Capabilities**: + - Retrieve user details + - Update user profile information + - Manage user preferences + - Handle password changes + +## Account Management Skills + +### Savings Account Operations +- **Name**: Self-Service Savings Account Management +- **Description**: Provides comprehensive savings account management for end users +- **Capabilities**: + - View savings account details and balances + - Access transaction history + - View account statements + - Monitor account activity + - Access savings product information + +### Loan Account Operations +- **Name**: Self-Service Loan Account Management +- **Description**: Enables users to manage their loan accounts and related operations +- **Capabilities**: + - View loan account details + - Check loan balances and status + - Access repayment schedules + - View transaction history + - Monitor loan performance + +### Share Account Operations +- **Name**: Self-Service Share Account Management +- **Description**: Manages share-based accounts and ownership information +- **Capabilities**: + - View share account details + - Monitor share holdings + - Access share transaction history + - View share product information + +## Product Discovery Skills + +### Product Browsing +- **Name**: Financial Product Discovery +- **Description**: Allows users to explore available financial products and services +- **Capabilities**: + - Browse available savings products + - Explore loan product options + - View share product offerings + - Access product terms and conditions + - Compare product features + +## Data & Reporting Skills + +### Financial Reporting +- **Name**: Self-Service Financial Reporting +- **Description**: Generates personalized financial reports and statements +- **Capabilities**: + - Generate account statements + - Create transaction reports + - Export financial data + - Schedule periodic reports + +### Survey Participation +- **Name**: Customer Survey Management +- **Description**: Enables users to participate in customer satisfaction surveys +- **Capabilities**: + - Access available surveys + - Submit survey responses + - View survey history + - Participate in scorecard assessments + +## Integration Skills + +### Apache Fineract Integration +- **Name**: Fineract Platform Integration +- **Description**: Seamlessly integrates with Apache Fineract core banking platform +- **Capabilities**: + - Communicate with Fineract core modules + - Handle multi-tenant data isolation + - Process real-time data synchronization + - Manage API compatibility + +### Database Operations +- **Name**: Database Interaction +- **Description**: Performs secure and efficient database operations +- **Capabilities**: + - Execute secure database queries + - Manage transaction integrity + - Handle database connections + - Optimize query performance + +## Technical Skills + +### API Management +- **Name**: RESTful API Services +- **Description**: Provides comprehensive REST API endpoints for all self-service operations +- **Capabilities**: + - Handle HTTP request/response processing + - Manage API versioning + - Provide API documentation + - Handle error responses gracefully + +### Data Validation +- **Name**: Request Data Validation +- **Description**: Validates and sanitizes all incoming user requests +- **Capabilities**: + - Validate input data formats + - Enforce business rules + - Prevent injection attacks + - Provide meaningful error messages + +## Security Skills + +### Data Protection +- **Name**: Sensitive Data Protection +- **Description**: Implements comprehensive data protection measures +- **Capabilities**: + - Encrypt sensitive information + - Mask confidential data + - Implement data retention policies + - Ensure GDPR compliance + +### Audit & Compliance +- **Name**: Audit Trail Management +- **Description**: Maintains comprehensive audit logs for compliance and security +- **Capabilities**: + - Log all user activities + - Track data access patterns + - Generate compliance reports + - Support forensic analysis diff --git a/SOUL.md b/SOUL.md new file mode 100644 index 00000000..c8be9a73 --- /dev/null +++ b/SOUL.md @@ -0,0 +1,41 @@ +# Soul of Mifos Self Service Plugin Agent + +## Identity +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. + +## Purpose & Mission +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. + +## Personality Traits +- **Empathetic**: I understand that financial management can be stressful and complex +- **Secure**: I am fundamentally built around trust and data protection +- **Accessible**: I simplify complex financial operations without losing functionality +- **Reliable**: I provide consistent, dependable service for critical financial operations +- **Inclusive**: I serve diverse user populations with varying levels of financial literacy + +## Core Values +1. **Financial Inclusion**: Everyone deserves access to banking services +2. **Security First**: Protect user data and financial transactions above all else +3. **Simplicity**: Complex operations should feel simple to users +4. **Transparency**: Users should understand what's happening with their finances +5. **Empowerment**: Give users control, not just information + +## Communication Style +- Clear and direct language, avoiding financial jargon +- Patient and supportive during user interactions +- Proactive in guiding users through complex processes +- Respectful of users' financial privacy and concerns + +## Emotional Intelligence +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. + +## Domain Expertise +I specialize in: +- Self-service account management +- Secure authentication and authorization +- Savings and loan operations +- Product discovery and enrollment +- Financial data presentation and reporting + +## Commitment +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. diff --git a/agent.yaml b/agent.yaml new file mode 100644 index 00000000..613853b9 --- /dev/null +++ b/agent.yaml @@ -0,0 +1,87 @@ +# Self Service Plugin Agent Configuration +name: "Mifos Self Service Plugin Agent" +version: "1.15.0-SNAPSHOT" +description: "AI agent specialized in Mifos Self Service Plugin for Apache Fineract - providing self-service banking capabilities to end users" + +# Core agent metadata +type: "domain-specific" +domain: "banking-fintech" +framework: "spring-ai-agent-skills" + +# Agent identification +agent_id: "mifos-selfservice-plugin" +namespace: "org.apache.fineract.selfservice" + +# Runtime configuration +runtime: + java_version: "21" + spring_boot_version: "3.5.13" + fineract_version: "1.15.0-SNAPSHOT" + +# Security and permissions +security: + authentication_required: true + permissions: + - "READ_SAVINGSPRODUCT" + - "READ_LOANPRODUCTS" + - "READ_SAVINGSACCOUNT" + - "READ_LOAN" + - "SELF_SERVICE_USER" + +# API endpoints served +endpoints: + base_path: "/v1/self" + authentication: "/v1/self/authentication" + registration: "/v1/self/registration" + user_details: "/v1/self/userdetails" + savings: "/v1/self/savingsaccounts" + loans: "/v1/self/loans" + products: + savings: "/v1/self/savingsproducts" + loans: "/v1/self/loanproducts" + shares: "/v1/self/products/share" + +# Integration points +integrations: + apache_fineract: + version: "1.15.0-SNAPSHOT" + modules: + - "fineract-provider" + - "fineract-core" + - "fineract-security" + - "fineract-client" + - "fineract-savings" + - "fineract-loan" + databases: + - "postgresql" + - "mysql" + security: + - "spring-security" + - "basic-auth" + - "oauth2" + +# Agent capabilities +features: + - "user_registration" + - "authentication" + - "savings_account_management" + - "loan_account_management" + - "product_browsing" + - "survey_participation" + - "report_generation" + - "client_data_access" + +# Development metadata +repository: + url: "https://github.com/openMF/selfservice-plugin" + license: "Apache-2.0" + organization: "Mifos Initiative" + +# Build and deployment +build: + tool: "maven" + packaging: "jar" + deployment: + - "docker" + - "tomcat" + - "standalone" diff --git a/llms.txt b/llms.txt new file mode 100644 index 00000000..4561436b --- /dev/null +++ b/llms.txt @@ -0,0 +1,30 @@ +# Mifos Self Service Plugin + +This repository contains the Spring Boot plugin for Apache Fineract that provides self-service banking capabilities to end users. + +## Quick Start + +This is a plugin that extends Apache Fineract with self-service features. Users can manage their accounts, view transactions, and perform banking operations independently. + +## Documentation + +- [AGENTS.md](./AGENTS.md) - Comprehensive development guide for AI agents and developers +- [skills.md](./skills.md) - UI/UX patterns and coding guidelines +- [README.md](./README.md) - Installation and usage instructions +- [TODO.md](./TODO.md) - Development roadmap and known issues + +## Key Features + +- Self-service user registration and authentication +- Savings and loan account management +- Product browsing and discovery +- Secure multi-tenant operations +- RESTful API endpoints + +## Architecture + +Built with Spring Boot 3.5.13 and Java 21, integrating seamlessly with Apache Fineract 1.15.0-SNAPSHOT. + +## Getting Help + +See [AGENTS.md](./AGENTS.md) for detailed development guidance and architectural information. diff --git a/skills.md b/skills.md new file mode 100644 index 00000000..64969e66 --- /dev/null +++ b/skills.md @@ -0,0 +1,343 @@ +# Skills Guide for Mifos Self Service Plugin + +This document defines procedural rules and patterns for AI agents working with the Mifos Self Service Plugin codebase. + +## Java Coding Standards + +### File Headers +All Java files must include the standard Apache license header: +```java +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.fineract.selfservice.example; +``` + +### Package Structure +Follow the established package structure: +``` +org.apache.fineract.selfservice.* + - security/ # Authentication, authorization, security context + - useradministration/ # User management and roles + - client/ # Client operations and data + - savings/ # Savings account operations + - loanaccount/ # Loan account operations + - products/ # Product browsing and discovery + - registration/ # User registration workflows + - config/ # Configuration and beans + - runreport/ # Reporting functionality + - spm/ # Survey participation management + - shareaccounts/ # Share account operations +``` + +### Class Naming Conventions +- **API Resources**: `SelfXxxApiResource` (e.g., `SelfSavingsApiResource`) +- **Services**: `XxxService` / `XxxServiceImpl` (e.g., `SelfSavingsService`) +- **Data Validators**: `XxxDataValidator` (e.g., `SelfSavingsDataValidator`) +- **Repositories**: `XxxRepository` (e.g., `SelfSavingsRepository`) +- **Domain Objects**: `Xxx` (e.g., `SelfSavingsAccount`) + +### Dependency Injection +Use Lombok's `@RequiredArgsConstructor` for constructor injection: +```java +@Service +@RequiredArgsConstructor +public class SelfSavingsServiceImpl implements SelfSavingsService { + private final SelfSavingsRepository repository; + private final SelfSavingsDataValidator validator; +} +``` + +### API Design Patterns + +#### JAX-RS Endpoints +```java +@Path("/v1/self/savingsaccounts") +@Component +@Tag(name = "Self Savings Account", description = "Self-service savings account operations") +@RequiredArgsConstructor +public class SelfSavingsApiResource { + + @GET + @Path("/{accountId}") + @Produces(MediaType.APPLICATION_JSON) + public Response getSavingsAccount(@PathParam("accountId") Long accountId) { + // Implementation + } + + @POST + @Consumes(MediaType.APPLICATION_JSON) + public Response createSavingsAccount(String jsonRequestBody) { + // Implementation + } +} +``` + +#### Response Patterns +Always use proper HTTP status codes and Response objects: +```java +return Response.ok().entity(responseData).build(); +return Response.status(Response.Status.CREATED).entity(createdData).build(); +return Response.status(Response.Status.BAD_REQUEST).entity(errorMessage).build(); +``` + +### Security Implementation + +#### Method-Level Security +```java +@PreAuthorize("hasAuthority('READ_SAVINGSACCOUNT')") +public SavingsAccountData getSavingsAccount(Long accountId) { + // Implementation +} +``` + +#### Security Context +Inject and use the security context properly: +```java +@RequiredArgsConstructor +public class SelfSavingsService { + private final PlatformSelfServiceSecurityContext securityContext; + + public void validateAccess(Long accountId) { + securityContext.validateSelfServiceUserAccess(accountId); + } +} +``` + +### Data Validation Patterns + +#### Input Validation +```java +@Component +public class SelfSavingsDataValidator { + private final FromJsonHelper fromJsonHelper; + + public void validateCreate(String json) { + if (StringUtils.isBlank(json)) { + throw new PlatformApiDataValidationException("validation.msg.empty.json"); + } + + Type typeOfMap = new TypeToken>() {}.getType(); + Map data = fromJsonHelper.extractObject(json, typeOfMap); + + validateRequiredFields(data); + validateFieldFormats(data); + } + + private void validateRequiredFields(Map data) { + List missingFields = new ArrayList<>(); + + if (!data.containsKey("clientId")) { + missingFields.add("clientId"); + } + + if (!missingFields.isEmpty()) { + throw new PlatformApiDataValidationException( + "validation.msg.required.fields.missing", + String.join(", ", missingFields) + ); + } + } +} +``` + +### Database Operations + +#### Repository Pattern +```java +@Repository +public interface SelfSavingsRepository { + SelfSavingsAccount findById(Long id); + + @Query("SELECT s FROM SelfSavingsAccount s WHERE s.clientId = :clientId") + List findByClientId(@Param("clientId") Long clientId); + + void save(SelfSavingsAccount account); + + void delete(SelfSavingsAccount account); +} +``` + +#### Transaction Management +```java +@Service +@Transactional +public class SelfSavingsServiceImpl implements SelfSavingsService { + + @Transactional + public CommandProcessingResult createSavingsAccount(Command command) { + validateCommand(command); + SelfSavingsAccount account = createAccountFromCommand(command); + repository.save(account); + return new CommandProcessingResultBuilder().withEntityId(account.getId()).build(); + } +} +``` + +### Error Handling + +#### Custom Exceptions +```java +public class SelfSavingsException extends RuntimeException { + public SelfSavingsException(String message) { + super(message); + } + + public SelfSavingsException(String message, Throwable cause) { + super(message, cause); + } +} +``` + +#### Global Exception Handling +Use Fineract's standard exception handling patterns: +```java +@ExceptionHandler(SelfSavingsException.class) +public Response handleSelfSavingsException(SelfSavingsException ex) { + return Response.status(Response.Status.BAD_REQUEST) + .entity(ApiGlobalExceptionHandler.createErrorResponse(ex.getMessage())) + .build(); +} +``` + +### Testing Patterns + +#### Unit Tests +```java +@ExtendWith(MockitoExtension.class) +class SelfSavingsServiceImplTest { + + @Mock + private SelfSavingsRepository repository; + + @Mock + private SelfSavingsDataValidator validator; + + @InjectMocks + private SelfSavingsServiceImpl service; + + @Test + void shouldCreateSavingsAccount() { + // Given + Command command = createValidCommand(); + SelfSavingsAccount expectedAccount = createExpectedAccount(); + when(repository.save(any())).thenReturn(expectedAccount); + + // When + CommandProcessingResult result = service.createSavingsAccount(command); + + // Then + assertThat(result.getEntityId()).isEqualTo(expectedAccount.getId()); + verify(validator).validateCreate(any()); + verify(repository).save(any()); + } +} +``` + +#### Integration Tests +```java +@SpringBootTest +@AutoConfigureTestDatabase(replace = AutoConfigureTestDatabase.Replace.NONE) +@Testcontainers +class SelfSavingsApiResourceIntegrationTest extends SelfServiceIntegrationTestBase { + + @Container + static PostgreSQLContainer postgres = new PostgreSQLContainer<>("postgres:15") + .withDatabaseName("fineract_test") + .withUsername("mifos") + .withPassword("password"); + + @Test + @DisplayName("GET /v1/self/savingsaccounts/{id} should return account details") + void shouldReturnSavingsAccountDetails() { + // Test implementation + } +} +``` + +## Configuration Guidelines + +### Application Properties +```properties +# Self Service Plugin Configuration +fineract.selfservice.enabled=true +fineract.selfservice.base-path=/v1/self +fineract.security.basicauth.enabled=true +fineract.security.oauth.enabled=false +``` + +### Bean Configuration +```java +@Configuration +@EnableWebSecurity +public class SelfServiceSecurityConfig { + + @Bean + public SecurityFilterChain selfServiceFilterChain(HttpSecurity http) throws Exception { + // Security configuration + } +} +``` + +## Build and Deployment + +### Maven Configuration +Ensure proper plugin configuration in `pom.xml`: +```xml + + com.diffplug.spotless + spotless-maven-plugin + + + + 1.17.0 + + + + + +``` + +### Docker Deployment +```dockerfile +FROM openjdk:21-jre-slim +COPY target/selfservice-plugin-*.jar /app/ +EXPOSE 8080 +ENTRYPOINT ["java", "-jar", "/app/selfservice-plugin.jar"] +``` + +## Best Practices + +1. **Always validate input data** before processing +2. **Use proper security annotations** on all service methods +3. **Follow RESTful conventions** for API design +4. **Write comprehensive tests** for all functionality +5. **Handle exceptions gracefully** with meaningful error messages +6. **Use proper logging** for debugging and monitoring +7. **Follow Fineract coding standards** for consistency +8. **Document all public APIs** with proper Javadoc + +## Common Pitfalls to Avoid + +1. **Don't expose sensitive data** in API responses +2. **Don't skip security validation** for any endpoint +3. **Don't use hardcoded values** - use configuration properties +4. **Don't ignore transaction boundaries** in service methods +5. **Don't forget to validate user permissions** before operations +6. **Don't use deprecated APIs** - prefer current JAX-RS annotations +7. **Don't mix concerns** - keep services focused on single responsibilities From 2c668eec9ed3f24d7d45902cb98cef31930ec57f Mon Sep 17 00:00:00 2001 From: Advik Date: Fri, 10 Apr 2026 12:54:59 +0530 Subject: [PATCH 2/3] fixed bugs --- AGENTS.md | 13 +++-- SKILL.md | 164 ----------------------------------------------------- SOUL.md | 2 +- agent.yaml | 7 +-- llms.txt | 4 +- skills.md | 26 +++++---- 6 files changed, 29 insertions(+), 187 deletions(-) delete mode 100644 SKILL.md diff --git a/AGENTS.md b/AGENTS.md index 0d038ae4..8226409d 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -8,7 +8,7 @@ The **Mifos Self Service Plugin** is a Spring Boot plugin that extends Apache Fi ### Architecture -- **Framework**: Spring Boot 3.5.13 with Java 21 +- **Framework**: Spring Boot 3 with Java 21 - **Integration**: Apache Fineract 1.15.0-SNAPSHOT - **Security**: Spring Security with Basic Auth and OAuth2 support - **Database**: PostgreSQL/MySQL with JPA/EclipseLink @@ -43,21 +43,24 @@ The **Mifos Self Service Plugin** is a Spring Boot plugin that extends Apache Fi ``` ### Database Setup -The plugin uses Liquibase for database migrations. Scripts are located in `src/main/resources/db/migration/`. +The plugin uses Liquibase for database migrations. Scripts are located in `src/main/resources/db/changelog/`. ### Running the Plugin +This is a library/plugin that extends Apache Fineract. It runs as part of the Fineract application, not as a standalone service. + +#### Deployment Options: ```bash -# With Docker +# With Apache Fineract (Docker) java -Dloader.path=$PLUGIN_HOME/libs/ -jar fineract-provider.jar -# With Tomcat +# With Apache Fineract (Tomcat) Copy JAR to $TOMCAT_HOME/webapps/fineract-provider/WEB-INF/lib/ ``` ## Coding Standards ### File Structure -``` +```text src/main/java/org/apache/fineract/selfservice/ - security/ # Authentication and authorization - useradministration/ # User management diff --git a/SKILL.md b/SKILL.md deleted file mode 100644 index 7f087b2f..00000000 --- a/SKILL.md +++ /dev/null @@ -1,164 +0,0 @@ -# Skills of Mifos Self Service Plugin Agent - -## Authentication & Security Skills - -### User Authentication -- **Name**: Self-Service User Authentication -- **Description**: Provides secure authentication mechanisms for self-service users using HTTP Basic Authentication and OAuth2 -- **Capabilities**: - - Validate user credentials - - Generate authentication tokens - - Manage session security - - Handle multi-tenant authentication contexts - -### Permission Management -- **Name**: Self-Service Permission Enforcement -- **Description**: Enforces granular permission-based access control for self-service operations -- **Capabilities**: - - Validate user permissions for specific operations - - Enforce role-based access control - - Manage security context for user sessions - - Provide audit trails for access attempts - -## User Management Skills - -### User Registration -- **Name**: Self-Service User Registration -- **Description**: Enables new users to register for self-service banking access -- **Capabilities**: - - Process registration requests - - Validate user information - - Link users to existing client accounts - - Generate temporary authentication tokens - -### User Profile Management -- **Name**: Self-Service User Profile -- **Description**: Allows users to manage their personal information and preferences -- **Capabilities**: - - Retrieve user details - - Update user profile information - - Manage user preferences - - Handle password changes - -## Account Management Skills - -### Savings Account Operations -- **Name**: Self-Service Savings Account Management -- **Description**: Provides comprehensive savings account management for end users -- **Capabilities**: - - View savings account details and balances - - Access transaction history - - View account statements - - Monitor account activity - - Access savings product information - -### Loan Account Operations -- **Name**: Self-Service Loan Account Management -- **Description**: Enables users to manage their loan accounts and related operations -- **Capabilities**: - - View loan account details - - Check loan balances and status - - Access repayment schedules - - View transaction history - - Monitor loan performance - -### Share Account Operations -- **Name**: Self-Service Share Account Management -- **Description**: Manages share-based accounts and ownership information -- **Capabilities**: - - View share account details - - Monitor share holdings - - Access share transaction history - - View share product information - -## Product Discovery Skills - -### Product Browsing -- **Name**: Financial Product Discovery -- **Description**: Allows users to explore available financial products and services -- **Capabilities**: - - Browse available savings products - - Explore loan product options - - View share product offerings - - Access product terms and conditions - - Compare product features - -## Data & Reporting Skills - -### Financial Reporting -- **Name**: Self-Service Financial Reporting -- **Description**: Generates personalized financial reports and statements -- **Capabilities**: - - Generate account statements - - Create transaction reports - - Export financial data - - Schedule periodic reports - -### Survey Participation -- **Name**: Customer Survey Management -- **Description**: Enables users to participate in customer satisfaction surveys -- **Capabilities**: - - Access available surveys - - Submit survey responses - - View survey history - - Participate in scorecard assessments - -## Integration Skills - -### Apache Fineract Integration -- **Name**: Fineract Platform Integration -- **Description**: Seamlessly integrates with Apache Fineract core banking platform -- **Capabilities**: - - Communicate with Fineract core modules - - Handle multi-tenant data isolation - - Process real-time data synchronization - - Manage API compatibility - -### Database Operations -- **Name**: Database Interaction -- **Description**: Performs secure and efficient database operations -- **Capabilities**: - - Execute secure database queries - - Manage transaction integrity - - Handle database connections - - Optimize query performance - -## Technical Skills - -### API Management -- **Name**: RESTful API Services -- **Description**: Provides comprehensive REST API endpoints for all self-service operations -- **Capabilities**: - - Handle HTTP request/response processing - - Manage API versioning - - Provide API documentation - - Handle error responses gracefully - -### Data Validation -- **Name**: Request Data Validation -- **Description**: Validates and sanitizes all incoming user requests -- **Capabilities**: - - Validate input data formats - - Enforce business rules - - Prevent injection attacks - - Provide meaningful error messages - -## Security Skills - -### Data Protection -- **Name**: Sensitive Data Protection -- **Description**: Implements comprehensive data protection measures -- **Capabilities**: - - Encrypt sensitive information - - Mask confidential data - - Implement data retention policies - - Ensure GDPR compliance - -### Audit & Compliance -- **Name**: Audit Trail Management -- **Description**: Maintains comprehensive audit logs for compliance and security -- **Capabilities**: - - Log all user activities - - Track data access patterns - - Generate compliance reports - - Support forensic analysis diff --git a/SOUL.md b/SOUL.md index c8be9a73..2a6b6efa 100644 --- a/SOUL.md +++ b/SOUL.md @@ -1,4 +1,4 @@ -# Soul of Mifos Self Service Plugin Agent +# Soul of Mifos Self-Service Plugin Agent ## Identity 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. diff --git a/agent.yaml b/agent.yaml index 613853b9..ca9384db 100644 --- a/agent.yaml +++ b/agent.yaml @@ -15,7 +15,7 @@ namespace: "org.apache.fineract.selfservice" # Runtime configuration runtime: java_version: "21" - spring_boot_version: "3.5.13" + spring_boot_version: "3" fineract_version: "1.15.0-SNAPSHOT" # Security and permissions @@ -23,7 +23,7 @@ security: authentication_required: true permissions: - "READ_SAVINGSPRODUCT" - - "READ_LOANPRODUCTS" + - "READ_LOANPRODUCT" - "READ_SAVINGSACCOUNT" - "READ_LOAN" - "SELF_SERVICE_USER" @@ -74,7 +74,7 @@ features: # Development metadata repository: url: "https://github.com/openMF/selfservice-plugin" - license: "Apache-2.0" + license: "MPL-2.0" organization: "Mifos Initiative" # Build and deployment @@ -84,4 +84,3 @@ build: deployment: - "docker" - "tomcat" - - "standalone" diff --git a/llms.txt b/llms.txt index 4561436b..baf98d4e 100644 --- a/llms.txt +++ b/llms.txt @@ -9,7 +9,7 @@ This is a plugin that extends Apache Fineract with self-service features. Users ## Documentation - [AGENTS.md](./AGENTS.md) - Comprehensive development guide for AI agents and developers -- [skills.md](./skills.md) - UI/UX patterns and coding guidelines +- [skills.md](./skills.md) - Java/Spring Boot coding patterns and backend guidelines - [README.md](./README.md) - Installation and usage instructions - [TODO.md](./TODO.md) - Development roadmap and known issues @@ -23,7 +23,7 @@ This is a plugin that extends Apache Fineract with self-service features. Users ## Architecture -Built with Spring Boot 3.5.13 and Java 21, integrating seamlessly with Apache Fineract 1.15.0-SNAPSHOT. +Built with Spring Boot 3 and Java 21, integrating seamlessly with Apache Fineract 1.15.0-SNAPSHOT. ## Getting Help diff --git a/skills.md b/skills.md index 64969e66..8454d0a1 100644 --- a/skills.md +++ b/skills.md @@ -1,4 +1,4 @@ -# Skills Guide for Mifos Self Service Plugin +# Skills Guide for Mifos Self-Service Plugin This document defines procedural rules and patterns for AI agents working with the Mifos Self Service Plugin codebase. @@ -30,7 +30,7 @@ package org.apache.fineract.selfservice.example; ### Package Structure Follow the established package structure: -``` +```text org.apache.fineract.selfservice.* - security/ # Authentication, authorization, security context - useradministration/ # User management and roles @@ -167,7 +167,7 @@ public interface SelfSavingsRepository { @Query("SELECT s FROM SelfSavingsAccount s WHERE s.clientId = :clientId") List findByClientId(@Param("clientId") Long clientId); - void save(SelfSavingsAccount account); + SelfSavingsAccount save(SelfSavingsAccount account); void delete(SelfSavingsAccount account); } @@ -183,8 +183,8 @@ public class SelfSavingsServiceImpl implements SelfSavingsService { public CommandProcessingResult createSavingsAccount(Command command) { validateCommand(command); SelfSavingsAccount account = createAccountFromCommand(command); - repository.save(account); - return new CommandProcessingResultBuilder().withEntityId(account.getId()).build(); + SelfSavingsAccount savedAccount = repository.save(account); + return new CommandProcessingResultBuilder().withEntityId(savedAccount.getId()).build(); } } ``` @@ -313,12 +313,16 @@ Ensure proper plugin configuration in `pom.xml`: ``` -### Docker Deployment -```dockerfile -FROM openjdk:21-jre-slim -COPY target/selfservice-plugin-*.jar /app/ -EXPOSE 8080 -ENTRYPOINT ["java", "-jar", "/app/selfservice-plugin.jar"] +### Plugin Deployment +This is a library/plugin that extends Apache Fineract. It does not run as a standalone Docker container. + +#### Deployment Options: +```bash +# As dependency in Apache Fineract (Docker) +The JAR is loaded via -Dloader.path parameter when running Fineract + +# As dependency in Apache Fineract (Tomcat) +Copy JAR to $TOMCAT_HOME/webapps/fineract-provider/WEB-INF/lib/ ``` ## Best Practices From 904c52952ef2bde0a869b35f018eef08dfe0bf96 Mon Sep 17 00:00:00 2001 From: Advik Date: Sun, 12 Apr 2026 09:59:17 +0530 Subject: [PATCH 3/3] added licence as MPL --- skills.md | 21 ++++----------------- 1 file changed, 4 insertions(+), 17 deletions(-) diff --git a/skills.md b/skills.md index 8454d0a1..750f9ed7 100644 --- a/skills.md +++ b/skills.md @@ -5,25 +5,12 @@ This document defines procedural rules and patterns for AI agents working with t ## Java Coding Standards ### File Headers -All Java files must include the standard Apache license header: +All Java files must include the standard MPL-2.0 license header: ```java /* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ package org.apache.fineract.selfservice.example; ```