Skip to content

Hmm-1224/fraud-detection-in-atm-withdrawal

Repository files navigation

Banking App with Face and OTP Authentication

Overview: This is a secure banking application built using Flask and integrated with Twilio for OTP verification and DeepFace for facial recognition. The app supports features like customer management, phone number updates, OTP-based withdrawals, and secure face-based verification for withdrawals.

Features Customer Management: Add new customers with name, phone number, face data, and account details. Retrieve customer information based on phone number or name.

OTP Verification: OTP-based verification for withdrawal requests and phone number updates using Twilio. Facial Recognition:

Secure withdrawals via face recognition using DeepFace. Verifies the face of the customer to complete transactions. Database Integration:

SQLAlchemy for database management. Stores customer details, transaction history, and face data in an SQLite database. Technologies Used

Flask: Web framework for Python. SQLAlchemy: ORM for database management. Twilio: SMS-based OTP verification. DeepFace: Facial recognition for secure authentication. OpenCV: Image processing. Numpy: For handling image data. SQLite: For storing customer and transaction data. Prerequisites Python 3.6+ SQLite (pre-installed with Python) Virtual environment (recommended)

INSTALLATION: Clone the repository git clone https://github.com/Hmm-1224/fraud-detection-in-atm-withdrawal.git cd fraud-detection-in-atm-withdrawal Set up a virtual environment:

bash Copy code python3 -m venv venv source venv/bin/activate # For Linux/Mac

OR

venv\Scripts\activate # For Windows Install required packages:

bash Copy code pip install -r requirements.txt Set up environment variables:

Create a .env file in the project root with the following contents: makefile Copy code TWILIO_ACCOUNT_SID= TWILIO_AUTH_TOKEN= TWILIO_PHONE_NUMBER= Set up the database:

Initialize the SQLite database: bash Copy code flask db init flask db migrate flask db upgrade Run the application:

bash Copy code flask run Access the app: Open your browser and navigate to http://127.0.0.1:5000.

API Endpoints Customer Management: GET /get_customer_id_by_name: Get customer ID by their name. GET /get_phone_number_by_name: Get customer's phone number by their name. GET /get_customer_details_by_phone: Get customer details using their phone number.

Adding Customers: POST /add_customer: Add a new customer with their name, phone number, and face data.

Updating Phone Number: POST /request_update_otp: Request an OTP to update the phone number. POST /update_mobile: Update the customer's phone number after OTP verification.

Withdrawals: GET /request_otp_withdraw/<customer_id>: Request an OTP for withdrawal. POST /verify_otp_withdraw: Verify the OTP for withdrawal. POST /verify_face: Verify face data to authorize withdrawal. POST /withdraw: Complete the withdrawal process after successful verification.

IMPORTANT NOTES: Security: Ensure you change the app.secret_key in production for security purposes. Twilio Integration: Twilio credentials are required for OTP functionality. Face Recognition: Customer face data is stored and used for withdrawal verification.

LIMITATIONS: This app uses SQLite for simplicity but should be migrated to a more scalable database in production. OTP and face verification are dependent on third-party services (Twilio and DeepFace) and may require internet connectivity.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages