The Settings page allows you to customize your FinAI experience, including profile information, security settings, language preferences, and AI features.
Navigate to Settings from your dashboard menu. The system automatically creates default settings for new users:
# From app/routes/settings.py:14-18if not current_user.settings: new_settings = UserSetting(user_id=current_user.id) db.session.add(new_settings) db.session.commit()
Open the Settings page and locate the Profile section.
2
Enter New Name
Update your full name in the text field.
3
Save Changes
Click Save to update your profile.
Your name cannot be empty. The system validates input before saving.
API Endpoint:POST /api/settings/profile
# From app/routes/settings.py:24-40@settings_bp.route('/api/settings/profile', methods=['POST'])@api_login_requireddef update_profile(): data = request.json new_name = data.get('fullName', '').strip() if not new_name: return jsonify({ 'status': 'error', 'message': 'Họ tên không được để trống' }), 400 user = User.query.get(session['user_id']) user.name = new_name db.session.commit() return jsonify({ 'status': 'success', 'message': 'Cập nhật họ tên thành công!' })
Ensure your new password is strong and unique. The system verifies your current password before allowing changes.
Password Validation:
# From app/routes/settings.py:43-70@settings_bp.route('/api/settings/password', methods=['POST'])@api_login_requireddef update_password(): data = request.json current_password = data.get('currentPassword') new_password = data.get('newPassword') confirm_password = data.get('confirmNewPassword') # Validation checks if new_password != confirm_password: return jsonify({ 'status': 'error', 'message': 'Mật khẩu mới không khớp nhau' }), 400 user = User.query.get(session['user_id']) # Verify current password using hashed comparison if not user.check_password(current_password): return jsonify({ 'status': 'error', 'message': 'Mật khẩu hiện tại không đúng' }), 401 # Update with hashed password user.set_password(new_password) db.session.commit()
Control whether AI suggestions are enabled for your transactions.Toggle AI Suggestions:
# From app/routes/settings.py:91-108@settings_bp.route('/api/settings/ai', methods=['POST'])@api_login_requireddef update_ai_settings(): data = request.json ai_enabled = data.get('aiSuggestion') # Boolean from UI user_setting = UserSetting.query.get(session['user_id']) # Store as Integer: 1 = Enabled, 0 = Disabled user_setting.ai_suggestions = 1 if ai_enabled else 0 db.session.commit() status_msg = 'Đã BẬT AI' if ai_enabled else 'Đã TẮT AI' return jsonify({'status': 'success', 'message': status_msg})
AI suggestions help automatically categorize your transactions. When enabled, the system analyzes transaction descriptions and suggests appropriate categories.