├── 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 |
5 |
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 |
5 |
--------------------------------------------------------------------------------
/android/.idea/compiler.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/android/.idea/kotlinc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/android/.idea/vcs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/genAI/services/tempCodeRunnerFile.py:
--------------------------------------------------------------------------------
1 | # tools = []
2 | # agent = initialize_agent(
3 | # tools=tools,
4 | # llm=llm,
5 | # agent="zero-shot-react-description",
6 | # verbose=True
7 | # )
8 |
--------------------------------------------------------------------------------
/gradle.properties:
--------------------------------------------------------------------------------
1 | # This file was generated by the Gradle 'init' task.
2 | # https://docs.gradle.org/current/userguide/build_environment.html#sec:gradle_configuration_properties
3 |
4 | org.gradle.parallel=true
5 | org.gradle.caching=true
6 |
7 |
--------------------------------------------------------------------------------
/list/build.gradle.kts:
--------------------------------------------------------------------------------
1 | /*
2 | * This file was generated by the Gradle 'init' task.
3 | *
4 | * This project uses @Incubating APIs which are subject to change.
5 | */
6 |
7 | plugins {
8 | id("srtbaroda.kotlin-library-conventions")
9 | }
10 |
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable/transparent.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
--------------------------------------------------------------------------------
/.gitattributes:
--------------------------------------------------------------------------------
1 | #
2 | # https://help.github.com/articles/dealing-with-line-endings/
3 | #
4 | # Linux start script should use lf
5 | /gradlew text eol=lf
6 |
7 | # These are Windows script files and should use crlf
8 | *.bat text eol=crlf
9 |
10 |
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable/custom_radio_button_unchecked.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionBase=GRADLE_USER_HOME
2 | distributionPath=wrapper/dists
3 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip
4 | networkTimeout=10000
5 | zipStoreBase=GRADLE_USER_HOME
6 | zipStorePath=wrapper/dists
7 |
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable/icon_trend_down.xml:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable/btn_primary.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable/btn_secondary.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable/rev_black.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/android/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Wed Jul 10 15:41:12 IST 2024
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip
5 | zipStoreBase=GRADLE_USER_HOME
6 | zipStorePath=wrapper/dists
7 |
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable/bg_violet_corner_10.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable/rev_one.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/app/src/main/kotlin/srtbaroda/app/MessageUtils.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * This Kotlin source file was generated by the Gradle 'init' task.
3 | */
4 | package srtbaroda.app
5 |
6 | class MessageUtils {
7 | companion object {
8 | fun getMessage(): String = "Hello World!"
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/.idea/migrations.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
10 |
--------------------------------------------------------------------------------
/android/.gitignore:
--------------------------------------------------------------------------------
1 | *.iml
2 | .gradle
3 | /local.properties
4 | /.idea/caches
5 | /.idea/libraries
6 | /.idea/modules.xml
7 | /.idea/workspace.xml
8 | /.idea/navEditor.xml
9 | /.idea/assetWizardSettings.xml
10 | .DS_Store
11 | /build
12 | /captures
13 | .externalNativeBuild
14 | .cxx
15 | local.properties
16 |
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable/bg_light_violet_corner_10.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable/custom_radio_button_checked.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/android/.idea/migrations.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/android/app/src/main/java/com/uphar/bussinesss/domain/data/profile/Transaction.kt:
--------------------------------------------------------------------------------
1 | package com.uphar.bussinesss.domain.data.profile
2 |
3 | data class AddTransaction(
4 | val receiverAccNo: Long,
5 | val desc: String,
6 | val amount: Double,
7 | val status: String,
8 | val type: String
9 | )
10 |
--------------------------------------------------------------------------------
/utilities/build.gradle.kts:
--------------------------------------------------------------------------------
1 | /*
2 | * This file was generated by the Gradle 'init' task.
3 | *
4 | * This project uses @Incubating APIs which are subject to change.
5 | */
6 |
7 | plugins {
8 | id("srtbaroda.kotlin-library-conventions")
9 | }
10 |
11 | dependencies {
12 | api(project(":list"))
13 | }
14 |
--------------------------------------------------------------------------------
/android/app/src/main/java/com/uphar/bussinesss/domain/dataStore/authetication/LoginDatasource.kt:
--------------------------------------------------------------------------------
1 | package com.uphar.bussinesss.domain.dataStore.authetication
2 |
3 | import com.uphar.bussinesss.domain.Utils.state.DataState
4 | import kotlinx.coroutines.flow.Flow
5 |
6 |
7 | interface LoginDatasource {
8 |
9 | }
10 |
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable/back_round.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable/custom_circle.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
6 |
7 |
9 |
10 |
--------------------------------------------------------------------------------
/android/app/src/main/java/com/uphar/bussinesss/domain/dataStore/wallet/WalletDatasourceImpl.kt:
--------------------------------------------------------------------------------
1 | package com.uphar.bussinesss.domain.dataStore.wallet
2 |
3 | import com.uphar.datasource.retrofit.BOBRetrofitService
4 |
5 | class WalletDatasourceImpl constructor( private val BOBRetrofitService: BOBRetrofitService
6 | ) : WalletDatasource {
7 |
8 |
9 | }
--------------------------------------------------------------------------------
/genAI/.env:
--------------------------------------------------------------------------------
1 | AZURE_OPENAI_API_VERSION = '2024-04-01-preview'
2 | AZURE_OPENAI_ENDPOINT = "https://smartbaroda.openai.azure.com/"
3 | AZURE_OPENAI_API_KEY = "33bd2cab70034855a0060baea9d415f6"
4 | AZURE_OPENAI_API_TYPE = "azure"
5 | AZURE_DEPLOYMENT_ID = "llm_model"
6 |
7 |
8 |
9 | MONGO_USERNAME = "kamalyash2002"
10 | MONGO_PASSWORD = "yashbhai"
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable/custom_check.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
6 |
7 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable/edit_green.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable/edit_red.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable/input_square.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable/input_primary.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable/primary_gradient.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
9 |
10 |
--------------------------------------------------------------------------------
/server/routes/gst.js:
--------------------------------------------------------------------------------
1 | const express = require('express');
2 | const router = express.Router();
3 | const gstController = require('../controllers/gstController');
4 |
5 | router.post('/', gstController.createGST);
6 |
7 | router.get('/', gstController.getAllGST);
8 |
9 | router.get('/:id', gstController.getGSTById);
10 |
11 | module.exports = router;
12 |
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable/edit_circle.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable/edit_text_square_rounded.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable/ic_four.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable/ic_one.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable/secondary_gradient.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
10 |
11 |
--------------------------------------------------------------------------------
/.idea/deploymentTargetSelector.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/genAI/utils/fetchJsonData.py:
--------------------------------------------------------------------------------
1 | import json
2 | def fetchJsonData (file_path: str) -> str:
3 | """Fetches the data from the json file and converts it to string"""
4 | try:
5 | with open(file_path, 'r') as json_file:
6 | data = json.load(json_file)
7 | return json.dumps(data, indent=4)
8 | except Exception as e:
9 | return str(e)
--------------------------------------------------------------------------------
/android/.idea/deploymentTargetSelector.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/local.properties:
--------------------------------------------------------------------------------
1 | ## This file must *NOT* be checked into Version Control Systems,
2 | # as it contains information specific to your local configuration.
3 | #
4 | # Location of the SDK. This is only used by Gradle.
5 | # For customization when using a Version Control System, please read the
6 | # header note.
7 | #Thu Aug 01 03:16:36 IST 2024
8 | sdk.dir=/home/pain/uphar/Android/Sdk
9 |
--------------------------------------------------------------------------------
/android/app/src/main/java/com/uphar/bussinesss/domain/Utils/networkException/AccessDeniedException.java:
--------------------------------------------------------------------------------
1 | package com.uphar.bussinesss.domain.Utils.networkException;
2 |
3 | import java.io.IOException;
4 |
5 | public class AccessDeniedException extends IOException {
6 |
7 | @Override
8 | public String getMessage() {
9 | return "Access denied";
10 | }
11 |
12 | }
--------------------------------------------------------------------------------
/android/app/src/main/java/com/uphar/bussinesss/domain/data/login/loginCredentials.kt:
--------------------------------------------------------------------------------
1 | package com.uphar.bussinesss.domain.data.login
2 |
3 | data class loginCredentials(
4 | var login: String = "",
5 | var pwd: String = "",
6 | var remember: Boolean = false
7 | ) {
8 | fun isNotEmpty(): Boolean {
9 | return login.isNotEmpty() && pwd.isNotEmpty()
10 | }
11 | }
--------------------------------------------------------------------------------
/android/app/src/main/java/com/uphar/smartbaroda/ui/theme/Color.kt:
--------------------------------------------------------------------------------
1 | package com.uphar.smartbaroda.ui.theme
2 |
3 | import androidx.compose.ui.graphics.Color
4 |
5 | val Purple80 = Color(0xFFD0BCFF)
6 | val PurpleGrey80 = Color(0xFFCCC2DC)
7 | val Pink80 = Color(0xFFEFB8C8)
8 |
9 | val Purple40 = Color(0xFF6650a4)
10 | val PurpleGrey40 = Color(0xFF625b71)
11 | val Pink40 = Color(0xFF7D5260)
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable/custom_radio_button_selector.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/android/app/src/main/java/com/uphar/bussinesss/domain/Utils/networkException/NoConnectivityException.java:
--------------------------------------------------------------------------------
1 | package com.uphar.bussinesss.domain.Utils.networkException;
2 |
3 | import java.io.IOException;
4 |
5 | public class NoConnectivityException extends IOException {
6 |
7 | @Override
8 | public String getMessage() {
9 | return "No connectivity";
10 | }
11 |
12 | }
13 |
--------------------------------------------------------------------------------
/android/app/src/main/java/com/uphar/smartbaroda/ui/ui/theme/Color.kt:
--------------------------------------------------------------------------------
1 | package com.uphar.smartbaroda.ui.ui.theme
2 |
3 | import androidx.compose.ui.graphics.Color
4 |
5 | val Purple80 = Color(0xFFD0BCFF)
6 | val PurpleGrey80 = Color(0xFFCCC2DC)
7 | val Pink80 = Color(0xFFEFB8C8)
8 |
9 | val Purple40 = Color(0xFF6650a4)
10 | val PurpleGrey40 = Color(0xFF625b71)
11 | val Pink40 = Color(0xFF7D5260)
--------------------------------------------------------------------------------
/android/build.gradle.kts:
--------------------------------------------------------------------------------
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 | plugins {
3 | alias(libs.plugins.android.application) apply false
4 | alias(libs.plugins.jetbrains.kotlin.android) apply false
5 | id ("com.google.dagger.hilt.android") version "2.48" apply false
6 | alias(libs.plugins.google.gms.google.services) apply false
7 | }
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable/ic_arrow_right_24.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/android/app/src/main/java/com/uphar/bussinesss/domain/Utils/state/DataState.kt:
--------------------------------------------------------------------------------
1 | package com.uphar.bussinesss.domain.Utils.state
2 |
3 | import java.lang.Exception
4 |
5 | sealed class DataState {
6 | data class Success(val data: T) : DataState()
7 | data class Error(val exception: Exception) : DataState()
8 | data class Loading(val loading: Boolean) : DataState()
9 | }
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/server/models/GST.js:
--------------------------------------------------------------------------------
1 | const mongoose = require('mongoose');
2 | const Schema = mongoose.Schema;
3 |
4 | const GSTSchema = new Schema({
5 | gstNo: { type: String, required: true, unique: true },
6 | sellerName: { type: String, required: true },
7 | type: { type: String, required: true },
8 | desc: { type: String, required: true }
9 | });
10 |
11 | module.exports = mongoose.model('GST', GSTSchema);
12 |
--------------------------------------------------------------------------------
/android/app/src/main/java/com/uphar/datasource/networkmodel/LoginRequest.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 LoginRequest(
7 | @SerializedName("accNo")
8 | @Expose
9 | val accNo: Int,
10 | @SerializedName("password")
11 | @Expose
12 | val password: String
13 | )
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/server/routes/user.js:
--------------------------------------------------------------------------------
1 | const express = require('express');
2 | const router = express.Router();
3 | const userController = require('../controllers/userController');
4 | const auth = require('../middleware/auth');
5 |
6 | // Get user profile
7 | router.get('/profile', auth, userController.getUserProfile);
8 | router.get('/profile/:id', auth, userController.getUserProfileById);
9 |
10 | module.exports = router;
11 |
--------------------------------------------------------------------------------
/android/app/src/main/java/com/uphar/datasource/networkmodel/LoginResponse.kt:
--------------------------------------------------------------------------------
1 | package com.uphar.datasource.networkmodel
2 |
3 | import com.google.gson.annotations.SerializedName
4 | import com.google.gson.annotations.Expose
5 |
6 | data class LoginResponse(
7 | @SerializedName("token")
8 | @Expose
9 | val token: String?,
10 | @SerializedName("msg")
11 | @Expose
12 | val msg: String?,
13 | )
14 |
--------------------------------------------------------------------------------
/server/utils/db.js:
--------------------------------------------------------------------------------
1 | const mongoose = require('mongoose');
2 |
3 | const connectDB = async () => {
4 | try {
5 | await mongoose.connect(process.env.MONGODB_URI);
6 | console.log('MongoDB connected');
7 | } catch (error) {
8 | console.error('MongoDB connection error:', error);
9 | process.exit(1);
10 | }
11 | };
12 |
13 | // export default connectDB;
14 | module.exports = connectDB;
--------------------------------------------------------------------------------
/android/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | Smart Baroda
3 | Something went Wrong
4 | Take a photo
5 | LoginActivity
6 | credit\n
7 | No history found
8 |
--------------------------------------------------------------------------------
/app/src/test/kotlin/srtbaroda/app/MessageUtilsTest.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * This Kotlin source file was generated by the Gradle "init" task.
3 | */
4 | package srtbaroda.app
5 |
6 | import org.junit.jupiter.api.Test
7 |
8 | import org.junit.jupiter.api.Assertions.assertEquals
9 |
10 | class MessageUtilsTest {
11 | @Test fun testGetMessage() {
12 | assertEquals("Hello World!", MessageUtils.getMessage())
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/app/src/main/kotlin/srtbaroda/app/App.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * This Kotlin source file was generated by the Gradle 'init' task.
3 | */
4 | package srtbaroda.app
5 |
6 | import srtbaroda.utilities.StringUtils
7 |
8 | import org.apache.commons.text.WordUtils
9 |
10 | fun main() {
11 | val tokens = StringUtils.split(MessageUtils.getMessage())
12 | val result = StringUtils.join(tokens)
13 | println(WordUtils.capitalize(result))
14 | }
15 |
--------------------------------------------------------------------------------
/.idea/misc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable/otp.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/android/app/src/main/java/com/uphar/bussinesss/domain/data/login/RegisterCredentials.kt:
--------------------------------------------------------------------------------
1 | package com.uphar.bussinesss.domain.data.login
2 |
3 | data class RegisterCredentials(
4 | val accNo: String = "",
5 | val username: String = "",
6 | val panCard: String = "",
7 | val cibilScore: String = "",
8 | val type: String = "",
9 | val password: String = "",
10 | val confirmPassword: String = "",
11 | val gstIN :String="",
12 | )
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable/ic_spinner.xml:
--------------------------------------------------------------------------------
1 |
6 |
11 |
12 |
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable/bg_blue_gradient_circle.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
12 |
13 |
--------------------------------------------------------------------------------
/android/app/src/test/java/com/uphar/smartbaroda/ExampleUnitTest.kt:
--------------------------------------------------------------------------------
1 | package com.uphar.smartbaroda
2 |
3 | import org.junit.Test
4 |
5 | import org.junit.Assert.*
6 |
7 | /**
8 | * Example local unit test, which will execute on the development machine (host).
9 | *
10 | * See [testing documentation](http://d.android.com/tools/testing).
11 | */
12 | class ExampleUnitTest {
13 | @Test
14 | fun addition_isCorrect() {
15 | assertEquals(4, 2 + 2)
16 | }
17 | }
--------------------------------------------------------------------------------
/server/middleware/auth.js:
--------------------------------------------------------------------------------
1 | const jwt = require('jsonwebtoken');
2 |
3 | module.exports = function (req, res, next) {
4 | const token = req.header('x-auth-token');
5 | if (!token) {
6 | return res.status(401).json({ msg: 'No token, authorization denied' });
7 | }
8 |
9 | try {
10 | const decoded = jwt.verify(token, 'secret');
11 | req.user = decoded.user;
12 | next();
13 | } catch (err) {
14 | res.status(401).json({ msg: 'Token is not valid' });
15 | }
16 | };
17 |
--------------------------------------------------------------------------------
/android/.idea/misc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/server/routes/loanIssued.js:
--------------------------------------------------------------------------------
1 | const express = require('express');
2 | const router = express.Router();
3 | const loanIssuedController = require('../controllers/loanIssuedController');
4 |
5 | // Create a new loan issued
6 | router.post('/', loanIssuedController.createLoanIssued);
7 |
8 | // Get all loans issued
9 | router.get('/', loanIssuedController.getAllLoansIssued);
10 |
11 | // Get loan issued by ID
12 | router.get('/:id', loanIssuedController.getLoanIssuedById);
13 |
14 | module.exports = router;
15 |
--------------------------------------------------------------------------------
/app/build.gradle.kts:
--------------------------------------------------------------------------------
1 | /*
2 | * This file was generated by the Gradle 'init' task.
3 | *
4 | * This project uses @Incubating APIs which are subject to change.
5 | */
6 |
7 | plugins {
8 | id("srtbaroda.kotlin-application-conventions")
9 | }
10 |
11 | dependencies {
12 | implementation("org.apache.commons:commons-text")
13 | implementation(project(":utilities"))
14 | }
15 |
16 | application {
17 | // Define the main class for the application.
18 | mainClass.set("srtbaroda.app.AppKt")
19 | }
20 |
--------------------------------------------------------------------------------
/android/app/src/main/java/com/uphar/di/MyApplication.kt:
--------------------------------------------------------------------------------
1 | package com.uphar.di
2 |
3 |
4 | import android.app.Application
5 | import com.uphar.bussinesss.domain.Utils.BasePreferences
6 | import dagger.hilt.android.HiltAndroidApp
7 |
8 | @HiltAndroidApp
9 | class MyApplication : Application()
10 | {
11 | private lateinit var basePreferences: BasePreferences
12 |
13 |
14 | override fun onCreate() {
15 | super.onCreate()
16 | basePreferences = BasePreferences(applicationContext)
17 | }
18 |
19 | }
--------------------------------------------------------------------------------
/android/app/src/main/java/com/uphar/smartbaroda/NavRoutes.kt:
--------------------------------------------------------------------------------
1 | package com.uphar.smartbaroda
2 |
3 | object NavRoutes {
4 | const val LOAN_CONTENT = "loanContent"
5 | const val POLICY_CONTENT = "policyContent"
6 | const val AI_SCREEN = "aiScreen"
7 | const val PROFILE_CONTENT = "profileContent"
8 | const val TRANSACTION_HISTORY_CONTENT = "transactionHistoryContent"
9 | const val PDF_VIEWER_SCREEN = "pdfViewerScreen"
10 | const val TRANSACTION_ANALYSIS_SCREEN = "TRANSACTION_ANALYSIS_SCREEN"
11 |
12 | }
--------------------------------------------------------------------------------
/utilities/src/main/kotlin/srtbaroda/utilities/StringUtils.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * This Kotlin source file was generated by the Gradle 'init' task.
3 | */
4 | package srtbaroda.utilities
5 |
6 | import srtbaroda.list.LinkedList
7 |
8 | class StringUtils {
9 | companion object {
10 | fun join(source: LinkedList): String {
11 | return JoinUtils.join(source)
12 | }
13 |
14 | fun split(source: String): LinkedList {
15 | return SplitUtils.split(source)
16 | }
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/android/app/src/main/java/com/uphar/datasource/networkmodel/FinanceChatBotNetworkResponse.kt:
--------------------------------------------------------------------------------
1 | package com.uphar.datasource.networkmodel
2 |
3 |
4 | import com.google.gson.annotations.Expose
5 | import com.google.gson.annotations.SerializedName
6 |
7 | data class FinanceChatBotNetworkResponse(
8 | @SerializedName("answer")
9 | @Expose
10 | val answer: String
11 | )
12 |
13 | data class SmartNotificationsNetworkResponse(
14 | @SerializedName("smartNotifications")
15 | @Expose
16 | val answer: String
17 | )
18 |
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable/ic_arr.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable/edittext_bg.xml:
--------------------------------------------------------------------------------
1 |
6 |
12 |
13 |
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable/editext_bg_green.xml:
--------------------------------------------------------------------------------
1 |
6 |
12 |
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable/edittext_bg_green.xml:
--------------------------------------------------------------------------------
1 |
6 |
12 |
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable/edittext_bg_red.xml:
--------------------------------------------------------------------------------
1 |
6 |
12 |
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable/edittext_bg_white.xml:
--------------------------------------------------------------------------------
1 |
6 |
12 |
--------------------------------------------------------------------------------
/genAI/repo/promotions.py:
--------------------------------------------------------------------------------
1 | from datetime import datetime
2 | import sys
3 | import os
4 | # Add the parent directory to the path
5 | sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
6 | from mongoClient import fetchDataMongo
7 | import json
8 | import random
9 |
10 |
11 | def randomPromotions():
12 | promotions = fetchDataMongo("promotion", {})
13 | ## choose the random promotion from the list of promotions
14 | randomPromotion = promotions[random.randint(0, len(promotions) - 1)]
15 | return randomPromotion
16 |
17 |
--------------------------------------------------------------------------------
/android/app/src/main/res/xml/backup_rules.xml:
--------------------------------------------------------------------------------
1 |
8 |
9 |
13 |
--------------------------------------------------------------------------------
/server/models/PolicySubscribed.js:
--------------------------------------------------------------------------------
1 | const mongoose = require('mongoose');
2 | const Schema = mongoose.Schema;
3 |
4 | const PoliciesSubscribedSchema = new Schema({
5 | desc: { type: String },
6 | recieverAccNo: { type: Number, required: true },
7 | type: { type: String, required: true },
8 | premium: { type: Number, required: true },
9 | policyId: { type: Schema.Types.ObjectId, ref: 'PolicyDetails', required: true },
10 | created_at: { type: Date, default: Date.now }
11 | });
12 |
13 | module.exports = mongoose.model('PoliciesSubscribed', PoliciesSubscribedSchema);
14 |
--------------------------------------------------------------------------------
/server/routes/policySubscribed.js:
--------------------------------------------------------------------------------
1 | const express = require('express');
2 | const router = express.Router();
3 | const policySubscribedController = require('../controllers/policySubscribedController');
4 |
5 | // Create a new policy subscribed
6 | router.post('/', policySubscribedController.createPolicySubscribed);
7 |
8 | // Get all policies subscribed
9 | router.get('/', policySubscribedController.getAllPoliciesSubscribed);
10 |
11 | // Get policy subscribed by ID
12 | router.get('/:id', policySubscribedController.getPolicySubscribedById);
13 |
14 | module.exports = router;
15 |
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable/switch_icon.xml:
--------------------------------------------------------------------------------
1 |
7 |
8 |
9 |
12 |
13 |
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable/ic_arrowbottom.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/server/models/LoanDetail.js:
--------------------------------------------------------------------------------
1 | const mongoose = require('mongoose');
2 | const Schema = mongoose.Schema;
3 |
4 | const LoanDetailSchema = new Schema({
5 | desc: { type: String, required: true },
6 | interest: { type: mongoose.Types.Decimal128, required: true },
7 | type: { type: String, required: true },
8 | requiredCibil: { type: mongoose.Types.Decimal128, required: true },
9 | benifits: { type: String, required: true },
10 | downloadableDoc: { type: String, required: true },
11 | created_at: { type: Date, default: Date.now }
12 | });
13 |
14 | module.exports = mongoose.model('LoanDetail', LoanDetailSchema);
15 |
--------------------------------------------------------------------------------
/server/routes/loanDetails.js:
--------------------------------------------------------------------------------
1 | const express = require('express');
2 | const router = express.Router();
3 | const loanDetailController = require('../controllers/loanDetailController');
4 | const auth = require('../middleware/auth');
5 |
6 | // Create a new loan detail
7 | router.post('/', loanDetailController.createLoanDetail);
8 |
9 | // Get all loan details
10 | router.get('/', loanDetailController.getAllLoanDetails);
11 |
12 | // Get loan detail by ID
13 | router.get('/:id', loanDetailController.getLoanDetailById);
14 |
15 | router.post('/issue', auth, loanDetailController.issueLoan);
16 |
17 | module.exports = router;
18 |
--------------------------------------------------------------------------------
/android/app/src/main/java/com/uphar/smartbaroda/ScreenConstants.kt:
--------------------------------------------------------------------------------
1 | package com.uphar.smartbaroda
2 |
3 | import androidx.annotation.DrawableRes
4 |
5 | sealed class ScreenConstants(val route: String, @DrawableRes val iconResId: Int, val title: String) {
6 | data object Dashboard : ScreenConstants("dashboard", R.drawable.graph_svgrepo_com, "Dashboard")
7 | data object AIPrompt : ScreenConstants("ai_prompt", R.drawable.light_bulb_svgrepo_com, "AI Prompt")
8 | data object Profile : ScreenConstants("profile", R.drawable.profile_svgrepo_com, "Profile")
9 | data object Login : ScreenConstants("login", 0, "Login")
10 | }
11 |
12 |
--------------------------------------------------------------------------------
/server/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "smartbobbackend",
3 | "version": "1.0.0",
4 | "description": "Main backend for SmartBOB hackathon",
5 | "main": "server.js",
6 | "scripts": {
7 | "test": "echo \"Error: no test specified\" && exit 1",
8 | "start": "node server.js",
9 | "dev": "nodemon server.js"
10 | },
11 | "author": "Tushar",
12 | "license": "ISC",
13 | "dependencies": {
14 | "bcrypt": "^5.1.1",
15 | "bcryptjs": "^2.4.3",
16 | "dotenv": "^16.4.5",
17 | "express": "^4.19.2",
18 | "express-validator": "^7.1.0",
19 | "jsonwebtoken": "^9.0.2",
20 | "mongoose": "^8.5.0"
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/android/app/src/main/java/com/uphar/bussinesss/domain/Utils/state/APIError.kt:
--------------------------------------------------------------------------------
1 | package com.jhalakXCorp.vent.bussinesss.domain.Utils.state
2 |
3 | import androidx.annotation.Keep
4 | import com.google.gson.annotations.Expose
5 | import com.google.gson.annotations.SerializedName
6 | @Keep
7 | data class APIError(
8 |
9 | @SerializedName("statusCode")
10 | @Expose
11 | val statusCode: Int,
12 | @SerializedName("message")
13 | @Expose
14 | val message: List,
15 | @SerializedName("error")
16 | @Expose
17 | val error: String
18 | ) {
19 | constructor() : this(400, listOf("Something went wrong"), "Bad Request")
20 | }
--------------------------------------------------------------------------------
/android/app/src/main/java/com/uphar/bussinesss/domain/dataStore/authetication/LoginDatasourceImpl.kt:
--------------------------------------------------------------------------------
1 | package com.uphar.bussinesss.domain.dataStore.authetication
2 |
3 | import android.util.Log
4 | import com.uphar.bussinesss.domain.Utils.state.DataState
5 | import com.uphar.bussinesss.domain.Utils.exhaustive
6 | import com.uphar.datasource.networkmodel.LoginRequest
7 | import com.uphar.datasource.retrofit.BOBRetrofitService
8 | import kotlinx.coroutines.flow.Flow
9 | import kotlinx.coroutines.flow.flow
10 |
11 |
12 | class LoginDatasourceImpl constructor( private val BOBRetrofitService: BOBRetrofitService
13 | ) : LoginDatasource {
14 |
15 |
16 | }
17 |
--------------------------------------------------------------------------------
/android/app/src/main/java/com/uphar/bussinesss/domain/Utils/networkException/NetworkUtil.java:
--------------------------------------------------------------------------------
1 | package com.uphar.bussinesss.domain.Utils.networkException;
2 |
3 | import android.content.Context;
4 | import android.net.ConnectivityManager;
5 | import android.net.NetworkInfo;
6 |
7 | public class NetworkUtil {
8 |
9 | public static boolean isOnline(Context context) {
10 | ConnectivityManager connectivityManager = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE);
11 | NetworkInfo netInfo = connectivityManager.getActiveNetworkInfo();
12 | return (netInfo != null && netInfo.isConnected());
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/server/routes/policyDetails.js:
--------------------------------------------------------------------------------
1 | const express = require('express');
2 | const router = express.Router();
3 | const policyDetailController = require('../controllers/policyDetailController');
4 | const auth = require('../middleware/auth');
5 |
6 | // Create a new policy detail
7 | router.post('/', policyDetailController.createPolicyDetail);
8 |
9 | // Get all policy details
10 | router.get('/', policyDetailController.getAllPolicyDetails);
11 |
12 | // Get policy detail by ID
13 | router.get('/:id', policyDetailController.getPolicyDetailById);
14 |
15 | router.post('/subscribe', auth, policyDetailController.addPolicySubscribed);
16 |
17 | module.exports = router;
18 |
--------------------------------------------------------------------------------
/android/app/src/main/res/xml/data_extraction_rules.xml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
8 |
12 |
13 |
19 |
--------------------------------------------------------------------------------
/utilities/src/main/kotlin/srtbaroda/utilities/JoinUtils.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * This Kotlin source file was generated by the Gradle 'init' task.
3 | */
4 | package srtbaroda.utilities
5 |
6 | import srtbaroda.list.LinkedList
7 |
8 | class JoinUtils {
9 | companion object {
10 | fun join(source: LinkedList): String {
11 | val result = StringBuilder()
12 | for (i in 0 until source.size()) {
13 | if (result.isNotEmpty()) {
14 | result.append(" ")
15 | }
16 | result.append(source.get(i))
17 | }
18 |
19 | return result.toString()
20 | }
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/server/models/Transaction.js:
--------------------------------------------------------------------------------
1 | const mongoose = require('mongoose');
2 | const Schema = mongoose.Schema;
3 |
4 | const TransactionSchema = new Schema({
5 | desc: { type: String },
6 | amount: { type: Number, required: true },
7 | recieverAccNo: { type: Number, required: true },
8 | senderAccNo: { type: Number, required: true },
9 | type: { type: String, enum: ['Food', 'Groceries', 'Travel', 'Bills', 'Loan', 'Anonymous', 'Salary'], required: true, default: 'Anonymous' },
10 | status: { type: String, required: true },
11 | created_at: { type: Date, default: Date.now }
12 | });
13 |
14 | module.exports = mongoose.model('Transaction', TransactionSchema);
15 |
--------------------------------------------------------------------------------
/server/models/LoanIssued.js:
--------------------------------------------------------------------------------
1 | const mongoose = require('mongoose');
2 | const Schema = mongoose.Schema;
3 |
4 | const LoansIssuedSchema = new Schema({
5 | desc: { type: String },
6 | recieverAccNo: { type: Number, required: true },
7 | type: { type: String, required: true },
8 | amount: { type: Number, required: true },
9 | paid: { type: Number, default: 0 },
10 | loanId: { type: Schema.Types.ObjectId, ref: 'LoanDetails', required: true },
11 | interest: { type: Number, required: true },
12 | status: { type: String, required: true },
13 | created_at: { type: Date, default: Date.now }
14 | });
15 |
16 | module.exports = mongoose.model('LoansIssued', LoansIssuedSchema);
17 |
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable/arrow_trend_down.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/android/app/src/main/java/com/uphar/datasource/networkmodel/TransactionNetwork.kt:
--------------------------------------------------------------------------------
1 | package com.uphar.datasource.networkmodel
2 |
3 | import com.google.gson.annotations.Expose
4 | import com.google.gson.annotations.SerializedName
5 |
6 |
7 |
8 | data class TransactionNetwork(
9 | @SerializedName("recieverAccNo")
10 | @Expose
11 | val receiverAccNo: Long,
12 |
13 | @SerializedName("desc")
14 | @Expose
15 | val desc: String,
16 |
17 | @SerializedName("amount")
18 | @Expose
19 | val amount: Double,
20 |
21 | @SerializedName("status")
22 | @Expose
23 | val status: String,
24 |
25 | @SerializedName("type")
26 | @Expose
27 | val type: String
28 | )
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable/ic_glass.xml:
--------------------------------------------------------------------------------
1 |
6 |
10 |
15 |
16 |
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable/ic_edit.xml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
9 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/android/app/src/main/java/com/uphar/datasource/networkmodel/RegisterRequest.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 RegisterRequest(
7 | @SerializedName("accNo")
8 | @Expose
9 | val accNo: Int,
10 |
11 | @SerializedName("username")
12 | @Expose
13 | val username: String,
14 |
15 | @SerializedName("panCard")
16 | @Expose
17 | val panCard: String,
18 |
19 | @SerializedName("cibilScore")
20 | @Expose
21 | val cibilScore: Int,
22 |
23 | @SerializedName("type")
24 | @Expose
25 | val type: String,
26 |
27 | @SerializedName("password")
28 | @Expose
29 | val password: String
30 | )
31 |
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable/ic_dataprivacy.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
16 |
17 |
--------------------------------------------------------------------------------
/android/settings.gradle.kts:
--------------------------------------------------------------------------------
1 | pluginManagement {
2 | repositories {
3 | google {
4 | content {
5 | includeGroupByRegex("com\\.android.*")
6 | includeGroupByRegex("com\\.google.*")
7 | includeGroupByRegex("androidx.*")
8 | }
9 | }
10 | mavenCentral()
11 | gradlePluginPortal()
12 | maven { url = uri("https://www.jitpack.io" ) }
13 | }
14 | }
15 |
16 | dependencyResolutionManagement {
17 | repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
18 | repositories {
19 | google()
20 | mavenCentral()
21 | maven { url = uri("https://www.jitpack.io" ) }
22 | }
23 | }
24 |
25 | rootProject.name = "Smart Baroda"
26 | include(":app")
27 |
--------------------------------------------------------------------------------
/android/.idea/gradle.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/android/app/src/main/java/com/uphar/bussinesss/domain/data/profile/ProfileDetailByAccountData.kt:
--------------------------------------------------------------------------------
1 | package com.uphar.bussinesss.domain.data.profile
2 |
3 | data class ProfileDetailByAccountData(
4 | val user: User,
5 | val sellerDetails: SellerDetails
6 | )
7 |
8 | data class User(
9 | val id: String,
10 | val accountNumber: Int,
11 | val username: String,
12 | val panCard: String,
13 | val cibilScore: Int,
14 | val type: String,
15 | val gstin: String,
16 | val password: String,
17 | val balance: Int,
18 | val createdAt: String,
19 | val v: Int
20 | )
21 |
22 | data class SellerDetails(
23 | val id: String,
24 | val gstNo: String,
25 | val sellerName: String,
26 | val type: String,
27 | val desc: String,
28 | val v: Int
29 | )
30 |
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable/ic_background.xml:
--------------------------------------------------------------------------------
1 |
7 |
9 |
10 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/genAI/tools/policy.py:
--------------------------------------------------------------------------------
1 | from datetime import datetime
2 | from langchain.agents import tool, initialize_agent
3 | from mongoClient import fetchDataMongo
4 | import json
5 | def fetchJsonData (file_path: str) -> str:
6 | """Fetches the data from the json file and converts it to string"""
7 | try:
8 | with open(file_path, 'r') as json_file:
9 | data = json.load(json_file)
10 | return json.dumps(data, indent=4)
11 | except Exception as e:
12 | return str(e)
13 |
14 | @tool
15 | def policyTool(query: str) -> str:
16 | """Loan tool : To get details of the loan that is available"""
17 | ## fetch the loan details from the json fil and convert it to string
18 | policies = fetchDataMongo("policydetails", {})
19 | response = policies
20 | return response
--------------------------------------------------------------------------------
/genAI/tools/promotions.py:
--------------------------------------------------------------------------------
1 | from datetime import datetime
2 | from langchain.agents import tool, initialize_agent
3 |
4 | import sys
5 | import os
6 | # Add the parent directory to the path
7 | sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
8 | from mongoClient import fetchDataMongo
9 | import json
10 | import random
11 |
12 |
13 |
14 | @tool
15 | def promotionsTool(query: str) -> str:
16 | """Promotions Tool : To get details of the promotions that is available"""
17 | ## fetch the loan details from the json fil and convert it to string
18 | promotions = fetchDataMongo("promotion", {})
19 | ## choose the random promotion from the list of promotions
20 | randomPromotion = promotions[random.randint(0, len(promotions) - 1)]
21 | return randomPromotion
22 |
23 |
--------------------------------------------------------------------------------
/server/routes/transactions.js:
--------------------------------------------------------------------------------
1 | const express = require('express');
2 | const router = express.Router();
3 | const transactionController = require('../controllers/transactionController');
4 | const auth = require('../middleware/auth');
5 |
6 | // Create a new transaction
7 | router.post('/', auth, transactionController.createTransaction);
8 |
9 | // Get all transactions for logged in user
10 | router.get('/', auth, async (req, res) => {
11 | try {
12 | const transactions = await Transaction.find({ $or: [{ sender: req.user.id }, { receiver: req.user.id }] });
13 | res.status(200).send(transactions);
14 | } catch (err) {
15 | res.status(400).send(err);
16 | }
17 | });
18 |
19 | // Get transaction by ID
20 | router.get('/:id', auth, transactionController.getTransactionById);
21 |
22 | module.exports = router;
23 |
--------------------------------------------------------------------------------
/.github/workflows/cicd-nodejs.yml:
--------------------------------------------------------------------------------
1 | name: Deploy Node.js to Azure App Service
2 |
3 | on:
4 | push:
5 | branches:
6 | - final-submission
7 |
8 | jobs:
9 | build-and-deploy:
10 | runs-on: ubuntu-latest
11 | steps:
12 | - name: Checkout Source
13 | uses: actions/checkout@v3
14 |
15 | - name: Setup Node.js version
16 | uses: actions/setup-node@v4
17 | with:
18 | node-version: '20.x'
19 |
20 | - name: Install Dependencies
21 | run: |
22 | cd server
23 | npm install
24 |
25 | - name: Deploy to Azure App Service
26 | uses: azure/webapps-deploy@v2
27 | with:
28 | app-name: smartbarodanode
29 | publish-profile: ${{ secrets.AZURE_WEBAPP_PUBLISH_PROFILE }}
30 | package: server
31 |
--------------------------------------------------------------------------------
/android/app/src/androidTest/java/com/uphar/smartbaroda/ExampleInstrumentedTest.kt:
--------------------------------------------------------------------------------
1 | package com.uphar.smartbaroda
2 |
3 | import androidx.test.platform.app.InstrumentationRegistry
4 | import androidx.test.ext.junit.runners.AndroidJUnit4
5 |
6 | import org.junit.Test
7 | import org.junit.runner.RunWith
8 |
9 | import org.junit.Assert.*
10 |
11 | /**
12 | * Instrumented test, which will execute on an Android device.
13 | *
14 | * See [testing documentation](http://d.android.com/tools/testing).
15 | */
16 | @RunWith(AndroidJUnit4::class)
17 | class ExampleInstrumentedTest {
18 | @Test
19 | fun useAppContext() {
20 | // Context of the app under test.
21 | val appContext = InstrumentationRegistry.getInstrumentation().targetContext
22 | assertEquals("com.uphar.smartbaroda", appContext.packageName)
23 | }
24 | }
--------------------------------------------------------------------------------
/android/app/src/main/java/com/uphar/bussinesss/domain/Utils/state/ErrorUtils.kt:
--------------------------------------------------------------------------------
1 | package com.jhalakXCorp.vent.bussinesss.domain.Utils.state
2 |
3 | import okhttp3.ResponseBody
4 | import retrofit2.Converter
5 | import retrofit2.Response
6 | import retrofit2.Retrofit
7 | import java.io.IOException
8 |
9 | class ErrorUtils constructor(
10 | private val retrofit: Retrofit
11 | ) {
12 |
13 | fun parseError(response: Response<*>): APIError? {
14 | val converter: Converter = retrofit
15 | .responseBodyConverter(APIError::class.java, arrayOfNulls(0))
16 | val error: APIError = try {
17 | response.errorBody()?.let { converter.convert(it) }!!
18 | } catch (e: IOException) {
19 | return APIError()
20 | }
21 | return error
22 | }
23 | }
--------------------------------------------------------------------------------
/settings.gradle.kts:
--------------------------------------------------------------------------------
1 | /*
2 | * This file was generated by the Gradle 'init' task.
3 | *
4 | * The settings file is used to specify which projects to include in your build.
5 | *
6 | * Detailed information about configuring a multi-project build in Gradle can be found
7 | * in the user manual at https://docs.gradle.org/8.1.1/userguide/multi_project_builds.html
8 | * This project uses @Incubating APIs which are subject to change.
9 | */
10 |
11 | pluginManagement {
12 | // Include 'plugins build' to define convention plugins.
13 | includeBuild("build-logic")
14 | }
15 |
16 | plugins {
17 | // Apply the foojay-resolver plugin to allow automatic download of JDKs
18 | id("org.gradle.toolchains.foojay-resolver-convention") version "0.4.0"
19 | }
20 |
21 | rootProject.name = "SmartBaroda"
22 | include("app", "list", "utilities")
23 |
--------------------------------------------------------------------------------
/android/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # You can control the set of applied configuration files using the
3 | # proguardFiles setting in build.gradle.
4 | #
5 | # For more details, see
6 | # http://developer.android.com/guide/developing/tools/proguard.html
7 |
8 | # If your project uses WebView with JS, uncomment the following
9 | # and specify the fully qualified class name to the JavaScript interface
10 | # class:
11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12 | # public *;
13 | #}
14 |
15 | # Uncomment this to preserve the line number information for
16 | # debugging stack traces.
17 | #-keepattributes SourceFile,LineNumberTable
18 |
19 | # If you keep the line number information, uncomment this to
20 | # hide the original source file name.
21 | #-renamesourcefileattribute SourceFile
--------------------------------------------------------------------------------
/server/models/PolicyDetail.js:
--------------------------------------------------------------------------------
1 | const mongoose = require('mongoose');
2 | const Schema = mongoose.Schema;
3 |
4 | const PolicyDetailSchema = new Schema({
5 | desc: { type: String, required: true },
6 | premium: { type: mongoose.Types.Decimal128, required: true },
7 | tenure: { type: mongoose.Types.Decimal128, required: true },
8 | maturity: { type: mongoose.Types.Decimal128, required: true },
9 | endAmount: { type: mongoose.Types.Decimal128, required: true },
10 | insuranceCover: { type: Boolean, required: true },
11 | insuranceAmount: { type: mongoose.Types.Decimal128 },
12 | type: { type: String, required: true },
13 | benifits: { type: String, required: true },
14 | downloadableDoc: { type: String, required: true },
15 | created_at: { type: Date, default: Date.now }
16 | });
17 |
18 | module.exports = mongoose.model('PolicyDetail', PolicyDetailSchema);
19 |
--------------------------------------------------------------------------------
/android/app/src/main/java/com/uphar/di/RepositoryModule.kt:
--------------------------------------------------------------------------------
1 | package com.uphar.di
2 |
3 | import com.uphar.bussinesss.domain.dataStore.basePreference.BasePreferencesManager
4 | import com.uphar.bussinesss.domain.dataStore.common.CommonDatasource
5 | import com.uphar.bussinesss.repository.CommonRepository
6 | import dagger.Module
7 | import dagger.Provides
8 | import dagger.hilt.InstallIn
9 | import dagger.hilt.components.SingletonComponent
10 | import javax.inject.Singleton
11 |
12 | @Module
13 | @InstallIn(SingletonComponent::class)
14 | object RepositoryModule {
15 |
16 |
17 | @Singleton
18 | @Provides
19 | fun provideCommonRepository(
20 | commonDatasource: CommonDatasource, basePreferencesManager: BasePreferencesManager
21 |
22 | ): CommonRepository {
23 | return CommonRepository(commonDatasource, basePreferencesManager)
24 | }
25 | }
26 |
27 |
28 |
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable/edit_text_square_rounded_new.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
22 |
--------------------------------------------------------------------------------
/server/controllers/gstController.js:
--------------------------------------------------------------------------------
1 | const GST = require('../models/GST');
2 |
3 | // Create a new GST
4 | exports.createGST = async (req, res) => {
5 | try {
6 | const gst = new GST(req.body);
7 | await gst.save();
8 | res.status(201).send(gst);
9 | } catch (err) {
10 | res.status(400).send(err);
11 | }
12 | };
13 |
14 | // Get all GST records
15 | exports.getAllGST = async (req, res) => {
16 | try {
17 | const gstRecords = await GST.find();
18 | res.status(200).send(gstRecords);
19 | } catch (err) {
20 | res.status(400).send(err);
21 | }
22 | };
23 |
24 | // Get GST by ID
25 | exports.getGSTById = async (req, res) => {
26 | try {
27 | const gst = await GST.findById(req.params.id);
28 | if (!gst) return res.status(404).send();
29 | res.status(200).send(gst);
30 | } catch (err) {
31 | res.status(400).send(err);
32 | }
33 | };
34 |
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable/ic_lendingpolicy.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
12 |
13 |
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable/menu.xml:
--------------------------------------------------------------------------------
1 |
6 |
12 |
18 |
24 |
--------------------------------------------------------------------------------
/android/app/src/main/java/com/uphar/datasource/networkmodel/FinancialReportResponse.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 Expenditure(
7 | @SerializedName("Anonymous")
8 | @Expose
9 | val anonymous: String,
10 |
11 | @SerializedName("Food")
12 | @Expose
13 | val food: String,
14 |
15 | @SerializedName("Groceries")
16 | @Expose
17 | val groceries: String,
18 |
19 | @SerializedName("Loan")
20 | @Expose
21 | val loan: String,
22 |
23 | @SerializedName("Travel")
24 | @Expose
25 | val travel: String
26 | )
27 |
28 | data class FinancialReportResponse(
29 | @SerializedName("expenditure")
30 | @Expose
31 | val expenditure: Expenditure,
32 |
33 | @SerializedName("savingsSuggestions")
34 | @Expose
35 | val savingsSuggestions: String
36 | )
37 |
--------------------------------------------------------------------------------
/server/routes/auth.js:
--------------------------------------------------------------------------------
1 | const express = require('express');
2 | const { check } = require('express-validator');
3 | const router = express.Router();
4 | const authController = require('../controllers/authController');
5 |
6 | // Register route
7 | router.post('/register', [
8 | check('accNo', 'Account number is required').not().isEmpty(),
9 | check('username', 'Username is required').not().isEmpty(),
10 | check('panCard', 'Pan card is required').not().isEmpty(),
11 | check('cibilScore', 'Cibil score is required').not().isEmpty(),
12 | check('type', 'Type is required').not().isEmpty(),
13 | check('password', 'Password is required').isLength({ min: 6 })
14 | ], authController.register);
15 |
16 | // Login route
17 | router.post('/login', [
18 | check('accNo', 'Account number is required').not().isEmpty(),
19 | check('password', 'Password is required').exists()
20 | ], authController.login);
21 |
22 | module.exports = router;
23 |
--------------------------------------------------------------------------------
/genAI/tools/user.py:
--------------------------------------------------------------------------------
1 | import sys
2 | import os
3 | from collections import defaultdict
4 | sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
5 |
6 | from datetime import datetime
7 | from langchain.agents import tool, initialize_agent
8 | from mongoClient import fetchDataMongo
9 | from repo.user import userTransactionCategory
10 | import json
11 |
12 |
13 |
14 | @tool
15 | def dateTool(query: str) -> str:
16 | """Date tool : To get the lastest / current date"""
17 | response = " Today is " + datetime.today().strftime("%Y-%m-%d")
18 | return response
19 |
20 | @tool
21 | def userTransactionCategoryTool(userId: str) -> str:
22 | """User Transaction Category tool : To get the user transaction by the transaction category"""
23 | ## fetch the loan details from the json fil and convert it to string
24 | transactions = userTransactionCategory(int(userId))
25 | response = transactions
26 | return response
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable/ic_arrow_right.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/genAI/tools/loan.py:
--------------------------------------------------------------------------------
1 | from datetime import datetime
2 | from langchain.agents import tool, initialize_agent
3 | from mongoClient import fetchDataMongo
4 | import json
5 | def fetchJsonData (file_path: str) -> str:
6 | """Fetches the data from the json file and converts it to string"""
7 | try:
8 | with open(file_path, 'r') as json_file:
9 | data = json.load(json_file)
10 | return json.dumps(data, indent=4)
11 | except Exception as e:
12 | return str(e)
13 |
14 | @tool
15 | def dateTool(query: str) -> str:
16 | """Date tool : To get the lastest / current date"""
17 | response = " Today is " + datetime.today().strftime("%Y-%m-%d")
18 | return response
19 |
20 | @tool
21 | def loanTool(query: str) -> str:
22 | """Loan tool : To get details of the loan that is available"""
23 | ## fetch the loan details from the json fil and convert it to string
24 | loans = fetchDataMongo("loandetails", {})
25 | response = loans
26 | return response
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable/ic_otwo.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
14 |
19 |
20 |
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable/ic_othree.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
14 |
19 |
20 |
--------------------------------------------------------------------------------
/android/app/src/main/java/com/uphar/datasource/networkmodel/TransactionResponse.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 TransactionResponse(
7 | @SerializedName("desc")
8 | @Expose
9 | val desc: String,
10 |
11 | @SerializedName("amount")
12 | @Expose
13 | val amount: Int,
14 |
15 | @SerializedName("recieverAccNo")
16 | @Expose
17 | val receiverAccNo: Int,
18 |
19 | @SerializedName("senderAccNo")
20 | @Expose
21 | val senderAccNo: Int,
22 |
23 | @SerializedName("type")
24 | @Expose
25 | val type: String,
26 |
27 | @SerializedName("status")
28 | @Expose
29 | val status: String,
30 |
31 | @SerializedName("_id")
32 | @Expose
33 | val id: String,
34 |
35 | @SerializedName("created_at")
36 | @Expose
37 | val createdAt: String,
38 |
39 | @SerializedName("__v")
40 | @Expose
41 | val version: Int
42 | )
43 |
--------------------------------------------------------------------------------
/android/app/src/main/java/com/uphar/datasource/networkmodel/loanrecommendationNetworkRespone.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 LoanRecommendationRequest(
7 | @SerializedName("userPrompt")
8 | @Expose
9 | val userPrompt: String
10 | )
11 | data class LoanRecommendationResponse(
12 | @SerializedName("loanType")
13 | @Expose
14 | val loanType: String,
15 |
16 | @SerializedName("loanAmount")
17 | @Expose
18 | val loanAmount: String,
19 |
20 | @SerializedName("loanTenure")
21 | @Expose
22 | val loanTenure: String,
23 |
24 | @SerializedName("interestRate")
25 | @Expose
26 | val interestRate: String,
27 |
28 | @SerializedName("emi")
29 | @Expose
30 | val emi: String,
31 |
32 | @SerializedName("processingFee")
33 | @Expose
34 | val processingFee: String,
35 |
36 | @SerializedName("totalCost")
37 | @Expose
38 | val totalCost: String
39 | )
--------------------------------------------------------------------------------
/genAI/repo/user.py:
--------------------------------------------------------------------------------
1 | import sys
2 | import os
3 | from collections import defaultdict
4 |
5 | sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
6 |
7 | # import the required dependencies
8 | from mongoClient import fetchDataMongo
9 |
10 | def userTransactionCategory(userId):
11 | # Fetch the expenditures of the user
12 | transactions = fetchDataMongo("transactions", {"senderAccNo": userId})
13 |
14 | # Initialize a dictionary to hold the total expenditure for each category
15 | expenditureByType = defaultdict(float)
16 |
17 | # Process each transaction
18 | for transaction in transactions:
19 | transaction_type = transaction.get('type')
20 | amount = transaction.get('amount', 0)
21 | # Sum up the amount for each type
22 | expenditureByType[transaction_type] += amount
23 |
24 | # Print the total expenditures by type
25 | for category, total_amount in expenditureByType.items():
26 | print(f"Type: {category}, Total Amount: {total_amount}")
27 |
28 | return expenditureByType
29 |
30 |
31 |
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable/ic_tell_your_friend.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
12 |
15 |
18 |
21 |
24 |
25 |
--------------------------------------------------------------------------------
/server/models/User.js:
--------------------------------------------------------------------------------
1 | const mongoose = require('mongoose');
2 | const bcrypt = require('bcryptjs');
3 | const Schema = mongoose.Schema;
4 |
5 | const UserSchema = new Schema({
6 | accNo: { type: Number, required: true, unique: true },
7 | username: { type: String, required: true },
8 | panCard: { type: String, required: true },
9 | cibilScore: { type: Number, required: true },
10 | type: { type: String, required: true },
11 | GSTIN: { type: String },
12 | password: { type: String, required: true },
13 | balance: { type: Number, default: 0 },
14 | created_at: { type: Date, default: Date.now },
15 | });
16 |
17 | // Password hashing middleware
18 | UserSchema.pre('save', async function(next) {
19 | if (!this.isModified('password')) return next();
20 | const salt = await bcrypt.genSalt(10);
21 | this.password = await bcrypt.hash(this.password, salt);
22 | next();
23 | });
24 |
25 | UserSchema.methods.comparePassword = async function(password) {
26 | return await bcrypt.compare(password, this.password);
27 | };
28 |
29 | module.exports = mongoose.model('User', UserSchema);
30 |
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable/ic_oone.xml:
--------------------------------------------------------------------------------
1 |
6 |
11 |
16 |
21 |
22 |
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable/ic_payment.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/server/controllers/loanIssuedController.js:
--------------------------------------------------------------------------------
1 | const LoanIssued = require('../models/LoanIssued');
2 | const LoanDetails = require('../models/LoanDetail');
3 | const User = require('../models/User');
4 |
5 | // Create a new loan issued
6 | exports.createLoanIssued = async (req, res) => {
7 | try {
8 | const loanIssued = new LoanIssued(req.body);
9 | await loanIssued.save();
10 | res.status(201).send(loanIssued);
11 | } catch (err) {
12 | res.status(400).send(err);
13 | }
14 | };
15 |
16 | // Get all loans issued
17 | exports.getAllLoansIssued = async (req, res) => {
18 | try {
19 | const loansIssued = await LoanIssued.find();
20 | res.status(200).send(loansIssued);
21 | } catch (err) {
22 | res.status(400).send(err);
23 | }
24 | };
25 |
26 | // Get loan issued by ID
27 | exports.getLoanIssuedById = async (req, res) => {
28 | try {
29 | const loanIssued = await LoanIssued.findById(req.params.id);
30 | if (!loanIssued) return res.status(404).send();
31 | res.status(200).send(loanIssued);
32 | } catch (err) {
33 | res.status(400).send(err);
34 | }
35 | };
36 |
37 |
38 |
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable/ic_pendingtick.xml:
--------------------------------------------------------------------------------
1 |
7 |
9 |
10 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable/ic_successtick.xml:
--------------------------------------------------------------------------------
1 |
7 |
9 |
10 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/server/controllers/policySubscribedController.js:
--------------------------------------------------------------------------------
1 | const PolicySubscribed = require('../models/PolicySubscribed');
2 |
3 | // Create a new policy subscribed
4 | exports.createPolicySubscribed = async (req, res) => {
5 | try {
6 | const policySubscribed = new PolicySubscribed(req.body);
7 | await policySubscribed.save();
8 | res.status(201).send(policySubscribed);
9 | } catch (err) {
10 | res.status(400).send(err);
11 | }
12 | };
13 |
14 | // Get all policies subscribed
15 | exports.getAllPoliciesSubscribed = async (req, res) => {
16 | try {
17 | const policiesSubscribed = await PolicySubscribed.find();
18 | res.status(200).send(policiesSubscribed);
19 | } catch (err) {
20 | res.status(400).send(err);
21 | }
22 | };
23 |
24 | // Get policy subscribed by ID
25 | exports.getPolicySubscribedById = async (req, res) => {
26 | try {
27 | const policySubscribed = await PolicySubscribed.findById(req.params.id);
28 | if (!policySubscribed) return res.status(404).send();
29 | res.status(200).send(policySubscribed);
30 | } catch (err) {
31 | res.status(400).send(err);
32 | }
33 | };
34 |
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable/ic_home.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/appInsightsSettings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable/ic_allowtick.xml:
--------------------------------------------------------------------------------
1 |
7 |
10 |
12 |
13 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/android/app/src/main/res/layout/activity_camera.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
14 |
15 |
16 |
17 |
27 |
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable/ic_card_primary.xml:
--------------------------------------------------------------------------------
1 |
7 |
9 |
10 |
16 |
17 |
18 |
19 |
20 |
21 |
25 |
26 |
--------------------------------------------------------------------------------
/android/app/src/main/java/com/uphar/di/AppModule.kt:
--------------------------------------------------------------------------------
1 | package com.uphar.di
2 |
3 | import android.content.Context
4 | import com.uphar.bussinesss.domain.dataStore.basePreference.BasePreferencesManager
5 | import com.uphar.bussinesss.domain.dataStore.basePreference.BasePreferencesManagerImpl
6 | import com.uphar.smartbaroda.NotificationService
7 | import dagger.Module
8 | import dagger.Provides
9 | import dagger.hilt.InstallIn
10 | import dagger.hilt.android.qualifiers.ApplicationContext
11 | import dagger.hilt.components.SingletonComponent
12 | import javax.inject.Singleton
13 |
14 |
15 | @Module
16 | @InstallIn(SingletonComponent::class)
17 | object AppModule {
18 |
19 | @Singleton
20 | @Provides
21 | fun provideDataStoreRepository(@ApplicationContext context: Context): BasePreferencesManager {
22 | return BasePreferencesManagerImpl(context)
23 | }
24 |
25 | @Provides
26 | fun provideNotificationService(@ApplicationContext context: Context): NotificationService {
27 | return NotificationService(context)
28 | }
29 | }
30 |
31 |
32 | /*@Qualifier
33 | @Retention(AnnotationRetention.BINARY)
34 | annotation class NetworkConnection*/
--------------------------------------------------------------------------------
/.github/workflows/cicd.yml:
--------------------------------------------------------------------------------
1 | name: CI/CD Pipeline
2 |
3 | on:
4 | push:
5 | branches:
6 | - final-submission
7 |
8 | jobs:
9 | build-and-deploy:
10 | runs-on: ubuntu-latest
11 |
12 | steps:
13 | - name: Checkout code
14 | uses: actions/checkout@v2
15 |
16 | - name: Set up Python
17 | uses: actions/setup-python@v2
18 | with:
19 | python-version: '3.x'
20 |
21 | - name: Install dependencies
22 | run: |
23 | cd genAI
24 | python -m pip install --upgrade pip
25 | pip install -r requirements.txt
26 |
27 | - name: Build and test
28 | run: |
29 | # Add your build and test commands here
30 | cd genAI
31 | uvicorn main:app
32 |
33 | - name: Publish artifact
34 | uses: actions/upload-artifact@v2
35 | with:
36 | name: app
37 |
38 | - name: Deploy to Azure App Service
39 | uses: azure/webapps-deploy@v2
40 | with:
41 | app-name: smartbarodagenaiV2
42 | publish-profile: ${{ secrets.AZURE_APP_SERVICE_GENAI }}
43 | package: ${{ github.workspace }}/genAI
44 |
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable/ic_shutter.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/android/app/src/main/java/com/uphar/smartbaroda/ui/theme/Type.kt:
--------------------------------------------------------------------------------
1 | package com.uphar.smartbaroda.ui.theme
2 |
3 | import androidx.compose.material3.Typography
4 | import androidx.compose.ui.text.TextStyle
5 | import androidx.compose.ui.text.font.FontFamily
6 | import androidx.compose.ui.text.font.FontWeight
7 | import androidx.compose.ui.unit.sp
8 |
9 | // Set of Material typography styles to start with
10 | val Typography = Typography(
11 | bodyLarge = TextStyle(
12 | fontFamily = FontFamily.Default,
13 | fontWeight = FontWeight.Normal,
14 | fontSize = 16.sp,
15 | lineHeight = 24.sp,
16 | letterSpacing = 0.5.sp
17 | )
18 | /* Other default text styles to override
19 | titleLarge = TextStyle(
20 | fontFamily = FontFamily.Default,
21 | fontWeight = FontWeight.Normal,
22 | fontSize = 22.sp,
23 | lineHeight = 28.sp,
24 | letterSpacing = 0.sp
25 | ),
26 | labelSmall = TextStyle(
27 | fontFamily = FontFamily.Default,
28 | fontWeight = FontWeight.Medium,
29 | fontSize = 11.sp,
30 | lineHeight = 16.sp,
31 | letterSpacing = 0.5.sp
32 | )
33 | */
34 | )
--------------------------------------------------------------------------------
/android/app/src/main/java/com/uphar/smartbaroda/ui/ui/theme/Type.kt:
--------------------------------------------------------------------------------
1 | package com.uphar.smartbaroda.ui.ui.theme
2 |
3 | import androidx.compose.material3.Typography
4 | import androidx.compose.ui.text.TextStyle
5 | import androidx.compose.ui.text.font.FontFamily
6 | import androidx.compose.ui.text.font.FontWeight
7 | import androidx.compose.ui.unit.sp
8 |
9 | // Set of Material typography styles to start with
10 | val Typography = Typography(
11 | bodyLarge = TextStyle(
12 | fontFamily = FontFamily.Default,
13 | fontWeight = FontWeight.Normal,
14 | fontSize = 16.sp,
15 | lineHeight = 24.sp,
16 | letterSpacing = 0.5.sp
17 | )
18 | /* Other default text styles to override
19 | titleLarge = TextStyle(
20 | fontFamily = FontFamily.Default,
21 | fontWeight = FontWeight.Normal,
22 | fontSize = 22.sp,
23 | lineHeight = 28.sp,
24 | letterSpacing = 0.sp
25 | ),
26 | labelSmall = TextStyle(
27 | fontFamily = FontFamily.Default,
28 | fontWeight = FontWeight.Medium,
29 | fontSize = 11.sp,
30 | lineHeight = 16.sp,
31 | letterSpacing = 0.5.sp
32 | )
33 | */
34 | )
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable/baseline_celebration_24.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable/ic_history.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
12 |
13 |
--------------------------------------------------------------------------------
/android/app/src/main/java/com/uphar/bussinesss/domain/data/profile/ProfileResponseData.kt:
--------------------------------------------------------------------------------
1 | package com.uphar.bussinesss.domain.data.profile
2 |
3 |
4 | data class ProfileResponseData(
5 | val id: String,
6 | val accountNumber: Int,
7 | val username: String,
8 | val panCard: String,
9 | val cibilScore: Int,
10 | val type: String,
11 | val password: String,
12 | val balance: Int,
13 | val createdAt: String,
14 | val version: Int,
15 | val transactions: List,
16 | val loans: List
17 | )
18 |
19 | data class Transaction(
20 | val id: String,
21 | val description: String,
22 | val amount: Int,
23 | val receiverAccountNumber: Int,
24 | val senderAccountNumber: Int,
25 | val type: String,
26 | val status: String,
27 | val createdAt: String,
28 | val version: Int,
29 | val isSender: Boolean
30 | )
31 |
32 | data class Loan(
33 | val id: String,
34 | val description: String,
35 | val receiverAccountNumber: Int,
36 | val type: String,
37 | val amount: Int,
38 | val paid: Int,
39 | val loanId: String,
40 | val interest: Int,
41 | val status: String,
42 | val createdAt: String,
43 | val version: Int
44 | )
45 |
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable/icon_arrow_trend_up_svgrepo_com.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable/ic_arrow_in.xml:
--------------------------------------------------------------------------------
1 |
6 |
11 |
16 |
23 |
30 |
31 |
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable/ic_arrow_out.xml:
--------------------------------------------------------------------------------
1 |
6 |
11 |
16 |
23 |
30 |
31 |
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable/ic_star.xml:
--------------------------------------------------------------------------------
1 |
7 |
9 |
10 |
15 |
16 |
17 |
18 |
19 |
20 |
26 |
27 |
--------------------------------------------------------------------------------
/android/app/src/main/java/com/uphar/datasource/networkmodel/PolicyRecommendationNetworkResponse.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 PolicyRecommendationNetworkResponse(
7 | @SerializedName("policyType")
8 | @Expose
9 | val policyType: String,
10 |
11 | @SerializedName("policyDescription")
12 | @Expose
13 | val policyDescription: String,
14 |
15 | @SerializedName("premiumAmount")
16 | @Expose
17 | val premiumAmount: String,
18 |
19 | @SerializedName("policyTenure")
20 | @Expose
21 | val policyTenure: String,
22 |
23 | @SerializedName("maturityPeriod")
24 | @Expose
25 | val maturityPeriod: String,
26 |
27 | @SerializedName("endAmount")
28 | @Expose
29 | val endAmount: String,
30 |
31 | @SerializedName("insuranceCover")
32 | @Expose
33 | val insuranceCover: Boolean, // Change to Boolean for proper type mapping
34 |
35 | @SerializedName("insuranceAmount")
36 | @Expose
37 | val insuranceAmount: String,
38 |
39 | @SerializedName("benefits")
40 | @Expose
41 | val benefits: String,
42 |
43 | @SerializedName("downloadableDocument")
44 | @Expose
45 | val downloadableDocument: String
46 | )
--------------------------------------------------------------------------------
/android/app/src/main/java/com/uphar/datasource/networkmodel/LoanOfferResponse.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 LoanOfferResponse(
7 | @SerializedName("_id")
8 | @Expose
9 | val id: String,
10 |
11 | @SerializedName("desc")
12 | @Expose
13 | val desc: String,
14 |
15 | @SerializedName("interest")
16 | @Expose
17 | val interest: Interest,
18 |
19 | @SerializedName("type")
20 | @Expose
21 | val type: String,
22 |
23 | @SerializedName("requiredCibil")
24 | @Expose
25 | val requiredCibil: RequiredCibil,
26 |
27 | @SerializedName("benifits")
28 | @Expose
29 | val benefits: String,
30 |
31 | @SerializedName("downloadableDoc")
32 | @Expose
33 | val downloadableDoc: String,
34 |
35 | @SerializedName("created_at")
36 | @Expose
37 | val createdAt: String,
38 |
39 | @SerializedName("__v")
40 | @Expose
41 | val version: Int
42 | )
43 |
44 | data class Interest(
45 | @SerializedName("\$numberDecimal")
46 | @Expose
47 | val numberDecimal: String
48 | )
49 |
50 | data class RequiredCibil(
51 | @SerializedName("\$numberDecimal")
52 | @Expose
53 | val numberDecimal: String
54 | )
55 |
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable/ic_dashboard.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
12 |
15 |
18 |
19 |
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable/ic_back.xml:
--------------------------------------------------------------------------------
1 |
6 |
10 |
11 |
14 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/android/app/src/main/res/layout/activity_splash.xml:
--------------------------------------------------------------------------------
1 |
2 |
11 |
12 |
19 |
20 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/list/src/test/kotlin/srtbaroda/list/LinkedListTest.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * This Kotlin source file was generated by the Gradle "init" task.
3 | */
4 | package srtbaroda.list
5 |
6 | import org.junit.jupiter.api.Test
7 |
8 | import org.junit.jupiter.api.Assertions.*
9 |
10 | class LinkedListTest {
11 | @Test fun testConstructor() {
12 | val list = LinkedList()
13 | assertEquals(0, list.size())
14 | }
15 |
16 | @Test fun testAdd() {
17 | val list = LinkedList()
18 |
19 | list.add("one")
20 | assertEquals(1, list.size())
21 | assertEquals("one", list.get(0))
22 |
23 | list.add("two")
24 | assertEquals(2, list.size())
25 | assertEquals("two", list.get(1))
26 | }
27 |
28 | @Test fun testRemove() {
29 | val list = LinkedList()
30 |
31 | list.add("one")
32 | list.add("two")
33 | assertTrue(list.remove("one"))
34 |
35 | assertEquals(1, list.size())
36 | assertEquals("two", list.get(0))
37 |
38 | assertTrue(list.remove("two"))
39 | assertEquals(0, list.size())
40 | }
41 |
42 | @Test fun testRemoveMissing() {
43 | val list = LinkedList()
44 |
45 | list.add("one")
46 | list.add("two")
47 | assertFalse(list.remove("three"))
48 | assertEquals(2, list.size())
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/utilities/src/main/kotlin/srtbaroda/utilities/SplitUtils.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * This Kotlin source file was generated by the Gradle 'init' task.
3 | */
4 | package srtbaroda.utilities
5 |
6 | import srtbaroda.list.LinkedList
7 |
8 | class SplitUtils {
9 | companion object {
10 | fun split(source: String): LinkedList {
11 | var lastFind = 0
12 | val result = LinkedList()
13 |
14 | var currentFind = source.indexOf(" ", lastFind)
15 | while (currentFind != -1) {
16 | var token = source.substring(lastFind)
17 | if (currentFind != -1) {
18 | token = token.substring(0, currentFind - lastFind)
19 | }
20 |
21 | addIfValid(token, result)
22 | lastFind = currentFind + 1
23 | currentFind = source.indexOf(" ", lastFind)
24 | }
25 |
26 | val token = source.substring(lastFind)
27 | addIfValid(token, result)
28 |
29 | return result
30 | }
31 |
32 | private fun addIfValid(token: String, list: LinkedList) {
33 | if (isTokenValid(token)) {
34 | list.add(token)
35 | }
36 | }
37 |
38 | private fun isTokenValid(token: String): Boolean {
39 | return token.isNotEmpty()
40 | }
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable/ic_pin_backspace.xml:
--------------------------------------------------------------------------------
1 |
3 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/.idea/gradle.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable/transaction_icon.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
12 |
15 |
18 |
21 |
24 |
25 |
--------------------------------------------------------------------------------
/android/gradle.properties:
--------------------------------------------------------------------------------
1 | # Project-wide Gradle settings.
2 | # IDE (e.g. Android Studio) users:
3 | # Gradle settings configured through the IDE *will override*
4 | # any settings specified in this file.
5 | # For more details on how to configure your build environment visit
6 | # http://www.gradle.org/docs/current/userguide/build_environment.html
7 | # Specifies the JVM arguments used for the daemon process.
8 | # The setting is particularly useful for tweaking memory settings.
9 | org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
10 | # When configured, Gradle will run in incubating parallel mode.
11 | # This option should only be used with decoupled projects. For more details, visit
12 | # https://developer.android.com/r/tools/gradle-multi-project-decoupled-projects
13 | # org.gradle.parallel=true
14 | # AndroidX package structure to make it clearer which packages are bundled with the
15 | # Android operating system, and which are packaged with your app's APK
16 | # https://developer.android.com/topic/libraries/support-library/androidx-rn
17 | android.useAndroidX=true
18 | # Kotlin code style for this project: "official" or "obsolete":
19 | kotlin.code.style=official
20 | # Enables namespacing of each library's R class so that its R class includes only the
21 | # resources declared in the library itself and none from the library's dependencies,
22 | # thereby reducing the size of the R class for that library
23 | android.nonTransitiveRClass=true
--------------------------------------------------------------------------------
/android/app/src/main/java/com/uphar/smartbaroda/splashScreen/SplashActivity.kt:
--------------------------------------------------------------------------------
1 | package com.uphar.smartbaroda.splashScreen
2 |
3 | import android.content.Intent
4 | import android.os.Bundle
5 | import android.os.Handler
6 | import android.os.Looper
7 | import androidx.activity.ComponentActivity
8 | import androidx.appcompat.app.AppCompatActivity
9 | import com.uphar.smartbaroda.MainActivity
10 | import com.uphar.smartbaroda.databinding.ActivitySplashBinding
11 | import com.uphar.smartbaroda.ui.LoginActivity
12 | import dagger.hilt.android.AndroidEntryPoint
13 |
14 | @AndroidEntryPoint
15 | class SplashActivity : ComponentActivity() {
16 |
17 | private var binding: ActivitySplashBinding? = null
18 |
19 | override fun onCreate(savedInstanceState: Bundle?) {
20 | super.onCreate(savedInstanceState)
21 | binding = ActivitySplashBinding.inflate(layoutInflater)
22 | setContentView(binding?.root)
23 |
24 | init()
25 | }
26 |
27 | private fun init() {
28 | Handler(Looper.getMainLooper()).postDelayed({
29 | goToNextScreen()
30 | }, SPLASH_DELAY) // Set the delay for the splash screen duration
31 | }
32 |
33 | private fun goToNextScreen() {
34 | val intent = Intent(this, FaceMlActivity::class.java)
35 | startActivity(intent)
36 | finish()
37 | }
38 |
39 | companion object {
40 | private const val SPLASH_DELAY = 4000L
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable/no_data.xml:
--------------------------------------------------------------------------------
1 |
6 |
14 |
22 |
23 |
--------------------------------------------------------------------------------
/android/app/src/main/java/com/uphar/bussinesss/domain/dataStore/basePreference/BasePreferencesManager.kt:
--------------------------------------------------------------------------------
1 | package com.uphar.bussinesss.domain.dataStore.basePreference
2 |
3 |
4 |
5 | import kotlinx.coroutines.flow.Flow
6 |
7 | interface BasePreferencesManager {
8 |
9 | suspend fun updateAccessToken(accessToken: String)
10 | suspend fun getAccessToken(): Flow
11 | suspend fun getTestMode(): Flow
12 |
13 | suspend fun getAccountType(): Flow
14 | suspend fun updateRefreshToken(accessToken: String)
15 | suspend fun updateTestMode(test: String)
16 |
17 | suspend fun updateAccountType(userType: String)
18 | suspend fun getRefreshToken(): Flow
19 |
20 | suspend fun updateRefreshTokenExpiry(refreshTokeExpiry: Long)
21 | suspend fun getRefreshTokenExpiry(): Flow
22 |
23 | suspend fun logOut()
24 | suspend fun updateUserId(userId: String)
25 | suspend fun getUserId(): Flow
26 |
27 | suspend fun updateUserDetails(
28 | userId: String,
29 | userFirstName: String,
30 | userLastName: String,
31 | email: String,
32 | mobile: String,
33 | image: String,
34 | isNewUser: Boolean,
35 | isEmailVerified: Boolean,
36 | defaultBusinessId: String,
37 | isAadhaarVerified: Boolean,
38 | isBusinessVerified: Boolean
39 | )
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 | }
--------------------------------------------------------------------------------
/android/app/src/main/java/com/uphar/smartbaroda/showNotification.kt:
--------------------------------------------------------------------------------
1 | package com.uphar.smartbaroda
2 |
3 | import android.Manifest
4 | import androidx.compose.runtime.Composable
5 | import androidx.compose.runtime.LaunchedEffect
6 | import androidx.compose.runtime.remember
7 | import androidx.compose.ui.platform.LocalContext
8 | import com.google.accompanist.permissions.ExperimentalPermissionsApi
9 | import com.google.accompanist.permissions.isGranted
10 | import com.google.accompanist.permissions.rememberPermissionState
11 |
12 | @OptIn(ExperimentalPermissionsApi::class)
13 | @Composable
14 | fun shownotification(message: String)
15 | {
16 | val postNotificationPermission = rememberPermissionState(permission = Manifest.permission.POST_NOTIFICATIONS)
17 | val context = LocalContext.current
18 | val waterNotificationService = remember { NotificationService(context) }
19 |
20 | LaunchedEffect(key1 = true) {
21 | if (postNotificationPermission.status.isGranted) {
22 | waterNotificationService.showBasicNotification()
23 | } else {
24 | postNotificationPermission.launchPermissionRequest()
25 | }
26 | }
27 |
28 | // Show the notification as soon as permission is granted
29 | // LaunchedEffect(postNotificationPermission.status.isGranted) {
30 | // if (postNotificationPermission.status.isGranted) {
31 | // waterNotificationService.showExpandableNotification()
32 | // }
33 | // }
34 | }
35 |
--------------------------------------------------------------------------------
/android/app/src/main/java/com/uphar/bussinesss/domain/Utils/networkException/ConnectivityInterceptor.java:
--------------------------------------------------------------------------------
1 | package com.uphar.bussinesss.domain.Utils.networkException;
2 |
3 | import android.content.Context;
4 |
5 | import java.io.IOException;
6 |
7 | import okhttp3.Interceptor;
8 | import okhttp3.Request;
9 | import okhttp3.Response;
10 |
11 | public class ConnectivityInterceptor implements Interceptor {
12 |
13 | private final Context mContext;
14 |
15 | public ConnectivityInterceptor(Context context) {
16 | mContext = context;
17 | }
18 |
19 | @Override
20 | public Response intercept(Chain chain) throws IOException {
21 | if (!NetworkUtil.isOnline(mContext)) {
22 |
23 | /*try {
24 | Intent intent = new Intent(mContext,Class.forName("com.agrireach.common.ui.activities.noNetwork.NoNetworkActivity"));
25 | intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_SINGLE_TOP);
26 | mContext.startActivity(intent);
27 | } catch (ClassNotFoundException e) {
28 | e.printStackTrace();
29 | }*/
30 |
31 | throw new NoConnectivityException();
32 | }
33 |
34 | try {
35 | Request.Builder builder = chain.request().newBuilder();
36 | return chain.proceed(builder.build());
37 | } catch (Exception e){
38 | throw new AccessDeniedException();
39 | }
40 |
41 | }
42 |
43 | }
44 |
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable/ic_shutter_focused.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
22 |
25 |
28 |
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable/ic_shutter_normal.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
22 |
25 |
28 |
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable/ic_shutter_pressed.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
22 |
25 |
28 |
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable/ic_shutter_selected.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
22 |
25 |
28 |
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable/progressbarcustom.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | -
4 |
5 |
6 |
13 |
14 |
15 |
16 | -
17 |
18 |
19 |
20 |
27 |
28 |
29 |
30 | -
33 |
34 |
35 |
37 |
41 |
42 |
43 |
44 |
--------------------------------------------------------------------------------
/genAI/extras/poc.py:
--------------------------------------------------------------------------------
1 | import os
2 | from langchain_openai import AzureOpenAI
3 | from langchain_openai import AzureChatOpenAI
4 | from langchain.schema import SystemMessage, HumanMessage
5 | from langchain.callbacks import get_openai_callback
6 | from langchain_community.vectorstores import FAISS
7 | from langchain_core.output_parsers import StrOutputParser
8 | from langchain_core.runnables import RunnablePassthrough
9 | from langchain.prompts import PromptTemplate
10 | from langchain_core.documents import Document
11 | from dotenv import load_dotenv
12 | import warnings
13 |
14 | # load the environment variables
15 | load_dotenv()
16 | warnings.filterwarnings("ignore")
17 |
18 | # check the os environment variable settings
19 | azure_openai_api_key = os.environ["AZURE_OPENAI_API_KEY"]
20 | azure_openai_endpoint = os.environ["AZURE_OPENAI_ENDPOINT"]
21 |
22 |
23 | ## Initialising the Auzre Chat OpenAI model
24 | llm = AzureChatOpenAI(
25 | openai_api_version="2024-04-01-preview",
26 | azure_deployment="llm_model",
27 | model_name="gpt3.5-turbo"
28 | )
29 |
30 | messages = [
31 | SystemMessage(
32 | content=(
33 | "You are Loan Recommendation Chatbot.With Loan Data and customer data recommend the best loan for the customer in Markdown format."
34 | )
35 | ),
36 | HumanMessage(content="What is capital of India ?"),
37 |
38 | ]
39 |
40 |
41 | res = llm(messages)
42 | print (res)
43 |
44 | # # print the response
45 | # print(res.content)
46 | # # print the total tokens used
47 | # with get_openai_callback() as cb:
48 | # print(cb.total_tokens)
49 |
--------------------------------------------------------------------------------
/android/app/src/main/java/com/uphar/bussinesss/domain/Utils/networkException/ErrorInterceptorCommon.kt:
--------------------------------------------------------------------------------
1 | package com.jhalakXCorp.vent.bussinesss.domain.Utils.networkException
2 |
3 | import android.content.Context
4 | import android.content.Intent
5 | import com.uphar.bussinesss.domain.dataStore.basePreference.BasePreferencesManager
6 | import kotlinx.coroutines.runBlocking
7 | import okhttp3.Interceptor
8 | import okhttp3.Request
9 | import okhttp3.Response
10 |
11 | class ErrorInterceptorCommon(
12 | private val context: Context,
13 | private val basePreferencesManager: BasePreferencesManager
14 | ) : Interceptor {
15 |
16 | override fun intercept(chain: Interceptor.Chain): Response {
17 |
18 | val request: Request = chain.request()
19 |
20 | val response = chain.proceed(request)
21 |
22 | // inspect status codes of unsuccessful responses
23 | when (response.code) {
24 | 400 -> {
25 | runBlocking {
26 | basePreferencesManager.logOut()
27 | Intent(
28 | context,
29 | Class.forName("com.jhalakXCorp.vent.ui.screens.homeScreen")
30 | ).apply {
31 | this.flags =
32 | Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_CLEAR_TASK
33 | context.startActivity(this)
34 | }
35 | // throw IOException("Unauthorized !!")
36 | }
37 | }
38 | }
39 |
40 | return response
41 | }
42 | }
--------------------------------------------------------------------------------
/android/app/src/main/java/com/uphar/datasource/networkmodel/AllPolicyResponse.kt:
--------------------------------------------------------------------------------
1 | package com.uphar.datasource.networkmodel
2 |
3 | import com.google.gson.annotations.Expose
4 | import com.google.gson.annotations.SerializedName
5 | import java.math.BigDecimal
6 | import java.util.Date
7 |
8 | data class AllPolicyItemResponse(
9 | @SerializedName("_id")
10 | @Expose
11 | val id: String,
12 |
13 | @SerializedName("desc")
14 | @Expose
15 | val description: String,
16 |
17 | @SerializedName("premium")
18 | @Expose
19 | val premium: DecimalValue,
20 |
21 | @SerializedName("tenure")
22 | @Expose
23 | val tenure: DecimalValue,
24 |
25 | @SerializedName("maturity")
26 | @Expose
27 | val maturity: DecimalValue,
28 |
29 | @SerializedName("endAmount")
30 | @Expose
31 | val endAmount: DecimalValue,
32 |
33 | @SerializedName("insuranceCover")
34 | @Expose
35 | val insuranceCover: Boolean,
36 |
37 | @SerializedName("insuranceAmount")
38 | @Expose
39 | val insuranceAmount: DecimalValue,
40 |
41 | @SerializedName("type")
42 | @Expose
43 | val type: String,
44 |
45 | @SerializedName("benifits")
46 | @Expose
47 | val benefits: String,
48 |
49 | @SerializedName("downloadableDoc")
50 | @Expose
51 | val downloadableDocument: String,
52 |
53 | @SerializedName("created_at")
54 | @Expose
55 | val createdAt: String,
56 |
57 | @SerializedName("__v")
58 | @Expose
59 | val version: Int
60 | )
61 |
62 | data class DecimalValue(
63 | @SerializedName("\$numberDecimal")
64 | @Expose
65 | val value: String
66 | )
--------------------------------------------------------------------------------
/android/app/src/main/java/com/uphar/smartbaroda/ui/LoginActivity.kt:
--------------------------------------------------------------------------------
1 | package com.uphar.smartbaroda.ui
2 |
3 | import android.os.Bundle
4 | import androidx.activity.ComponentActivity
5 | import androidx.activity.compose.setContent
6 | import androidx.activity.enableEdgeToEdge
7 | import androidx.compose.foundation.layout.fillMaxSize
8 | import androidx.compose.foundation.layout.padding
9 | import androidx.compose.material3.Scaffold
10 | import androidx.compose.material3.Text
11 | import androidx.compose.runtime.Composable
12 | import androidx.compose.ui.Modifier
13 | import androidx.compose.ui.tooling.preview.Preview
14 | import androidx.navigation.compose.NavHost
15 | import androidx.navigation.compose.composable
16 | import androidx.navigation.compose.rememberNavController
17 | import com.uphar.smartbaroda.financialreport.PdfViewerScreen
18 | import com.uphar.smartbaroda.login.LoginForm
19 | import com.uphar.smartbaroda.login.RegisterForm
20 | import com.uphar.smartbaroda.ui.ui.theme.SmartBarodaTheme
21 | import dagger.hilt.android.AndroidEntryPoint
22 | import org.json.JSONObject
23 |
24 |
25 | @AndroidEntryPoint
26 | class LoginActivity : ComponentActivity() {
27 | override fun onCreate(savedInstanceState: Bundle?) {
28 | super.onCreate(savedInstanceState)
29 | enableEdgeToEdge()
30 | setContent {
31 | val navController = rememberNavController()
32 | NavHost(navController = navController, startDestination = "login") {
33 | composable("login") { LoginForm(navController) }
34 | composable("register") { RegisterForm(navController) }
35 | }
36 |
37 | }
38 | }
39 | }
40 |
41 |
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable/ic_bankgrade.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
12 |
15 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable/ic_loan.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/server/server.js:
--------------------------------------------------------------------------------
1 | // import dotenv from 'dotenv';
2 | const dotenv = require('dotenv');
3 | dotenv.config();
4 | // import express from 'express';
5 | const express = require('express');
6 | // import authRouter from './routers/authRoutes.js';
7 | // import { authenticateToken } from './middlewares/authToken.js';
8 | // import connectDB from './utils/db.js';
9 | const connectDB = require('./utils/db.js');
10 |
11 | const userRoutes = require('./routes/user.js');
12 | const gstRoutes = require('./routes/gst.js');
13 | const transactionRoutes = require('./routes/transactions.js');
14 | const loanIssuedRoutes = require('./routes/loanIssued.js');
15 | const loanDetailRoutes = require('./routes/loanDetails.js');
16 | const policyDetailRoutes = require('./routes/policyDetails.js');
17 | const policySubscribedRoutes = require('./routes/policySubscribed.js');
18 | const authRoutes = require('./routes/auth.js');
19 |
20 | const app = express();
21 |
22 | app.use(express.json());
23 |
24 | connectDB();
25 |
26 | app.get('/', (req, res) => {
27 | res.send('Welcome to the SmartBOB API!');
28 | });
29 |
30 | // app.use('/auth', authRouter);
31 |
32 | // app.get('/protected', authenticateToken, (req, res) => {
33 | // res.send('Protected route, only accessible with a valid JWT token');
34 | // });
35 |
36 | app.use('/user', userRoutes);
37 | app.use('/gst', gstRoutes);
38 | app.use('/transactions', transactionRoutes);
39 | app.use('/loans-issued', loanIssuedRoutes);
40 | app.use('/loans', loanDetailRoutes);
41 | app.use('/policy-details', policyDetailRoutes);
42 | app.use('/policies-subscribed', policySubscribedRoutes);
43 | app.use('/auth', authRoutes);
44 |
45 | app.listen(process.env.PORT || 3000, () => {
46 | console.log(`Server is running on port ${process.env.PORT || 3000}`);
47 | });
--------------------------------------------------------------------------------
/android/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #FFBB86FC
4 | #FF6200EE
5 | #FF3700B3
6 | #FF03DAC5
7 | #FF018786
8 | #FF000000
9 | #FFFFFFFF
10 | #cccccc
11 | #555555
12 | #555555
13 | #cccccc
14 | #FF3131
15 | #eb7134
16 | #ebc334
17 | #04C604
18 | #41A4FF
19 | #dadada
20 | #392DA7
21 | #4D4D4E
22 | #7D89A0
23 | #7165E3
24 | #d9D9D9
25 | #808080
26 | #d5D4E3
27 | #00FFFFFF
28 | #7165E3
29 | #C8DBFF
30 | #8582A1
31 | #EAEAEA
32 | #7165E3
33 | #028F3B
34 | #C60000
35 |
36 |
37 |
38 |
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 |
--------------------------------------------------------------------------------