1
0
Fork 0
mirror of https://github.com/maybe-finance/maybe.git synced 2025-08-10 07:55:21 +02:00

Merge branch 'main' of github.com:maybe-finance/maybe into zachgoll/design-audit

This commit is contained in:
Zach Gollwitzer 2025-04-28 18:06:54 -04:00
commit 06fd927afc
15 changed files with 61 additions and 66 deletions

View file

@ -60,7 +60,7 @@ gem "stripe"
gem "intercom-rails" gem "intercom-rails"
gem "plaid" gem "plaid"
gem "rotp", "~> 6.3" gem "rotp", "~> 6.3"
gem "rqrcode", "~> 2.2" gem "rqrcode", "~> 3.0"
gem "activerecord-import" gem "activerecord-import"
# AI # AI

View file

@ -134,7 +134,7 @@ GEM
chunky_png (1.4.0) chunky_png (1.4.0)
climate_control (1.2.0) climate_control (1.2.0)
concurrent-ruby (1.3.5) concurrent-ruby (1.3.5)
connection_pool (2.5.0) connection_pool (2.5.2)
crack (1.0.0) crack (1.0.0)
bigdecimal bigdecimal
rexml rexml
@ -163,7 +163,7 @@ GEM
event_stream_parser (1.0.0) event_stream_parser (1.0.0)
faker (3.5.1) faker (3.5.1)
i18n (>= 1.8.11, < 2) i18n (>= 1.8.11, < 2)
faraday (2.13.0) faraday (2.13.1)
faraday-net_http (>= 2.0, < 3.5) faraday-net_http (>= 2.0, < 3.5)
json json
logger logger
@ -230,7 +230,7 @@ GEM
rdoc (>= 4.0.0) rdoc (>= 4.0.0)
reline (>= 0.4.2) reline (>= 0.4.2)
jmespath (1.6.2) jmespath (1.6.2)
json (2.10.2) json (2.11.3)
jwt (2.10.1) jwt (2.10.1)
base64 base64
language_server-protocol (3.17.0.4) language_server-protocol (3.17.0.4)
@ -316,7 +316,7 @@ GEM
racc (~> 1.4) racc (~> 1.4)
nokogiri (1.18.6-x86_64-linux-musl) nokogiri (1.18.6-x86_64-linux-musl)
racc (~> 1.4) racc (~> 1.4)
octokit (9.2.0) octokit (10.0.0)
faraday (>= 1, < 3) faraday (>= 1, < 3)
sawyer (~> 0.9) sawyer (~> 0.9)
pagy (9.3.4) pagy (9.3.4)
@ -325,7 +325,7 @@ GEM
ast (~> 2.4.1) ast (~> 2.4.1)
racc racc
pg (1.5.9) pg (1.5.9)
plaid (36.1.0) plaid (37.0.0)
faraday (>= 1.0.1, < 3.0) faraday (>= 1.0.1, < 3.0)
faraday-multipart (>= 1.0.1, < 2.0) faraday-multipart (>= 1.0.1, < 2.0)
platform_agent (1.0.1) platform_agent (1.0.1)
@ -347,7 +347,7 @@ GEM
puma (6.6.0) puma (6.6.0)
nio4r (~> 2.0) nio4r (~> 2.0)
racc (1.8.1) racc (1.8.1)
rack (3.1.12) rack (3.1.13)
rack-mini-profiler (3.3.1) rack-mini-profiler (3.3.1)
rack (>= 1.2.0) rack (>= 1.2.0)
rack-session (2.1.0) rack-session (2.1.0)
@ -397,7 +397,7 @@ GEM
rb-fsevent (0.11.2) rb-fsevent (0.11.2)
rb-inotify (0.11.1) rb-inotify (0.11.1)
ffi (~> 1.0) ffi (~> 1.0)
rbs (3.9.1) rbs (3.9.2)
logger logger
rdoc (6.13.0) rdoc (6.13.0)
psych (>= 4.0.0) psych (>= 4.0.0)
@ -412,10 +412,10 @@ GEM
rexml (3.4.1) rexml (3.4.1)
rotp (6.3.0) rotp (6.3.0)
rouge (4.5.1) rouge (4.5.1)
rqrcode (2.2.0) rqrcode (3.0.0)
chunky_png (~> 1.0) chunky_png (~> 1.0)
rqrcode_core (~> 1.0) rqrcode_core (~> 2.0)
rqrcode_core (1.2.0) rqrcode_core (2.0.0)
rubocop (1.74.0) rubocop (1.74.0)
json (~> 2.3) json (~> 2.3)
language_server-protocol (~> 3.17.0.2) language_server-protocol (~> 3.17.0.2)
@ -443,13 +443,13 @@ GEM
rubocop (>= 1.72) rubocop (>= 1.72)
rubocop-performance (>= 1.24) rubocop-performance (>= 1.24)
rubocop-rails (>= 2.30) rubocop-rails (>= 2.30)
ruby-lsp (0.23.12) ruby-lsp (0.23.15)
language_server-protocol (~> 3.17.0) language_server-protocol (~> 3.17.0)
prism (>= 1.2, < 2.0) prism (>= 1.2, < 2.0)
rbs (>= 3, < 4) rbs (>= 3, < 4)
sorbet-runtime (>= 0.5.10782) sorbet-runtime (>= 0.5.10782)
ruby-lsp-rails (0.4.0) ruby-lsp-rails (0.4.1)
ruby-lsp (>= 0.23.0, < 0.24.0) ruby-lsp (>= 0.23.14, < 0.24.0)
ruby-openai (8.1.0) ruby-openai (8.1.0)
event_stream_parser (>= 0.3.0, < 2.0.0) event_stream_parser (>= 0.3.0, < 2.0.0)
faraday (>= 1) faraday (>= 1)
@ -479,7 +479,7 @@ GEM
sentry-sidekiq (5.23.0) sentry-sidekiq (5.23.0)
sentry-ruby (~> 5.23.0) sentry-ruby (~> 5.23.0)
sidekiq (>= 3.0) sidekiq (>= 3.0)
sidekiq (8.0.2) sidekiq (8.0.3)
connection_pool (>= 2.5.0) connection_pool (>= 2.5.0)
json (>= 2.9.0) json (>= 2.9.0)
logger (>= 1.6.2) logger (>= 1.6.2)
@ -494,7 +494,7 @@ GEM
skylight (6.0.4) skylight (6.0.4)
activesupport (>= 5.2.0) activesupport (>= 5.2.0)
smart_properties (1.17.0) smart_properties (1.17.0)
sorbet-runtime (0.5.11953) sorbet-runtime (0.5.12043)
stimulus-rails (1.3.4) stimulus-rails (1.3.4)
railties (>= 6.0.0) railties (>= 6.0.0)
stringio (3.1.5) stringio (3.1.5)
@ -602,7 +602,7 @@ DEPENDENCIES
redcarpet redcarpet
redis (~> 5.4) redis (~> 5.4)
rotp (~> 6.3) rotp (~> 6.3)
rqrcode (~> 2.2) rqrcode (~> 3.0)
rubocop-rails-omakase rubocop-rails-omakase
ruby-lsp-rails ruby-lsp-rails
ruby-openai ruby-openai

View file

@ -1,7 +1,7 @@
<img width="1440" alt="dashboard_mockup" src="https://github.com/maybe-finance/maybe/assets/35243/a7763d0e-a942-42db-bde7-eb8d28106917">
<sup><i>(Note: The image above is a mockup of what we're working towards. We're rapidly approaching the functionality shown, but not all of the parts are ready just yet.)</i></sup>
# Maybe: The OS for your personal finances <img width="1190" alt="maybe_hero" src="https://github.com/user-attachments/assets/13fc5ef4-ce0f-4073-a163-9dbc3eb4c8e5" />
# Maybe: The personal finance app for everyone
<b>Get <b>Get
involved: [Discord](https://link.maybe.co/discord) • [Website](https://maybefinance.com) • [Issues](https://github.com/maybe-finance/maybe/issues)</b> involved: [Discord](https://link.maybe.co/discord) • [Website](https://maybefinance.com) • [Issues](https://github.com/maybe-finance/maybe/issues)</b>

View file

@ -322,7 +322,7 @@ export default class extends Controller {
.attr("class", "data-point-circle") .attr("class", "data-point-circle")
.attr("cx", this._d3XScale(d.date)) .attr("cx", this._d3XScale(d.date))
.attr("cy", this._d3YScale(this._getDatumValue(d))) .attr("cy", this._d3YScale(this._getDatumValue(d)))
.attr("r", 8) .attr("r", 10)
.attr("fill", this._trendColor) .attr("fill", this._trendColor)
.attr("fill-opacity", "0.1") .attr("fill-opacity", "0.1")
.attr("pointer-events", "none"); .attr("pointer-events", "none");
@ -333,7 +333,7 @@ export default class extends Controller {
.attr("class", "data-point-circle") .attr("class", "data-point-circle")
.attr("cx", this._d3XScale(d.date)) .attr("cx", this._d3XScale(d.date))
.attr("cy", this._d3YScale(this._getDatumValue(d))) .attr("cy", this._d3YScale(this._getDatumValue(d)))
.attr("r", 3) .attr("r", 5)
.attr("fill", this._trendColor) .attr("fill", this._trendColor)
.attr("pointer-events", "none"); .attr("pointer-events", "none");
@ -364,19 +364,17 @@ export default class extends Controller {
<div style="margin-bottom: 4px; color: var(--color-gray-500);"> <div style="margin-bottom: 4px; color: var(--color-gray-500);">
${datum.date_formatted} ${datum.date_formatted}
</div> </div>
<div style="display: flex; align-items: center; gap: 16px; margin-bottom: 0px;">
<div style="display: flex; align-items: center; gap: 16px;"> <div style="display: flex; align-items: center; gap: 8px; color: var(--color-black);">
<div style="display: flex; align-items: center; gap: 8px;"> <div style="display: flex; align-items: center; justify-content: center; height: 16px; width: 16px;">
<svg width="10" height="10"> ${datum.trend.previous.amount === datum.trend.current.amount ? `
<circle <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="${datum.trend.color}" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-minus-icon lucide-minus"><path d="M5 12h14"/></svg>
cx="5" ` : Number(datum.trend.previous.amount) < Number(datum.trend.current.amount) ? `
cy="5" <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="${datum.trend.color}" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-arrow-up-right-icon lucide-arrow-up-right"><path d="M7 7h10v10"/><path d="M7 17 17 7"/></svg>
r="4" ` : `
stroke="${datum.trend.color}" <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="${datum.trend.color}" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-arrow-down-right-icon lucide-arrow-down-right"><path d="m7 7 10 10"/><path d="M17 7v10H7"/></svg>
fill="transparent" `}
stroke-width="1"></circle> </div>
</svg>
${this._extractFormattedValue(datum.trend.current)} ${this._extractFormattedValue(datum.trend.current)}
</div> </div>

View file

@ -83,6 +83,7 @@ class Sync < ApplicationRecord
Sentry.capture_exception(error) do |scope| Sentry.capture_exception(error) do |scope|
scope.set_context("sync", { id: id, syncable_type: syncable_type, syncable_id: syncable_id }) scope.set_context("sync", { id: id, syncable_type: syncable_type, syncable_id: syncable_id })
scope.set_tags(sync_id: id)
end end
update!( update!(

View file

@ -3,16 +3,7 @@
<%= turbo_frame_tag dom_id(@account, :chart_details) do %> <%= turbo_frame_tag dom_id(@account, :chart_details) do %>
<div class="px-4"> <div class="px-4">
<% if trend.direction.flat? %> <%= render partial: "shared/trend_change", locals: { trend: trend, comparison_label: @period.comparison_label } %>
<%= tag.span t(".no_change"), class: "text-secondary" %>
<% else %>
<%= tag.span "#{trend.value.positive? ? "+" : ""}#{format_money(trend.value)}", style: "color: #{trend.color}" %>
<% unless trend.percent.infinite? %>
<%= tag.span "(#{trend.percent}%)", style: "color: #{trend.color}" %>
<% end %>
<% end %>
<%= tag.span @period.comparison_label, class: "text-secondary" %>
</div> </div>
<div class="h-64 pb-4"> <div class="h-64 pb-4">
@ -24,7 +15,7 @@
data-time-series-chart-data-value="<%= series.to_json %>"></div> data-time-series-chart-data-value="<%= series.to_json %>"></div>
<% else %> <% else %>
<div class="w-full h-full flex items-center justify-center"> <div class="w-full h-full flex items-center justify-center">
<p class="text-secondary text-sm">No data available for the selected period.</p> <p class="text-secondary text-sm"><%= t(".data_not_available") %></p>
</div> </div>
<% end %> <% end %>
</div> </div>

View file

@ -15,7 +15,7 @@
<div class="grid grid-cols-12 items-center uppercase text-xs font-medium text-secondary px-4 py-2"> <div class="grid grid-cols-12 items-center uppercase text-xs font-medium text-secondary px-4 py-2">
<%= tag.p t(".name"), class: "col-span-4" %> <%= tag.p t(".name"), class: "col-span-4" %>
<%= tag.p t(".weight"), class: "col-span-2 justify-self-end" %> <%= tag.p t(".weight"), class: "col-span-2 justify-self-end" %>
<%= tag.p t(".cost"), class: "col-span-2 justify-self-end" %> <%= tag.p t(".average_cost"), class: "col-span-2 justify-self-end" %>
<%= tag.p t(".holdings"), class: "col-span-2 justify-self-end" %> <%= tag.p t(".holdings"), class: "col-span-2 justify-self-end" %>
<%= tag.p t(".return"), class: "col-span-2 justify-self-end" %> <%= tag.p t(".return"), class: "col-span-2 justify-self-end" %>
</div> </div>

View file

@ -38,7 +38,7 @@
</div> </div>
<div class="flex items-center justify-between text-sm"> <div class="flex items-center justify-between text-sm">
<dt class="text-secondary"><%= t(".trend_label") %></dt> <dt class="text-secondary"><%= t(".total_return_label") %></dt>
<dd style="color: <%= @holding.trend&.color %>;"> <dd style="color: <%= @holding.trend&.color %>;">
<%= @holding.trend ? render("shared/trend_change", trend: @holding.trend) : t(".unknown") %> <%= @holding.trend ? render("shared/trend_change", trend: @holding.trend) : t(".unknown") %>
</dd> </dd>

View file

@ -3,19 +3,14 @@
<div class="flex justify-between gap-4 px-4"> <div class="flex justify-between gap-4 px-4">
<div class="space-y-2"> <div class="space-y-2">
<div class="space-y-2"> <div class="space-y-2">
<p class="text-sm text-secondary font-medium">Net Worth</p> <p class="text-sm text-secondary font-medium"><%= t(".title") %></p>
<p class="text-primary -space-x-0.5 text-3xl font-medium"> <p class="text-primary -space-x-0.5 text-3xl font-medium">
<%= series.current.format %> <%= series.current.format %>
</p> </p>
<% if series.trend.nil? %> <% if series.trend.nil? %>
<p class="text-sm text-secondary">Data not available for the selected period</p> <p class="text-sm text-secondary"><%= t(".data_not_available") %></p>
<% elsif series.trend.direction.flat? %>
<p class="text-sm text-secondary">No change vs. prior period</p>
<% else %> <% else %>
<div class="flex items-center gap-2"> <%= render partial: "shared/trend_change", locals: { trend: series.trend, comparison_label: period.comparison_label } %>
<%= render partial: "shared/trend_change", locals: { trend: series.trend } %>
<span class="text-sm text-secondary"><%= period.comparison_label %></span>
</div>
<% end %> <% end %>
</div> </div>
</div> </div>
@ -32,6 +27,6 @@
data-time-series-chart-data-value="<%= series.to_json %>"></div> data-time-series-chart-data-value="<%= series.to_json %>"></div>
<% else %> <% else %>
<div class="w-full h-full flex items-center justify-center"> <div class="w-full h-full flex items-center justify-center">
<p class="text-secondary text-sm">No data available for the selected period.</p> <p class="text-secondary text-sm"><%= t(".data_not_available") %></p>
</div> </div>
<% end %> <% end %>

View file

@ -1,8 +1,8 @@
<%# locals: { trend: } %> <%# locals: { trend:, comparison_label: nil } %>
<p class="text-sm" style="color: <%= trend.color %>"> <p class="text-sm" style="color: <%= trend.color %>">
<% if trend.direction.flat? %> <% if trend.direction.flat? %>
<span>No change</span> <%= t(".no_change") %><%= " #{comparison_label}" if defined?(comparison_label) && comparison_label.present? %>
<% else %> <% else %>
<span class="font-mono"> <span class="font-mono">
<%= trend.value.is_a?(Money) ? format_money(trend.value) : trend.value.round(2) %> <%= trend.value.is_a?(Money) ? format_money(trend.value) : trend.value.round(2) %>
@ -10,5 +10,8 @@
<% unless trend.percent.infinite? %> <% unless trend.percent.infinite? %>
<span class="font-mono">(<%= lucide_icon(trend.icon, class: "w-4 h-4 align-text-bottom inline") %><%= trend.percent_formatted %>)</span> <span class="font-mono">(<%= lucide_icon(trend.icon, class: "w-4 h-4 align-text-bottom inline") %><%= trend.percent_formatted %>)</span>
<% end %> <% end %>
<span class="text-secondary">
<%= " #{comparison_label}" if defined?(comparison_label) && comparison_label.present? %>
</span>
<% end %> <% end %>
</p> </p>

View file

@ -41,6 +41,8 @@ x-rails-env: &rails_env
DB_HOST: db DB_HOST: db
DB_PORT: 5432 DB_PORT: 5432
REDIS_URL: redis://redis:6379/1 REDIS_URL: redis://redis:6379/1
# NOTE: enabling OpenAI will incur costs when you use AI-related features in the app (chat, rules). Make sure you have set appropriate spend limits on your account before adding this.
OPENAI_ACCESS_TOKEN: ${OPENAI_ACCESS_TOKEN}
services: services:
web: web:
@ -97,4 +99,4 @@ services:
volumes: volumes:
app-storage: app-storage:
postgres-data: postgres-data:
redis-data: redis-data:

View file

@ -4,7 +4,7 @@ en:
account: account:
troubleshoot: Troubleshoot troubleshoot: Troubleshoot
chart: chart:
no_change: no change data_not_available: Data not available for the selected period
create: create:
success: "%{type} account created" success: "%{type} account created"
destroy: destroy:

View file

@ -9,13 +9,13 @@ en:
per_share: per share per_share: per share
shares: "%{qty} shares" shares: "%{qty} shares"
index: index:
cost: cost average_cost: Average cost
holdings: Holdings holdings: Holdings
name: name name: Name
new_holding: New transaction new_holding: New transaction
no_holdings: No holdings to show. no_holdings: No holdings to show.
return: total return return: Total return
weight: weight weight: Weight
missing_price_tooltip: missing_price_tooltip:
description: This investment has missing values and we could not calculate description: This investment has missing values and we could not calculate
its returns or value. its returns or value.
@ -33,5 +33,5 @@ en:
settings: Settings settings: Settings
ticker_label: Ticker ticker_label: Ticker
trade_history_entry: "%{qty} shares of %{security} at %{price}" trade_history_entry: "%{qty} shares of %{security} at %{price}"
trend_label: Trend total_return_label: Total Return
unknown: Unknown unknown: Unknown

View file

@ -4,6 +4,9 @@ en:
changelog: changelog:
title: What's new title: What's new
dashboard: dashboard:
net_worth_chart:
data_not_available: Data not available for the selected period
title: Net Worth
no_account_empty_state: no_account_empty_state:
new_account: New account new_account: New account
no_account_subtitle: Since no accounts have been added, there's no data to no_account_subtitle: Since no accounts have been added, there's no data to

View file

@ -10,3 +10,5 @@ en:
label: Amount label: Amount
syncing_notice: syncing_notice:
syncing: Syncing accounts data... syncing: Syncing accounts data...
trend_change:
no_change: "no change"