More rebranding changes (#159)

* Replace Maybe for Sure in select code areas

* Make sure passwords are consistent

* Remove (admin|member) from demo data first name

* Database and schema names finally to `sure`

* Fix broken test

* Another (benchmarking) database name to `sure_*`

* More rebranding to Sure

* Missed this Maybe mention in the same page

* Random nitpicks and more Maybes

* Demo data accounts and more Maybes

* Test data account updates

* Impersonation test accounts

* Consistency with `compose.example.yml`
This commit is contained in:
Juan José Mata
2025-09-24 00:19:51 +02:00
committed by GitHub
parent 7245dd79a2
commit 5706280dd7
60 changed files with 116 additions and 116 deletions

View File

@@ -80,7 +80,7 @@ class Account < ApplicationRecord
balance = simplefin_account.current_balance || simplefin_account.available_balance || 0
# SimpleFin returns negative balances for credit cards (liabilities)
# But Maybe expects positive balances for liabilities
# But Sure expects positive balances for liabilities
if account_type == "CreditCard" || account_type == "Loan"
balance = balance.abs
end

View File

@@ -26,7 +26,7 @@ module Assistant::Configurable
<<~PROMPT
## Your identity
You are a friendly financial assistant for an open source personal finance application called "Maybe", which is short for "Maybe Finance".
You are a friendly financial assistant for an open source personal finance application called "Sure", which is short for "Sure Finances".
## Your purpose
@@ -52,7 +52,7 @@ module Assistant::Configurable
#### User's preferred currency
Maybe is a multi-currency app where each user has a "preferred currency" setting.
Sure is a multi-currency app where each user has a "preferred currency" setting.
When no currency is specified, use the user's preferred currency for formatting and displaying monetary values.

View File

@@ -38,7 +38,7 @@ class Demo::Generator
end
puts "👥 Creating empty family..."
create_family_and_users!("Demo Family", "user@sure.local", onboarded: true, subscribed: true)
create_family_and_users!("Demo Family", "user@example.com", onboarded: true, subscribed: true)
puts "✅ Empty demo data loaded successfully!"
end
@@ -53,14 +53,14 @@ class Demo::Generator
end
puts "👥 Creating new user family..."
create_family_and_users!("Demo Family", "user@sure.local", onboarded: false, subscribed: false)
create_family_and_users!("Demo Family", "user@example.com", onboarded: false, subscribed: false)
puts "✅ New user demo data loaded successfully!"
end
end
# Generate comprehensive realistic demo data with multi-currency
def generate_default_data!(skip_clear: false, email: "user@sure.local")
def generate_default_data!(skip_clear: false, email: "user@example.com")
if skip_clear
puts "⏭️ Skipping data clearing (appending new family)..."
else
@@ -133,20 +133,20 @@ class Demo::Generator
# Admin user
family.users.create!(
email: email,
first_name: "Demo (admin)",
last_name: "Maybe",
first_name: "Jack",
last_name: "Bogle",
role: "admin",
password: "password",
password: "Password1!",
onboarded_at: onboarded ? Time.current : nil
)
# Member user
family.users.create!(
email: "partner_#{email}",
first_name: "Demo (member)",
last_name: "Maybe",
first_name: "Eve",
last_name: "Bogle",
role: "member",
password: "password",
password: "Password1!",
onboarded_at: onboarded ? Time.current : nil
)

View File

@@ -13,7 +13,7 @@ class FamilyExport < ApplicationRecord
scope :ordered, -> { order(created_at: :desc) }
def filename
"maybe_export_#{created_at.strftime('%Y%m%d_%H%M%S')}.zip"
"sure_export_#{created_at.strftime('%Y%m%d_%H%M%S')}.zip"
end
def downloadable?

View File

@@ -37,12 +37,12 @@ class Import::Row < ApplicationRecord
end
private
# In the Maybe system, positive quantities == "inflows"
# In the Sure system, positive quantities == "inflows"
def apply_trade_signage_convention(value)
value * (import.signage_convention == "inflows_positive" ? 1 : -1)
end
# In the Maybe system, positive amounts == "outflows", so we must reverse signage
# In the Sure system, positive amounts == "outflows", so we must reverse signage
def apply_transaction_signage_convention(value)
if import.amount_type_strategy == "signed_amount"
value * (import.signage_convention == "inflows_positive" ? -1 : 1)

View File

@@ -23,7 +23,7 @@ class MobileDevice < ApplicationRecord
app = Doorkeeper::Application.create!(
name: "Mobile App - #{device_id}",
redirect_uri: "maybe://oauth/callback", # Custom scheme for mobile
redirect_uri: "sureapp://oauth/callback", # Custom scheme for mobile
scopes: "read_write", # Use the configured scope
confidential: false # Public client for mobile
)

View File

@@ -24,7 +24,7 @@ class PlaidAccount::Investments::BalanceCalculator
# Plaid considers "brokerage cash" and "cash equivalent holdings" to all be part of "cash balance"
#
# Internally, we DO NOT. Maybe clearly distinguishes between "brokerage cash" vs. "holdings (i.e. invested cash)"
# Internally, we DO NOT. Sure clearly distinguishes between "brokerage cash" vs. "holdings (i.e. invested cash)"
# For this reason, we must manually calculate the cash balance based on "total value" and "holdings value"
# See PlaidAccount::Investments::SecurityResolver for more details.
def cash_balance

View File

@@ -63,7 +63,7 @@ class PlaidAccount::Investments::SecurityResolver
end
end
# Plaid treats "brokerage cash" differently than us. Internally, Maybe treats "brokerage cash"
# Plaid treats "brokerage cash" differently than us. Internally, Sure treats "brokerage cash"
# as "uninvested cash" (i.e. cash that doesn't have a corresponding Security and can be withdrawn).
#
# Plaid treats everything as a "holding" with a corresponding Security. For example, "brokerage cash" (USD)

View File

@@ -3,7 +3,7 @@
# categories we cannot directly assign Plaid categories as this would overwrite
# user data and create a confusing experience.
#
# Automated category matching in the Maybe app has a hierarchy:
# Automated category matching in the Sure app has a hierarchy:
# 1. Naive string matching via CategoryAliasMatcher
# 2. Rules-based matching set by user
# 3. AI-powered matching (also enabled by user via rules)

View File

@@ -1,7 +1,7 @@
class Provider::Plaid
attr_reader :client, :region
MAYBE_SUPPORTED_PLAID_PRODUCTS = %w[transactions investments liabilities].freeze
SUPPORTED_PLAID_PRODUCTS = %w[transactions investments liabilities].freeze
MAX_HISTORY_DAYS = Rails.env.development? ? 90 : 730
def initialize(config, region: :us)
@@ -45,7 +45,7 @@ class Provider::Plaid
def get_link_token(user_id:, webhooks_url:, redirect_url:, accountable_type: nil, access_token: nil)
request_params = {
user: { client_user_id: user_id },
client_name: "Maybe Finance",
client_name: "Sure Finances",
country_codes: country_codes,
language: "en",
webhook: webhooks_url,
@@ -195,7 +195,7 @@ class Provider::Plaid
def get_additional_consented_products(accountable_type)
return [] if eu?
MAYBE_SUPPORTED_PLAID_PRODUCTS - [ get_primary_product(accountable_type) ]
SUPPORTED_PLAID_PRODUCTS - [ get_primary_product(accountable_type) ]
end
def eu?

View File

@@ -1,4 +1,4 @@
# There are hundreds of thousands of market securities that Maybe must handle.
# There are hundreds of thousands of market securities that Sure must handle.
# Due to the always-changing nature of the market, the health checker is responsible
# for periodically checking active securities to ensure we can still fetch prices for them.
#

View File

@@ -79,8 +79,8 @@ class SimplefinAccount::Processor
end
# SimpleFin uses banking convention (expenses negative, income positive)
# Maybe expects opposite convention (expenses positive, income negative)
# So we negate the amount to convert from SimpleFin to Maybe format
# Sure expects opposite convention (expenses positive, income negative)
# So we negate the amount to convert from SimpleFin to Sure format
-parsed_amount
rescue ArgumentError => e
Rails.logger.error "Failed to parse SimpleFin transaction amount: #{amount_value.inspect} - #{e.message}"

View File

@@ -193,7 +193,7 @@ class User < ApplicationRecord
end
def totp
ROTP::TOTP.new(otp_secret, issuer: "Maybe Finance")
ROTP::TOTP.new(otp_secret, issuer: "Sure Finances")
end
def verify_backup_code?(code)