A full-stack banking application built with Oracle JET and Spring Boot that provides a secure password reset/change functionality for banking customers. The system implements a multi-step wizard that allows users to verify their identity through CNIC and account details before updating their login credentials.
- Multi-step Password Reset Wizard - Guided 4-step process for secure password changes
- Real-time Validation - Instant feedback on CNIC, account numbers, and IBAN validation
- Account Type Support - Individual, Sole Proprietor, and Foreign National account types
- Dual Verification Methods - Support for both Account Number and IBAN verification
- Password Strength Evaluation - Real-time password strength assessment and feedback
- Secure Password Hashing - SHA-256 hashing using Web Crypto API
- Input validation and sanitization
- Database constraints and unique validations
- Secure API endpoints with proper error handling
- Password strength requirements and validation
- Framework: Oracle JavaScript Extension Toolkit (JET) v19.0.0
- MVVM Pattern: Knockout.js for data binding and reactive UI
- Module Loading: Require.js for dependency management
- Responsive Design: Mobile-first approach with Oracle JET components
- Framework: Spring Boot 3.5.6 with Java 17
- Data Access: Spring Data JPA with Hibernate
- Database: PostgreSQL with proper indexing and constraints
- API Design: RESTful APIs with comprehensive validation
- Customer Entity: CNIC as primary key with validation constraints
- Account Entity: Composite unique constraints (customer + account_type)
- Relationships: Proper JPA relationships with foreign key mappings
- Stored Procedures: Complex operations handled by PostgreSQL procedures
OracleJet_KnockOutJS_LearningProject/
βββ mvvmJS/                          # Frontend Application
β   βββ src/
β   β   βββ js/
β   β   β   βββ viewModels/          # Knockout ViewModels
β   β   β   β   βββ Account_Type.js      # Account type selection
β   β   β   β   βββ Account_Details.js   # Account verification
β   β   β   β   βββ login_details_2.js   # Password reset
β   β   β   β   βββ successful_registration.js # Success page
β   β   β   βββ views/               # HTML Templates
β   β   β   β   βββ Account_Type.html
β   β   β   β   βββ Account_Details.html
β   β   β   β   βββ successful_registration.html
β   β   β   βββ appController.js     # Main application controller
β   β   β   βββ main.js             # Application bootstrap
β   β   β   βββ root.js             # Router configuration
β   β   βββ css/                    # Stylesheets and images
β   β   βββ index.html              # Main HTML file
β   βββ package.json                # Frontend dependencies
β   βββ oraclejetconfig.json       # Oracle JET configuration
β
βββ springOne/                      # Backend Application
β   βββ src/main/java/com/example/springOne/
β   β   βββ controller/             # REST Controllers
β   β   β   βββ AccountController.java    # Account management
β   β   β   βββ CustomerController.java   # Customer management
β   β   βββ entity/                 # JPA Entities
β   β   β   βββ Account.java             # Account entity
β   β   β   βββ Customer.java            # Customer entity
β   β   βββ repository/             # Data repositories
β   β   β   βββ AccountRepository.java
β   β   β   βββ CustomerRepository.java
β   β   βββ service/                # Business logic services
β   β   βββ dto/                    # Data Transfer Objects
β   β   βββ config/                 # Configuration classes
β   βββ src/main/resources/
β   β   βββ application.properties  # Application configuration
β   β   βββ sp_create_account.sql   # Database procedures
β   βββ pom.xml                     # Maven dependencies
β
βββ notes/                         # Documentation and notes
    βββ SpringBoot/                # Spring Boot reference materials
- Oracle JET 19.0.0 - Enterprise JavaScript framework
- Knockout.js - MVVM data binding library
- Require.js - JavaScript module loader
- HTML5/CSS3 - Modern web standards
- Responsive Design - Mobile-first approach
- Spring Boot 3.5.6 - Java web framework
- Spring Data JPA - Data access abstraction
- Hibernate - ORM framework
- Jakarta Validation - Bean validation
- Maven - Dependency management
- PostgreSQL - Relational database
- Git - Version control
- Node.js - JavaScript runtime
- Java 17 or higher
- Node.js 16 or higher
- PostgreSQL database
- Maven for backend build
- Git for version control
- 
Clone the repository git clone <repository-url> cd OracleJet_KnockOutJS_LearningProject 
- 
Configure Database - Create a PostgreSQL database
- Update springOne/src/main/resources/application.properties:
 spring.datasource.url=jdbc:postgresql://localhost:3306/your_database spring.datasource.username=your_username spring.datasource.password=your_password spring.jpa.hibernate.ddl-auto=update 
- 
Build and Run Backend cd springOne ./mvnw spring-boot:run- Backend will be available at http://localhost:8080
 
- Backend will be available at 
- 
Install Dependencies cd mvvmJS npm install
- 
Build and Serve ojet build ojet serve - Frontend will be available at http://localhost:8000
 
- Frontend will be available at 
| Method | Endpoint | Description | 
|---|---|---|
| GET | / | Get all customers | 
| POST | / | Create new customer | 
| DELETE | /{customerId} | Delete customer | 
| PUT | /{customerId}/password | Update customer password | 
| GET | /validate/{cnic} | Validate CNIC number | 
| Method | Endpoint | Description | 
|---|---|---|
| GET | / | Get all accounts | 
| GET | /customer/{customerId} | Get accounts by customer | 
| POST | / | Create new account | 
| DELETE | /{accountNumber} | Delete account by account number | 
| PUT | / | Update account | 
| GET | /validate/{accountNumber}/{cnic} | Validate account number with CNIC | 
| GET | /validate/iban/{iban}/{cnic} | Validate IBAN with CNIC | 
| GET | /summary/{cnic} | Get account summary by CNIC | 
| GET | /username/by-account/{cnic}/{accountNumber} | Get username by CNIC and account number | 
| GET | /username/by-iban/{iban}/{cnic} | Get username by IBAN and CNIC | 
GET /api/v1/customers/validate/1234567890123Response:
{
  "statusCode": "SUCCESS",
  "message": "CNIC verified successfully",
  "isValid": true
}PUT /api/v1/customers/1234567890123/password
Content-Type: application/json
{
  "password": "hashed_password_here"
}- 
Account Type Selection - Choose from Individual, Sole Proprietor, or Foreign National
- Enter CNIC number (for Individual accounts)
- Real-time validation with database verification
 
- 
Account Details Verification - Enter Account Number (14 digits) or IBAN
- Tab-based interface for easy switching
- Real-time validation against database
 
- 
Verification Step - CNIC and account linking validation
- Cross-verification of provided details
 
- 
Password Update - Password strength evaluation
- Real-time matching validation
- Secure hashing before database storage
 
- 
Success Confirmation - Display updated account information
- Confirmation of successful password change
 
- Minimum 8 characters
- At least "Fair" strength rating
- Combination of uppercase, lowercase, numbers, and special characters recommended
Frontend Structure:
- viewModels/- Business logic and data management
- views/- HTML templates and UI components
- appController.js- Main application coordination
- Modular design for easy maintenance
Backend Structure:
- controller/- REST API endpoints
- entity/- JPA entities and database models
- repository/- Data access layer
- service/- Business logic layer
- dto/- Data transfer objects
- Account_Type.js - Account type selection and CNIC validation
- Account_Details.js - Account number/IBAN verification
- login_details_2.js - Password reset with strength validation
- successful_registration.js - Success page management
- CustomerController - Customer management and validation
- AccountController - Account operations and verification
CREATE TABLE customer (
    id BIGINT PRIMARY KEY,           -- CNIC as primary key
    name VARCHAR(255) NOT NULL,
    username VARCHAR(255) UNIQUE NOT NULL,
    password VARCHAR(255) NOT NULL,
    phone_number VARCHAR(13) NOT NULL
);CREATE TABLE accounts (
    account_number BIGINT PRIMARY KEY,
    user_id BIGINT NOT NULL,         -- Foreign key to customer.id
    account_type INTEGER NOT NULL,
    iban VARCHAR(34) UNIQUE NOT NULL,
    digitally_active BOOLEAN NOT NULL,
    FOREIGN KEY (user_id) REFERENCES customer(id)
);- Fork the repository
- Create a feature branch (git checkout -b feature/amazing-feature)
- Commit your changes (git commit -m 'Add amazing feature')
- Push to the branch (git push origin feature/amazing-feature)
- Open a Pull Request
- Follow existing code style and patterns
- Add proper validation for new features
- Update documentation for API changes
- Test thoroughly before submitting PR
- This application demonstrates integration between Oracle JET frontend and Spring Boot backend
- Implements modern web development practices with reactive UI patterns
- Suitable for banking and financial services requiring secure customer verification
- Can be extended for additional account management features
View the project presentation here: Canva Presentation
The StoredProcedure_View_MaterializedView_SummaryCode.txt file contains comprehensive database scripts and examples including:
- Stored procedures for customer and account creation
- Materialized view creation for customer-account relationships
- Sample data insertion scripts for testing
- Database management commands and utilities
- API endpoint examples for account summaries
This project is licensed under the Oracle Universal Permissive License (UPL) - see the LICENSE file for details.
For support and questions:
- Create an issue in the repository
- Contact the development team
- Check the documentation in the notes/directory
Built with β€οΈ using Oracle JET and Spring Boot