jaysbeekay fea283488c Derive panel syncable types from connection declarations (#5079)
## Summary

Provider kit Track A, A2:
`Settings::ProvidersController::PANEL_SYNCABLE_TYPES` is derived from
the adapters' connection declarations instead of hand-kept.

Part of #5003

Stacked on #5005 (A1), in Track A's native stack on #5005.

Fork pre-flight: jaysbeekay/sure#686 (same commits, against a mirror of
upstream `main`; its CI, Gatekeeper and review history live there).

## What changed

- `PANEL_SYNCABLE_TYPES` = the connection declarations whose key is in
`FAMILY_PANEL_KEYS`, as `key => item class`. `FAMILY_PANELS` itself
stays hand-kept until A3.
- `#sync` finds the key instead of indexing the hash with
`params[:provider_key]`, the pattern `connect_form` already uses for
`FAMILY_PANELS`: once the hash is not a literal, Brakeman flags the
indexed lookup as UnsafeReflection (the class name never comes from the
param).
- The `provider:family` generator no longer patches the hash
(`append_panel_syncable_type` removed); a generated adapter already
declares its connection. Its two tests now cover `family_panel_items`
only; `docs/api/rails_provider_generator.md` updated.

No visible change.

## Demo data

No demo data needed.

## Migration notes

No migration.

## Verification

- Old vs new (Rails runner against the removed literal): 26 = 26
entries, equal as a hash.
- New tests: every family panel maps to its own `Syncable` `<key>_items`
model; `POST sync` for a provider without a panel (Plaid) schedules
nothing. The Plaid test is a boundary guard for the new lookup and
passes before the change too.
- Mutations, each caught: no panel filter (all 28 declarations); a panel
provider without a declaration; the wrong declaration field as the type;
Brex declaring Mercury's item class.
- `eager_load!` then `PANEL_SYNCABLE_TYPES.size` = 26.
- `bin/rails test` (full): 15,867 runs, 0 failures; 8 errors in
`ReleaseNotesWorkflowTest` from `node` missing in the test image. After
rebasing the stack onto upstream `main` (dbeebf14c), the full suite at
the top of the stack (A9): 16,246 runs, 0 failures, the same 8
environment errors.
- `bin/rubocop` on changed files: no offenses. `bin/brakeman`: no
warnings.

## Blast radius

- `PANEL_SYNCABLE_TYPES` readers: `#sync` (unknown or panel-less keys
still redirect with no notice) and `compute_provider_sync_health`
(iterates pairs; order irrelevant).
- The generator: one fewer patched list; `FAMILY_PANELS`,
`family_panel_items` and `provider_summary` are still patched until
their own Track A changes.

<!-- This is an auto-generated description by cubic. -->
---
## Summary by cubic
Derives `Settings::ProvidersController::PANEL_SYNCABLE_TYPES` from the
adapters' connection declarations instead of a hand-kept hash, so sync
support follows a panel's declaration automatically. No visible behavior
change.

**Refactors**

- `PANEL_SYNCABLE_TYPES` is built from connection declarations whose key
is in `FAMILY_PANEL_KEYS`, mapping keys to item classes.
- `#sync` finds its key with `find` instead of indexing the hash with
`params[:provider_key]`, which Brakeman reads as the param choosing the
class to constantize.
- The `provider:family` generator no longer patches the hash; a
generated adapter already declares its connection.
- New tests verify every family panel maps to its own syncable item
model (via `sync_later`) and that syncing a non-panel provider schedules
nothing.

<sup>Written for commit 4ad3a3bd2c.
Summary will update on new commits.</sup>

<a
href="https://cubic.dev/pr/we-promise/sure/pull/5079?utm_source=github"
target="_blank" rel="noopener noreferrer"
data-no-image-dialog="true"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"><source
media="(prefers-color-scheme: light)"
srcset="https://www.cubic.dev/buttons/review-in-cubic-light.svg"><img
alt="View guided diff"
src="https://www.cubic.dev/buttons/review-in-cubic-light.svg"></picture></a>
<a
href="https://www.cubic.dev/action/auto-fix/pr/we-promise/sure/5079?returnTo=https%3A%2F%2Fgithub.com%2Fwe-promise%2Fsure%2Fpull%2F5079&source=description"
target="_blank" rel="noopener noreferrer"
data-no-image-dialog="true"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://www.cubic.dev/buttons/turn-on-auto-fix-dark.svg"><source
media="(prefers-color-scheme: light)"
srcset="https://www.cubic.dev/buttons/turn-on-auto-fix-light.svg"><img
alt="Turn on auto-fix"
src="https://www.cubic.dev/buttons/turn-on-auto-fix-light.svg"></picture></a>

<!-- End of auto-generated description by cubic. -->

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

<!-- coderabbit-ai-generated:v1 -->

## Summary by CodeRabbit

* **Bug Fixes**
* Sync controls now reflect the providers available in the settings
panel. Attempting to sync a provider without a panel entry no longer
queues a sync or displays a success notice.
* **Documentation**
* Updated provider setup guidance to clarify how connection declarations
determine sync status and the availability of the Sync button.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-12-01 17:16:02 -08:00
2024-02-02 09:05:04 -06:00
2024-02-02 09:05:04 -06:00
2024-02-02 09:05:04 -06:00
2024-02-02 09:05:04 -06:00
2024-08-23 10:06:24 -04:00
2024-02-02 09:05:04 -06:00
2024-02-02 09:05:04 -06:00
2025-09-24 00:19:51 +02:00
2026-04-13 13:44:37 +02:00
2024-02-02 09:05:04 -06:00
2026-06-05 15:16:41 +02:00

Ask DeepWiki View performance data on Skylight Dosu Pipelock Security Scan

The Sure dashboard in two columns (cashflow, net worth, spending and outflows) beside the AI assistant answering a question about savings

Deutsch | Español | Français | 日本語 | 한국어 | Português | Русский | 中文

Sure: The personal finance app for everyone

Get involved: Discord • Website • Issues

Important

This repository is a community fork of the now-abandoned Maybe Finance project.
Learn more in their final release doc.

Backstory

The Maybe Finance (archived/abandoned repo) team spent most of 2021–2022 building a full-featured personal finance and wealth management app. It even included an “Ask an Advisor” feature that connected users with a real CFP/CFA — all included with your subscription.

The business end of things didn't work out, and so they stopped developing the app in mid-2023.

After spending nearly $1 million on development (employees, contractors, data providers, infra, etc.), the team open-sourced the app. Their goal was to let users self-host it for free — and eventually launch a hosted version for a small fee.

They actually did launch that hosted version … briefly.

That also didn’t work out — at least not as a sustainable B2C business — so now here we are: hosting a community-maintained fork to keep the codebase alive and see where this can go next.

Join us!

Hosting Sure

Sure is a fully working personal finance app that can be self hosted with Docker. Sure can be accessed from a browser, the macOS desktop app, the mobile app, API clients, and LLM agents. See Sure Clients for an overview.

Forking and Attribution

This repo is a community fork of the archived Maybe Finance repo. You’re free to fork it under the AGPLv3 license — but we’d love it if you stuck around and contributed here instead.

To stay compliant and avoid trademark issues:

  • Be sure to include the original AGPLv3 license and clearly state in your README that your fork is based on Maybe Finance but is not affiliated with or endorsed by Maybe Finance Inc.
  • "Maybe" is a trademark of Maybe Finance Inc. and therefore, use of it is NOT allowed in forked repositories (or the logo)

Performance Issues

With data-heavy apps, inevitably, there are performance issues. We've set up a public dashboard showing the problematic requests seen on the demo site, along with the stacktraces to help debug them.

https://www.skylight.io/app/applications/s6PEZSKwcklL/recent/6h/endpoints

Any contributions that help improve performance are very much welcome.

Local Development Setup

If you are trying to self-host the app, read this guide to get started.

The instructions below are for developers to get started with contributing to the app.

Requirements

  • See .ruby-version file for required Ruby version
  • PostgreSQL >9.3 (latest stable version recommended)
  • Redis > 5.4 (latest stable version recommended)

Getting Started

cd sure
cp .env.local.example .env.local
bin/setup
bin/dev

# Optionally, load demo data
rake demo_data:default

Visit http://localhost:3000 to view the app.

If you loaded the optional demo data, log in with these credentials:

  • Email: user@example.com
  • Password: Password1!

For further instructions, see guides below.

Setup Guides

One-click Install

Render expects each button target branch to have a render.yaml at the repository root. The branch-ready Blueprint files live in branches/<branch-name>/render.yaml in a separate repo and can be copied to each corresponding branch root.

Option What it deploys latest stable
Sure - No AI Sure web, Sidekiq worker, Render Postgres, and Render Key Value. AI tokens are intentionally blank. Deploy to Render Deploy to Render
Sure - Simple AI Sure with OpenAI-backed AI settings, pgvector-ready Postgres, Sidekiq, and Render Key Value. Render prompts for the OpenAI token. Deploy to Render Deploy to Render
Sure - External AI Sure with external assistant settings plus AlphaClaw, which manages the OpenClaw gateway on Render. Deploy to Render Deploy to Render

Run on PikaPods

Deploy on Hostim

License and Trademarks

Maybe and Sure are both distributed under an AGPLv3 license.

  • "Maybe" is a trademark of Maybe Finance, Inc.
  • "Sure" is not, and refers to this community fork.
S
Description
GitHub Trending: we-promise/sure
Readme AGPL-3.0
1.1 GiB
Languages
Ruby 81.6%
HTML 10.1%
Dart 4.6%
JavaScript 3%
Shell 0.3%
Other 0.3%