-
Notifications
You must be signed in to change notification settings - Fork 0
1. Installation
smartMoney was built using Laravel framework.
- Download source code smartMoney
git clone https://github.com/mrahmadt/smartMoney.git
cd smartMoney
- Follow Laravel Deployment
- Set Up Environment Configuration: Copy the example environment configuration to a new .env file:
cp .env.example .env
- Configure Environment Variables
Open the .env file and update the following essential settings:
a. Make sure you have created a database and a database user. Update the database credentials accordingly:
DB_HOST=mysql
DB_PORT=3306
DB_DATABASE=laravel
DB_USERNAME=sail
DB_PASSWORD=password
b. Firefly-III Integration Provide the URL and personal token for your Firefly-III instance:
FIREFLYIII_URL=https://moneycontrol.com
FIREFLYIII_TOKEN=eyJ0eXAiOiJKV1QiLC.....
c. Migrate Database Run the database migrations to set up the required tables:
php artisan migrate
If you want to enable SMS parsing for transactions, update the following settings in the .env file:
PARSE_SMS_ENABLED=true
Provide a JSON configuration for the SMS senders: The json keys are the SMS Senders (if SMS sender name not in the list, it will be ignored), and the values are the class names under "app/parseSMS". You will need to create a class that will parse each bank, you can find multiple banks included under "app/parseSMS", copy any file and modify it as you can see fit to your bank SMS formats.
PARSE_SMS_SENDERS='{"saib":"parseSAIB","stcpay":"parseSTCPay","alinmabank":"parseAlinmaBank","sab":"parseSAB","snb-alahli":"parseSNBAlAhli"}'
Should we save invalid SMS (SMS that did not pass our initial validation or SMS that we are not able to parse as bank transaction)
PARSE_SMS_STORE_INVALID_SMS=true
Should we keep valid SMS in database even after parsing them?
PARSE_SMS_STORE_VALID_SMS=true
Any SMS message below this length will be considered as invalid bank transaction
PARSE_SMS_MIN_SMS_LENGTH=30
Before parsing any SMS, smartMoney can try to detect if this SMS is an actual Bank transaction or just a message from your bank for whatever reason, if the SMS message determined that it's not a valid message and PARSE_SMS_STORE_INVALID_SMS
is true, it will be saved in database.
PARSE_SMS_AUTO_DETECT_NON_TRANSACTION_SMS=true
If your SMS parse class for this specific SMS sender were not able to parse the SMS message, would you like to send the SMS message to Azure OpenAI to parse it? Keep in mind, your BANK SMS Message with all the information will be sent to Azure OpenAI. you can enable/disable this also in Sender SMS parse class.
PARSE_SMS_FAILBACK_OPENAI=true
Would you like to use Azure OpenAI to determine the correct category for each transaction, smartMoney will first try to determine the category of every transaction based on the destination/source of the transaction, if it is not able to determine the category, it can ask Azure OpenAI. Keep in mind, your BANK SMS Message with all the information will be sent to Azure OpenAI.
PARSE_SMS_DETECT_CATEGORY_OPENAI=true
If using Azure OpenAI for SMS parsing and categorization, update the following settings: (I never tested it with OpenAI API, but it should work).
OPENAI_ENABLED=true
OPENAI_URL='https://AAAA.openai.azure.com/openai/deployments/VVVVV/chat/completions?api-version=2024-02-01'
OPENAI_TOKEN='3333333333'
Configure the VAPID keys for web push notifications: Generate the VAPID keys (required for browser authentication) with:
php artisan webpush:vapid
VAPID_PUBLIC_KEY=
VAPID_PRIVATE_KEY=
Configure settings for abnormal transaction detection and alerts:
CAL_AVERAGE_TRANSACTIONS_WITHDRAWAL_ENABLED=true
CAL_AVERAGE_TRANSACTIONS_DEPOSIT_ENABLED=true
Enable the bill detection feature:
BILL_DETECTOR_ENABLED=true
BILL_DETECTOR_MIN_AMOUNT=10