├── genAI ├── __init__.py ├── constant.py ├── repo │ ├── loan.py │ ├── __pycache__ │ │ ├── user.cpython-311.pyc │ │ └── promotions.cpython-311.pyc │ ├── promotions.py │ └── user.py ├── utils │ ├── __init__.py │ ├── __pycache__ │ │ ├── __init__.cpython-311.pyc │ │ └── fetchJsonData.cpython-311.pyc │ └── fetchJsonData.py ├── startup.sh ├── .DS_Store ├── __pycache__ │ ├── main.cpython-311.pyc │ ├── mongoClient.cpython-311.pyc │ ├── financialAdvisor.cpython-311.pyc │ ├── loanRecommenderAgent.cpython-311.pyc │ └── policyRecommenderAgent.cpython-311.pyc ├── tools │ ├── __pycache__ │ │ ├── loan.cpython-311.pyc │ │ ├── policy.cpython-311.pyc │ │ ├── user.cpython-311.pyc │ │ └── promotions.cpython-311.pyc │ ├── policy.py │ ├── promotions.py │ ├── user.py │ └── loan.py ├── services │ ├── __pycache__ │ │ ├── reportGenerator.cpython-311.pyc │ │ ├── smartPromotions.cpython-311.pyc │ │ ├── financialAdvisor.cpython-311.pyc │ │ ├── loanRecommenderAgent.cpython-311.pyc │ │ └── policyRecommenderAgent.cpython-311.pyc │ ├── tempCodeRunnerFile.py │ ├── reportGenerator.py │ └── financialAdvisor.py ├── .env ├── extras │ └── poc.py └── mongoClient.py ├── android ├── app │ ├── .gitignore │ ├── src │ │ ├── main │ │ │ ├── res │ │ │ │ ├── drawable │ │ │ │ │ ├── sms.png │ │ │ │ │ ├── donut.png │ │ │ │ │ ├── exit.png │ │ │ │ │ ├── icon.png │ │ │ │ │ ├── money.png │ │ │ │ │ ├── msb0.png │ │ │ │ │ ├── msb1.png │ │ │ │ │ ├── msb2.png │ │ │ │ │ ├── msb3.png │ │ │ │ │ ├── msb4.png │ │ │ │ │ ├── msb5.png │ │ │ │ │ ├── msb6.png │ │ │ │ │ ├── video.png │ │ │ │ │ ├── zicon.png │ │ │ │ │ ├── camera.png │ │ │ │ │ ├── contact.png │ │ │ │ │ ├── icon_new.png │ │ │ │ │ ├── kycfiles.png │ │ │ │ │ ├── location.png │ │ │ │ │ ├── moneybag.png │ │ │ │ │ ├── mountain.png │ │ │ │ │ ├── tnc_doc.png │ │ │ │ │ ├── trophy.png │ │ │ │ │ ├── email_file.png │ │ │ │ │ ├── glass_card.png │ │ │ │ │ ├── neosaturn.png │ │ │ │ │ ├── splash_bg.png │ │ │ │ │ ├── yellowdoc.png │ │ │ │ │ ├── app_installed.png │ │ │ │ │ ├── checked_image.png │ │ │ │ │ ├── creadit_score.png │ │ │ │ │ ├── data_privacy.png │ │ │ │ │ ├── data_security.png │ │ │ │ │ ├── data_storage.png │ │ │ │ │ ├── fingure_tap.png │ │ │ │ │ ├── kyc_verified.png │ │ │ │ │ ├── kyvverified.png │ │ │ │ │ ├── manwithphone.png │ │ │ │ │ ├── register_ask.webp │ │ │ │ │ ├── regorapptour.jpg │ │ │ │ │ ├── customersuccess.png │ │ │ │ │ ├── lending_policy.png │ │ │ │ │ ├── abstract_rotated.png │ │ │ │ │ ├── allow_permission.png │ │ │ │ │ ├── eligibility_card.png │ │ │ │ │ ├── eligibilityasset.png │ │ │ │ │ ├── register_saying_hellow.png │ │ │ │ │ ├── transparent.xml │ │ │ │ │ ├── custom_radio_button_unchecked.xml │ │ │ │ │ ├── icon_trend_down.xml │ │ │ │ │ ├── btn_primary.xml │ │ │ │ │ ├── btn_secondary.xml │ │ │ │ │ ├── rev_black.xml │ │ │ │ │ ├── bg_violet_corner_10.xml │ │ │ │ │ ├── rev_one.xml │ │ │ │ │ ├── bg_light_violet_corner_10.xml │ │ │ │ │ ├── custom_radio_button_checked.xml │ │ │ │ │ ├── back_round.xml │ │ │ │ │ ├── custom_circle.xml │ │ │ │ │ ├── custom_check.xml │ │ │ │ │ ├── edit_green.xml │ │ │ │ │ ├── edit_red.xml │ │ │ │ │ ├── input_square.xml │ │ │ │ │ ├── input_primary.xml │ │ │ │ │ ├── primary_gradient.xml │ │ │ │ │ ├── edit_circle.xml │ │ │ │ │ ├── edit_text_square_rounded.xml │ │ │ │ │ ├── ic_four.xml │ │ │ │ │ ├── ic_one.xml │ │ │ │ │ ├── secondary_gradient.xml │ │ │ │ │ ├── custom_radio_button_selector.xml │ │ │ │ │ ├── ic_arrow_right_24.xml │ │ │ │ │ ├── otp.xml │ │ │ │ │ ├── ic_spinner.xml │ │ │ │ │ ├── bg_blue_gradient_circle.xml │ │ │ │ │ ├── ic_arr.xml │ │ │ │ │ ├── edittext_bg.xml │ │ │ │ │ ├── editext_bg_green.xml │ │ │ │ │ ├── edittext_bg_green.xml │ │ │ │ │ ├── edittext_bg_red.xml │ │ │ │ │ ├── edittext_bg_white.xml │ │ │ │ │ ├── switch_icon.xml │ │ │ │ │ ├── ic_arrowbottom.xml │ │ │ │ │ ├── arrow_trend_down.xml │ │ │ │ │ ├── ic_glass.xml │ │ │ │ │ ├── ic_edit.xml │ │ │ │ │ ├── ic_dataprivacy.xml │ │ │ │ │ ├── ic_background.xml │ │ │ │ │ ├── edit_text_square_rounded_new.xml │ │ │ │ │ ├── ic_lendingpolicy.xml │ │ │ │ │ ├── menu.xml │ │ │ │ │ ├── ic_arrow_right.xml │ │ │ │ │ ├── ic_otwo.xml │ │ │ │ │ ├── ic_othree.xml │ │ │ │ │ ├── ic_tell_your_friend.xml │ │ │ │ │ ├── ic_oone.xml │ │ │ │ │ ├── ic_payment.xml │ │ │ │ │ ├── ic_pendingtick.xml │ │ │ │ │ ├── ic_successtick.xml │ │ │ │ │ ├── ic_home.xml │ │ │ │ │ ├── ic_allowtick.xml │ │ │ │ │ ├── ic_card_primary.xml │ │ │ │ │ ├── ic_shutter.xml │ │ │ │ │ ├── baseline_celebration_24.xml │ │ │ │ │ ├── ic_history.xml │ │ │ │ │ ├── icon_arrow_trend_up_svgrepo_com.xml │ │ │ │ │ ├── ic_arrow_in.xml │ │ │ │ │ ├── ic_arrow_out.xml │ │ │ │ │ ├── ic_star.xml │ │ │ │ │ ├── ic_dashboard.xml │ │ │ │ │ ├── ic_back.xml │ │ │ │ │ ├── ic_pin_backspace.xml │ │ │ │ │ ├── transaction_icon.xml │ │ │ │ │ ├── no_data.xml │ │ │ │ │ ├── ic_shutter_focused.xml │ │ │ │ │ ├── ic_shutter_normal.xml │ │ │ │ │ ├── ic_shutter_pressed.xml │ │ │ │ │ ├── ic_shutter_selected.xml │ │ │ │ │ ├── progressbarcustom.xml │ │ │ │ │ ├── ic_bankgrade.xml │ │ │ │ │ ├── ic_loan.xml │ │ │ │ │ ├── ic_launcher_foreground.xml │ │ │ │ │ ├── miscellaneous_icon.xml │ │ │ │ │ ├── ic_settings.xml │ │ │ │ │ └── profile_svgrepo_com.xml │ │ │ │ ├── mipmap-hdpi │ │ │ │ │ ├── ic_launcher.webp │ │ │ │ │ └── ic_launcher_round.webp │ │ │ │ ├── mipmap-mdpi │ │ │ │ │ ├── ic_launcher.webp │ │ │ │ │ └── ic_launcher_round.webp │ │ │ │ ├── mipmap-xhdpi │ │ │ │ │ ├── ic_launcher.webp │ │ │ │ │ └── ic_launcher_round.webp │ │ │ │ ├── mipmap-xxhdpi │ │ │ │ │ ├── ic_launcher.webp │ │ │ │ │ └── ic_launcher_round.webp │ │ │ │ ├── mipmap-xxxhdpi │ │ │ │ │ ├── ic_launcher.webp │ │ │ │ │ └── ic_launcher_round.webp │ │ │ │ ├── values │ │ │ │ │ ├── themes.xml │ │ │ │ │ ├── strings.xml │ │ │ │ │ └── colors.xml │ │ │ │ ├── mipmap-anydpi-v26 │ │ │ │ │ ├── ic_launcher.xml │ │ │ │ │ └── ic_launcher_round.xml │ │ │ │ ├── xml │ │ │ │ │ ├── backup_rules.xml │ │ │ │ │ └── data_extraction_rules.xml │ │ │ │ └── layout │ │ │ │ │ ├── activity_camera.xml │ │ │ │ │ └── activity_splash.xml │ │ │ └── java │ │ │ │ └── com │ │ │ │ └── uphar │ │ │ │ ├── bussinesss │ │ │ │ └── domain │ │ │ │ │ ├── dataStore │ │ │ │ │ ├── wallet │ │ │ │ │ │ ├── WalletDatasource.kt │ │ │ │ │ │ └── WalletDatasourceImpl.kt │ │ │ │ │ ├── authetication │ │ │ │ │ │ ├── LoginDatasource.kt │ │ │ │ │ │ └── LoginDatasourceImpl.kt │ │ │ │ │ └── basePreference │ │ │ │ │ │ └── BasePreferencesManager.kt │ │ │ │ │ ├── data │ │ │ │ │ ├── profile │ │ │ │ │ │ ├── Transaction.kt │ │ │ │ │ │ ├── ProfileDetailByAccountData.kt │ │ │ │ │ │ └── ProfileResponseData.kt │ │ │ │ │ └── login │ │ │ │ │ │ ├── loginCredentials.kt │ │ │ │ │ │ └── RegisterCredentials.kt │ │ │ │ │ └── Utils │ │ │ │ │ ├── networkException │ │ │ │ │ ├── AccessDeniedException.java │ │ │ │ │ ├── NoConnectivityException.java │ │ │ │ │ ├── NetworkUtil.java │ │ │ │ │ ├── ConnectivityInterceptor.java │ │ │ │ │ └── ErrorInterceptorCommon.kt │ │ │ │ │ ├── state │ │ │ │ │ ├── DataState.kt │ │ │ │ │ ├── APIError.kt │ │ │ │ │ └── ErrorUtils.kt │ │ │ │ │ └── BasePreferences.kt │ │ │ │ ├── smartbaroda │ │ │ │ ├── ui │ │ │ │ │ ├── theme │ │ │ │ │ │ ├── Color.kt │ │ │ │ │ │ ├── Type.kt │ │ │ │ │ │ └── Theme.kt │ │ │ │ │ ├── ui │ │ │ │ │ │ └── theme │ │ │ │ │ │ │ ├── Color.kt │ │ │ │ │ │ │ ├── Type.kt │ │ │ │ │ │ │ └── Theme.kt │ │ │ │ │ └── LoginActivity.kt │ │ │ │ ├── NavRoutes.kt │ │ │ │ ├── ScreenConstants.kt │ │ │ │ ├── splashScreen │ │ │ │ │ └── SplashActivity.kt │ │ │ │ └── showNotification.kt │ │ │ │ ├── datasource │ │ │ │ └── networkmodel │ │ │ │ │ ├── LoginRequest.kt │ │ │ │ │ ├── LoginResponse.kt │ │ │ │ │ ├── FinanceChatBotNetworkResponse.kt │ │ │ │ │ ├── TransactionNetwork.kt │ │ │ │ │ ├── RegisterRequest.kt │ │ │ │ │ ├── FinancialReportResponse.kt │ │ │ │ │ ├── TransactionResponse.kt │ │ │ │ │ ├── loanrecommendationNetworkRespone.kt │ │ │ │ │ ├── PolicyRecommendationNetworkResponse.kt │ │ │ │ │ ├── LoanOfferResponse.kt │ │ │ │ │ ├── AllPolicyResponse.kt │ │ │ │ │ └── ProfileDetailByAccountResponse.kt │ │ │ │ └── di │ │ │ │ ├── MyApplication.kt │ │ │ │ ├── RepositoryModule.kt │ │ │ │ └── AppModule.kt │ │ ├── test │ │ │ └── java │ │ │ │ └── com │ │ │ │ └── uphar │ │ │ │ └── smartbaroda │ │ │ │ └── ExampleUnitTest.kt │ │ └── androidTest │ │ │ └── java │ │ │ └── com │ │ │ └── uphar │ │ │ └── smartbaroda │ │ │ └── ExampleInstrumentedTest.kt │ ├── proguard-rules.pro │ └── google-services.json ├── .idea │ ├── .name │ ├── .gitignore │ ├── compiler.xml │ ├── kotlinc.xml │ ├── vcs.xml │ ├── migrations.xml │ ├── deploymentTargetSelector.xml │ ├── misc.xml │ └── gradle.xml ├── gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties ├── .gitignore ├── build.gradle.kts ├── settings.gradle.kts └── gradle.properties ├── server ├── README.md ├── app.json ├── routes │ ├── gst.js │ ├── user.js │ ├── loanIssued.js │ ├── policySubscribed.js │ ├── loanDetails.js │ ├── policyDetails.js │ ├── transactions.js │ └── auth.js ├── models │ ├── GST.js │ ├── PolicySubscribed.js │ ├── LoanDetail.js │ ├── Transaction.js │ ├── LoanIssued.js │ ├── PolicyDetail.js │ └── User.js ├── utils │ └── db.js ├── middleware │ └── auth.js ├── package.json ├── controllers │ ├── gstController.js │ ├── loanIssuedController.js │ ├── policySubscribedController.js │ ├── loanDetailController.js │ └── authController.js └── server.js ├── .DS_Store ├── backend.png ├── Generative_AI.png ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── .gitignore ├── Screenshot from 2024-07-04 02-30-25.png ├── .idea ├── vcs.xml ├── compiler.xml ├── kotlinc.xml ├── migrations.xml ├── deploymentTargetSelector.xml ├── misc.xml ├── appInsightsSettings.xml └── gradle.xml ├── gradle.properties ├── list ├── build.gradle.kts └── src │ ├── test │ └── kotlin │ │ └── srtbaroda │ │ └── list │ │ └── LinkedListTest.kt │ └── main │ └── kotlin │ └── srtbaroda │ └── list │ └── LinkedList.kt ├── .gitattributes ├── app ├── src │ ├── main │ │ └── kotlin │ │ │ └── srtbaroda │ │ │ └── app │ │ │ ├── MessageUtils.kt │ │ │ └── App.kt │ └── test │ │ └── kotlin │ │ └── srtbaroda │ │ └── app │ │ └── MessageUtilsTest.kt └── build.gradle.kts ├── utilities ├── build.gradle.kts └── src │ └── main │ └── kotlin │ └── srtbaroda │ └── utilities │ ├── StringUtils.kt │ ├── JoinUtils.kt │ └── SplitUtils.kt ├── local.properties ├── .github └── workflows │ ├── cicd-nodejs.yml │ └── cicd.yml └── settings.gradle.kts /genAI/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /genAI/constant.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /genAI/repo/loan.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /genAI/utils/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /android/app/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /server/README.md: -------------------------------------------------------------------------------- 1 | # SmartBOB -------------------------------------------------------------------------------- /android/.idea/.name: -------------------------------------------------------------------------------- 1 | Smart Baroda -------------------------------------------------------------------------------- /server/app.json: -------------------------------------------------------------------------------- 1 | { 2 | "expo": {} 3 | } -------------------------------------------------------------------------------- /genAI/startup.sh: -------------------------------------------------------------------------------- 1 | gunicorn -w 4 -k uvicorn.workers.UvicornWorker main:app -------------------------------------------------------------------------------- /.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kamalyash2002/SmartBaroda/HEAD/.DS_Store -------------------------------------------------------------------------------- /android/.idea/.gitignore: -------------------------------------------------------------------------------- 1 | # Default ignored files 2 | /shelf/ 3 | /workspace.xml 4 | -------------------------------------------------------------------------------- /backend.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kamalyash2002/SmartBaroda/HEAD/backend.png -------------------------------------------------------------------------------- /genAI/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kamalyash2002/SmartBaroda/HEAD/genAI/.DS_Store -------------------------------------------------------------------------------- /Generative_AI.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kamalyash2002/SmartBaroda/HEAD/Generative_AI.png -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kamalyash2002/SmartBaroda/HEAD/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /genAI/__pycache__/main.cpython-311.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kamalyash2002/SmartBaroda/HEAD/genAI/__pycache__/main.cpython-311.pyc -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | venv 2 | # Ignore Gradle project-specific cache directory 3 | .gradle 4 | 5 | # Ignore Gradle build output directory 6 | build 7 | -------------------------------------------------------------------------------- /Screenshot from 2024-07-04 02-30-25.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kamalyash2002/SmartBaroda/HEAD/Screenshot from 2024-07-04 02-30-25.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/sms.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kamalyash2002/SmartBaroda/HEAD/android/app/src/main/res/drawable/sms.png -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kamalyash2002/SmartBaroda/HEAD/android/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/donut.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kamalyash2002/SmartBaroda/HEAD/android/app/src/main/res/drawable/donut.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/exit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kamalyash2002/SmartBaroda/HEAD/android/app/src/main/res/drawable/exit.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kamalyash2002/SmartBaroda/HEAD/android/app/src/main/res/drawable/icon.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/money.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kamalyash2002/SmartBaroda/HEAD/android/app/src/main/res/drawable/money.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/msb0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kamalyash2002/SmartBaroda/HEAD/android/app/src/main/res/drawable/msb0.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/msb1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kamalyash2002/SmartBaroda/HEAD/android/app/src/main/res/drawable/msb1.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/msb2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kamalyash2002/SmartBaroda/HEAD/android/app/src/main/res/drawable/msb2.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/msb3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kamalyash2002/SmartBaroda/HEAD/android/app/src/main/res/drawable/msb3.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/msb4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kamalyash2002/SmartBaroda/HEAD/android/app/src/main/res/drawable/msb4.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/msb5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kamalyash2002/SmartBaroda/HEAD/android/app/src/main/res/drawable/msb5.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/msb6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kamalyash2002/SmartBaroda/HEAD/android/app/src/main/res/drawable/msb6.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/video.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kamalyash2002/SmartBaroda/HEAD/android/app/src/main/res/drawable/video.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/zicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kamalyash2002/SmartBaroda/HEAD/android/app/src/main/res/drawable/zicon.png -------------------------------------------------------------------------------- /genAI/repo/__pycache__/user.cpython-311.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kamalyash2002/SmartBaroda/HEAD/genAI/repo/__pycache__/user.cpython-311.pyc -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/camera.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kamalyash2002/SmartBaroda/HEAD/android/app/src/main/res/drawable/camera.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/contact.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kamalyash2002/SmartBaroda/HEAD/android/app/src/main/res/drawable/contact.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/icon_new.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kamalyash2002/SmartBaroda/HEAD/android/app/src/main/res/drawable/icon_new.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/kycfiles.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kamalyash2002/SmartBaroda/HEAD/android/app/src/main/res/drawable/kycfiles.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/location.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kamalyash2002/SmartBaroda/HEAD/android/app/src/main/res/drawable/location.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/moneybag.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kamalyash2002/SmartBaroda/HEAD/android/app/src/main/res/drawable/moneybag.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/mountain.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kamalyash2002/SmartBaroda/HEAD/android/app/src/main/res/drawable/mountain.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/tnc_doc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kamalyash2002/SmartBaroda/HEAD/android/app/src/main/res/drawable/tnc_doc.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/trophy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kamalyash2002/SmartBaroda/HEAD/android/app/src/main/res/drawable/trophy.png -------------------------------------------------------------------------------- /genAI/__pycache__/mongoClient.cpython-311.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kamalyash2002/SmartBaroda/HEAD/genAI/__pycache__/mongoClient.cpython-311.pyc -------------------------------------------------------------------------------- /genAI/tools/__pycache__/loan.cpython-311.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kamalyash2002/SmartBaroda/HEAD/genAI/tools/__pycache__/loan.cpython-311.pyc -------------------------------------------------------------------------------- /genAI/tools/__pycache__/policy.cpython-311.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kamalyash2002/SmartBaroda/HEAD/genAI/tools/__pycache__/policy.cpython-311.pyc -------------------------------------------------------------------------------- /genAI/tools/__pycache__/user.cpython-311.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kamalyash2002/SmartBaroda/HEAD/genAI/tools/__pycache__/user.cpython-311.pyc -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/email_file.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kamalyash2002/SmartBaroda/HEAD/android/app/src/main/res/drawable/email_file.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/glass_card.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kamalyash2002/SmartBaroda/HEAD/android/app/src/main/res/drawable/glass_card.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/neosaturn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kamalyash2002/SmartBaroda/HEAD/android/app/src/main/res/drawable/neosaturn.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/splash_bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kamalyash2002/SmartBaroda/HEAD/android/app/src/main/res/drawable/splash_bg.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/yellowdoc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kamalyash2002/SmartBaroda/HEAD/android/app/src/main/res/drawable/yellowdoc.png -------------------------------------------------------------------------------- /genAI/utils/__pycache__/__init__.cpython-311.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kamalyash2002/SmartBaroda/HEAD/genAI/utils/__pycache__/__init__.cpython-311.pyc -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/app_installed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kamalyash2002/SmartBaroda/HEAD/android/app/src/main/res/drawable/app_installed.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/checked_image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kamalyash2002/SmartBaroda/HEAD/android/app/src/main/res/drawable/checked_image.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/creadit_score.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kamalyash2002/SmartBaroda/HEAD/android/app/src/main/res/drawable/creadit_score.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/data_privacy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kamalyash2002/SmartBaroda/HEAD/android/app/src/main/res/drawable/data_privacy.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/data_security.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kamalyash2002/SmartBaroda/HEAD/android/app/src/main/res/drawable/data_security.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/data_storage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kamalyash2002/SmartBaroda/HEAD/android/app/src/main/res/drawable/data_storage.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/fingure_tap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kamalyash2002/SmartBaroda/HEAD/android/app/src/main/res/drawable/fingure_tap.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/kyc_verified.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kamalyash2002/SmartBaroda/HEAD/android/app/src/main/res/drawable/kyc_verified.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/kyvverified.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kamalyash2002/SmartBaroda/HEAD/android/app/src/main/res/drawable/kyvverified.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/manwithphone.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kamalyash2002/SmartBaroda/HEAD/android/app/src/main/res/drawable/manwithphone.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/register_ask.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kamalyash2002/SmartBaroda/HEAD/android/app/src/main/res/drawable/register_ask.webp -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/regorapptour.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kamalyash2002/SmartBaroda/HEAD/android/app/src/main/res/drawable/regorapptour.jpg -------------------------------------------------------------------------------- /genAI/__pycache__/financialAdvisor.cpython-311.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kamalyash2002/SmartBaroda/HEAD/genAI/__pycache__/financialAdvisor.cpython-311.pyc -------------------------------------------------------------------------------- /genAI/repo/__pycache__/promotions.cpython-311.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kamalyash2002/SmartBaroda/HEAD/genAI/repo/__pycache__/promotions.cpython-311.pyc -------------------------------------------------------------------------------- /genAI/tools/__pycache__/promotions.cpython-311.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kamalyash2002/SmartBaroda/HEAD/genAI/tools/__pycache__/promotions.cpython-311.pyc -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/customersuccess.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kamalyash2002/SmartBaroda/HEAD/android/app/src/main/res/drawable/customersuccess.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/lending_policy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kamalyash2002/SmartBaroda/HEAD/android/app/src/main/res/drawable/lending_policy.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kamalyash2002/SmartBaroda/HEAD/android/app/src/main/res/mipmap-hdpi/ic_launcher.webp -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kamalyash2002/SmartBaroda/HEAD/android/app/src/main/res/mipmap-mdpi/ic_launcher.webp -------------------------------------------------------------------------------- /genAI/utils/__pycache__/fetchJsonData.cpython-311.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kamalyash2002/SmartBaroda/HEAD/genAI/utils/__pycache__/fetchJsonData.cpython-311.pyc -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/abstract_rotated.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kamalyash2002/SmartBaroda/HEAD/android/app/src/main/res/drawable/abstract_rotated.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/allow_permission.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kamalyash2002/SmartBaroda/HEAD/android/app/src/main/res/drawable/allow_permission.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/eligibility_card.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kamalyash2002/SmartBaroda/HEAD/android/app/src/main/res/drawable/eligibility_card.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/eligibilityasset.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kamalyash2002/SmartBaroda/HEAD/android/app/src/main/res/drawable/eligibilityasset.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kamalyash2002/SmartBaroda/HEAD/android/app/src/main/res/mipmap-xhdpi/ic_launcher.webp -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kamalyash2002/SmartBaroda/HEAD/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kamalyash2002/SmartBaroda/HEAD/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp -------------------------------------------------------------------------------- /genAI/__pycache__/loanRecommenderAgent.cpython-311.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kamalyash2002/SmartBaroda/HEAD/genAI/__pycache__/loanRecommenderAgent.cpython-311.pyc -------------------------------------------------------------------------------- /genAI/__pycache__/policyRecommenderAgent.cpython-311.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kamalyash2002/SmartBaroda/HEAD/genAI/__pycache__/policyRecommenderAgent.cpython-311.pyc -------------------------------------------------------------------------------- /genAI/services/__pycache__/reportGenerator.cpython-311.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kamalyash2002/SmartBaroda/HEAD/genAI/services/__pycache__/reportGenerator.cpython-311.pyc -------------------------------------------------------------------------------- /genAI/services/__pycache__/smartPromotions.cpython-311.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kamalyash2002/SmartBaroda/HEAD/genAI/services/__pycache__/smartPromotions.cpython-311.pyc -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/register_saying_hellow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kamalyash2002/SmartBaroda/HEAD/android/app/src/main/res/drawable/register_saying_hellow.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kamalyash2002/SmartBaroda/HEAD/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kamalyash2002/SmartBaroda/HEAD/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kamalyash2002/SmartBaroda/HEAD/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kamalyash2002/SmartBaroda/HEAD/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /genAI/services/__pycache__/financialAdvisor.cpython-311.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kamalyash2002/SmartBaroda/HEAD/genAI/services/__pycache__/financialAdvisor.cpython-311.pyc -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kamalyash2002/SmartBaroda/HEAD/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /genAI/services/__pycache__/loanRecommenderAgent.cpython-311.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kamalyash2002/SmartBaroda/HEAD/genAI/services/__pycache__/loanRecommenderAgent.cpython-311.pyc -------------------------------------------------------------------------------- /genAI/services/__pycache__/policyRecommenderAgent.cpython-311.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kamalyash2002/SmartBaroda/HEAD/genAI/services/__pycache__/policyRecommenderAgent.cpython-311.pyc -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /.idea/compiler.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /.idea/kotlinc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | -------------------------------------------------------------------------------- /android/app/src/main/java/com/uphar/bussinesss/domain/dataStore/wallet/WalletDatasource.kt: -------------------------------------------------------------------------------- 1 | package com.uphar.bussinesss.domain.dataStore.wallet 2 | 3 | 4 | 5 | interface WalletDatasource { 6 | 7 | 8 | 9 | } -------------------------------------------------------------------------------- /android/app/src/main/res/values/themes.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 42 | 43 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/ic_launcher_foreground.xml: -------------------------------------------------------------------------------- 1 | 7 | 8 | 9 | 15 | 18 | 21 | 22 | 23 | 24 | 30 | -------------------------------------------------------------------------------- /genAI/services/reportGenerator.py: -------------------------------------------------------------------------------- 1 | import json 2 | from langchain.agents import tool, initialize_agent 3 | from langchain_openai import AzureChatOpenAI 4 | from dotenv import load_dotenv 5 | import sys 6 | import os 7 | import warnings 8 | 9 | load_dotenv() 10 | warnings.filterwarnings("ignore") 11 | sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) 12 | 13 | #tools 14 | from tools.loan import dateTool, loanTool 15 | from tools.user import userTransactionCategoryTool 16 | from mongoClient import fetchDataMongo 17 | 18 | #repos 19 | from repo.user import userTransactionCategory 20 | 21 | def reportGenerator(userId: str): 22 | userData = fetchDataMongo("users", {"accNo": int(userId)})[0] 23 | print(f"User Data: {userData}") 24 | 25 | username = userData.get('username', 'Unknown') 26 | cibil_score = userData.get('cibilScore', 'Unknown') 27 | 28 | llm = AzureChatOpenAI( 29 | openai_api_version="2024-04-01-preview", 30 | azure_deployment="llm_model", 31 | model_name="gpt3.5-turbo", 32 | ) 33 | 34 | userTransactions = userTransactionCategory(int(userId)) 35 | print(f"User Transactions: {userTransactions}") 36 | print(type(userTransactions)) 37 | 38 | prompt = ( 39 | f""" 40 | Analyse the user transaction by the transaction category. 41 | Suggest the user {username} the best practices to save money for the future in points. 42 | Consider different factors like health, wealth, child education and lifestyle etc. 43 | 44 | These are {username} user's total amount spent in each category: 45 | {userTransactions} 46 | """ 47 | ) 48 | 49 | savingSuggestions = llm.invoke(prompt) 50 | return { 51 | "expenditure" : userTransactions, 52 | "savingsSuggestions" : savingSuggestions.content 53 | } 54 | 55 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/miscellaneous_icon.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /genAI/mongoClient.py: -------------------------------------------------------------------------------- 1 | from pymongo import MongoClient 2 | from pymongo.server_api import ServerApi 3 | import pymongo 4 | import os 5 | from dotenv import load_dotenv 6 | import certifi 7 | 8 | load_dotenv() 9 | 10 | # Constants 11 | userName = os.environ.get("MONGO_USERNAME") 12 | password = os.environ.get("MONGO_PASSWORD") 13 | 14 | MONGO_URI = f"mongodb+srv://{userName}:{password}@cluster0.vbt4ktw.mongodb.net/?retryWrites=true&w=majority&appName=Cluster0" 15 | MONGO_URI1 = "mongodb+srv://admin:DkW0i3OLRt2y3jcf@cluster0.vbt4ktw.mongodb.net/" 16 | DB_NAME = "test" 17 | 18 | def fetchDataMongo(collection_name, query={}): 19 | """ 20 | Connects to MongoDB and fetches data from the specified collection based on the query. 21 | 22 | :param collection_name: Name of the collection 23 | :param query: MongoDB query (default is empty query to fetch all documents) 24 | :return: List of documents from the collection 25 | """ 26 | # Create a MongoClient to the running mongod instance 27 | client = MongoClient(MONGO_URI1, tlsCAFile=certifi.where() ) 28 | print("Client created") 29 | 30 | # Connect to the database 31 | db = client[DB_NAME] 32 | 33 | # Get the collection 34 | collection = db[collection_name] 35 | print("Checking collection") 36 | 37 | # Fetch data based on the query 38 | cursor = collection.find(query) 39 | 40 | # Convert the cursor to a list of documents 41 | documents = list(cursor) 42 | 43 | # Close the connection 44 | client.close() 45 | 46 | return documents 47 | 48 | # Example usage 49 | # if __name__ == "__main__": 50 | # # ans = list_collections() 51 | # # print(ans) 52 | # collection_name = "users" 53 | # query = {} # Empty query to fetch all documents 54 | 55 | # data = fetchDataMongo(collection_name, query) 56 | # for document in data: 57 | # print(document) 58 | 59 | 60 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/ic_settings.xml: -------------------------------------------------------------------------------- 1 | 6 | 13 | 20 | 27 | 34 | 41 | 48 | 49 | -------------------------------------------------------------------------------- /android/app/src/main/java/com/uphar/smartbaroda/ui/theme/Theme.kt: -------------------------------------------------------------------------------- 1 | package com.uphar.smartbaroda.ui.theme 2 | 3 | import android.app.Activity 4 | import android.os.Build 5 | import androidx.compose.foundation.isSystemInDarkTheme 6 | import androidx.compose.material3.MaterialTheme 7 | import androidx.compose.material3.darkColorScheme 8 | import androidx.compose.material3.dynamicDarkColorScheme 9 | import androidx.compose.material3.dynamicLightColorScheme 10 | import androidx.compose.material3.lightColorScheme 11 | import androidx.compose.runtime.Composable 12 | import androidx.compose.ui.platform.LocalContext 13 | 14 | private val DarkColorScheme = darkColorScheme( 15 | primary = Purple80, 16 | secondary = PurpleGrey80, 17 | tertiary = Pink80 18 | ) 19 | 20 | private val LightColorScheme = lightColorScheme( 21 | primary = Purple40, 22 | secondary = PurpleGrey40, 23 | tertiary = Pink40 24 | 25 | /* Other default colors to override 26 | background = Color(0xFFFFFBFE), 27 | surface = Color(0xFFFFFBFE), 28 | onPrimary = Color.White, 29 | onSecondary = Color.White, 30 | onTertiary = Color.White, 31 | onBackground = Color(0xFF1C1B1F), 32 | onSurface = Color(0xFF1C1B1F), 33 | */ 34 | ) 35 | 36 | @Composable 37 | fun SmartBarodaTheme( 38 | darkTheme: Boolean = isSystemInDarkTheme(), 39 | // Dynamic color is available on Android 12+ 40 | dynamicColor: Boolean = true, 41 | content: @Composable () -> Unit 42 | ) { 43 | val colorScheme = when { 44 | dynamicColor && Build.VERSION.SDK_INT >= Build.VERSION_CODES.S -> { 45 | val context = LocalContext.current 46 | if (darkTheme) dynamicDarkColorScheme(context) else dynamicLightColorScheme(context) 47 | } 48 | 49 | darkTheme -> DarkColorScheme 50 | else -> LightColorScheme 51 | } 52 | 53 | MaterialTheme( 54 | colorScheme = colorScheme, 55 | typography = Typography, 56 | content = content 57 | ) 58 | } -------------------------------------------------------------------------------- /server/controllers/loanDetailController.js: -------------------------------------------------------------------------------- 1 | const LoanDetail = require('../models/LoanDetail'); 2 | const LoanIssued = require('../models/LoanIssued'); 3 | const User = require('../models/User'); 4 | 5 | // Create a new loan detail 6 | exports.createLoanDetail = async (req, res) => { 7 | try { 8 | const loanDetail = new LoanDetail(req.body); 9 | await loanDetail.save(); 10 | res.status(201).send(loanDetail); 11 | } catch (err) { 12 | res.status(400).send(err); 13 | } 14 | }; 15 | 16 | // Get all loan details 17 | exports.getAllLoanDetails = async (req, res) => { 18 | try { 19 | const loanDetails = await LoanDetail.find(); 20 | res.status(200).send(loanDetails); 21 | } catch (err) { 22 | res.status(400).send(err); 23 | } 24 | }; 25 | 26 | // Get loan detail by ID 27 | exports.getLoanDetailById = async (req, res) => { 28 | try { 29 | const loanDetail = await LoanDetail.findById(req.params.id); 30 | if (!loanDetail) return res.status(404).send(); 31 | res.status(200).send(loanDetail); 32 | } catch (err) { 33 | res.status(400).send(err); 34 | } 35 | }; 36 | 37 | exports.issueLoan = async (req, res) => { 38 | try { 39 | const { desc, recieverAccNo, type, amount, loanId, interest, status } = req.body; 40 | 41 | const receiver = await User.findOne({ accNo: recieverAccNo }); 42 | if (!receiver) { 43 | return res.status(404).json({ msg: 'Receiver not found' }); 44 | } 45 | 46 | const loanDetails = await LoanDetail.findById(loanId); 47 | if (!loanDetails) { 48 | return res.status(404).json({ msg: 'Loan details not found' }); 49 | } 50 | 51 | const loanIssued = new LoanIssued({ 52 | desc, 53 | recieverAccNo, 54 | type, 55 | amount, 56 | loanId, 57 | interest, 58 | status 59 | }); 60 | 61 | await loanIssued.save(); 62 | 63 | res.status(201).json(loanIssued); 64 | } catch (err) { 65 | res.status(500).json({ error: err.message }); 66 | } 67 | }; -------------------------------------------------------------------------------- /android/app/src/main/java/com/uphar/smartbaroda/ui/ui/theme/Theme.kt: -------------------------------------------------------------------------------- 1 | package com.uphar.smartbaroda.ui.ui.theme 2 | 3 | import android.app.Activity 4 | import android.os.Build 5 | import androidx.compose.foundation.isSystemInDarkTheme 6 | import androidx.compose.material3.MaterialTheme 7 | import androidx.compose.material3.darkColorScheme 8 | import androidx.compose.material3.dynamicDarkColorScheme 9 | import androidx.compose.material3.dynamicLightColorScheme 10 | import androidx.compose.material3.lightColorScheme 11 | import androidx.compose.runtime.Composable 12 | import androidx.compose.ui.platform.LocalContext 13 | 14 | private val DarkColorScheme = darkColorScheme( 15 | primary = Purple80, 16 | secondary = PurpleGrey80, 17 | tertiary = Pink80 18 | ) 19 | 20 | private val LightColorScheme = lightColorScheme( 21 | primary = Purple40, 22 | secondary = PurpleGrey40, 23 | tertiary = Pink40 24 | 25 | /* Other default colors to override 26 | background = Color(0xFFFFFBFE), 27 | surface = Color(0xFFFFFBFE), 28 | onPrimary = Color.White, 29 | onSecondary = Color.White, 30 | onTertiary = Color.White, 31 | onBackground = Color(0xFF1C1B1F), 32 | onSurface = Color(0xFF1C1B1F), 33 | */ 34 | ) 35 | 36 | @Composable 37 | fun SmartBarodaTheme( 38 | darkTheme: Boolean = isSystemInDarkTheme(), 39 | // Dynamic color is available on Android 12+ 40 | dynamicColor: Boolean = true, 41 | content: @Composable () -> Unit 42 | ) { 43 | val colorScheme = when { 44 | dynamicColor && Build.VERSION.SDK_INT >= Build.VERSION_CODES.S -> { 45 | val context = LocalContext.current 46 | if (darkTheme) dynamicDarkColorScheme(context) else dynamicLightColorScheme(context) 47 | } 48 | 49 | darkTheme -> DarkColorScheme 50 | else -> LightColorScheme 51 | } 52 | 53 | MaterialTheme( 54 | colorScheme = colorScheme, 55 | typography = Typography, 56 | content = content 57 | ) 58 | } -------------------------------------------------------------------------------- /android/app/src/main/java/com/uphar/datasource/networkmodel/ProfileDetailByAccountResponse.kt: -------------------------------------------------------------------------------- 1 | package com.uphar.datasource.networkmodel 2 | 3 | import com.google.gson.annotations.Expose 4 | import com.google.gson.annotations.SerializedName 5 | 6 | data class ProfileDetailByAccountResponse( 7 | @SerializedName("user") 8 | @Expose 9 | val user: UserResponse?, 10 | 11 | @SerializedName("sellerDetails") 12 | @Expose 13 | val sellerDetails: SellerDetailsResponse? 14 | ) 15 | 16 | data class UserResponse( 17 | @SerializedName("_id") 18 | @Expose 19 | val id: String?, 20 | 21 | @SerializedName("accNo") 22 | @Expose 23 | val accountNumber: Int?, 24 | 25 | @SerializedName("username") 26 | @Expose 27 | val username: String?, 28 | 29 | @SerializedName("panCard") 30 | @Expose 31 | val panCard: String?, 32 | 33 | @SerializedName("cibilScore") 34 | @Expose 35 | val cibilScore: Int?, 36 | 37 | @SerializedName("type") 38 | @Expose 39 | val type: String?, 40 | 41 | @SerializedName("GSTIN") 42 | @Expose 43 | val gstin: String?, 44 | 45 | @SerializedName("password") 46 | @Expose 47 | val password: String?, 48 | 49 | @SerializedName("balance") 50 | @Expose 51 | val balance: Int?, 52 | 53 | @SerializedName("created_at") 54 | @Expose 55 | val createdAt: String?, 56 | 57 | @SerializedName("__v") 58 | @Expose 59 | val v: Int? 60 | ) 61 | 62 | data class SellerDetailsResponse( 63 | @SerializedName("_id") 64 | @Expose 65 | val id: String?, 66 | 67 | @SerializedName("gstNo") 68 | @Expose 69 | val gstNo: String?, 70 | 71 | @SerializedName("sellerName") 72 | @Expose 73 | val sellerName: String?, 74 | 75 | @SerializedName("type") 76 | @Expose 77 | val type: String?, 78 | 79 | @SerializedName("desc") 80 | @Expose 81 | val desc: String?, 82 | 83 | @SerializedName("__v") 84 | @Expose 85 | val v: Int? 86 | ) 87 | -------------------------------------------------------------------------------- /android/app/src/main/java/com/uphar/bussinesss/domain/Utils/BasePreferences.kt: -------------------------------------------------------------------------------- 1 | package com.uphar.bussinesss.domain.Utils 2 | 3 | import android.content.Context 4 | 5 | val PREFERENCE_NAME = "language_preference" 6 | val FIREBASE_REFRESH_TOKEN = "firebase_refresh_token" 7 | val MULTIPLE_LOGIN = "multiple_login" 8 | val LOG_OUT_REASON = "login_out_reason" 9 | 10 | val LOG_IN_STATUS = "login_status" 11 | 12 | 13 | val APP_TOKEN = "application_token" 14 | val APP_REFRESH_TOKEN = "application_refresh_token" 15 | 16 | 17 | class BasePreferences(context: Context?) { 18 | 19 | private val preferences = context?.getSharedPreferences(PREFERENCE_NAME, Context.MODE_PRIVATE) 20 | 21 | 22 | 23 | 24 | fun setFirebaseRefreshedToken(token: String) { 25 | val editor = preferences?.edit() 26 | editor?.putString(FIREBASE_REFRESH_TOKEN, token) 27 | editor?.apply() 28 | } 29 | 30 | fun getFirebaseRefreshedToken() = preferences?.getString(FIREBASE_REFRESH_TOKEN, "") 31 | 32 | 33 | fun setTokens(token: String, refreshToken: String) { 34 | val editor = preferences?.edit() 35 | editor?.putString(APP_TOKEN, token) 36 | editor?.putString(APP_REFRESH_TOKEN, refreshToken) 37 | editor?.apply() 38 | } 39 | 40 | fun getToken() = preferences?.getString(APP_TOKEN, "") 41 | 42 | fun getRefreshToken() = preferences?.getString(APP_REFRESH_TOKEN, "") 43 | 44 | fun setMultipleLogin(status: Boolean, reason: String) { 45 | val editor = preferences?.edit() 46 | editor?.putBoolean(MULTIPLE_LOGIN, status) 47 | editor?.putString(LOG_OUT_REASON, reason) 48 | editor?.apply() 49 | } 50 | 51 | fun isMultipleLogin() = preferences?.getBoolean(MULTIPLE_LOGIN, false) 52 | fun getLogOutReason() = preferences?.getString(LOG_OUT_REASON, "") 53 | 54 | fun setLoginStatus(status: Boolean) { 55 | val editor = preferences?.edit() 56 | editor?.putBoolean(LOG_IN_STATUS, status) 57 | editor?.apply() 58 | } 59 | 60 | } -------------------------------------------------------------------------------- /server/controllers/authController.js: -------------------------------------------------------------------------------- 1 | const jwt = require('jsonwebtoken'); 2 | const { validationResult } = require('express-validator'); 3 | const User = require('../models/User'); 4 | 5 | exports.register = async (req, res) => { 6 | const errors = validationResult(req); 7 | if (!errors.isEmpty()) { 8 | return res.status(400).json({ errors: errors.array() }); 9 | } 10 | 11 | try { 12 | const { accNo, username, panCard, cibilScore, type, GSTIN, password, balance } = req.body; 13 | 14 | let user = await User.findOne({ accNo }); 15 | if (user) { 16 | return res.status(400).json({ msg: 'User already exists' }); 17 | } 18 | 19 | user = new User({ accNo, username, panCard, cibilScore, type, GSTIN, password, balance }); 20 | await user.save(); 21 | 22 | const payload = { user: { id: user.id, accNo: user.accNo } }; 23 | jwt.sign(payload, 'secret', { expiresIn: '10d' }, (err, token) => { 24 | if (err) throw err; 25 | res.json({ token }); 26 | }); 27 | } catch (err) { 28 | console.error(err.message); 29 | res.status(500).send('Server error'); 30 | } 31 | }; 32 | 33 | exports.login = async (req, res) => { 34 | const errors = validationResult(req); 35 | if (!errors.isEmpty()) { 36 | return res.status(400).json({ errors: errors.array() }); 37 | } 38 | 39 | const { accNo, password } = req.body; 40 | 41 | try { 42 | let user = await User.findOne({ accNo }); 43 | if (!user) { 44 | return res.status(400).json({ msg: 'Invalid Credentials' }); 45 | } 46 | 47 | const isMatch = await user.comparePassword(password); 48 | if (!isMatch) { 49 | return res.status(400).json({ msg: 'Invalid Credentials' }); 50 | } 51 | 52 | const payload = { user: { id: user.id, accNo: user.accNo } }; 53 | jwt.sign(payload, 'secret', { expiresIn: '10d' }, (err, token) => { 54 | if (err) throw err; 55 | res.json({ token }); 56 | }); 57 | } catch (err) { 58 | console.error(err.message); 59 | res.status(500).send('Server error'); 60 | } 61 | }; 62 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/profile_svgrepo_com.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 12 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /genAI/services/financialAdvisor.py: -------------------------------------------------------------------------------- 1 | import json 2 | from langchain.agents import tool, initialize_agent 3 | from langchain_openai import AzureChatOpenAI 4 | from dotenv import load_dotenv 5 | import warnings 6 | 7 | # load the environment variables 8 | load_dotenv() 9 | warnings.filterwarnings("ignore") 10 | 11 | import sys 12 | import os 13 | # Add the parent directory to the path 14 | sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) 15 | 16 | from tools.loan import dateTool, loanTool 17 | from utils.fetchJsonData import fetchJsonData 18 | from mongoClient import fetchDataMongo 19 | 20 | def financialAdvisor(userId: str, userPrompt: str) -> list: 21 | 22 | userData = fetchDataMongo("users", {"accNo": int(userId)})[0] 23 | 24 | 25 | username = userData.get('username', 'Unknown') 26 | cibil_score = userData.get('cibilScore', 'Unknown') 27 | 28 | llm = AzureChatOpenAI( 29 | openai_api_version="2024-04-01-preview", 30 | azure_deployment="llm_model", 31 | model_name="gpt3.5-turbo", 32 | ) 33 | 34 | prompt = f""" 35 | You are an experienced and highly skilled financial advisor with a deep understanding of various financial instruments, investment strategies, and economic trends. Your goal is to greet and assist the user by offering well-informed and comprehensive responses to their financial inquiries.Feel free to leverage your expertise to provide actionable advice, and don't hesitate to seek further details from the user to tailor your responses to their specific financial situation. 36 | User {username} want to ask you about finance understand the user question and provide the best possible answer in 150 words in markdown format. 37 | User Question : {userPrompt} 38 | """ 39 | 40 | answer = llm.invoke(prompt) 41 | return answer.content 42 | 43 | # Example usage 44 | if __name__ == "__main__": 45 | userId = "123456" 46 | userPrompt = "What are mutual funds ?" 47 | recommendations = financialAdvisor(userId, userPrompt) 48 | print(recommendations) -------------------------------------------------------------------------------- /android/app/google-services.json: -------------------------------------------------------------------------------- 1 | { 2 | "project_info": { 3 | "project_number": "352894862311", 4 | "project_id": "gymrat-78acb", 5 | "storage_bucket": "gymrat-78acb.appspot.com" 6 | }, 7 | "client": [ 8 | { 9 | "client_info": { 10 | "mobilesdk_app_id": "1:352894862311:android:4a8970431da927ce9e3342", 11 | "android_client_info": { 12 | "package_name": "com.example.quote" 13 | } 14 | }, 15 | "oauth_client": [ 16 | { 17 | "client_id": "352894862311-fg84dm1022ek0lqvkndpl5ja6f9sku9a.apps.googleusercontent.com", 18 | "client_type": 3 19 | } 20 | ], 21 | "api_key": [ 22 | { 23 | "current_key": "AIzaSyBK2hJWFh1THBfJCqw5miFeDhcKdQyf8eo" 24 | } 25 | ], 26 | "services": { 27 | "appinvite_service": { 28 | "other_platform_oauth_client": [ 29 | { 30 | "client_id": "352894862311-fg84dm1022ek0lqvkndpl5ja6f9sku9a.apps.googleusercontent.com", 31 | "client_type": 3 32 | } 33 | ] 34 | } 35 | } 36 | }, 37 | { 38 | "client_info": { 39 | "mobilesdk_app_id": "1:352894862311:android:4467366cec653e9f9e3342", 40 | "android_client_info": { 41 | "package_name": "com.uphar.smartbaroda" 42 | } 43 | }, 44 | "oauth_client": [ 45 | { 46 | "client_id": "352894862311-fg84dm1022ek0lqvkndpl5ja6f9sku9a.apps.googleusercontent.com", 47 | "client_type": 3 48 | } 49 | ], 50 | "api_key": [ 51 | { 52 | "current_key": "AIzaSyBK2hJWFh1THBfJCqw5miFeDhcKdQyf8eo" 53 | } 54 | ], 55 | "services": { 56 | "appinvite_service": { 57 | "other_platform_oauth_client": [ 58 | { 59 | "client_id": "352894862311-fg84dm1022ek0lqvkndpl5ja6f9sku9a.apps.googleusercontent.com", 60 | "client_type": 3 61 | } 62 | ] 63 | } 64 | } 65 | } 66 | ], 67 | "configuration_version": "1" 68 | } -------------------------------------------------------------------------------- /list/src/main/kotlin/srtbaroda/list/LinkedList.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * This Kotlin source file was generated by the Gradle 'init' task. 3 | */ 4 | package srtbaroda.list 5 | 6 | class LinkedList { 7 | private var head: Node? = null 8 | 9 | fun add(element: String) { 10 | val newNode = Node(element) 11 | 12 | val it = tail(head) 13 | if (it == null) { 14 | head = newNode 15 | } else { 16 | it.next = newNode 17 | } 18 | } 19 | 20 | private fun tail(head: Node?): Node? { 21 | var it: Node? 22 | 23 | it = head 24 | while (it?.next != null) { 25 | it = it.next 26 | } 27 | 28 | return it 29 | } 30 | 31 | fun remove(element: String): Boolean { 32 | var result = false 33 | var previousIt: Node? = null 34 | var it: Node? = head 35 | while (!result && it != null) { 36 | if (0 == element.compareTo(it.data)) { 37 | result = true 38 | unlink(previousIt, it) 39 | break 40 | } 41 | previousIt = it 42 | it = it.next 43 | } 44 | 45 | return result 46 | } 47 | 48 | private fun unlink(previousIt: Node?, currentIt: Node) { 49 | if (currentIt == head) { 50 | head = currentIt.next 51 | } else { 52 | previousIt?.next = currentIt.next 53 | } 54 | } 55 | 56 | fun size(): Int { 57 | var size = 0 58 | 59 | var it = head 60 | while (it != null) { 61 | ++size 62 | it = it.next 63 | } 64 | 65 | return size 66 | } 67 | 68 | fun get(idx: Int): String { 69 | var index = idx 70 | var it = head 71 | while (index > 0 && it != null) { 72 | it = it.next 73 | index-- 74 | } 75 | 76 | if (it == null) { 77 | throw IndexOutOfBoundsException("Index is out of range") 78 | } 79 | 80 | return it.data 81 | } 82 | 83 | private data class Node(val data: String) { 84 | var next: Node? = null 85 | } 86 | } 87 | --------------------------------------------------------------------------------