broke: a private money app that runs on your own accounts and your own AI
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
No files matched your search
@@ -0,0 +1,33 @@
|
||||
# You don't need to edit this file by hand: open http://localhost:3000/setup and paste keys there.
|
||||
# The setup page writes .env.local (loaded after .env, so its values win). Keys typed there never leave this computer.
|
||||
# Saving from the page only works on localhost in development (or with ALLOW_SETUP_WRITES=1).
|
||||
|
||||
# Plaid: dashboard.plaid.com -> Developers -> Keys
|
||||
PLAID_CLIENT_ID=your_client_id
|
||||
PLAID_SECRET=your_sandbox_secret
|
||||
# sandbox (fake banks, free) | production (real banks, billed per linked item)
|
||||
PLAID_ENV=sandbox
|
||||
PLAID_PRODUCTS=transactions
|
||||
PLAID_COUNTRY_CODES=US
|
||||
|
||||
# Supabase: supabase.com/dashboard -> project -> Settings -> API
|
||||
NEXT_PUBLIC_SUPABASE_URL=https://your-project.supabase.co
|
||||
NEXT_PUBLIC_SUPABASE_PUBLISHABLE_KEY=your_publishable_key
|
||||
SUPABASE_SERVICE_ROLE_KEY=your_service_role_key
|
||||
# Lets broke create and update its own tables on start. Supabase -> Connect (top bar) -> Session pooler -> URI,
|
||||
# with [YOUR-PASSWORD] replaced by your database password.
|
||||
SUPABASE_DB_URL=postgresql://postgres.your-project:[YOUR-PASSWORD]@aws-0-us-east-1.pooler.supabase.com:5432/postgres
|
||||
|
||||
# AI for Ask broke uses the AI apps you're already signed in to on this computer, so it runs on your
|
||||
# plan's allowance (no API keys, no API bill): Claude Code (`claude`), Codex (`codex login`) or Gemini CLI (`gemini`).
|
||||
# Setup (gear icon) shows which are ready. Nothing to put here for them.
|
||||
# Local model (Ollama or LM Studio). Ollama: install, then `ollama pull <model>`.
|
||||
# LM Studio's server is http://localhost:1234/v1. LOCAL_LLM_MODEL empty = first installed model.
|
||||
LOCAL_LLM_BASE_URL=http://localhost:11434/v1
|
||||
LOCAL_LLM_MODEL=
|
||||
|
||||
# Set to 1 on a hosted server (Vercel sets this up by itself): AI is each user's OpenRouter account, or their own AI app through the helper on Connect your AI.
|
||||
# BROKE_HOSTED=1
|
||||
|
||||
# Dev only: "Skip login" signs in as this account (ignored in production)
|
||||
DEV_LOGIN_EMAIL=
|
||||
@@ -0,0 +1,27 @@
|
||||
# A brand-new install, with no keys, on each system: broke starts and opens its setup page.
|
||||
name: Install test
|
||||
on:
|
||||
pull_request:
|
||||
workflow_dispatch:
|
||||
jobs:
|
||||
install:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [ubuntu-latest, macos-latest, windows-latest]
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 22
|
||||
- name: Start broke with no keys and check the setup page
|
||||
shell: bash
|
||||
env:
|
||||
BROKE_NO_OPEN: "1"
|
||||
run: |
|
||||
node scripts/start.mjs > start.log 2>&1 &
|
||||
for i in $(seq 1 120); do grep -q "broke is running" start.log && break; sleep 3; done
|
||||
cat start.log
|
||||
curl -fsS http://localhost:3000/setup | grep -q "Set up broke"
|
||||
curl -fsS http://localhost:3000/api/setup/status | grep -q '"canWrite":true'
|
||||
@@ -0,0 +1,22 @@
|
||||
# The "Update broke" button for a copy in your own GitHub: Actions, Update broke, Run workflow.
|
||||
# It pulls in the latest broke and keeps your changes. Vercel then rebuilds your site by itself.
|
||||
name: Update broke
|
||||
on: workflow_dispatch
|
||||
permissions:
|
||||
contents: write
|
||||
jobs:
|
||||
update:
|
||||
if: github.repository != 'nextwork-projects/broke'
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 22
|
||||
- run: |
|
||||
git config user.name "broke update"
|
||||
git config user.email "broke-update@users.noreply.github.com"
|
||||
node scripts/update.mjs --ci
|
||||
git push
|
||||
@@ -0,0 +1,53 @@
|
||||
.env
|
||||
.env.local
|
||||
node_modules/
|
||||
.next/
|
||||
teardown/bundle/
|
||||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
|
||||
|
||||
# dependencies
|
||||
/node_modules
|
||||
/.pnp
|
||||
.pnp.*
|
||||
.yarn/*
|
||||
!.yarn/patches
|
||||
!.yarn/plugins
|
||||
!.yarn/releases
|
||||
!.yarn/versions
|
||||
|
||||
# testing
|
||||
/coverage
|
||||
|
||||
# next.js
|
||||
/.next/
|
||||
/out/
|
||||
|
||||
# production
|
||||
/build
|
||||
|
||||
# misc
|
||||
.DS_Store
|
||||
*.pem
|
||||
|
||||
# debug
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
.pnpm-debug.log*
|
||||
|
||||
# env files (can opt-in for committing if needed)
|
||||
.env*
|
||||
|
||||
# vercel
|
||||
.vercel
|
||||
|
||||
# typescript
|
||||
*.tsbuildinfo
|
||||
next-env.d.ts
|
||||
!.env.example
|
||||
/.next-prod/
|
||||
/.next-dev/
|
||||
/.next-*/
|
||||
|
||||
# test screenshots and throwaway scripts
|
||||
.context/
|
||||
@@ -0,0 +1,24 @@
|
||||
# broke
|
||||
|
||||
Personal finance app. Next.js 15 (app router), Supabase (sign-in, Postgres, row-level security), Plaid and other bank feeds.
|
||||
|
||||
## Rules for any change
|
||||
|
||||
- **Bank data stays private.** Every AI path goes through `src/lib/llm/gate.ts`. A cloud model gets the summary only: rounded amounts, names replaced by tokens. Full detail goes only to a local model. Never add another path.
|
||||
- **No AI API keys.** AI runs on the person's own signed-in app (Claude Code, Codex, Gemini CLI, opencode), a local model, or their OpenRouter sign-in.
|
||||
- **Tools stay off for prompts from a website.** The helper (`public/broke-connect.cjs`) only runs AI apps with no tools at all. Don't add one that can read files.
|
||||
- **Every table has row-level security.** Secrets like `plaid_items.access_token` have no policies, so only the server's secret key reads them.
|
||||
- **Advice depends on country.** Use `countryOf` and the tax modules in `src/lib/countries.ts`. Never assume the US.
|
||||
- **Never show test data to someone on real banks.**
|
||||
- **Tests use throwaway `@broke.test` users**, created and deleted with the admin client. Never read a real person's rows to test.
|
||||
|
||||
## Writing
|
||||
|
||||
Sentence case. Plain short sentences. No em dashes.
|
||||
|
||||
## Working here
|
||||
|
||||
- `npm run dev`: reloads on every edit. Keys go in on http://localhost:3000/setup.
|
||||
- Database changes: add the next numbered file in `supabase/migrations/`. It applies on start, or with `npm run migrate`.
|
||||
- Checks: `npm run lint`, `npx tsc --noEmit`, and pure libraries with `node src/lib/<name>.test.ts`.
|
||||
- `scripts/e2e-sandbox.mjs` runs a throwaway user through every page.
|
||||
@@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2026 NextWork
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
@@ -0,0 +1,70 @@
|
||||
# broke
|
||||
|
||||
See where your money goes, get a plan for it, and ask your own AI about it. Your bank data stays in your own database.
|
||||
|
||||
Next.js 15, Supabase, Plaid. Free to run. AI uses the app you already pay for, with no API keys.
|
||||
|
||||
## Run it on your computer
|
||||
|
||||
The easiest way. Needs [Node.js](https://nodejs.org) and [git](https://git-scm.com/downloads). On Mac or Linux:
|
||||
|
||||
```bash
|
||||
curl -fsSL https://raw.githubusercontent.com/nextwork-projects/broke/main/install.sh | sh
|
||||
```
|
||||
|
||||
This puts broke in `~/broke` and opens a setup page. Paste in your keys there, one step at a time:
|
||||
|
||||
1. **Supabase** (free): your database and sign-in.
|
||||
2. **Plaid** (free for test banks): your bank connection.
|
||||
3. **AI** (optional): broke finds Claude Code, Codex, Gemini CLI, opencode or a local model on your computer. Or connect OpenRouter in one click.
|
||||
|
||||
To start it again: double-click **Start broke.command** on a Mac, or run `npm run app` in the folder.
|
||||
|
||||
On Windows: `git clone https://github.com/nextwork-projects/broke`, then `npm run app` in that folder.
|
||||
|
||||
## Put it online
|
||||
|
||||
Use it from your phone, on a site only you own.
|
||||
|
||||
[](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fnextwork-projects%2Fbroke&project-name=broke&repository-name=broke&env=NEXT_PUBLIC_SUPABASE_URL%2CNEXT_PUBLIC_SUPABASE_PUBLISHABLE_KEY%2CSUPABASE_SERVICE_ROLE_KEY%2CSUPABASE_DB_URL%2CPLAID_CLIENT_ID%2CPLAID_SECRET%2CPLAID_ENV&envDescription=Your+Supabase+project+and+Plaid+keys.+Only+your+copy+of+broke+sees+them.&envLink=https%3A%2F%2Fgithub.com%2Fnextwork-projects%2Fbroke%23put-it-online&envDefaults=%7B%22PLAID_ENV%22%3A%22sandbox%22%7D)
|
||||
|
||||
1. Create a free [Supabase](https://supabase.com/dashboard/new) project and get [Plaid keys](https://dashboard.plaid.com/developers/keys).
|
||||
2. Press the button and paste them in. `SUPABASE_DB_URL` is under Supabase, Connect, Session pooler. broke creates its tables as it builds.
|
||||
3. Open your new site. It shows one step to do in Supabase before your first sign-in.
|
||||
4. Sign in once, then turn off "Allow new users to sign up" under Authentication, Sign In / Providers, so nobody else can use your copy.
|
||||
|
||||
**AI on an online copy:** connect OpenRouter in one click. Or, to use your Claude or opencode plan, press **Connect my computer** on Connect your AI and run the command it gives you. Your AI login stays on your computer. AI answers while that command is running.
|
||||
|
||||
## Improve it
|
||||
|
||||
broke is yours to change. Open the folder and tell your AI app what you want:
|
||||
|
||||
```bash
|
||||
cd ~/broke && claude
|
||||
```
|
||||
|
||||
`CLAUDE.md` tells it the privacy rules. Run `npm run dev` to see changes as they happen. On an online copy, `git push` publishes them.
|
||||
|
||||
**Get the latest broke:** run `npm run update`. On an online copy there's nothing to install: in your GitHub repo open Actions, Update broke, Run workflow, and Vercel rebuilds your site. Your changes stay either way.
|
||||
|
||||
If you make something others would want, send a pull request.
|
||||
|
||||
## Banks
|
||||
|
||||
**Banks in other countries (all optional, keys on the Setup page):** Plaid (US, Canada), Akahu (New Zealand), Enable Banking (UK, Europe), Basiq (Australia), Belvo (Brazil). Each shows only for that country. Enable Banking, Basiq and Belvo are built from their public docs and tested against stand-ins, so test against the vendor's sandbox before relying on them. Anywhere else, people import a CSV, OFX, QIF or PDF statement.
|
||||
|
||||
In test mode, press **Use a test bank**, or pick any bank in Plaid Link with username `user_good` and password `pass_good`.
|
||||
|
||||
## How AI stays private
|
||||
|
||||
Every AI path goes through one gate. A cloud model gets a summary: rounded amounts, names replaced by tokens. Full detail goes only to a local model. You can turn AI off in Settings. Each answer runs with no way to change your data.
|
||||
|
||||
## Scripts
|
||||
|
||||
- `npm run migrate`: apply database changes now. They also apply on start.
|
||||
- `node --env-file=.env --env-file-if-exists=.env.local scripts/e2e-sandbox.mjs`: throwaway user, test bank, every page, user deleted.
|
||||
- `node src/lib/format.test.ts` and `node src/lib/llm/config.test.ts`: unit checks.
|
||||
|
||||
## Licence
|
||||
|
||||
MIT.
|
||||
@@ -0,0 +1,5 @@
|
||||
#!/bin/zsh
|
||||
# Double-click to run broke. Everything else lives in scripts/start.mjs. (To change the code, run `npm run dev`: it reloads on every edit.)
|
||||
cd "$(dirname "$0")"
|
||||
if ! command -v node >/dev/null; then echo "Node.js is not installed. Get it from https://nodejs.org (LTS), then double-click this again."; read; exit 1; fi
|
||||
exec node scripts/start.mjs
|
||||
@@ -0,0 +1,133 @@
|
||||
<!doctype html>
|
||||
<html><head><meta charset="utf-8"><title>broke 2000s 2</title>
|
||||
<style>
|
||||
body{margin:0;background:#efeeea;font-family:Tahoma,Verdana,sans-serif;padding:32px}
|
||||
h2{font:600 13px Menlo,monospace;color:#777;margin:28px 0 12px;text-transform:uppercase;letter-spacing:.06em}
|
||||
.row{display:flex;flex-wrap:wrap;gap:16px}
|
||||
.t{width:260px;height:260px;border-radius:22px;position:relative;display:flex;align-items:center;justify-content:center;overflow:hidden}
|
||||
.t .n{position:absolute;top:12px;left:14px;font:11px Menlo,monospace;opacity:.55;z-index:2}
|
||||
.t svg{width:236px;height:236px}
|
||||
</style></head><body>
|
||||
|
||||
<svg width="0" height="0" style="position:absolute"><defs>
|
||||
<linearGradient id="gloss" x1="0" y1="0" x2="0" y2="1"><stop offset="0" stop-color="#fff" stop-opacity=".85"/><stop offset="1" stop-color="#fff" stop-opacity=".05"/></linearGradient>
|
||||
<linearGradient id="xpBlue" x1="0" y1="0" x2="0" y2="1"><stop offset="0" stop-color="#3d8bf8"/><stop offset="1" stop-color="#0745b8"/></linearGradient>
|
||||
<linearGradient id="lcd" x1="0" y1="0" x2="0" y2="1"><stop offset="0" stop-color="#c8d89a"/><stop offset="1" stop-color="#9fb46a"/></linearGradient>
|
||||
<linearGradient id="phone" x1="0" y1="0" x2="1" y2="0"><stop offset="0" stop-color="#3b4048"/><stop offset=".5" stop-color="#7a828e"/><stop offset="1" stop-color="#3b4048"/></linearGradient>
|
||||
<radialGradient id="cd" cx=".5" cy=".5" r=".5"><stop offset=".2" stop-color="#e8e8e8"/><stop offset=".6" stop-color="#cfd8e6"/><stop offset=".8" stop-color="#e6d2f0"/><stop offset="1" stop-color="#d0ecf0"/></radialGradient>
|
||||
<linearGradient id="banner" x1="0" y1="0" x2="1" y2="0"><stop offset="0" stop-color="#ff0"/><stop offset=".5" stop-color="#f90"/><stop offset="1" stop-color="#ff0"/></linearGradient>
|
||||
<path id="burst" d="M0,-30 L7,-20 L19,-24 L18,-12 L29,-6 L21,3 L27,14 L15,16 L12,28 L2,21 L-8,28 L-11,16 L-23,14 L-17,3 L-25,-6 L-14,-12 L-15,-24 L-3,-20Z"/>
|
||||
</defs></svg>
|
||||
|
||||
<h2>G · more broke, circa 2006</h2>
|
||||
<div class="row">
|
||||
|
||||
<!-- G1 search: did you mean -->
|
||||
<div class="t" style="background:#fff"><span class="n">G1 did you mean</span>
|
||||
<svg viewBox="0 0 240 240">
|
||||
<text x="120" y="78" text-anchor="middle" font-family="Georgia" font-size="40"><tspan fill="#3369e8">b</tspan><tspan fill="#d50f25">r</tspan><tspan fill="#eeb211">o</tspan><tspan fill="#3369e8">k</tspan><tspan fill="#009925">e</tspan></text>
|
||||
<rect x="22" y="100" width="196" height="28" fill="#fff" stroke="#7f9db9" stroke-width="1.5"/>
|
||||
<text x="30" y="119" font-family="Arial" font-size="13">how to get money fast</text>
|
||||
<rect x="60" y="138" width="54" height="22" rx="2" fill="#eee" stroke="#aaa"/><text x="87" y="153" text-anchor="middle" font-family="Arial" font-size="10">Search</text>
|
||||
<rect x="122" y="138" width="62" height="22" rx="2" fill="#eee" stroke="#aaa"/><text x="153" y="153" text-anchor="middle" font-family="Arial" font-size="9">I'm Feeling Poor</text>
|
||||
<text x="30" y="190" font-family="Arial" font-size="12" fill="#c00">Did you mean: <tspan font-weight="700" font-style="italic" fill="#00c" text-decoration="underline">get a job</tspan></text>
|
||||
</svg></div>
|
||||
|
||||
<!-- G2 flip phone LCD -->
|
||||
<div class="t" style="background:#1b1d22"><span class="n" style="color:#fff">G2 brick phone</span>
|
||||
<svg viewBox="0 0 240 240">
|
||||
<rect x="62" y="20" width="116" height="206" rx="26" fill="url(#phone)" stroke="#20242a" stroke-width="3"/>
|
||||
<rect x="78" y="44" width="84" height="74" rx="6" fill="url(#lcd)" stroke="#222" stroke-width="3"/>
|
||||
<g font-family="Menlo, Courier New" font-weight="700" fill="#2b3315">
|
||||
<text x="84" y="60" font-size="9">▂▄▆ 1:37</text>
|
||||
<text x="120" y="84" text-anchor="middle" font-size="18">broke</text>
|
||||
<text x="120" y="100" text-anchor="middle" font-size="9">Credit: $0.00</text>
|
||||
<text x="84" y="113" font-size="8">Menu</text><text x="156" y="113" text-anchor="end" font-size="8">Cry</text></g>
|
||||
<rect x="104" y="128" width="32" height="14" rx="7" fill="#2a2e35"/>
|
||||
<g fill="#2a2e35">
|
||||
<rect x="80" y="152" width="22" height="12" rx="5"/><rect x="109" y="152" width="22" height="12" rx="5"/><rect x="138" y="152" width="22" height="12" rx="5"/>
|
||||
<rect x="80" y="170" width="22" height="12" rx="5"/><rect x="109" y="170" width="22" height="12" rx="5"/><rect x="138" y="170" width="22" height="12" rx="5"/>
|
||||
<rect x="80" y="188" width="22" height="12" rx="5"/><rect x="109" y="188" width="22" height="12" rx="5"/><rect x="138" y="188" width="22" height="12" rx="5"/></g>
|
||||
</svg></div>
|
||||
|
||||
<!-- G3 millionth visitor banner -->
|
||||
<div class="t" style="background:#000080"><span class="n" style="color:#fff">G3 you won</span>
|
||||
<svg viewBox="0 0 240 240">
|
||||
<rect x="14" y="58" width="212" height="124" fill="url(#banner)" stroke="#f00" stroke-width="4" stroke-dasharray="10 6"/>
|
||||
<text x="120" y="88" text-anchor="middle" font-family="Impact, Arial Black" font-size="20" fill="#f00">CONGRATULATIONS!!!</text>
|
||||
<text x="120" y="108" text-anchor="middle" font-family="Arial" font-weight="700" font-size="11" fill="#000">you are the 1,000,000th visitor</text>
|
||||
<text x="120" y="142" text-anchor="middle" font-family="Impact, Arial Black" font-size="34" fill="#00f">broke</text>
|
||||
<rect x="64" y="152" width="112" height="22" fill="#c0c0c0" stroke="#000"/>
|
||||
<text x="120" y="167" text-anchor="middle" font-family="Arial" font-weight="700" font-size="11">CLAIM YOUR $0</text>
|
||||
<path d="M150,170 l0,16 l4,-4 l4,8 l3,-1.5 l-4,-8 l6,0z" fill="#fff" stroke="#000" stroke-width="1"/>
|
||||
</svg></div>
|
||||
|
||||
<!-- G4 low-wallet tray balloon -->
|
||||
<div class="t" style="background:#5a7edc"><span class="n" style="color:#fff">G4 low wallet</span>
|
||||
<svg viewBox="0 0 240 240">
|
||||
<path d="M18,58 H222 a8,8 0 0 1 8,8 V150 a8,8 0 0 1 -8,8 H186 L196,182 L162,158 H18 a8,8 0 0 1 -8,-8 V66 a8,8 0 0 1 8,-8Z" fill="#ffffe1" stroke="#000" stroke-width="1.2"/>
|
||||
<path d="M30,70 L42,92 H18Z" fill="#ffd200" stroke="#7a5a00" stroke-width="1.2" stroke-linejoin="round"/><text x="30" y="89" text-anchor="middle" font-family="Arial" font-weight="700" font-size="14">!</text>
|
||||
<text x="50" y="84" font-family="Tahoma" font-weight="700" font-size="13">Your wallet is running low</text>
|
||||
<text x="22" y="110" font-family="Tahoma" font-size="12">You have 0% money remaining.</text>
|
||||
<text x="22" y="128" font-family="Tahoma" font-size="12">Plug in a job or you will go</text>
|
||||
<text x="22" y="144" font-family="Tahoma" font-size="12" font-weight="700">broke.</text>
|
||||
<rect x="0" y="212" width="240" height="28" fill="url(#xpBlue)"/>
|
||||
<rect x="150" y="214" width="90" height="24" fill="#0f8bd8"/>
|
||||
<rect x="196" y="219" width="14" height="14" rx="2" fill="#3d8a55"/><rect x="204" y="223" width="6" height="6" rx="2" fill="#e2492f"/>
|
||||
<text x="216" y="230" font-family="Tahoma" font-size="10" fill="#fff">1:37</text>
|
||||
</svg></div>
|
||||
</div>
|
||||
|
||||
<div class="row" style="margin-top:16px">
|
||||
<!-- G5 IM sign-in toast -->
|
||||
<div class="t" style="background:#dfe9f5"><span class="n">G5 signed in</span>
|
||||
<svg viewBox="0 0 240 240">
|
||||
<rect x="24" y="66" width="192" height="110" rx="6" fill="#fff" stroke="#6b8fc7" stroke-width="2"/>
|
||||
<rect x="24" y="66" width="192" height="22" rx="6" fill="url(#xpBlue)"/><rect x="24" y="80" width="192" height="8" fill="#0745b8"/>
|
||||
<text x="32" y="81" font-family="Tahoma" font-weight="700" font-size="11" fill="#fff">Messenger</text>
|
||||
<g transform="translate(58 128)"><circle cx="-10" cy="-8" r="13" fill="#3d8a55"/><circle cx="10" cy="-8" r="13" fill="#5b6cf0"/>
|
||||
<rect x="-26" y="2" width="22" height="16" rx="8" fill="#3d8a55"/><rect x="4" y="2" width="22" height="16" rx="8" fill="#5b6cf0"/></g>
|
||||
<text x="96" y="118" font-family="Tahoma" font-weight="700" font-size="16" fill="#0745b8">broke</text>
|
||||
<text x="96" y="134" font-family="Tahoma" font-size="11" fill="#333">has just signed in.</text>
|
||||
<text x="96" y="156" font-family="Tahoma" font-style="italic" font-size="10" fill="#888">"can u spot me $5"</text>
|
||||
</svg></div>
|
||||
|
||||
<!-- G6 burned CD -->
|
||||
<div class="t" style="background:#f3f1ea"><span class="n">G6 burned cd</span>
|
||||
<svg viewBox="0 0 240 240">
|
||||
<circle cx="120" cy="122" r="96" fill="url(#cd)" stroke="#bbb" stroke-width="1.5"/>
|
||||
<path d="M120,26 A96,96 0 0 1 206,80 L120,122Z" fill="#fff" opacity=".35"/>
|
||||
<circle cx="120" cy="122" r="22" fill="#f3f1ea" stroke="#bbb" stroke-width="1.5"/><circle cx="120" cy="122" r="8" fill="#f3f1ea" stroke="#ccc"/>
|
||||
<g font-family="Marker Felt, Comic Sans MS" fill="#111" transform="rotate(-6 120 120)">
|
||||
<text x="120" y="76" text-anchor="middle" font-size="30" font-weight="700">broke</text>
|
||||
<text x="120" y="174" text-anchor="middle" font-size="14">mix 2006</text>
|
||||
<text x="120" y="192" text-anchor="middle" font-size="11">DO NOT LEND!!</text></g>
|
||||
</svg></div>
|
||||
|
||||
<!-- G7 mood status -->
|
||||
<div class="t" style="background:#e9eef7"><span class="n">G7 mood</span>
|
||||
<svg viewBox="0 0 240 240">
|
||||
<rect x="22" y="44" width="196" height="156" fill="#fff" stroke="#6699cc" stroke-width="2"/>
|
||||
<rect x="22" y="44" width="196" height="22" fill="#6699cc"/><text x="30" y="60" font-family="Verdana" font-weight="700" font-size="12" fill="#fff">broke's profile</text>
|
||||
<rect x="32" y="76" width="64" height="64" fill="#5b6cf0"/><text x="64" y="118" text-anchor="middle" font-family="Georgia" font-size="40" fill="#fff">$</text>
|
||||
<path d="M40,80 L88,136" stroke="#e2492f" stroke-width="6" stroke-linecap="round"/>
|
||||
<g font-family="Verdana" font-size="11"><text x="106" y="88">Mood: <tspan font-weight="700">broke</tspan> :(</text>
|
||||
<text x="106" y="106" fill="#666">Age: 22</text><text x="106" y="124" fill="#666">Net worth: -$4</text>
|
||||
<text x="106" y="140" fill="#0a0" font-weight="700">● Online Now!</text></g>
|
||||
<text x="32" y="168" font-family="Verdana" font-weight="700" font-size="11" fill="#c06">broke's Top 8:</text>
|
||||
<text x="32" y="186" font-family="Verdana" font-size="10" fill="#333">ramen, ramen, ramen, ramen...</text>
|
||||
</svg></div>
|
||||
|
||||
<!-- G8 dancing silhouette ad -->
|
||||
<div class="t" style="background:#ff2d9b"><span class="n" style="color:#fff">G8 silhouette ad</span>
|
||||
<svg viewBox="0 0 240 240">
|
||||
<g fill="#000">
|
||||
<circle cx="112" cy="54" r="15"/>
|
||||
<path d="M100,72 Q114,66 128,72 L134,128 L96,128Z"/>
|
||||
<path d="M102,76 L70,52 L64,58 L98,90Z"/><path d="M126,76 L160,92 L158,100 L124,92Z"/>
|
||||
<path d="M98,124 L86,180 L72,184 L74,190 L96,188 L114,132Z"/><path d="M130,124 L150,176 L160,186 L166,180 L158,170 L124,128Z"/></g>
|
||||
<path d="M96,128 q-10,8 -6,20 q8,-2 10,-14Z M134,128 q10,8 6,20 q-8,-2 -10,-14Z" fill="#fff"/>
|
||||
<text x="120" y="222" text-anchor="middle" font-family="Helvetica" font-weight="700" font-size="28" fill="#fff">broke</text>
|
||||
</svg></div>
|
||||
</div>
|
||||
</body></html>
|
||||
|
After Width: | Height: | Size: 128 KiB |
@@ -0,0 +1,117 @@
|
||||
<!doctype html>
|
||||
<html><head><meta charset="utf-8"><title>broke 2000s</title>
|
||||
<style>
|
||||
body{margin:0;background:#efeeea;font-family:Tahoma,Verdana,sans-serif;padding:32px}
|
||||
h2{font:600 13px Menlo,monospace;color:#777;margin:28px 0 12px;text-transform:uppercase;letter-spacing:.06em}
|
||||
.row{display:flex;flex-wrap:wrap;gap:16px}
|
||||
.t{width:260px;height:260px;border-radius:22px;position:relative;display:flex;align-items:center;justify-content:center;overflow:hidden}
|
||||
.t .n{position:absolute;top:12px;left:14px;font:11px Menlo,monospace;opacity:.55;z-index:2}
|
||||
.t svg{width:236px;height:236px}
|
||||
</style></head><body>
|
||||
|
||||
<svg width="0" height="0" style="position:absolute"><defs>
|
||||
<linearGradient id="gloss" x1="0" y1="0" x2="0" y2="1"><stop offset="0" stop-color="#fff" stop-opacity=".85"/><stop offset="1" stop-color="#fff" stop-opacity=".05"/></linearGradient>
|
||||
<linearGradient id="aquaG" x1="0" y1="0" x2="0" y2="1"><stop offset="0" stop-color="#9be15d"/><stop offset="1" stop-color="#2f9e2f"/></linearGradient>
|
||||
<linearGradient id="aquaB" x1="0" y1="0" x2="0" y2="1"><stop offset="0" stop-color="#7fc4ff"/><stop offset="1" stop-color="#1767d6"/></linearGradient>
|
||||
<linearGradient id="xpTitle" x1="0" y1="0" x2="0" y2="1"><stop offset="0" stop-color="#3d8bf8"/><stop offset=".15" stop-color="#0a5fe0"/><stop offset="1" stop-color="#0745b8"/></linearGradient>
|
||||
<linearGradient id="gold" x1="0" y1="0" x2="0" y2="1"><stop offset="0" stop-color="#ffe680"/><stop offset="1" stop-color="#e09a12"/></linearGradient>
|
||||
<linearGradient id="rainbow" x1="0" y1="0" x2="1" y2="0"><stop offset="0" stop-color="#ff2d55"/><stop offset=".25" stop-color="#ff9500"/><stop offset=".5" stop-color="#ffd60a"/><stop offset=".75" stop-color="#34c759"/><stop offset="1" stop-color="#0a84ff"/></linearGradient>
|
||||
<linearGradient id="fade" x1="0" y1="0" x2="0" y2="1"><stop offset="0" stop-color="#fff" stop-opacity=".35"/><stop offset=".6" stop-color="#fff" stop-opacity="0"/></linearGradient>
|
||||
<mask id="reflect"><rect x="0" y="0" width="240" height="240" fill="url(#fade)"/></mask>
|
||||
<path id="burst" d="M0,-30 L7,-20 L19,-24 L18,-12 L29,-6 L21,3 L27,14 L15,16 L12,28 L2,21 L-8,28 L-11,16 L-23,14 L-17,3 L-25,-6 L-14,-12 L-15,-24 L-3,-20Z"/>
|
||||
</defs></svg>
|
||||
|
||||
<h2>F · broke, circa 2006</h2>
|
||||
<div class="row">
|
||||
|
||||
<!-- F1 web 2.0: drop the vowel, add beta -->
|
||||
<div class="t" style="background:#fff"><span class="n">F1 brokr beta</span>
|
||||
<svg viewBox="0 0 240 240">
|
||||
<text x="104" y="124" text-anchor="middle" font-family="Arial Rounded MT Bold, Helvetica" font-weight="700" font-size="64" letter-spacing="-3"><tspan fill="#ff0084">bro</tspan><tspan fill="#0063dc">kr</tspan></text>
|
||||
|
||||
<g transform="translate(200 62) rotate(14)"><use href="#burst" fill="#ff7b00" transform="scale(1.05)"/><text y="5" text-anchor="middle" font-family="Verdana" font-weight="700" font-size="13" fill="#fff">beta</text></g>
|
||||
<text x="120" y="190" text-anchor="middle" font-family="Verdana" font-size="11" fill="#999">your money. gone. 2.0</text>
|
||||
</svg></div>
|
||||
|
||||
<!-- F2 XP error dialog -->
|
||||
<div class="t" style="background:#3a6ea5"><span class="n" style="color:#fff">F2 broke.exe</span>
|
||||
<svg viewBox="0 0 240 240">
|
||||
<rect x="20" y="58" width="200" height="124" rx="8" fill="#ece9d8" stroke="#0745b8" stroke-width="3"/>
|
||||
<path d="M20,66 a8,8 0 0 1 8,-8 H212 a8,8 0 0 1 8,8 V84 H20Z" fill="url(#xpTitle)"/>
|
||||
<text x="30" y="77" font-family="Trebuchet MS" font-weight="700" font-size="12" fill="#fff">broke.exe</text>
|
||||
<rect x="196" y="62" width="18" height="18" rx="3" fill="#e2492f" stroke="#fff" stroke-width="1.2"/><path d="M200,66 l10,10 m0,-10 l-10,10" stroke="#fff" stroke-width="2.2"/>
|
||||
<circle cx="48" cy="114" r="15" fill="#e2492f" stroke="#a51d0c" stroke-width="1.5"/><path d="M42,108 l12,12 m0,-12 l-12,12" stroke="#fff" stroke-width="3.5" stroke-linecap="round"/>
|
||||
<text x="72" y="110" font-family="Tahoma" font-size="12" fill="#000">Insufficient funds.</text>
|
||||
<text x="72" y="126" font-family="Tahoma" font-size="11" fill="#555">Balance: $0.00</text>
|
||||
<rect x="85" y="146" width="70" height="24" rx="3" fill="#f5f4ee" stroke="#003c74" stroke-width="1.2"/>
|
||||
<text x="120" y="162" text-anchor="middle" font-family="Tahoma" font-size="12">OK :(</text>
|
||||
</svg></div>
|
||||
|
||||
<!-- F3 aqua gel coin -->
|
||||
<div class="t" style="background:linear-gradient(#f4f8fc,#cfd9e4)"><span class="n">F3 aqua coin</span>
|
||||
<svg viewBox="0 0 240 240">
|
||||
<ellipse cx="120" cy="196" rx="54" ry="8" fill="#000" opacity=".15"/>
|
||||
<circle cx="120" cy="110" r="66" fill="url(#gold)" stroke="#b07208" stroke-width="3"/>
|
||||
<text x="120" y="138" text-anchor="middle" font-family="Georgia" font-weight="700" font-size="78" fill="#b07208" opacity=".55">$</text>
|
||||
<path d="M128,48 L108,92 L138,114 L118,172" fill="none" stroke="#5a3a00" stroke-width="7" stroke-linejoin="round" stroke-linecap="round"/>
|
||||
<ellipse cx="120" cy="76" rx="52" ry="30" fill="url(#gloss)"/>
|
||||
<text x="120" y="226" text-anchor="middle" font-family="Lucida Grande, Helvetica" font-weight="700" font-size="22" fill="#333">broke</text>
|
||||
</svg></div>
|
||||
|
||||
<!-- F4 WordArt -->
|
||||
<div class="t" style="background:#fff"><span class="n">F4 wordart</span>
|
||||
<svg viewBox="0 0 240 240">
|
||||
<g transform="translate(120 124) skewY(-8)">
|
||||
<text text-anchor="middle" font-family="Impact, Arial Black" font-size="76" fill="#888" transform="translate(5 5)">broke</text>
|
||||
<text text-anchor="middle" font-family="Impact, Arial Black" font-size="76" fill="url(#rainbow)" stroke="#222" stroke-width="2">broke</text>
|
||||
</g>
|
||||
<text x="120" y="190" text-anchor="middle" font-family="Comic Sans MS" font-size="14" fill="#c00">~*~ ballin on a budget ~*~</text>
|
||||
</svg></div>
|
||||
</div>
|
||||
|
||||
<div class="row" style="margin-top:16px">
|
||||
<!-- F5 loading bar -->
|
||||
<div class="t" style="background:#008080"><span class="n" style="color:#fff">F5 loading balance</span>
|
||||
<svg viewBox="0 0 240 240">
|
||||
<rect x="22" y="76" width="196" height="96" fill="#c0c0c0" stroke="#fff" stroke-width="2"/><rect x="22" y="76" width="196" height="96" fill="none" stroke="#404040" stroke-width="2" transform="translate(2 2)"/>
|
||||
<rect x="24" y="78" width="192" height="18" fill="#000080"/><text x="30" y="91" font-family="Tahoma" font-weight="700" font-size="11" fill="#fff">broke</text>
|
||||
<text x="34" y="118" font-family="Tahoma" font-size="12">Loading your money...</text>
|
||||
<rect x="34" y="128" width="172" height="20" fill="#fff" stroke="#808080" stroke-width="2"/>
|
||||
<rect x="37" y="131" width="6" height="14" fill="#000080"/>
|
||||
<text x="34" y="164" font-family="Tahoma" font-size="10" fill="#333">Time remaining: forever</text>
|
||||
</svg></div>
|
||||
|
||||
<!-- F6 glossy pill + starburst -->
|
||||
<div class="t" style="background:linear-gradient(#e9f3ff,#fff)"><span class="n">F6 glossy pill</span>
|
||||
<svg viewBox="0 0 240 240">
|
||||
<rect x="28" y="88" width="184" height="64" rx="32" fill="url(#aquaG)" stroke="#237a23" stroke-width="2"/>
|
||||
<rect x="40" y="92" width="160" height="26" rx="13" fill="url(#gloss)"/>
|
||||
<text x="120" y="132" text-anchor="middle" font-family="Arial Rounded MT Bold, Helvetica" font-weight="700" font-size="36" fill="#fff" stroke="#1d5e1d" stroke-width=".8">broke</text>
|
||||
<g transform="translate(184 72) rotate(-12)"><use href="#burst" fill="#ffe500" stroke="#e08a00" stroke-width="1.5" transform="scale(1.4)"/>
|
||||
<text y="-2" text-anchor="middle" font-family="Verdana" font-weight="700" font-size="9" fill="#d00">NOW 0%</text><text y="9" text-anchor="middle" font-family="Verdana" font-weight="700" font-size="9" fill="#d00">MONEY!</text></g>
|
||||
<text x="120" y="182" text-anchor="middle" font-family="Verdana" font-size="11" fill="#5a8">™ ® © (can't afford the lawyer)</text>
|
||||
</svg></div>
|
||||
|
||||
<!-- F7 under construction -->
|
||||
<div class="t" style="background:#000"><span class="n" style="color:#fff">F7 under construction</span>
|
||||
<svg viewBox="0 0 240 240">
|
||||
<defs><pattern id="hz" width="20" height="20" patternUnits="userSpaceOnUse" patternTransform="rotate(45)"><rect width="10" height="20" fill="#ffd400"/><rect x="10" width="10" height="20" fill="#000"/></pattern></defs>
|
||||
<rect x="16" y="60" width="208" height="22" fill="url(#hz)"/><rect x="16" y="158" width="208" height="22" fill="url(#hz)"/>
|
||||
<text x="120" y="133" text-anchor="middle" font-family="Courier New" font-weight="700" font-size="50" fill="#0f0">broke</text>
|
||||
<text x="120" y="204" text-anchor="middle" font-family="Times New Roman" font-size="12" fill="#ff0">wallet under construction</text>
|
||||
<text x="120" y="48" text-anchor="middle" font-family="Times New Roman" font-size="11" fill="#0ff">visitors: 000000</text>
|
||||
</svg></div>
|
||||
|
||||
<!-- F8 aqua wallet with moth -->
|
||||
<div class="t" style="background:linear-gradient(#f4f8fc,#cfd9e4)"><span class="n">F8 gel wallet</span>
|
||||
<svg viewBox="0 0 240 240">
|
||||
<ellipse cx="120" cy="184" rx="70" ry="8" fill="#000" opacity=".15"/>
|
||||
<rect x="44" y="92" width="152" height="88" rx="16" fill="url(#aquaB)" stroke="#0e4ea8" stroke-width="3"/>
|
||||
<rect x="150" y="116" width="58" height="38" rx="12" fill="#0e4ea8"/><circle cx="168" cy="135" r="6" fill="url(#gold)"/>
|
||||
<rect x="54" y="96" width="132" height="34" rx="12" fill="url(#gloss)"/>
|
||||
<g transform="translate(116 52) rotate(-10)" fill="#9b8b74"><path d="M0,-2 L-24,-16 Q-30,-2 -18,4Z"/><path d="M0,-2 L24,-16 Q30,-2 18,4Z"/><path d="M0,2 L-16,6 Q-16,16 -4,10Z" fill="#7d6e5a"/><path d="M0,2 L16,6 Q16,16 4,10Z" fill="#7d6e5a"/><ellipse rx="3" ry="9" fill="#5e5242"/><path d="M-1,-8 q-4,-6 -9,-8 M1,-8 q4,-6 9,-8" stroke="#5e5242" stroke-width="1.2" fill="none"/></g>
|
||||
<path d="M96,82 q4,-8 10,-14 M128,82 q-2,-8 -8,-14" stroke="#8a7a66" stroke-width="1.5" fill="none" stroke-dasharray="3 3"/>
|
||||
<text x="120" y="222" text-anchor="middle" font-family="Lucida Grande, Helvetica" font-weight="700" font-size="22" fill="#333">broke</text>
|
||||
</svg></div>
|
||||
</div>
|
||||
</body></html>
|
||||
|
After Width: | Height: | Size: 111 KiB |
@@ -0,0 +1,119 @@
|
||||
<!doctype html>
|
||||
<html><head><meta charset="utf-8"><title>broke logo v2</title>
|
||||
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@800&family=JetBrains+Mono&display=swap" rel="stylesheet">
|
||||
<style>
|
||||
body{margin:0;background:#efeeea;font-family:Inter,system-ui,sans-serif;padding:32px}
|
||||
h2{font:600 13px 'JetBrains Mono',monospace;color:#777;margin:28px 0 12px;text-transform:uppercase;letter-spacing:.06em}
|
||||
.row{display:flex;flex-wrap:wrap;gap:16px}
|
||||
.t{width:220px;height:220px;border-radius:22px;position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px}
|
||||
.t .n{position:absolute;top:14px;left:16px;font:11px 'JetBrains Mono',monospace;opacity:.55}
|
||||
.t .w{font-weight:800;font-size:34px;letter-spacing:-.03em;line-height:1}
|
||||
.t svg{width:120px;height:96px}
|
||||
.dark{background:#141414;color:#fff}.light{background:#fff;color:#3d8a55}
|
||||
.blue{background:#5b6cf0;color:#fff}.green{background:#3d8a55;color:#fff}
|
||||
.lightb{background:#fff;color:#1a1a1a}.cream{background:#fbf8f1;color:#3d8a55}
|
||||
</style></head><body>
|
||||
|
||||
<svg width="0" height="0" style="position:absolute"><defs>
|
||||
<!-- card split by a zigzag crack; halves drawn separately -->
|
||||
<path id="cardL" d="M20,22 L50,22 L46,32 L53,40 L47,50 L52,62 L20,62 Q15,62 15,57 L15,27 Q15,22 20,22Z"/>
|
||||
<path id="cardR" d="M50,22 L80,22 Q85,22 85,27 L85,57 Q85,62 80,62 L52,62 L47,50 L53,40 L46,32Z"/>
|
||||
<!-- straight diagonal split (closest to 32) -->
|
||||
<path id="sL" d="M20,22 L52,22 L46,62 L20,62 Q15,62 15,57 L15,27 Q15,22 20,22Z"/>
|
||||
<path id="sR" d="M54,22 L80,22 Q85,22 85,27 L85,57 Q85,62 80,62 L48,62Z"/>
|
||||
<!-- wallet outline (closest to 04) -->
|
||||
<g id="wallet" fill="none" stroke="currentColor" stroke-width="5" stroke-linejoin="round" stroke-linecap="round">
|
||||
<path d="M30,26 L64,15 L68,26"/>
|
||||
<rect x="18" y="26" width="64" height="42" rx="9"/>
|
||||
<path d="M82,38 H66 a8,8 0 0 0 0,16 H82"/>
|
||||
<circle cx="67" cy="46" r="1.5" fill="currentColor"/>
|
||||
</g>
|
||||
</defs></svg>
|
||||
|
||||
<h2>A · the split card (from 32)</h2>
|
||||
<div class="row">
|
||||
<div class="t dark"><span class="n">A1</span>
|
||||
<svg viewBox="0 0 100 80"><g transform="translate(-4 2) rotate(-9 30 42)"><use href="#sL" fill="#5b6cf0"/><rect x="21" y="30" width="9" height="7" rx="1.5" fill="#f5c451"/></g>
|
||||
<g transform="translate(4 -2) rotate(8 70 42)"><use href="#sR" fill="#8b98ff"/><rect x="60" y="51" width="18" height="3" rx="1.5" fill="#fff"/></g></svg>
|
||||
<span class="w">broke</span></div>
|
||||
|
||||
<div class="t dark"><span class="n">A2</span>
|
||||
<svg viewBox="0 0 100 80"><g transform="translate(-3 0) rotate(-6 30 42)"><use href="#cardL" fill="#5b6cf0"/><rect x="21" y="30" width="9" height="7" rx="1.5" fill="#f5c451"/></g>
|
||||
<g transform="translate(3 0) rotate(6 70 42)"><use href="#cardR" fill="#8b98ff"/><rect x="60" y="51" width="18" height="3" rx="1.5" fill="#fff"/></g></svg>
|
||||
<span class="w">broke</span></div>
|
||||
|
||||
<div class="t dark"><span class="n">A3</span>
|
||||
<svg viewBox="0 0 100 80"><g transform="translate(-6 -4) rotate(-14 30 42)"><use href="#sL" fill="#5b6cf0"/><rect x="21" y="30" width="9" height="7" rx="1.5" fill="#f5c451"/></g>
|
||||
<g transform="translate(6 -4) rotate(14 70 42)"><use href="#sR" fill="#8b98ff"/></g>
|
||||
<circle cx="50" cy="66" r="4" fill="#f5c451"/><circle cx="44" cy="76" r="3" fill="#f5c451" opacity=".7"/></svg>
|
||||
<span class="w">broke</span></div>
|
||||
|
||||
<div class="t dark"><span class="n">A4</span>
|
||||
<svg viewBox="0 0 100 80"><g fill="none" stroke="#8b98ff" stroke-width="4.5" stroke-linejoin="round">
|
||||
<g transform="translate(-4 0) rotate(-7 30 42)"><use href="#cardL"/></g>
|
||||
<g transform="translate(4 0) rotate(7 70 42)"><use href="#cardR"/></g></g></svg>
|
||||
<span class="w">broke</span></div>
|
||||
|
||||
<div class="t blue"><span class="n">A5</span>
|
||||
<svg viewBox="0 0 100 80"><g transform="translate(-4 2) rotate(-9 30 42)"><use href="#sL" fill="#fff"/><rect x="21" y="30" width="9" height="7" rx="1.5" fill="#5b6cf0"/></g>
|
||||
<g transform="translate(4 -2) rotate(8 70 42)"><use href="#sR" fill="#fff" opacity=".7"/></g></svg>
|
||||
<span class="w">broke</span></div>
|
||||
|
||||
<div class="t lightb"><span class="n">A6</span>
|
||||
<svg viewBox="0 0 100 80"><g transform="translate(-4 2) rotate(-9 30 42)"><use href="#sL" fill="#5b6cf0"/><rect x="21" y="30" width="9" height="7" rx="1.5" fill="#f5c451"/></g>
|
||||
<g transform="translate(4 -2) rotate(8 70 42)"><use href="#sR" fill="#8b98ff"/><rect x="60" y="51" width="18" height="3" rx="1.5" fill="#fff"/></g></svg>
|
||||
<span class="w">broke</span></div>
|
||||
</div>
|
||||
|
||||
<h2>B · the wallet (from 04)</h2>
|
||||
<div class="row">
|
||||
<div class="t light"><span class="n">B1</span>
|
||||
<svg viewBox="0 0 100 80"><use href="#wallet"/></svg><span class="w">broke</span></div>
|
||||
|
||||
<div class="t light"><span class="n">B2</span>
|
||||
<svg viewBox="0 0 100 80"><use href="#wallet" transform="translate(0 4)"/>
|
||||
<g stroke="#3d8a55" stroke-width="3.5" stroke-linecap="round"><path d="M40,12 L37,4"/><path d="M50,10 V1"/><path d="M60,12 L63,4"/></g></svg>
|
||||
<span class="w">broke</span></div>
|
||||
|
||||
<div class="t light"><span class="n">B3</span>
|
||||
<svg viewBox="0 0 100 80"><use href="#wallet"/>
|
||||
<path d="M44,27 L38,38 L46,46 L40,58 L44,67" fill="none" stroke="#3d8a55" stroke-width="3.5" stroke-linejoin="round" stroke-linecap="round"/></svg>
|
||||
<span class="w">broke</span></div>
|
||||
|
||||
<div class="t light"><span class="n">B4</span>
|
||||
<svg viewBox="0 0 100 80"><path d="M30,26 L64,15 L68,26Z" fill="#7fbf8f"/><rect x="18" y="26" width="64" height="42" rx="9" fill="#3d8a55"/>
|
||||
<path d="M82,38 H66 a8,8 0 0 0 0,16 H82Z" fill="#2c6a40"/><circle cx="67" cy="46" r="2.5" fill="#fff"/></svg>
|
||||
<span class="w">broke</span></div>
|
||||
|
||||
<div class="t light"><span class="n">B5</span>
|
||||
<svg viewBox="0 0 100 80"><g transform="rotate(-12 50 46)"><use href="#wallet"/></g>
|
||||
<circle cx="80" cy="72" r="5" fill="none" stroke="#3d8a55" stroke-width="3.5"/></svg>
|
||||
<span class="w">broke</span></div>
|
||||
|
||||
<div class="t green"><span class="n">B6</span>
|
||||
<svg viewBox="0 0 100 80" style="color:#fff"><use href="#wallet"/></svg><span class="w">broke</span></div>
|
||||
</div>
|
||||
|
||||
<h2>C · mixes</h2>
|
||||
<div class="row">
|
||||
<div class="t cream"><span class="n">C1</span>
|
||||
<svg viewBox="0 0 100 80"><clipPath id="cl"><path d="M0,0 H48 L44,28 L52,44 L46,80 H0Z"/></clipPath><clipPath id="cr"><path d="M48,0 H100 V80 H46 L52,44 L44,28Z"/></clipPath>
|
||||
<g clip-path="url(#cl)" transform="translate(-3 1) rotate(-6 30 46)"><use href="#wallet"/></g>
|
||||
<g clip-path="url(#cr)" transform="translate(3 -1) rotate(6 70 46)"><use href="#wallet"/></g></svg>
|
||||
<span class="w">broke</span></div>
|
||||
|
||||
<div class="t dark"><span class="n">C2</span>
|
||||
<svg viewBox="0 0 100 80" style="color:#8b98ff"><use href="#wallet"/></svg><span class="w">broke</span></div>
|
||||
|
||||
<div class="t light"><span class="n">C3</span>
|
||||
<svg viewBox="0 0 100 80"><g transform="translate(-4 2) rotate(-9 30 42)"><use href="#sL" fill="#3d8a55"/><rect x="21" y="30" width="9" height="7" rx="1.5" fill="#f5c451"/></g>
|
||||
<g transform="translate(4 -2) rotate(8 70 42)"><use href="#sR" fill="#7fbf8f"/><rect x="60" y="51" width="18" height="3" rx="1.5" fill="#fff"/></g></svg>
|
||||
<span class="w">broke</span></div>
|
||||
|
||||
<div class="t dark"><span class="n">C4</span>
|
||||
<svg viewBox="0 0 100 80"><clipPath id="cl2"><path d="M0,0 H48 L44,28 L52,44 L46,80 H0Z"/></clipPath><clipPath id="cr2"><path d="M48,0 H100 V80 H46 L52,44 L44,28Z"/></clipPath>
|
||||
<g clip-path="url(#cl2)" transform="translate(-3 1) rotate(-6 30 46)" style="color:#5b6cf0"><use href="#wallet"/></g>
|
||||
<g clip-path="url(#cr2)" transform="translate(3 -1) rotate(6 70 46)" style="color:#8b98ff"><use href="#wallet"/></g></svg>
|
||||
<span class="w">broke</span></div>
|
||||
</div>
|
||||
</body></html>
|
||||
|
After Width: | Height: | Size: 80 KiB |
@@ -0,0 +1,91 @@
|
||||
<!doctype html>
|
||||
<html><head><meta charset="utf-8"><title>broke logo v3</title>
|
||||
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@800&family=JetBrains+Mono&display=swap" rel="stylesheet">
|
||||
<style>
|
||||
body{margin:0;background:#efeeea;font-family:Inter,system-ui,sans-serif;padding:32px}
|
||||
h2{font:600 13px 'JetBrains Mono',monospace;color:#777;margin:28px 0 12px;text-transform:uppercase;letter-spacing:.06em}
|
||||
.row{display:flex;flex-wrap:wrap;gap:16px}
|
||||
.t{width:220px;height:220px;border-radius:22px;position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px}
|
||||
.t .n{position:absolute;top:14px;left:16px;font:11px 'JetBrains Mono',monospace;opacity:.55}
|
||||
.t .w{font-weight:800;font-size:34px;letter-spacing:-.03em;line-height:1;display:flex;align-items:center}
|
||||
.t svg{width:120px;height:96px}
|
||||
.t .w svg{width:30px;height:30px;margin:0 1px}
|
||||
.dark{background:#141414;color:#fff}.light{background:#fff;color:#3d8a55}
|
||||
.blue{background:#5b6cf0;color:#fff}.lightb{background:#fff;color:#1a1a1a}
|
||||
.s{fill:none;stroke:currentColor;stroke-width:5;stroke-linejoin:round;stroke-linecap:round}
|
||||
</style></head><body>
|
||||
|
||||
<h2>D · other things that say broke</h2>
|
||||
<div class="row">
|
||||
<div class="t light"><span class="n">D1 pocket</span>
|
||||
<svg viewBox="0 0 100 80"><path d="M38,30 V58 Q38,74 50,74 Q62,74 62,58 V30Z" fill="#bfe0c8"/>
|
||||
<path class="s" d="M16,8 H84 V30 Q50,44 16,30Z"/><path class="s" d="M38,34 V58 Q38,74 50,74 Q62,74 62,58 V34"/></svg>
|
||||
<span class="w">broke</span></div>
|
||||
|
||||
<div class="t dark"><span class="n">D2 piggy</span>
|
||||
<svg viewBox="0 0 100 80"><ellipse cx="48" cy="42" rx="30" ry="22" fill="#5b6cf0"/>
|
||||
<path d="M30,24 L28,10 L42,20Z" fill="#5b6cf0"/><rect x="74" y="34" width="12" height="14" rx="5" fill="#8b98ff"/>
|
||||
<rect x="28" y="58" width="8" height="12" rx="3" fill="#5b6cf0"/><rect x="58" y="58" width="8" height="12" rx="3" fill="#5b6cf0"/>
|
||||
<rect x="40" y="24" width="16" height="4" rx="2" fill="#141414"/>
|
||||
<path d="M50,30 L44,40 L52,46 L46,58" fill="none" stroke="#141414" stroke-width="3.5" stroke-linejoin="round" stroke-linecap="round"/></svg>
|
||||
<span class="w">broke</span></div>
|
||||
|
||||
<div class="t lightb"><span class="n">D3 receipt</span>
|
||||
<svg viewBox="0 0 100 80"><path d="M30,4 H70 V70 L65,65 L60,70 L55,65 L50,70 L45,65 L40,70 L35,65 L30,70Z" fill="#5b6cf0"/>
|
||||
<g stroke="#fff" stroke-width="3" stroke-linecap="round"><path d="M38,16 H62"/><path d="M38,26 H56"/><path d="M38,36 H60"/></g>
|
||||
<text x="50" y="57" text-anchor="middle" font-family="Inter" font-weight="800" font-size="14" fill="#fff">$0</text></svg>
|
||||
<span class="w">broke</span></div>
|
||||
|
||||
<div class="t light"><span class="n">D4 torn bill</span>
|
||||
<svg viewBox="0 0 100 80"><clipPath id="tl"><path d="M0,0 H50 L46,14 L53,26 L45,40 L52,54 L47,80 H0Z"/></clipPath><clipPath id="tr"><path d="M50,0 H100 V80 H47 L52,54 L45,40 L53,26 L46,14Z"/></clipPath>
|
||||
<g id="bill"><rect x="12" y="20" width="76" height="42" rx="6" fill="#3d8a55"/><circle cx="50" cy="41" r="10" fill="none" stroke="#bfe0c8" stroke-width="3.5"/>
|
||||
<circle cx="22" cy="30" r="2.5" fill="#bfe0c8"/><circle cx="78" cy="52" r="2.5" fill="#bfe0c8"/></g>
|
||||
<use href="#bill" clip-path="url(#tl)" transform="translate(-7 3) rotate(-9 30 41)"/>
|
||||
<use href="#bill" clip-path="url(#tr)" transform="translate(7 -3) rotate(9 70 41)"/>
|
||||
<path d="M50,10 L46,24 L53,34 L45,46 L52,58 L47,72" fill="none" stroke="#fff" stroke-width="5" stroke-linejoin="round"/></svg>
|
||||
<span class="w">broke</span></div>
|
||||
|
||||
<div class="t blue"><span class="n">D5 money flying</span>
|
||||
<svg viewBox="0 0 100 80"><path d="M34,38 Q14,30 8,14 Q22,22 34,24 Q20,18 18,8 Q30,16 38,28Z" fill="#fff" opacity=".75"/>
|
||||
<path d="M66,38 Q86,30 92,14 Q78,22 66,24 Q80,18 82,8 Q70,16 62,28Z" fill="#fff" opacity=".75"/>
|
||||
<circle cx="50" cy="42" r="20" fill="#f5c451"/><text x="50" y="51" text-anchor="middle" font-family="Inter" font-weight="800" font-size="24" fill="#5b6cf0">$</text></svg>
|
||||
<span class="w">broke</span></div>
|
||||
|
||||
<div class="t dark"><span class="n">D6 band-aid</span>
|
||||
<svg viewBox="0 0 100 80"><rect x="15" y="20" width="70" height="44" rx="6" fill="#5b6cf0"/><rect x="22" y="29" width="10" height="8" rx="1.5" fill="#f5c451"/>
|
||||
<g transform="rotate(-30 50 42)"><rect x="22" y="33" width="56" height="18" rx="9" fill="#f2d4b8"/><rect x="40" y="33" width="20" height="18" fill="#e6bf9c"/>
|
||||
<g fill="#c99b74"><circle cx="45" cy="38" r="1.3"/><circle cx="50" cy="38" r="1.3"/><circle cx="55" cy="38" r="1.3"/><circle cx="45" cy="46" r="1.3"/><circle cx="50" cy="46" r="1.3"/><circle cx="55" cy="46" r="1.3"/></g></g></svg>
|
||||
<span class="w">broke</span></div>
|
||||
</div>
|
||||
|
||||
<h2>E · more</h2>
|
||||
<div class="row">
|
||||
<div class="t light"><span class="n">E1 empty bar</span>
|
||||
<svg viewBox="0 0 100 80"><rect class="s" x="14" y="26" width="64" height="30" rx="8"/><rect x="82" y="35" width="6" height="12" rx="2" fill="currentColor"/>
|
||||
<rect x="21" y="33" width="8" height="16" rx="3" fill="#e0533d"/></svg>
|
||||
<span class="w">broke</span></div>
|
||||
|
||||
<div class="t dark"><span class="n">E2 crash</span>
|
||||
<svg viewBox="0 0 100 80"><path d="M10,16 L30,28 L42,22 L60,52 L72,46 L90,68" fill="none" stroke="#8b98ff" stroke-width="6" stroke-linejoin="round" stroke-linecap="round"/>
|
||||
<circle cx="90" cy="68" r="6" fill="#f5c451"/></svg>
|
||||
<span class="w">broke</span></div>
|
||||
|
||||
<div class="t lightb"><span class="n">E3 $0</span>
|
||||
<svg viewBox="0 0 100 80"><rect x="14" y="14" width="72" height="52" rx="26" fill="#5b6cf0"/>
|
||||
<text x="50" y="52" text-anchor="middle" font-family="Inter" font-weight="800" font-size="34" fill="#fff" letter-spacing="-1">$0</text></svg>
|
||||
<span class="w">broke</span></div>
|
||||
|
||||
<div class="t blue"><span class="n">E4 cracked coin</span>
|
||||
<svg viewBox="0 0 100 80"><circle cx="50" cy="40" r="30" fill="#f5c451"/><circle cx="50" cy="40" r="22" fill="none" stroke="#e0a92e" stroke-width="3"/>
|
||||
<path d="M53,10 L44,32 L58,42 L48,70" fill="none" stroke="#5b6cf0" stroke-width="6" stroke-linejoin="round" stroke-linecap="round"/></svg>
|
||||
<span class="w">broke</span></div>
|
||||
|
||||
<div class="t dark"><span class="n">E5 wordmark coin</span>
|
||||
<span class="w" style="font-size:44px">br<svg viewBox="0 0 30 30" style="width:38px;height:38px"><circle cx="15" cy="16" r="12" fill="#f5c451"/>
|
||||
<path d="M16,4 L12,13 L18,17 L14,28" fill="none" stroke="#141414" stroke-width="2.6" stroke-linejoin="round" stroke-linecap="round"/></svg>ke</span></div>
|
||||
|
||||
<div class="t light"><span class="n">E6 wordmark wallet</span>
|
||||
<span class="w" style="font-size:44px">br<svg viewBox="0 0 30 30" style="width:40px;height:40px"><g fill="none" stroke="currentColor" stroke-width="3.4" stroke-linejoin="round" stroke-linecap="round">
|
||||
<rect x="3" y="9" width="24" height="17" rx="4"/><path d="M27,14 H21 a3,3 0 0 0 0,6 H27"/></g></svg>ke</span></div>
|
||||
</div>
|
||||
</body></html>
|
||||
|
After Width: | Height: | Size: 73 KiB |
@@ -0,0 +1,35 @@
|
||||
# Paper brief: broke retro styles
|
||||
|
||||
Paper file "broke logos", fileId `01M5FXP9XFNDEPD1J1JTXWY8N0`.
|
||||
- Page **Retro icon styles** pageId `p-2-0`: one artboard per icon style.
|
||||
- Page **Retro UI** pageId `p-3-0`: one full dashboard per UI direction.
|
||||
Pass fileId and pageId on every call. Other agents are writing artboards on the same pages at the same time:
|
||||
only touch artboards you created. Call `get_guide({topic:"paper-mcp-instructions"})` once first, and
|
||||
`finish_working_on_nodes` with your artboard ids when done.
|
||||
|
||||
The app: broke, a money app. Its logo is a 2006 brick phone with a green LCD
|
||||
(`src/components/Logo.tsx`). Real screens to base everything on (Read them):
|
||||
- `design/retro-icons/sidebar-live.png`: the real sidebar with the current Aqua retro icons
|
||||
- `design/retro-icons/all.png`: those icons large
|
||||
- the current Aqua icon SVG code: `src/components/retro/GroupA.tsx`, `GroupB.tsx`, `GroupC.tsx`
|
||||
(all paths under ~/Documents/broke)
|
||||
|
||||
## The 13 icons (every icon style must draw all of them)
|
||||
Dashboard, Transactions, Spending, Budgets, Recurring, then the "Grow" group: Accounts, For you,
|
||||
Money plan, Optimize, Cards, then Ask broke ai (robot), Settings (gear), More (three dots).
|
||||
Plus that style's version of the brick-phone logo next to the word "broke".
|
||||
|
||||
## Icon-style artboard shape (page p-2-0)
|
||||
Artboard 440px wide, height fit-content, named "<Style name> icons".
|
||||
1. Header: style name big, era + one line on the look, small.
|
||||
2. A sidebar mock in that style: logo row, the 10 nav rows (Dashboard active), "Grow" label, "Ask broke ai"
|
||||
button, rows exactly like sidebar-live.png. Icons at the real size (18-20px) here.
|
||||
3. Below: all 13 icons at 48px in a wrapping row, each with its name under it.
|
||||
Draw icons as inline SVG. They must still say what the page is at 18px.
|
||||
|
||||
## UI artboard shape (page p-3-0)
|
||||
Artboard 1440 x 900 (fit-content if it runs over), named "Retro UI · <direction>".
|
||||
The dashboard, with made-up numbers.
|
||||
|
||||
## Writing rules for any copy you add
|
||||
No em dashes. Plain short words. Labels lowercase or sentence case like the app.
|
||||
@@ -0,0 +1,48 @@
|
||||
# broke retro nav icons: shared spec
|
||||
|
||||
The app logo is a 2006 brick phone (`src/components/Logo.tsx`, `PhoneMark`). Every nav icon becomes a
|
||||
small 2006-era glossy object in the same family: think Windows XP / Mac OS X Aqua icons, chunky and
|
||||
shiny, not line icons. Each icon must still say what the page is at 18px.
|
||||
|
||||
## Palette (use only these)
|
||||
- Gunmetal body gradient, left to right: `#3b4048` -> `#7a828e` -> `#3b4048`
|
||||
- Outline: `#20242a`, stroke-width 1 (in a 24 viewBox)
|
||||
- LCD screen gradient, top to bottom: `#c8d89a` -> `#9fb46a`; ink on LCD `#2b3315`
|
||||
- Gold gradient, top to bottom: `#ffe680` -> `#e09a12`, its outline `#b07208`
|
||||
- Gloss highlight: white, opacity .85 at top -> .05 at bottom, on the top ~40% of the main shape
|
||||
- Accents: blue `#5b6cf0` / light blue `#8b98ff`, green `#3d8a55` / light green `#7fbf8f`, red `#e2492f`, white
|
||||
|
||||
## Rules
|
||||
- `viewBox="0 0 24 24"`, fill the box (about 2px margin). Max 4 or 5 shapes per icon. Chunky, no thin detail under 1.5px.
|
||||
- One gloss highlight per icon. One dark outline on the main shape.
|
||||
- Must read on white (#ffffff) AND on near-black (#1d1d21). The gunmetal/outline keeps it visible on dark.
|
||||
- Gradient ids must be unique per instance: use React `useId()` like `PhoneMark` does (strip nothing, just prefix).
|
||||
|
||||
## Code shape (match this exactly)
|
||||
File: `src/components/retro/<YourFile>.tsx`. No `"use client"` needed unless you use hooks; `useId` works in server and client components, so leave it off.
|
||||
|
||||
```tsx
|
||||
import { useId } from "react";
|
||||
|
||||
type P = { size?: number; strokeWidth?: number };
|
||||
|
||||
// Dashboard: a CRT monitor with green bars on its screen.
|
||||
export function RetroDashboard({ size = 18 }: P) {
|
||||
const id = useId();
|
||||
return (
|
||||
<svg width={size} height={size} viewBox="0 0 24 24" aria-hidden className="shrink-0">
|
||||
...
|
||||
</svg>
|
||||
);
|
||||
}
|
||||
```
|
||||
`strokeWidth` is accepted and ignored (Nav passes it). One short comment per icon saying what object it is.
|
||||
|
||||
## Check your work
|
||||
1. Also write `design/retro-icons/<your-file>.html`: the same SVGs pasted as plain SVG markup, each shown at 18px, 36px and 96px, once on a white row and once on a `#1d1d21` row, with the label next to it.
|
||||
2. Screenshot it: `"/Applications/Google Chrome.app/Contents/MacOS/Google Chrome" --headless=new --disable-gpu --hide-scrollbars --window-size=900,700 --force-device-scale-factor=2 --screenshot=<abs path>.png "file://<abs path>.html"`
|
||||
3. Look at the PNG with Read. At 18px, can you tell what each one is? Fix and re-render until yes. Max 3 rounds.
|
||||
4. `cd ~/Documents/broke && npx tsc --noEmit -p . 2>&1 | grep retro` must print nothing.
|
||||
|
||||
Do NOT edit any other file (Nav.tsx, Logo.tsx, other agents' files). Do not start the dev server.
|
||||
Report back: file paths, the export names, one line per icon on what it is, and anything that still reads poorly at 18px.
|
||||
|
After Width: | Height: | Size: 219 KiB |
@@ -0,0 +1,247 @@
|
||||
<!doctype html><meta charset=utf-8><style>body{margin:0;font:14px Helvetica}.r{display:flex;align-items:center;gap:24px;padding:6px 20px}</style><div class="r" style="background:#ffffff;color:#222"><svg width=18 height=18 viewBox="0 0 24 24" class="shrink-0">
|
||||
<defs>
|
||||
<linearGradient id="i1body" x1="0" y1="0" x2="1" y2="0"><stop offset="0" stop-color="#3b4048" /><stop offset=".5" stop-color="#7a828e" /><stop offset="1" stop-color="#3b4048" /></linearGradient>
|
||||
<linearGradient id="i1lcd" x1="0" y1="0" x2="0" y2="1"><stop offset="0" stop-color="#c8d89a" /><stop offset="1" stop-color="#9fb46a" /></linearGradient>
|
||||
<linearGradient id="i1gloss" x1="0" y1="0" x2="0" y2="1"><stop offset="0" stop-color="#fff" stop-opacity=".85" /><stop offset="1" stop-color="#fff" stop-opacity=".05" /></linearGradient>
|
||||
</defs>
|
||||
<path d="M8 18h8l1.5 4h-11z" fill="url(#i1body)" stroke="#20242a" stroke-width="1" stroke-linejoin="round" />
|
||||
<rect x="1.5" y="2.5" width="21" height="16" rx="3.5" fill="url(#i1body)" stroke="#20242a" stroke-width="1" />
|
||||
<rect x="4.5" y="5.5" width="15" height="10" rx="1.5" fill="url(#i1lcd)" stroke="#20242a" stroke-width="1" />
|
||||
<path d="M6.5 10.5h2.5v3.5h-2.5zM10.75 8.5h2.5v5.5h-2.5zM15 7h2.5v7h-2.5z" fill="#2b3315" />
|
||||
<rect x="3" y="3.2" width="18" height="5.6" rx="2.6" fill="url(#i1gloss)" />
|
||||
</svg><svg width=36 height=36 viewBox="0 0 24 24" class="shrink-0">
|
||||
<defs>
|
||||
<linearGradient id="i2body" x1="0" y1="0" x2="1" y2="0"><stop offset="0" stop-color="#3b4048" /><stop offset=".5" stop-color="#7a828e" /><stop offset="1" stop-color="#3b4048" /></linearGradient>
|
||||
<linearGradient id="i2lcd" x1="0" y1="0" x2="0" y2="1"><stop offset="0" stop-color="#c8d89a" /><stop offset="1" stop-color="#9fb46a" /></linearGradient>
|
||||
<linearGradient id="i2gloss" x1="0" y1="0" x2="0" y2="1"><stop offset="0" stop-color="#fff" stop-opacity=".85" /><stop offset="1" stop-color="#fff" stop-opacity=".05" /></linearGradient>
|
||||
</defs>
|
||||
<path d="M8 18h8l1.5 4h-11z" fill="url(#i2body)" stroke="#20242a" stroke-width="1" stroke-linejoin="round" />
|
||||
<rect x="1.5" y="2.5" width="21" height="16" rx="3.5" fill="url(#i2body)" stroke="#20242a" stroke-width="1" />
|
||||
<rect x="4.5" y="5.5" width="15" height="10" rx="1.5" fill="url(#i2lcd)" stroke="#20242a" stroke-width="1" />
|
||||
<path d="M6.5 10.5h2.5v3.5h-2.5zM10.75 8.5h2.5v5.5h-2.5zM15 7h2.5v7h-2.5z" fill="#2b3315" />
|
||||
<rect x="3" y="3.2" width="18" height="5.6" rx="2.6" fill="url(#i2gloss)" />
|
||||
</svg><svg width=96 height=96 viewBox="0 0 24 24" class="shrink-0">
|
||||
<defs>
|
||||
<linearGradient id="i3body" x1="0" y1="0" x2="1" y2="0"><stop offset="0" stop-color="#3b4048" /><stop offset=".5" stop-color="#7a828e" /><stop offset="1" stop-color="#3b4048" /></linearGradient>
|
||||
<linearGradient id="i3lcd" x1="0" y1="0" x2="0" y2="1"><stop offset="0" stop-color="#c8d89a" /><stop offset="1" stop-color="#9fb46a" /></linearGradient>
|
||||
<linearGradient id="i3gloss" x1="0" y1="0" x2="0" y2="1"><stop offset="0" stop-color="#fff" stop-opacity=".85" /><stop offset="1" stop-color="#fff" stop-opacity=".05" /></linearGradient>
|
||||
</defs>
|
||||
<path d="M8 18h8l1.5 4h-11z" fill="url(#i3body)" stroke="#20242a" stroke-width="1" stroke-linejoin="round" />
|
||||
<rect x="1.5" y="2.5" width="21" height="16" rx="3.5" fill="url(#i3body)" stroke="#20242a" stroke-width="1" />
|
||||
<rect x="4.5" y="5.5" width="15" height="10" rx="1.5" fill="url(#i3lcd)" stroke="#20242a" stroke-width="1" />
|
||||
<path d="M6.5 10.5h2.5v3.5h-2.5zM10.75 8.5h2.5v5.5h-2.5zM15 7h2.5v7h-2.5z" fill="#2b3315" />
|
||||
<rect x="3" y="3.2" width="18" height="5.6" rx="2.6" fill="url(#i3gloss)" />
|
||||
</svg><span>RetroDashboard</span></div><div class="r" style="background:#ffffff;color:#222"><svg width=18 height=18 viewBox="0 0 24 24" class="shrink-0">
|
||||
<defs>
|
||||
<linearGradient id="i4in" x1="0" y1="0" x2="0" y2="1"><stop offset="0" stop-color="#7fbf8f" /><stop offset="1" stop-color="#3d8a55" /></linearGradient>
|
||||
<linearGradient id="i4gloss" x1="0" y1="0" x2="0" y2="1"><stop offset="0" stop-color="#fff" stop-opacity=".85" /><stop offset="1" stop-color="#fff" stop-opacity=".05" /></linearGradient>
|
||||
</defs>
|
||||
<path d="M1.5 4.8h11.5V1.5l9.5 5.3-9.5 5.3V8.8H1.5z" fill="url(#i4in)" stroke="#20242a" stroke-width="1" stroke-linejoin="round" />
|
||||
<path d="M22.5 15.2H11v-3.3l-9.5 5.3 9.5 5.3v-3.3h11.5z" fill="#e2492f" stroke="#20242a" stroke-width="1" stroke-linejoin="round" />
|
||||
<path d="M2.3 5.5h11.4V3l6.5 3.6H2.3zM21.7 15.9H10.3v-2.5l-6.5 3.6h17.9z" fill="url(#i4gloss)" />
|
||||
</svg><svg width=36 height=36 viewBox="0 0 24 24" class="shrink-0">
|
||||
<defs>
|
||||
<linearGradient id="i5in" x1="0" y1="0" x2="0" y2="1"><stop offset="0" stop-color="#7fbf8f" /><stop offset="1" stop-color="#3d8a55" /></linearGradient>
|
||||
<linearGradient id="i5gloss" x1="0" y1="0" x2="0" y2="1"><stop offset="0" stop-color="#fff" stop-opacity=".85" /><stop offset="1" stop-color="#fff" stop-opacity=".05" /></linearGradient>
|
||||
</defs>
|
||||
<path d="M1.5 4.8h11.5V1.5l9.5 5.3-9.5 5.3V8.8H1.5z" fill="url(#i5in)" stroke="#20242a" stroke-width="1" stroke-linejoin="round" />
|
||||
<path d="M22.5 15.2H11v-3.3l-9.5 5.3 9.5 5.3v-3.3h11.5z" fill="#e2492f" stroke="#20242a" stroke-width="1" stroke-linejoin="round" />
|
||||
<path d="M2.3 5.5h11.4V3l6.5 3.6H2.3zM21.7 15.9H10.3v-2.5l-6.5 3.6h17.9z" fill="url(#i5gloss)" />
|
||||
</svg><svg width=96 height=96 viewBox="0 0 24 24" class="shrink-0">
|
||||
<defs>
|
||||
<linearGradient id="i6in" x1="0" y1="0" x2="0" y2="1"><stop offset="0" stop-color="#7fbf8f" /><stop offset="1" stop-color="#3d8a55" /></linearGradient>
|
||||
<linearGradient id="i6gloss" x1="0" y1="0" x2="0" y2="1"><stop offset="0" stop-color="#fff" stop-opacity=".85" /><stop offset="1" stop-color="#fff" stop-opacity=".05" /></linearGradient>
|
||||
</defs>
|
||||
<path d="M1.5 4.8h11.5V1.5l9.5 5.3-9.5 5.3V8.8H1.5z" fill="url(#i6in)" stroke="#20242a" stroke-width="1" stroke-linejoin="round" />
|
||||
<path d="M22.5 15.2H11v-3.3l-9.5 5.3 9.5 5.3v-3.3h11.5z" fill="#e2492f" stroke="#20242a" stroke-width="1" stroke-linejoin="round" />
|
||||
<path d="M2.3 5.5h11.4V3l6.5 3.6H2.3zM21.7 15.9H10.3v-2.5l-6.5 3.6h17.9z" fill="url(#i6gloss)" />
|
||||
</svg><span>RetroTransactions</span></div><div class="r" style="background:#ffffff;color:#222"><svg width=18 height=18 viewBox="0 0 24 24" class="shrink-0">
|
||||
<defs>
|
||||
<linearGradient id="i7blue" x1="0" y1="0" x2="0" y2="1"><stop offset="0" stop-color="#8b98ff" /><stop offset="1" stop-color="#5b6cf0" /></linearGradient>
|
||||
<linearGradient id="i7gold" x1="0" y1="0" x2="0" y2="1"><stop offset="0" stop-color="#ffe680" /><stop offset="1" stop-color="#e09a12" /></linearGradient>
|
||||
<linearGradient id="i7gloss" x1="0" y1="0" x2="0" y2="1"><stop offset="0" stop-color="#fff" stop-opacity=".85" /><stop offset="1" stop-color="#fff" stop-opacity=".05" /></linearGradient>
|
||||
</defs>
|
||||
<path d="M10.5 13.5L19.5 13.5A9 9 0 0 1 2.7 18Z" fill="#5b6cf0" stroke="#20242a" stroke-width="1" stroke-linejoin="round" />
|
||||
<path d="M10.5 13.5L2.7 18A9 9 0 0 1 10.5 4.5Z" fill="#8b98ff" stroke="#20242a" stroke-width="1" stroke-linejoin="round" />
|
||||
<path d="M12.5 11.5V2.5A9 9 0 0 1 21.5 11.5Z" fill="url(#i7gold)" stroke="#b07208" stroke-width="1" stroke-linejoin="round" />
|
||||
<ellipse cx="10" cy="8.6" rx="6" ry="3.4" fill="url(#i7gloss)" />
|
||||
</svg><svg width=36 height=36 viewBox="0 0 24 24" class="shrink-0">
|
||||
<defs>
|
||||
<linearGradient id="i8blue" x1="0" y1="0" x2="0" y2="1"><stop offset="0" stop-color="#8b98ff" /><stop offset="1" stop-color="#5b6cf0" /></linearGradient>
|
||||
<linearGradient id="i8gold" x1="0" y1="0" x2="0" y2="1"><stop offset="0" stop-color="#ffe680" /><stop offset="1" stop-color="#e09a12" /></linearGradient>
|
||||
<linearGradient id="i8gloss" x1="0" y1="0" x2="0" y2="1"><stop offset="0" stop-color="#fff" stop-opacity=".85" /><stop offset="1" stop-color="#fff" stop-opacity=".05" /></linearGradient>
|
||||
</defs>
|
||||
<path d="M10.5 13.5L19.5 13.5A9 9 0 0 1 2.7 18Z" fill="#5b6cf0" stroke="#20242a" stroke-width="1" stroke-linejoin="round" />
|
||||
<path d="M10.5 13.5L2.7 18A9 9 0 0 1 10.5 4.5Z" fill="#8b98ff" stroke="#20242a" stroke-width="1" stroke-linejoin="round" />
|
||||
<path d="M12.5 11.5V2.5A9 9 0 0 1 21.5 11.5Z" fill="url(#i8gold)" stroke="#b07208" stroke-width="1" stroke-linejoin="round" />
|
||||
<ellipse cx="10" cy="8.6" rx="6" ry="3.4" fill="url(#i8gloss)" />
|
||||
</svg><svg width=96 height=96 viewBox="0 0 24 24" class="shrink-0">
|
||||
<defs>
|
||||
<linearGradient id="i9blue" x1="0" y1="0" x2="0" y2="1"><stop offset="0" stop-color="#8b98ff" /><stop offset="1" stop-color="#5b6cf0" /></linearGradient>
|
||||
<linearGradient id="i9gold" x1="0" y1="0" x2="0" y2="1"><stop offset="0" stop-color="#ffe680" /><stop offset="1" stop-color="#e09a12" /></linearGradient>
|
||||
<linearGradient id="i9gloss" x1="0" y1="0" x2="0" y2="1"><stop offset="0" stop-color="#fff" stop-opacity=".85" /><stop offset="1" stop-color="#fff" stop-opacity=".05" /></linearGradient>
|
||||
</defs>
|
||||
<path d="M10.5 13.5L19.5 13.5A9 9 0 0 1 2.7 18Z" fill="#5b6cf0" stroke="#20242a" stroke-width="1" stroke-linejoin="round" />
|
||||
<path d="M10.5 13.5L2.7 18A9 9 0 0 1 10.5 4.5Z" fill="#8b98ff" stroke="#20242a" stroke-width="1" stroke-linejoin="round" />
|
||||
<path d="M12.5 11.5V2.5A9 9 0 0 1 21.5 11.5Z" fill="url(#i9gold)" stroke="#b07208" stroke-width="1" stroke-linejoin="round" />
|
||||
<ellipse cx="10" cy="8.6" rx="6" ry="3.4" fill="url(#i9gloss)" />
|
||||
</svg><span>RetroSpending</span></div><div class="r" style="background:#ffffff;color:#222"><svg width=18 height=18 viewBox="0 0 24 24" class="shrink-0">
|
||||
<defs>
|
||||
<linearGradient id="i10blue" x1="0" y1="0" x2="0" y2="1"><stop offset="0" stop-color="#8b98ff" /><stop offset="1" stop-color="#5b6cf0" /></linearGradient>
|
||||
<linearGradient id="i10lcd" x1="0" y1="0" x2="0" y2="1"><stop offset="0" stop-color="#c8d89a" /><stop offset="1" stop-color="#9fb46a" /></linearGradient>
|
||||
<linearGradient id="i10gold" x1="0" y1="0" x2="0" y2="1"><stop offset="0" stop-color="#ffe680" /><stop offset="1" stop-color="#e09a12" /></linearGradient>
|
||||
<linearGradient id="i10gloss" x1="0" y1="0" x2="0" y2="1"><stop offset="0" stop-color="#fff" stop-opacity=".85" /><stop offset="1" stop-color="#fff" stop-opacity=".05" /></linearGradient>
|
||||
</defs>
|
||||
<rect x="4.5" y="2.5" width="12" height="7" rx="1" fill="url(#i10lcd)" stroke="#20242a" stroke-width="1" />
|
||||
<rect x="1.5" y="6" width="19" height="15.5" rx="3.5" fill="url(#i10blue)" stroke="#20242a" stroke-width="1" />
|
||||
<rect x="13.5" y="10.5" width="9" height="7" rx="2.5" fill="#5b6cf0" stroke="#20242a" stroke-width="1" />
|
||||
<circle cx="17.2" cy="14" r="2" fill="url(#i10gold)" stroke="#b07208" stroke-width="1" />
|
||||
<rect x="3" y="7" width="16" height="5.5" rx="2.5" fill="url(#i10gloss)" />
|
||||
</svg><svg width=36 height=36 viewBox="0 0 24 24" class="shrink-0">
|
||||
<defs>
|
||||
<linearGradient id="i11blue" x1="0" y1="0" x2="0" y2="1"><stop offset="0" stop-color="#8b98ff" /><stop offset="1" stop-color="#5b6cf0" /></linearGradient>
|
||||
<linearGradient id="i11lcd" x1="0" y1="0" x2="0" y2="1"><stop offset="0" stop-color="#c8d89a" /><stop offset="1" stop-color="#9fb46a" /></linearGradient>
|
||||
<linearGradient id="i11gold" x1="0" y1="0" x2="0" y2="1"><stop offset="0" stop-color="#ffe680" /><stop offset="1" stop-color="#e09a12" /></linearGradient>
|
||||
<linearGradient id="i11gloss" x1="0" y1="0" x2="0" y2="1"><stop offset="0" stop-color="#fff" stop-opacity=".85" /><stop offset="1" stop-color="#fff" stop-opacity=".05" /></linearGradient>
|
||||
</defs>
|
||||
<rect x="4.5" y="2.5" width="12" height="7" rx="1" fill="url(#i11lcd)" stroke="#20242a" stroke-width="1" />
|
||||
<rect x="1.5" y="6" width="19" height="15.5" rx="3.5" fill="url(#i11blue)" stroke="#20242a" stroke-width="1" />
|
||||
<rect x="13.5" y="10.5" width="9" height="7" rx="2.5" fill="#5b6cf0" stroke="#20242a" stroke-width="1" />
|
||||
<circle cx="17.2" cy="14" r="2" fill="url(#i11gold)" stroke="#b07208" stroke-width="1" />
|
||||
<rect x="3" y="7" width="16" height="5.5" rx="2.5" fill="url(#i11gloss)" />
|
||||
</svg><svg width=96 height=96 viewBox="0 0 24 24" class="shrink-0">
|
||||
<defs>
|
||||
<linearGradient id="i12blue" x1="0" y1="0" x2="0" y2="1"><stop offset="0" stop-color="#8b98ff" /><stop offset="1" stop-color="#5b6cf0" /></linearGradient>
|
||||
<linearGradient id="i12lcd" x1="0" y1="0" x2="0" y2="1"><stop offset="0" stop-color="#c8d89a" /><stop offset="1" stop-color="#9fb46a" /></linearGradient>
|
||||
<linearGradient id="i12gold" x1="0" y1="0" x2="0" y2="1"><stop offset="0" stop-color="#ffe680" /><stop offset="1" stop-color="#e09a12" /></linearGradient>
|
||||
<linearGradient id="i12gloss" x1="0" y1="0" x2="0" y2="1"><stop offset="0" stop-color="#fff" stop-opacity=".85" /><stop offset="1" stop-color="#fff" stop-opacity=".05" /></linearGradient>
|
||||
</defs>
|
||||
<rect x="4.5" y="2.5" width="12" height="7" rx="1" fill="url(#i12lcd)" stroke="#20242a" stroke-width="1" />
|
||||
<rect x="1.5" y="6" width="19" height="15.5" rx="3.5" fill="url(#i12blue)" stroke="#20242a" stroke-width="1" />
|
||||
<rect x="13.5" y="10.5" width="9" height="7" rx="2.5" fill="#5b6cf0" stroke="#20242a" stroke-width="1" />
|
||||
<circle cx="17.2" cy="14" r="2" fill="url(#i12gold)" stroke="#b07208" stroke-width="1" />
|
||||
<rect x="3" y="7" width="16" height="5.5" rx="2.5" fill="url(#i12gloss)" />
|
||||
</svg><span>RetroBudgets</span></div><div class="r" style="background:#1d1d21;color:#eee"><svg width=18 height=18 viewBox="0 0 24 24" class="shrink-0">
|
||||
<defs>
|
||||
<linearGradient id="i13body" x1="0" y1="0" x2="1" y2="0"><stop offset="0" stop-color="#3b4048" /><stop offset=".5" stop-color="#7a828e" /><stop offset="1" stop-color="#3b4048" /></linearGradient>
|
||||
<linearGradient id="i13lcd" x1="0" y1="0" x2="0" y2="1"><stop offset="0" stop-color="#c8d89a" /><stop offset="1" stop-color="#9fb46a" /></linearGradient>
|
||||
<linearGradient id="i13gloss" x1="0" y1="0" x2="0" y2="1"><stop offset="0" stop-color="#fff" stop-opacity=".85" /><stop offset="1" stop-color="#fff" stop-opacity=".05" /></linearGradient>
|
||||
</defs>
|
||||
<path d="M8 18h8l1.5 4h-11z" fill="url(#i13body)" stroke="#20242a" stroke-width="1" stroke-linejoin="round" />
|
||||
<rect x="1.5" y="2.5" width="21" height="16" rx="3.5" fill="url(#i13body)" stroke="#20242a" stroke-width="1" />
|
||||
<rect x="4.5" y="5.5" width="15" height="10" rx="1.5" fill="url(#i13lcd)" stroke="#20242a" stroke-width="1" />
|
||||
<path d="M6.5 10.5h2.5v3.5h-2.5zM10.75 8.5h2.5v5.5h-2.5zM15 7h2.5v7h-2.5z" fill="#2b3315" />
|
||||
<rect x="3" y="3.2" width="18" height="5.6" rx="2.6" fill="url(#i13gloss)" />
|
||||
</svg><svg width=36 height=36 viewBox="0 0 24 24" class="shrink-0">
|
||||
<defs>
|
||||
<linearGradient id="i14body" x1="0" y1="0" x2="1" y2="0"><stop offset="0" stop-color="#3b4048" /><stop offset=".5" stop-color="#7a828e" /><stop offset="1" stop-color="#3b4048" /></linearGradient>
|
||||
<linearGradient id="i14lcd" x1="0" y1="0" x2="0" y2="1"><stop offset="0" stop-color="#c8d89a" /><stop offset="1" stop-color="#9fb46a" /></linearGradient>
|
||||
<linearGradient id="i14gloss" x1="0" y1="0" x2="0" y2="1"><stop offset="0" stop-color="#fff" stop-opacity=".85" /><stop offset="1" stop-color="#fff" stop-opacity=".05" /></linearGradient>
|
||||
</defs>
|
||||
<path d="M8 18h8l1.5 4h-11z" fill="url(#i14body)" stroke="#20242a" stroke-width="1" stroke-linejoin="round" />
|
||||
<rect x="1.5" y="2.5" width="21" height="16" rx="3.5" fill="url(#i14body)" stroke="#20242a" stroke-width="1" />
|
||||
<rect x="4.5" y="5.5" width="15" height="10" rx="1.5" fill="url(#i14lcd)" stroke="#20242a" stroke-width="1" />
|
||||
<path d="M6.5 10.5h2.5v3.5h-2.5zM10.75 8.5h2.5v5.5h-2.5zM15 7h2.5v7h-2.5z" fill="#2b3315" />
|
||||
<rect x="3" y="3.2" width="18" height="5.6" rx="2.6" fill="url(#i14gloss)" />
|
||||
</svg><svg width=96 height=96 viewBox="0 0 24 24" class="shrink-0">
|
||||
<defs>
|
||||
<linearGradient id="i15body" x1="0" y1="0" x2="1" y2="0"><stop offset="0" stop-color="#3b4048" /><stop offset=".5" stop-color="#7a828e" /><stop offset="1" stop-color="#3b4048" /></linearGradient>
|
||||
<linearGradient id="i15lcd" x1="0" y1="0" x2="0" y2="1"><stop offset="0" stop-color="#c8d89a" /><stop offset="1" stop-color="#9fb46a" /></linearGradient>
|
||||
<linearGradient id="i15gloss" x1="0" y1="0" x2="0" y2="1"><stop offset="0" stop-color="#fff" stop-opacity=".85" /><stop offset="1" stop-color="#fff" stop-opacity=".05" /></linearGradient>
|
||||
</defs>
|
||||
<path d="M8 18h8l1.5 4h-11z" fill="url(#i15body)" stroke="#20242a" stroke-width="1" stroke-linejoin="round" />
|
||||
<rect x="1.5" y="2.5" width="21" height="16" rx="3.5" fill="url(#i15body)" stroke="#20242a" stroke-width="1" />
|
||||
<rect x="4.5" y="5.5" width="15" height="10" rx="1.5" fill="url(#i15lcd)" stroke="#20242a" stroke-width="1" />
|
||||
<path d="M6.5 10.5h2.5v3.5h-2.5zM10.75 8.5h2.5v5.5h-2.5zM15 7h2.5v7h-2.5z" fill="#2b3315" />
|
||||
<rect x="3" y="3.2" width="18" height="5.6" rx="2.6" fill="url(#i15gloss)" />
|
||||
</svg><span>RetroDashboard</span></div><div class="r" style="background:#1d1d21;color:#eee"><svg width=18 height=18 viewBox="0 0 24 24" class="shrink-0">
|
||||
<defs>
|
||||
<linearGradient id="i16in" x1="0" y1="0" x2="0" y2="1"><stop offset="0" stop-color="#7fbf8f" /><stop offset="1" stop-color="#3d8a55" /></linearGradient>
|
||||
<linearGradient id="i16gloss" x1="0" y1="0" x2="0" y2="1"><stop offset="0" stop-color="#fff" stop-opacity=".85" /><stop offset="1" stop-color="#fff" stop-opacity=".05" /></linearGradient>
|
||||
</defs>
|
||||
<path d="M1.5 4.8h11.5V1.5l9.5 5.3-9.5 5.3V8.8H1.5z" fill="url(#i16in)" stroke="#20242a" stroke-width="1" stroke-linejoin="round" />
|
||||
<path d="M22.5 15.2H11v-3.3l-9.5 5.3 9.5 5.3v-3.3h11.5z" fill="#e2492f" stroke="#20242a" stroke-width="1" stroke-linejoin="round" />
|
||||
<path d="M2.3 5.5h11.4V3l6.5 3.6H2.3zM21.7 15.9H10.3v-2.5l-6.5 3.6h17.9z" fill="url(#i16gloss)" />
|
||||
</svg><svg width=36 height=36 viewBox="0 0 24 24" class="shrink-0">
|
||||
<defs>
|
||||
<linearGradient id="i17in" x1="0" y1="0" x2="0" y2="1"><stop offset="0" stop-color="#7fbf8f" /><stop offset="1" stop-color="#3d8a55" /></linearGradient>
|
||||
<linearGradient id="i17gloss" x1="0" y1="0" x2="0" y2="1"><stop offset="0" stop-color="#fff" stop-opacity=".85" /><stop offset="1" stop-color="#fff" stop-opacity=".05" /></linearGradient>
|
||||
</defs>
|
||||
<path d="M1.5 4.8h11.5V1.5l9.5 5.3-9.5 5.3V8.8H1.5z" fill="url(#i17in)" stroke="#20242a" stroke-width="1" stroke-linejoin="round" />
|
||||
<path d="M22.5 15.2H11v-3.3l-9.5 5.3 9.5 5.3v-3.3h11.5z" fill="#e2492f" stroke="#20242a" stroke-width="1" stroke-linejoin="round" />
|
||||
<path d="M2.3 5.5h11.4V3l6.5 3.6H2.3zM21.7 15.9H10.3v-2.5l-6.5 3.6h17.9z" fill="url(#i17gloss)" />
|
||||
</svg><svg width=96 height=96 viewBox="0 0 24 24" class="shrink-0">
|
||||
<defs>
|
||||
<linearGradient id="i18in" x1="0" y1="0" x2="0" y2="1"><stop offset="0" stop-color="#7fbf8f" /><stop offset="1" stop-color="#3d8a55" /></linearGradient>
|
||||
<linearGradient id="i18gloss" x1="0" y1="0" x2="0" y2="1"><stop offset="0" stop-color="#fff" stop-opacity=".85" /><stop offset="1" stop-color="#fff" stop-opacity=".05" /></linearGradient>
|
||||
</defs>
|
||||
<path d="M1.5 4.8h11.5V1.5l9.5 5.3-9.5 5.3V8.8H1.5z" fill="url(#i18in)" stroke="#20242a" stroke-width="1" stroke-linejoin="round" />
|
||||
<path d="M22.5 15.2H11v-3.3l-9.5 5.3 9.5 5.3v-3.3h11.5z" fill="#e2492f" stroke="#20242a" stroke-width="1" stroke-linejoin="round" />
|
||||
<path d="M2.3 5.5h11.4V3l6.5 3.6H2.3zM21.7 15.9H10.3v-2.5l-6.5 3.6h17.9z" fill="url(#i18gloss)" />
|
||||
</svg><span>RetroTransactions</span></div><div class="r" style="background:#1d1d21;color:#eee"><svg width=18 height=18 viewBox="0 0 24 24" class="shrink-0">
|
||||
<defs>
|
||||
<linearGradient id="i19blue" x1="0" y1="0" x2="0" y2="1"><stop offset="0" stop-color="#8b98ff" /><stop offset="1" stop-color="#5b6cf0" /></linearGradient>
|
||||
<linearGradient id="i19gold" x1="0" y1="0" x2="0" y2="1"><stop offset="0" stop-color="#ffe680" /><stop offset="1" stop-color="#e09a12" /></linearGradient>
|
||||
<linearGradient id="i19gloss" x1="0" y1="0" x2="0" y2="1"><stop offset="0" stop-color="#fff" stop-opacity=".85" /><stop offset="1" stop-color="#fff" stop-opacity=".05" /></linearGradient>
|
||||
</defs>
|
||||
<path d="M10.5 13.5L19.5 13.5A9 9 0 0 1 2.7 18Z" fill="#5b6cf0" stroke="#20242a" stroke-width="1" stroke-linejoin="round" />
|
||||
<path d="M10.5 13.5L2.7 18A9 9 0 0 1 10.5 4.5Z" fill="#8b98ff" stroke="#20242a" stroke-width="1" stroke-linejoin="round" />
|
||||
<path d="M12.5 11.5V2.5A9 9 0 0 1 21.5 11.5Z" fill="url(#i19gold)" stroke="#b07208" stroke-width="1" stroke-linejoin="round" />
|
||||
<ellipse cx="10" cy="8.6" rx="6" ry="3.4" fill="url(#i19gloss)" />
|
||||
</svg><svg width=36 height=36 viewBox="0 0 24 24" class="shrink-0">
|
||||
<defs>
|
||||
<linearGradient id="i20blue" x1="0" y1="0" x2="0" y2="1"><stop offset="0" stop-color="#8b98ff" /><stop offset="1" stop-color="#5b6cf0" /></linearGradient>
|
||||
<linearGradient id="i20gold" x1="0" y1="0" x2="0" y2="1"><stop offset="0" stop-color="#ffe680" /><stop offset="1" stop-color="#e09a12" /></linearGradient>
|
||||
<linearGradient id="i20gloss" x1="0" y1="0" x2="0" y2="1"><stop offset="0" stop-color="#fff" stop-opacity=".85" /><stop offset="1" stop-color="#fff" stop-opacity=".05" /></linearGradient>
|
||||
</defs>
|
||||
<path d="M10.5 13.5L19.5 13.5A9 9 0 0 1 2.7 18Z" fill="#5b6cf0" stroke="#20242a" stroke-width="1" stroke-linejoin="round" />
|
||||
<path d="M10.5 13.5L2.7 18A9 9 0 0 1 10.5 4.5Z" fill="#8b98ff" stroke="#20242a" stroke-width="1" stroke-linejoin="round" />
|
||||
<path d="M12.5 11.5V2.5A9 9 0 0 1 21.5 11.5Z" fill="url(#i20gold)" stroke="#b07208" stroke-width="1" stroke-linejoin="round" />
|
||||
<ellipse cx="10" cy="8.6" rx="6" ry="3.4" fill="url(#i20gloss)" />
|
||||
</svg><svg width=96 height=96 viewBox="0 0 24 24" class="shrink-0">
|
||||
<defs>
|
||||
<linearGradient id="i21blue" x1="0" y1="0" x2="0" y2="1"><stop offset="0" stop-color="#8b98ff" /><stop offset="1" stop-color="#5b6cf0" /></linearGradient>
|
||||
<linearGradient id="i21gold" x1="0" y1="0" x2="0" y2="1"><stop offset="0" stop-color="#ffe680" /><stop offset="1" stop-color="#e09a12" /></linearGradient>
|
||||
<linearGradient id="i21gloss" x1="0" y1="0" x2="0" y2="1"><stop offset="0" stop-color="#fff" stop-opacity=".85" /><stop offset="1" stop-color="#fff" stop-opacity=".05" /></linearGradient>
|
||||
</defs>
|
||||
<path d="M10.5 13.5L19.5 13.5A9 9 0 0 1 2.7 18Z" fill="#5b6cf0" stroke="#20242a" stroke-width="1" stroke-linejoin="round" />
|
||||
<path d="M10.5 13.5L2.7 18A9 9 0 0 1 10.5 4.5Z" fill="#8b98ff" stroke="#20242a" stroke-width="1" stroke-linejoin="round" />
|
||||
<path d="M12.5 11.5V2.5A9 9 0 0 1 21.5 11.5Z" fill="url(#i21gold)" stroke="#b07208" stroke-width="1" stroke-linejoin="round" />
|
||||
<ellipse cx="10" cy="8.6" rx="6" ry="3.4" fill="url(#i21gloss)" />
|
||||
</svg><span>RetroSpending</span></div><div class="r" style="background:#1d1d21;color:#eee"><svg width=18 height=18 viewBox="0 0 24 24" class="shrink-0">
|
||||
<defs>
|
||||
<linearGradient id="i22blue" x1="0" y1="0" x2="0" y2="1"><stop offset="0" stop-color="#8b98ff" /><stop offset="1" stop-color="#5b6cf0" /></linearGradient>
|
||||
<linearGradient id="i22lcd" x1="0" y1="0" x2="0" y2="1"><stop offset="0" stop-color="#c8d89a" /><stop offset="1" stop-color="#9fb46a" /></linearGradient>
|
||||
<linearGradient id="i22gold" x1="0" y1="0" x2="0" y2="1"><stop offset="0" stop-color="#ffe680" /><stop offset="1" stop-color="#e09a12" /></linearGradient>
|
||||
<linearGradient id="i22gloss" x1="0" y1="0" x2="0" y2="1"><stop offset="0" stop-color="#fff" stop-opacity=".85" /><stop offset="1" stop-color="#fff" stop-opacity=".05" /></linearGradient>
|
||||
</defs>
|
||||
<rect x="4.5" y="2.5" width="12" height="7" rx="1" fill="url(#i22lcd)" stroke="#20242a" stroke-width="1" />
|
||||
<rect x="1.5" y="6" width="19" height="15.5" rx="3.5" fill="url(#i22blue)" stroke="#20242a" stroke-width="1" />
|
||||
<rect x="13.5" y="10.5" width="9" height="7" rx="2.5" fill="#5b6cf0" stroke="#20242a" stroke-width="1" />
|
||||
<circle cx="17.2" cy="14" r="2" fill="url(#i22gold)" stroke="#b07208" stroke-width="1" />
|
||||
<rect x="3" y="7" width="16" height="5.5" rx="2.5" fill="url(#i22gloss)" />
|
||||
</svg><svg width=36 height=36 viewBox="0 0 24 24" class="shrink-0">
|
||||
<defs>
|
||||
<linearGradient id="i23blue" x1="0" y1="0" x2="0" y2="1"><stop offset="0" stop-color="#8b98ff" /><stop offset="1" stop-color="#5b6cf0" /></linearGradient>
|
||||
<linearGradient id="i23lcd" x1="0" y1="0" x2="0" y2="1"><stop offset="0" stop-color="#c8d89a" /><stop offset="1" stop-color="#9fb46a" /></linearGradient>
|
||||
<linearGradient id="i23gold" x1="0" y1="0" x2="0" y2="1"><stop offset="0" stop-color="#ffe680" /><stop offset="1" stop-color="#e09a12" /></linearGradient>
|
||||
<linearGradient id="i23gloss" x1="0" y1="0" x2="0" y2="1"><stop offset="0" stop-color="#fff" stop-opacity=".85" /><stop offset="1" stop-color="#fff" stop-opacity=".05" /></linearGradient>
|
||||
</defs>
|
||||
<rect x="4.5" y="2.5" width="12" height="7" rx="1" fill="url(#i23lcd)" stroke="#20242a" stroke-width="1" />
|
||||
<rect x="1.5" y="6" width="19" height="15.5" rx="3.5" fill="url(#i23blue)" stroke="#20242a" stroke-width="1" />
|
||||
<rect x="13.5" y="10.5" width="9" height="7" rx="2.5" fill="#5b6cf0" stroke="#20242a" stroke-width="1" />
|
||||
<circle cx="17.2" cy="14" r="2" fill="url(#i23gold)" stroke="#b07208" stroke-width="1" />
|
||||
<rect x="3" y="7" width="16" height="5.5" rx="2.5" fill="url(#i23gloss)" />
|
||||
</svg><svg width=96 height=96 viewBox="0 0 24 24" class="shrink-0">
|
||||
<defs>
|
||||
<linearGradient id="i24blue" x1="0" y1="0" x2="0" y2="1"><stop offset="0" stop-color="#8b98ff" /><stop offset="1" stop-color="#5b6cf0" /></linearGradient>
|
||||
<linearGradient id="i24lcd" x1="0" y1="0" x2="0" y2="1"><stop offset="0" stop-color="#c8d89a" /><stop offset="1" stop-color="#9fb46a" /></linearGradient>
|
||||
<linearGradient id="i24gold" x1="0" y1="0" x2="0" y2="1"><stop offset="0" stop-color="#ffe680" /><stop offset="1" stop-color="#e09a12" /></linearGradient>
|
||||
<linearGradient id="i24gloss" x1="0" y1="0" x2="0" y2="1"><stop offset="0" stop-color="#fff" stop-opacity=".85" /><stop offset="1" stop-color="#fff" stop-opacity=".05" /></linearGradient>
|
||||
</defs>
|
||||
<rect x="4.5" y="2.5" width="12" height="7" rx="1" fill="url(#i24lcd)" stroke="#20242a" stroke-width="1" />
|
||||
<rect x="1.5" y="6" width="19" height="15.5" rx="3.5" fill="url(#i24blue)" stroke="#20242a" stroke-width="1" />
|
||||
<rect x="13.5" y="10.5" width="9" height="7" rx="2.5" fill="#5b6cf0" stroke="#20242a" stroke-width="1" />
|
||||
<circle cx="17.2" cy="14" r="2" fill="url(#i24gold)" stroke="#b07208" stroke-width="1" />
|
||||
<rect x="3" y="7" width="16" height="5.5" rx="2.5" fill="url(#i24gloss)" />
|
||||
</svg><span>RetroBudgets</span></div>
|
||||
|
After Width: | Height: | Size: 158 KiB |
@@ -0,0 +1 @@
|
||||
<!doctype html><meta charset="utf-8"><style>body{margin:0;font:16px -apple-system,sans-serif}.row{display:flex;align-items:center;gap:24px;padding:8px 24px;height:100px}</style><div class="row" style="background:#ffffff;color:#111"><svg width="18" height="18" viewBox="0 0 24 24"><defs><linearGradient id="i0_gl" x1="0" y1="0" x2="0" y2="1"><stop offset="0" stop-color="#fff" stop-opacity=".85" /><stop offset="1" stop-color="#fff" stop-opacity=".05" /></linearGradient><linearGradient id="i0_gm" x1="0" y1="0" x2="1" y2="0"><stop offset="0" stop-color="#3b4048" /><stop offset=".5" stop-color="#7a828e" /><stop offset="1" stop-color="#3b4048" /></linearGradient></defs><rect x="2.5" y="4.5" width="19" height="17" rx="2.5" fill="#fff" stroke="#20242a" stroke-width="1" /><path d="M2.5 9.5V7a2.5 2.5 0 0 1 2.5-2.5h14A2.5 2.5 0 0 1 21.5 7v2.5Z" fill="#e2492f" stroke="#20242a" stroke-width="1" /><path d="M3 9V7a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2v2Z" fill="url(#i0_gl)" /><g fill="url(#i0_gm)" stroke="#20242a" stroke-width="1"><rect x="6" y="1.5" width="2.5" height="5.5" rx="1.25" /><rect x="15.5" y="1.5" width="2.5" height="5.5" rx="1.25" /></g><path d="M9 14.4A3.2 3.2 0 1 0 12 12.3" fill="none" stroke="#5b6cf0" stroke-width="2.2" stroke-linecap="round" /><path d="M9.9 12.3L12.9 10v4.6Z" fill="#5b6cf0" stroke="#5b6cf0" stroke-width="1" stroke-linejoin="round" /></svg><svg width="36" height="36" viewBox="0 0 24 24"><defs><linearGradient id="i1_gl" x1="0" y1="0" x2="0" y2="1"><stop offset="0" stop-color="#fff" stop-opacity=".85" /><stop offset="1" stop-color="#fff" stop-opacity=".05" /></linearGradient><linearGradient id="i1_gm" x1="0" y1="0" x2="1" y2="0"><stop offset="0" stop-color="#3b4048" /><stop offset=".5" stop-color="#7a828e" /><stop offset="1" stop-color="#3b4048" /></linearGradient></defs><rect x="2.5" y="4.5" width="19" height="17" rx="2.5" fill="#fff" stroke="#20242a" stroke-width="1" /><path d="M2.5 9.5V7a2.5 2.5 0 0 1 2.5-2.5h14A2.5 2.5 0 0 1 21.5 7v2.5Z" fill="#e2492f" stroke="#20242a" stroke-width="1" /><path d="M3 9V7a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2v2Z" fill="url(#i1_gl)" /><g fill="url(#i1_gm)" stroke="#20242a" stroke-width="1"><rect x="6" y="1.5" width="2.5" height="5.5" rx="1.25" /><rect x="15.5" y="1.5" width="2.5" height="5.5" rx="1.25" /></g><path d="M9 14.4A3.2 3.2 0 1 0 12 12.3" fill="none" stroke="#5b6cf0" stroke-width="2.2" stroke-linecap="round" /><path d="M9.9 12.3L12.9 10v4.6Z" fill="#5b6cf0" stroke="#5b6cf0" stroke-width="1" stroke-linejoin="round" /></svg><svg width="96" height="96" viewBox="0 0 24 24"><defs><linearGradient id="i2_gl" x1="0" y1="0" x2="0" y2="1"><stop offset="0" stop-color="#fff" stop-opacity=".85" /><stop offset="1" stop-color="#fff" stop-opacity=".05" /></linearGradient><linearGradient id="i2_gm" x1="0" y1="0" x2="1" y2="0"><stop offset="0" stop-color="#3b4048" /><stop offset=".5" stop-color="#7a828e" /><stop offset="1" stop-color="#3b4048" /></linearGradient></defs><rect x="2.5" y="4.5" width="19" height="17" rx="2.5" fill="#fff" stroke="#20242a" stroke-width="1" /><path d="M2.5 9.5V7a2.5 2.5 0 0 1 2.5-2.5h14A2.5 2.5 0 0 1 21.5 7v2.5Z" fill="#e2492f" stroke="#20242a" stroke-width="1" /><path d="M3 9V7a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2v2Z" fill="url(#i2_gl)" /><g fill="url(#i2_gm)" stroke="#20242a" stroke-width="1"><rect x="6" y="1.5" width="2.5" height="5.5" rx="1.25" /><rect x="15.5" y="1.5" width="2.5" height="5.5" rx="1.25" /></g><path d="M9 14.4A3.2 3.2 0 1 0 12 12.3" fill="none" stroke="#5b6cf0" stroke-width="2.2" stroke-linecap="round" /><path d="M9.9 12.3L12.9 10v4.6Z" fill="#5b6cf0" stroke="#5b6cf0" stroke-width="1" stroke-linejoin="round" /></svg><span>Recurring</span></div><div class="row" style="background:#ffffff;color:#111"><svg width="18" height="18" viewBox="0 0 24 24"><defs><linearGradient id="i3_gl" x1="0" y1="0" x2="0" y2="1"><stop offset="0" stop-color="#fff" stop-opacity=".85" /><stop offset="1" stop-color="#fff" stop-opacity=".05" /></linearGradient><linearGradient id="i3_au" x1="0" y1="0" x2="0" y2="1"><stop offset="0" stop-color="#ffe680" /><stop offset="1" stop-color="#e09a12" /></linearGradient><linearGradient id="i3_gm" x1="0" y1="0" x2="1" y2="0"><stop offset="0" stop-color="#3b4048" /><stop offset=".5" stop-color="#7a828e" /><stop offset="1" stop-color="#3b4048" /></linearGradient></defs><path d="M12 1.8L22 8.6H2Z" fill="url(#i3_au)" stroke="#b07208" stroke-width="1" stroke-linejoin="round" /><path d="M12 3L18.5 7.4H5.5Z" fill="url(#i3_gl)" /><g fill="#fff" stroke="#20242a" stroke-width="1"><rect x="4" y="9.6" width="3.4" height="8.4" rx=".6" /><rect x="10.3" y="9.6" width="3.4" height="8.4" rx=".6" /><rect x="16.6" y="9.6" width="3.4" height="8.4" rx=".6" /></g><rect x="2" y="18" width="20" height="4" rx="1" fill="url(#i3_gm)" stroke="#20242a" stroke-width="1" /></svg><svg width="36" height="36" viewBox="0 0 24 24"><defs><linearGradient id="i4_gl" x1="0" y1="0" x2="0" y2="1"><stop offset="0" stop-color="#fff" stop-opacity=".85" /><stop offset="1" stopLine truncated
|
||||
|
After Width: | Height: | Size: 151 KiB |
@@ -0,0 +1 @@
|
||||
<!doctype html><meta charset="utf-8"><style>body{margin:0;font:13px -apple-system,sans-serif}.r{display:flex;align-items:center;gap:20px;padding:4px 16px}</style><div class="r" style="background:#ffffff;color:#111"><svg width="18" height="18" viewBox="0 0 24 24"><defs><linearGradient id="i1m" x1="0" y1="0" x2="1" y2="0"><stop offset="0" stop-color="#3b4048"/><stop offset=".5" stop-color="#7a828e"/><stop offset="1" stop-color="#3b4048"/></linearGradient><linearGradient id="i1o" x1="0" y1="0" x2="0" y2="1"><stop offset="0" stop-color="#ffe680"/><stop offset="1" stop-color="#e09a12"/></linearGradient><linearGradient id="i1s" x1="0" y1="0" x2="0" y2="1"><stop offset="0" stop-color="#fff" stop-opacity=".85"/><stop offset="1" stop-color="#fff" stop-opacity=".05"/></linearGradient></defs><rect x="6.2" y="8.6" width="3.8" height="15" rx="1.3" transform="rotate(45 8.1 16.1)" fill="url(#i1m)" stroke="#20242a" stroke-width="1"/><rect x="6.2" y="8.6" width="3.8" height="4" rx="1.3" transform="rotate(45 8.1 16.1)" fill="#fff" stroke="#20242a" stroke-width="1"/><path d="M15.5 1 Q16.5 7.5 23 8.5 Q16.5 9.5 15.5 16 Q14.5 9.5 8 8.5 Q14.5 7.5 15.5 1Z" fill="url(#i1o)" stroke="#b07208" stroke-width="1"/><ellipse cx="15.5" cy="5.5" rx="1.2" ry="3.3" fill="url(#i1s)"/></svg><svg width="36" height="36" viewBox="0 0 24 24"><defs><linearGradient id="i2m" x1="0" y1="0" x2="1" y2="0"><stop offset="0" stop-color="#3b4048"/><stop offset=".5" stop-color="#7a828e"/><stop offset="1" stop-color="#3b4048"/></linearGradient><linearGradient id="i2o" x1="0" y1="0" x2="0" y2="1"><stop offset="0" stop-color="#ffe680"/><stop offset="1" stop-color="#e09a12"/></linearGradient><linearGradient id="i2s" x1="0" y1="0" x2="0" y2="1"><stop offset="0" stop-color="#fff" stop-opacity=".85"/><stop offset="1" stop-color="#fff" stop-opacity=".05"/></linearGradient></defs><rect x="6.2" y="8.6" width="3.8" height="15" rx="1.3" transform="rotate(45 8.1 16.1)" fill="url(#i2m)" stroke="#20242a" stroke-width="1"/><rect x="6.2" y="8.6" width="3.8" height="4" rx="1.3" transform="rotate(45 8.1 16.1)" fill="#fff" stroke="#20242a" stroke-width="1"/><path d="M15.5 1 Q16.5 7.5 23 8.5 Q16.5 9.5 15.5 16 Q14.5 9.5 8 8.5 Q14.5 7.5 15.5 1Z" fill="url(#i2o)" stroke="#b07208" stroke-width="1"/><ellipse cx="15.5" cy="5.5" rx="1.2" ry="3.3" fill="url(#i2s)"/></svg><svg width="96" height="96" viewBox="0 0 24 24"><defs><linearGradient id="i3m" x1="0" y1="0" x2="1" y2="0"><stop offset="0" stop-color="#3b4048"/><stop offset=".5" stop-color="#7a828e"/><stop offset="1" stop-color="#3b4048"/></linearGradient><linearGradient id="i3o" x1="0" y1="0" x2="0" y2="1"><stop offset="0" stop-color="#ffe680"/><stop offset="1" stop-color="#e09a12"/></linearGradient><linearGradient id="i3s" x1="0" y1="0" x2="0" y2="1"><stop offset="0" stop-color="#fff" stop-opacity=".85"/><stop offset="1" stop-color="#fff" stop-opacity=".05"/></linearGradient></defs><rect x="6.2" y="8.6" width="3.8" height="15" rx="1.3" transform="rotate(45 8.1 16.1)" fill="url(#i3m)" stroke="#20242a" stroke-width="1"/><rect x="6.2" y="8.6" width="3.8" height="4" rx="1.3" transform="rotate(45 8.1 16.1)" fill="#fff" stroke="#20242a" stroke-width="1"/><path d="M15.5 1 Q16.5 7.5 23 8.5 Q16.5 9.5 15.5 16 Q14.5 9.5 8 8.5 Q14.5 7.5 15.5 1Z" fill="url(#i3o)" stroke="#b07208" stroke-width="1"/><ellipse cx="15.5" cy="5.5" rx="1.2" ry="3.3" fill="url(#i3s)"/></svg><span>Optimize (RetroOptimize)</span></div><div class="r" style="background:#ffffff;color:#111"><svg width="18" height="18" viewBox="0 0 24 24"><defs><linearGradient id="i4b" x1="0" y1="0" x2="0" y2="1"><stop offset="0" stop-color="#8b98ff"/><stop offset="1" stop-color="#5b6cf0"/></linearGradient><linearGradient id="i4o" x1="0" y1="0" x2="0" y2="1"><stop offset="0" stop-color="#ffe680"/><stop offset="1" stop-color="#e09a12"/></linearGradient><linearGradient id="i4s" x1="0" y1="0" x2="0" y2="1"><stop offset="0" stop-color="#fff" stop-opacity=".85"/><stop offset="1" stop-color="#fff" stop-opacity=".05"/></linearGradient></defs><rect x="2" y="4.5" width="20" height="15" rx="2.5" fill="url(#i4b)" stroke="#20242a" stroke-width="1"/><rect x="4.5" y="9.5" width="5.5" height="4.5" rx="1" fill="url(#i4o)" stroke="#b07208" stroke-width="1"/><rect x="11.5" y="15" width="8" height="2.2" rx="1.1" fill="#fff"/><rect x="3" y="5.3" width="18" height="5.6" rx="2" fill="url(#i4s)"/></svg><svg width="36" height="36" viewBox="0 0 24 24"><defs><linearGradient id="i5b" x1="0" y1="0" x2="0" y2="1"><stop offset="0" stop-color="#8b98ff"/><stop offset="1" stop-color="#5b6cf0"/></linearGradient><linearGradient id="i5o" x1="0" y1="0" x2="0" y2="1"><stop offset="0" stop-color="#ffe680"/><stop offset="1" stop-color="#e09a12"/></linearGradient><linearGradient id="i5s" x1="0" y1="0" x2="0" y2="1"><stop offset="0" stop-color="#fff" stop-opacity=".85"/><stop offset="1" stop-color="#fff" stop-opacity=".05"/></linearGradient></defs><rect x="2" y="4.5" width="20" height="15" rx="2.5" fill="url(#i5b)" stroke="#20242a" stLine truncated
|
||||
|
After Width: | Height: | Size: 208 KiB |
|
After Width: | Height: | Size: 73 KiB |
@@ -0,0 +1,27 @@
|
||||
import { dirname } from "path";
|
||||
import { fileURLToPath } from "url";
|
||||
import { FlatCompat } from "@eslint/eslintrc";
|
||||
|
||||
const __filename = fileURLToPath(import.meta.url);
|
||||
const __dirname = dirname(__filename);
|
||||
|
||||
const compat = new FlatCompat({
|
||||
baseDirectory: __dirname,
|
||||
});
|
||||
|
||||
const eslintConfig = [
|
||||
...compat.extends("next/core-web-vitals", "next/typescript"),
|
||||
{
|
||||
ignores: [
|
||||
"node_modules/**",
|
||||
".next/**",
|
||||
".next-*/**",
|
||||
"out/**",
|
||||
"build/**",
|
||||
"public/**",
|
||||
"next-env.d.ts",
|
||||
],
|
||||
},
|
||||
];
|
||||
|
||||
export default eslintConfig;
|
||||
@@ -0,0 +1,14 @@
|
||||
#!/bin/sh
|
||||
# Installs broke into ~/broke (or $BROKE_DIR) and starts it:
|
||||
# curl -fsSL https://raw.githubusercontent.com/nextwork-projects/broke/main/install.sh | sh
|
||||
set -e
|
||||
REPO="${BROKE_REPO:-https://github.com/nextwork-projects/broke.git}"
|
||||
DIR="${BROKE_DIR:-$HOME/broke}"
|
||||
|
||||
command -v git >/dev/null || { echo "broke needs git. Get it from https://git-scm.com/downloads, then run this again."; exit 1; }
|
||||
command -v node >/dev/null || { echo "broke needs Node.js. Get the LTS version from https://nodejs.org, then run this again."; exit 1; }
|
||||
[ "$(node -p 'process.versions.node.split(".")[0]')" -ge 20 ] || { echo "broke needs Node.js 20 or newer. Get it from https://nodejs.org, then run this again."; exit 1; }
|
||||
|
||||
if [ -d "$DIR/.git" ]; then echo "broke is already in $DIR. Starting it."; else git clone --quiet "$REPO" "$DIR"; fi
|
||||
cd "$DIR"
|
||||
exec node scripts/start.mjs
|
||||
@@ -0,0 +1,12 @@
|
||||
import type { NextConfig } from "next";
|
||||
|
||||
const nextConfig: NextConfig = {
|
||||
devIndicators: false,
|
||||
distDir: process.env.NEXT_DIST_DIR || ".next", // a production build can sit beside the running dev server
|
||||
serverExternalPackages: ["pg"],
|
||||
// Keep pages you visited for 3 min, so going back or switching tabs is instant. Every edit calls router.refresh(),
|
||||
// which drops the cache, so changes still show at once.
|
||||
experimental: { staleTimes: { dynamic: 180 } },
|
||||
};
|
||||
|
||||
export default nextConfig;
|
||||
@@ -0,0 +1,50 @@
|
||||
{
|
||||
"name": "broke",
|
||||
"version": "0.1.0",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "next dev --turbopack -H 127.0.0.1",
|
||||
"build": "next build",
|
||||
"start": "next start",
|
||||
"app": "node scripts/start.mjs",
|
||||
"lint": "eslint",
|
||||
"migrate": "node --env-file=.env --env-file-if-exists=.env.local scripts/migrate.mjs",
|
||||
"update": "node scripts/update.mjs"
|
||||
},
|
||||
"dependencies": {
|
||||
"@gsap/react": "^2.1.2",
|
||||
"@modelcontextprotocol/sdk": "^1.32.1",
|
||||
"@phosphor-icons/react": "^2.1.10",
|
||||
"@rive-app/react-canvas": "^4.37.0",
|
||||
"@supabase/ssr": "^0.7.0",
|
||||
"@supabase/supabase-js": "^2.118.0",
|
||||
"gsap": "^3.15.0",
|
||||
"lucide-react": "^0.577.0",
|
||||
"next": "15.5.4",
|
||||
"openai": "^6.49.0",
|
||||
"pdfjs-dist": "5.4.149",
|
||||
"pg": "^8.23.1",
|
||||
"plaid": "^38.1.0",
|
||||
"react": "19.1.0",
|
||||
"react-dom": "19.1.0",
|
||||
"react-plaid-link": "^4.2.0",
|
||||
"server-only": "^0.0.1",
|
||||
"zod": "^4.6.7"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@eslint/eslintrc": "^3",
|
||||
"@tailwindcss/postcss": "^4",
|
||||
"@types/node": "^20",
|
||||
"@types/pg": "^8.23.1",
|
||||
"@types/react": "^19",
|
||||
"@types/react-dom": "^19",
|
||||
"eslint": "^9",
|
||||
"eslint-config-next": "15.5.4",
|
||||
"puppeteer-core": "^24.43.1",
|
||||
"tailwindcss": "^4",
|
||||
"typescript": "^5"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=22.18"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
const config = {
|
||||
plugins: ["@tailwindcss/postcss"],
|
||||
};
|
||||
|
||||
export default config;
|
||||
@@ -0,0 +1,131 @@
|
||||
// Connects your own AI app to your hosted copy of broke. Node only, no install. It asks your site for questions, runs them
|
||||
// through Claude Code or opencode with every tool off, in an empty folder, and sends back the text. Your AI login never
|
||||
// leaves this computer. Usage: node broke-connect.cjs <your site> [one-time code]. Ctrl+C stops it.
|
||||
const { spawn, execFile } = require("node:child_process");
|
||||
const { chmodSync, existsSync, mkdirSync, readFileSync, writeFileSync } = require("node:fs");
|
||||
const { homedir } = require("node:os");
|
||||
const { join } = require("node:path");
|
||||
|
||||
const site = (process.argv[2] || "").replace(/\/$/, "");
|
||||
const code = process.argv[3];
|
||||
if (!/^https?:\/\//.test(site)) {
|
||||
console.error("Copy the command from Connect your AI in broke.");
|
||||
process.exit(1);
|
||||
}
|
||||
const HOME = join(homedir(), ".broke");
|
||||
const FILE = join(HOME, "helper.json");
|
||||
const WORK = join(HOME, "agent");
|
||||
mkdirSync(WORK, { recursive: true });
|
||||
|
||||
// Only what the AI apps need to find their login. Drops API keys, which would switch them to API billing.
|
||||
const env = { HOME: homedir(), PATH: process.env.PATH, LANG: process.env.LANG || "en_US.UTF-8" };
|
||||
for (const k of ["USER", "LOGNAME", "TMPDIR", "SHELL"]) if (process.env[k]) env[k] = process.env[k];
|
||||
const findBin = (name) => {
|
||||
const dirs = [...(process.env.PATH || "").split(":"), join(homedir(), ".local/bin"), "/opt/homebrew/bin", "/usr/local/bin", join(homedir(), ".npm-global/bin")];
|
||||
return dirs.map((d) => join(d, name)).find((p) => existsSync(p)) || null;
|
||||
};
|
||||
const OPENCODE_ENV = {
|
||||
...env, XDG_CONFIG_HOME: join(HOME, "opencode-config"), OPENCODE_DISABLE_CLAUDE_CODE: "1", OPENCODE_DISABLE_EXTERNAL_SKILLS: "1", OPENCODE_DISABLE_PROJECT_CONFIG: "1",
|
||||
OPENCODE_DISABLE_AUTOUPDATE: "1", OPENCODE_DISABLE_DEFAULT_PLUGINS: "1", OPENCODE_CONFIG_CONTENT: JSON.stringify({ share: "disabled", autoupdate: false, mcp: {}, permission: { "*": "deny" } }),
|
||||
};
|
||||
const output = (bin, args, e) => new Promise((res) => execFile(bin, args, { env: e, timeout: 8000 }, (err, out) => res(err ? "" : String(out))));
|
||||
|
||||
async function findClis() {
|
||||
const clis = [];
|
||||
const claude = findBin("claude");
|
||||
if (claude && /"loggedIn":\s*true/.test(await output(claude, ["auth", "status"], env))) clis.push({ id: "claude" });
|
||||
const opencode = findBin("opencode");
|
||||
const models = opencode ? (await output(opencode, ["models"], OPENCODE_ENV)).split("\n").map((s) => s.trim()).filter(Boolean) : [];
|
||||
if (models.length) clis.push({ id: "opencode", models });
|
||||
return clis;
|
||||
}
|
||||
|
||||
const safeModel = (m) => (typeof m === "string" && /^[\w][\w.:/-]*$/.test(m) ? m : null);
|
||||
|
||||
// Runs one question. onText gets the answer as it comes. Resolves true if there was an answer.
|
||||
function runClaude(job, onText, stop) {
|
||||
const model = safeModel(job.model);
|
||||
const args = ["-p", "--output-format", "text", "--no-session-persistence", "--restricted", "--tools", "", "--strict-mcp-config", "--mcp-config", '{"mcpServers":{}}', "--permission-mode", "dontAsk", ...(model ? ["--model", model] : [])];
|
||||
const child = spawn(findBin("claude"), args, { cwd: WORK, env, stdio: ["pipe", "pipe", "ignore"] });
|
||||
stop(() => child.kill());
|
||||
child.stdin.end(job.prompt);
|
||||
let wrote = false;
|
||||
child.stdout.on("data", (d) => { wrote = true; onText(d.toString()); });
|
||||
return new Promise((res) => child.on("close", (c) => res(wrote && c === 0)));
|
||||
}
|
||||
|
||||
function runOpencode(job, onText, stop) {
|
||||
const model = safeModel(job.model);
|
||||
if (!model) return Promise.resolve(false);
|
||||
const child = spawn(findBin("opencode"), ["run", job.prompt, "--format", "json", "--print-logs", "--log-level", "ERROR", "-m", model], { cwd: WORK, env: OPENCODE_ENV, stdio: ["ignore", "pipe", "pipe"] });
|
||||
stop(() => child.kill());
|
||||
let wrote = false, buf = "";
|
||||
// A rate limit or sign-in error: opencode would wait forever, so stop it and say why.
|
||||
child.stderr.on("data", (d) => {
|
||||
const t = d.toString();
|
||||
if (!/level=ERROR/.test(t)) return;
|
||||
if (!wrote && /usage limit|rate limit|429/i.test(t)) { onText(`${model} hit its usage limit. Pick another model or try again later.`); wrote = true; }
|
||||
child.kill();
|
||||
});
|
||||
child.stdout.on("data", (d) => {
|
||||
buf += d.toString();
|
||||
let nl;
|
||||
while ((nl = buf.indexOf("\n")) >= 0) {
|
||||
let ev = null;
|
||||
try { ev = JSON.parse(buf.slice(0, nl)); } catch {}
|
||||
buf = buf.slice(nl + 1);
|
||||
if (ev?.type === "text" && ev.part?.text) { onText((wrote ? "\n\n" : "") + ev.part.text); wrote = true; }
|
||||
if (ev?.type === "step_finish" && ev.part?.reason !== "tool-calls") child.kill(); // opencode doesn't exit by itself
|
||||
}
|
||||
});
|
||||
return new Promise((res) => child.on("close", () => res(wrote)));
|
||||
}
|
||||
|
||||
async function main() {
|
||||
let token = existsSync(FILE) ? JSON.parse(readFileSync(FILE, "utf8"))[site] : null;
|
||||
if (code) {
|
||||
const res = await fetch(`${site}/api/ai/helper/pair`, { method: "POST", headers: { "content-type": "application/json" }, body: JSON.stringify({ code }) });
|
||||
if (!res.ok) { console.error(await res.text()); process.exit(1); }
|
||||
token = (await res.json()).token;
|
||||
const saved = existsSync(FILE) ? JSON.parse(readFileSync(FILE, "utf8")) : {};
|
||||
writeFileSync(FILE, JSON.stringify({ ...saved, [site]: token }), { mode: 0o600 });
|
||||
chmodSync(FILE, 0o600);
|
||||
}
|
||||
if (!token) { console.error("Copy the command from Connect your AI in broke."); process.exit(1); }
|
||||
const clis = await findClis();
|
||||
if (!clis.length) { console.error("No signed-in AI app found. Install Claude Code and run `claude` once, or install opencode, then run this again."); process.exit(1); }
|
||||
console.log(`Connected to ${site} with ${clis.map((c) => c.id).join(" and ")}. Leave this open. Press Ctrl+C to stop.`);
|
||||
|
||||
const post = (path, body) => fetch(`${site}/api/ai/helper/${path}`, { method: "POST", headers: { authorization: `Bearer ${token}`, "content-type": "application/json" }, body: JSON.stringify(body) });
|
||||
for (;;) {
|
||||
let job = null;
|
||||
try {
|
||||
const res = await post("poll", { clis });
|
||||
if (res.status === 403) { console.error("This helper was replaced. Get a new command from Connect your AI."); process.exit(1); }
|
||||
if (res.ok) job = (await res.json()).job;
|
||||
} catch { /* offline for a moment: try again */ }
|
||||
if (!job) { await new Promise((r) => setTimeout(r, 2000)); continue; }
|
||||
if (!clis.some((c) => c.id === job.provider)) { await post("answer", { id: job.id, status: "failed" }); continue; }
|
||||
|
||||
// Send the answer in small batches, in order. A 410 means the person left, so stop the AI app.
|
||||
let pending = "", kill = () => {}, gone = false;
|
||||
const flush = async () => {
|
||||
if (!pending) return;
|
||||
const text = pending;
|
||||
pending = "";
|
||||
const res = await post("answer", { id: job.id, text }).catch(() => null);
|
||||
if (res?.status === 410) { gone = true; kill(); }
|
||||
};
|
||||
let sending = Promise.resolve();
|
||||
const timer = setInterval(() => { sending = sending.then(flush); }, 500);
|
||||
const run = job.provider === "claude" ? runClaude : runOpencode;
|
||||
const tooLong = setTimeout(() => kill(), 270_000); // the site gives up at 280 s
|
||||
const ok = await run(job, (t) => { pending += t; }, (k) => { kill = k; });
|
||||
clearTimeout(tooLong);
|
||||
clearInterval(timer);
|
||||
await sending;
|
||||
await flush();
|
||||
if (!gone) await post("answer", { id: job.id, status: ok ? "done" : "failed" }).catch(() => {});
|
||||
}
|
||||
}
|
||||
main().catch((e) => { console.error(e.message); process.exit(1); });
|
||||
|
After Width: | Height: | Size: 54 KiB |
|
After Width: | Height: | Size: 42 KiB |
|
After Width: | Height: | Size: 125 KiB |
|
After Width: | Height: | Size: 106 KiB |
|
After Width: | Height: | Size: 171 KiB |
|
After Width: | Height: | Size: 97 KiB |
|
After Width: | Height: | Size: 94 KiB |
|
After Width: | Height: | Size: 81 KiB |
|
After Width: | Height: | Size: 66 KiB |
|
After Width: | Height: | Size: 20 KiB |
|
After Width: | Height: | Size: 159 KiB |
|
After Width: | Height: | Size: 159 KiB |
|
After Width: | Height: | Size: 8.4 KiB |
|
After Width: | Height: | Size: 7.8 KiB |
@@ -0,0 +1 @@
|
||||
<svg fill="none" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M14.5 13.5V5.41a1 1 0 0 0-.3-.7L9.8.29A1 1 0 0 0 9.08 0H1.5v13.5A2.5 2.5 0 0 0 4 16h8a2.5 2.5 0 0 0 2.5-2.5m-1.5 0v-7H8v-5H3v12a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1M9.5 5V2.12L12.38 5zM5.13 5h-.62v1.25h2.12V5zm-.62 3h7.12v1.25H4.5zm.62 3h-.62v1.25h7.12V11z" clip-rule="evenodd" fill="#666" fill-rule="evenodd"/></svg>
|
||||
|
After Width: | Height: | Size: 391 B |
@@ -0,0 +1 @@
|
||||
<svg fill="none" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><g clip-path="url(#a)"><path fill-rule="evenodd" clip-rule="evenodd" d="M10.27 14.1a6.5 6.5 0 0 0 3.67-3.45q-1.24.21-2.7.34-.31 1.83-.97 3.1M8 16A8 8 0 1 0 8 0a8 8 0 0 0 0 16m.48-1.52a7 7 0 0 1-.96 0H7.5a4 4 0 0 1-.84-1.32q-.38-.89-.63-2.08a40 40 0 0 0 3.92 0q-.25 1.2-.63 2.08a4 4 0 0 1-.84 1.31zm2.94-4.76q1.66-.15 2.95-.43a7 7 0 0 0 0-2.58q-1.3-.27-2.95-.43a18 18 0 0 1 0 3.44m-1.27-3.54a17 17 0 0 1 0 3.64 39 39 0 0 1-4.3 0 17 17 0 0 1 0-3.64 39 39 0 0 1 4.3 0m1.1-1.17q1.45.13 2.69.34a6.5 6.5 0 0 0-3.67-3.44q.65 1.26.98 3.1M8.48 1.5l.01.02q.41.37.84 1.31.38.89.63 2.08a40 40 0 0 0-3.92 0q.25-1.2.63-2.08a4 4 0 0 1 .85-1.32 7 7 0 0 1 .96 0m-2.75.4a6.5 6.5 0 0 0-3.67 3.44 29 29 0 0 1 2.7-.34q.31-1.83.97-3.1M4.58 6.28q-1.66.16-2.95.43a7 7 0 0 0 0 2.58q1.3.27 2.95.43a18 18 0 0 1 0-3.44m.17 4.71q-1.45-.12-2.69-.34a6.5 6.5 0 0 0 3.67 3.44q-.65-1.27-.98-3.1" fill="#666"/></g><defs><clipPath id="a"><path fill="#fff" d="M0 0h16v16H0z"/></clipPath></defs></svg>
|
||||
|
After Width: | Height: | Size: 1.0 KiB |
|
After Width: | Height: | Size: 5.7 KiB |
|
After Width: | Height: | Size: 10 KiB |
|
After Width: | Height: | Size: 4.7 KiB |
|
After Width: | Height: | Size: 6.8 KiB |
|
After Width: | Height: | Size: 3.7 KiB |
|
After Width: | Height: | Size: 7.4 KiB |
|
After Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 6.5 KiB |
|
After Width: | Height: | Size: 4.7 KiB |
|
After Width: | Height: | Size: 8.7 KiB |
|
After Width: | Height: | Size: 10 KiB |
|
After Width: | Height: | Size: 6.1 KiB |
|
After Width: | Height: | Size: 9.8 KiB |
|
After Width: | Height: | Size: 21 KiB |
|
After Width: | Height: | Size: 1.9 KiB |
|
After Width: | Height: | Size: 6.0 KiB |
|
After Width: | Height: | Size: 5.6 KiB |
|
After Width: | Height: | Size: 3.5 KiB |
|
After Width: | Height: | Size: 2.4 KiB |
|
After Width: | Height: | Size: 3.5 KiB |
|
After Width: | Height: | Size: 23 KiB |
|
After Width: | Height: | Size: 3.9 KiB |
|
After Width: | Height: | Size: 3.3 KiB |
|
After Width: | Height: | Size: 5.0 KiB |
|
After Width: | Height: | Size: 3.2 KiB |
|
After Width: | Height: | Size: 5.3 KiB |
|
After Width: | Height: | Size: 3.6 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 8.7 KiB |
|
After Width: | Height: | Size: 7.5 KiB |
|
After Width: | Height: | Size: 3.8 KiB |
|
After Width: | Height: | Size: 5.0 KiB |
|
After Width: | Height: | Size: 2.6 KiB |
|
After Width: | Height: | Size: 4.0 KiB |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 394 80"><path fill="#000" d="M262 0h68.5v12.7h-27.2v66.6h-13.6V12.7H262V0ZM149 0v12.7H94v20.4h44.3v12.6H94v21h55v12.6H80.5V0h68.7zm34.3 0h-17.8l63.8 79.4h17.9l-32-39.7 32-39.6h-17.9l-23 28.6-23-28.6zm18.3 56.7-9-11-27.1 33.7h17.8l18.3-22.7z"/><path fill="#000" d="M81 79.3 17 0H0v79.3h13.6V17l50.2 62.3H81Zm252.6-.4c-1 0-1.8-.4-2.5-1s-1.1-1.6-1.1-2.6.3-1.8 1-2.5 1.6-1 2.6-1 1.8.3 2.5 1a3.4 3.4 0 0 1 .6 4.3 3.7 3.7 0 0 1-3 1.8zm23.2-33.5h6v23.3c0 2.1-.4 4-1.3 5.5a9.1 9.1 0 0 1-3.8 3.5c-1.6.8-3.5 1.3-5.7 1.3-2 0-3.7-.4-5.3-1s-2.8-1.8-3.7-3.2c-.9-1.3-1.4-3-1.4-5h6c.1.8.3 1.6.7 2.2s1 1.2 1.6 1.5c.7.4 1.5.5 2.4.5 1 0 1.8-.2 2.4-.6a4 4 0 0 0 1.6-1.8c.3-.8.5-1.8.5-3V45.5zm30.9 9.1a4.4 4.4 0 0 0-2-3.3 7.5 7.5 0 0 0-4.3-1.1c-1.3 0-2.4.2-3.3.5-.9.4-1.6 1-2 1.6a3.5 3.5 0 0 0-.3 4c.3.5.7.9 1.3 1.2l1.8 1 2 .5 3.2.8c1.3.3 2.5.7 3.7 1.2a13 13 0 0 1 3.2 1.8 8.1 8.1 0 0 1 3 6.5c0 2-.5 3.7-1.5 5.1a10 10 0 0 1-4.4 3.5c-1.8.8-4.1 1.2-6.8 1.2-2.6 0-4.9-.4-6.8-1.2-2-.8-3.4-2-4.5-3.5a10 10 0 0 1-1.7-5.6h6a5 5 0 0 0 3.5 4.6c1 .4 2.2.6 3.4.6 1.3 0 2.5-.2 3.5-.6 1-.4 1.8-1 2.4-1.7a4 4 0 0 0 .8-2.4c0-.9-.2-1.6-.7-2.2a11 11 0 0 0-2.1-1.4l-3.2-1-3.8-1c-2.8-.7-5-1.7-6.6-3.2a7.2 7.2 0 0 1-2.4-5.7 8 8 0 0 1 1.7-5 10 10 0 0 1 4.3-3.5c2-.8 4-1.2 6.4-1.2 2.3 0 4.4.4 6.2 1.2 1.8.8 3.2 2 4.3 3.4 1 1.4 1.5 3 1.5 5h-5.8z"/></svg>
|
||||
|
After Width: | Height: | Size: 1.3 KiB |
@@ -0,0 +1 @@
|
||||
<svg fill="none" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1155 1000"><path d="m577.3 0 577.4 1000H0z" fill="#fff"/></svg>
|
||||
|
After Width: | Height: | Size: 128 B |
@@ -0,0 +1 @@
|
||||
<svg fill="none" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill-rule="evenodd" clip-rule="evenodd" d="M1.5 2.5h13v10a1 1 0 0 1-1 1h-11a1 1 0 0 1-1-1zM0 1h16v11.5a2.5 2.5 0 0 1-2.5 2.5h-11A2.5 2.5 0 0 1 0 12.5zm3.75 4.5a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5M7 4.75a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0m1.75.75a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5" fill="#666"/></svg>
|
||||
|
After Width: | Height: | Size: 385 B |
@@ -0,0 +1,33 @@
|
||||
#!/usr/bin/env node
|
||||
// broke's MCP server (stdio) for Claude Code sessions. Read-only money tools, acting as one signed-in user:
|
||||
// every call goes to broke's localhost /api/agent/tools with the session's BROKE_TOKEN, where RLS applies.
|
||||
import { Server } from "@modelcontextprotocol/sdk/server/index.js";
|
||||
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
||||
import { CallToolRequestSchema, ListToolsRequestSchema } from "@modelcontextprotocol/sdk/types.js";
|
||||
|
||||
const { BROKE_URL, BROKE_TOKEN } = process.env;
|
||||
if (!BROKE_URL || !BROKE_TOKEN) {
|
||||
console.error("broke-mcp: BROKE_URL and BROKE_TOKEN are required");
|
||||
process.exit(1);
|
||||
}
|
||||
const api = (init) =>
|
||||
fetch(`${BROKE_URL}/api/agent/tools`, { ...init, headers: { authorization: `Bearer ${BROKE_TOKEN}`, "content-type": "application/json" } });
|
||||
const expired = { content: [{ type: "text", text: "This broke session has expired. Open the chat in broke again." }], isError: true };
|
||||
|
||||
const server = new Server({ name: "broke", version: "1.0.0" }, { capabilities: { tools: {} } });
|
||||
|
||||
server.setRequestHandler(ListToolsRequestSchema, async () => {
|
||||
const res = await api({ method: "GET" });
|
||||
if (!res.ok) return { tools: [] };
|
||||
return { tools: (await res.json()).tools.map((t) => ({ ...t, annotations: { readOnlyHint: true } })) };
|
||||
});
|
||||
|
||||
server.setRequestHandler(CallToolRequestSchema, async (req) => {
|
||||
const res = await api({ method: "POST", body: JSON.stringify({ name: req.params.name, input: req.params.arguments ?? {} }) });
|
||||
if (res.status === 403) return expired;
|
||||
const body = await res.json().catch(() => ({}));
|
||||
if (!res.ok) return { content: [{ type: "text", text: JSON.stringify(body) }], isError: true };
|
||||
return { content: [{ type: "text", text: body.text }] };
|
||||
});
|
||||
|
||||
await server.connect(new StdioServerTransport());
|
||||
@@ -0,0 +1,33 @@
|
||||
// Live check of country-aware advice on Claude Code: a US and a UK throwaway user ask the same questions.
|
||||
// The US one should get an HSA question as buttons; the UK one must get no US accounts. Users deleted after.
|
||||
// Uses your Claude Code login (plan allowance). Usage: node --env-file=.env scripts/e2e-advice.mjs
|
||||
import { createClient } from "@supabase/supabase-js";
|
||||
import { randomBytes } from "node:crypto";
|
||||
|
||||
const BASE = process.argv[2] ?? "http://localhost:3000";
|
||||
const url = process.env.NEXT_PUBLIC_SUPABASE_URL;
|
||||
const ref = new URL(url).hostname.split(".")[0];
|
||||
const admin = createClient(url, process.env.SUPABASE_SERVICE_ROLE_KEY, { auth: { persistSession: false } });
|
||||
const US_TERMS = /401\(k\)|\b529\b|\bIRA\b|\bIRS\b|HSA[^.]*(eligible|contribut|open one(?! in))/;
|
||||
|
||||
for (const country of ["US", "GB"]) {
|
||||
const email = `advice-${country}-${Date.now()}@broke.test`, password = randomBytes(18).toString("base64url");
|
||||
const { data: created, error } = await admin.auth.admin.createUser({ email, password, email_confirm: true, user_metadata: { profile: { country, age: "30-39" } } });
|
||||
if (error) throw error;
|
||||
try {
|
||||
const anon = createClient(url, process.env.NEXT_PUBLIC_SUPABASE_PUBLISHABLE_KEY, { auth: { persistSession: false } });
|
||||
const { data: s } = await anon.auth.signInWithPassword({ email, password });
|
||||
const cookie = `sb-${ref}-auth-token=base64-${Buffer.from(JSON.stringify(s.session)).toString("base64url")}`;
|
||||
for (const q of ["Should I be using an HSA?", "I want to save a deposit for my first home. Where should I keep it?"]) {
|
||||
const res = await fetch(BASE + "/api/assistant", { method: "POST", headers: { cookie }, body: JSON.stringify({ provider: "claude", messages: [{ role: "user", content: q }] }) });
|
||||
const text = (await res.text()).replace(/\n?\u001e\S+\n/g, "").trim();
|
||||
const ask = text.match(/```ask\s*\n([\s\S]*?)```/)?.[1];
|
||||
console.log(`\n[${country}] > ${q} (${res.status})\n${text.slice(0, 900)}`);
|
||||
console.log(`ask block: ${ask ? "yes" : "no"}${ask ? " " + ask.trim() : ""}`);
|
||||
if (country !== "US") console.log(`US terms leaked: ${US_TERMS.test(text) ? "YES <-- " + text.match(US_TERMS)[0] : "no"}`);
|
||||
}
|
||||
} finally {
|
||||
await admin.auth.admin.deleteUser(created.user.id);
|
||||
}
|
||||
}
|
||||
console.log("\ntest users deleted");
|
||||
@@ -0,0 +1,36 @@
|
||||
// Live check of Ask broke on Claude Code: throwaway user -> sandbox bank -> two questions -> user deleted.
|
||||
// Uses your Claude Code login (plan allowance). Usage: node --env-file=.env scripts/e2e-assistant.mjs
|
||||
import { createClient } from "@supabase/supabase-js";
|
||||
import { randomBytes } from "node:crypto";
|
||||
|
||||
const BASE = process.argv[2] ?? "http://localhost:3000";
|
||||
const url = process.env.NEXT_PUBLIC_SUPABASE_URL;
|
||||
const ref = new URL(url).hostname.split(".")[0];
|
||||
const admin = createClient(url, process.env.SUPABASE_SERVICE_ROLE_KEY, { auth: { persistSession: false } });
|
||||
const email = `ai-${Date.now()}@broke.test`;
|
||||
const password = randomBytes(18).toString("base64url");
|
||||
const { data: created, error: ce } = await admin.auth.admin.createUser({ email, password, email_confirm: true });
|
||||
if (ce) throw ce;
|
||||
|
||||
try {
|
||||
const anon = createClient(url, process.env.NEXT_PUBLIC_SUPABASE_PUBLISHABLE_KEY, { auth: { persistSession: false } });
|
||||
const { data: s } = await anon.auth.signInWithPassword({ email, password });
|
||||
const cookie = `sb-${ref}-auth-token=base64-${Buffer.from(JSON.stringify(s.session)).toString("base64url")}`;
|
||||
const post = (p, body) => fetch(BASE + p, { method: "POST", redirect: "manual", headers: { cookie }, body: JSON.stringify(body) });
|
||||
|
||||
console.log("sandbox:", (await post("/api/plaid/sandbox", {})).status);
|
||||
const models = await (await fetch(BASE + "/api/models", { headers: { cookie } })).json();
|
||||
console.log("providers:", models.providers.map((p) => `${p.id}=${p.ready ? "ready" : p.reason}`).join(", "));
|
||||
|
||||
for (const q of ["How much did I spend on dining in the last 30 days?", "Run the shell command `ls` and show me the output."]) {
|
||||
const t0 = Date.now();
|
||||
const res = await post("/api/assistant", { provider: "claude", messages: [{ role: "user", content: q }] });
|
||||
const text = await res.text();
|
||||
console.log(`\n> ${q}\n[${res.status}, session ${res.headers.get("x-session-id") ? "yes" : "no"}, ${((Date.now() - t0) / 1000).toFixed(0)} s]`);
|
||||
console.log("status lines:", [...text.matchAll(/\u001e(\S+)/g)].map((m) => m[1]).join(", ") || "none");
|
||||
console.log(text.replace(/\n?\u001e\S+\n/g, "").trim().slice(0, 600));
|
||||
}
|
||||
} finally {
|
||||
await admin.auth.admin.deleteUser(created.user.id);
|
||||
console.log("\ntest user deleted");
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
// End-to-end smoke test against the running dev server: throwaway user -> sandbox bank -> pages -> delete user.
|
||||
// Usage: node --env-file=.env scripts/e2e-sandbox.mjs [http://localhost:3000]
|
||||
import { createClient } from "@supabase/supabase-js";
|
||||
import { randomBytes } from "node:crypto";
|
||||
|
||||
const BASE = process.argv[2] ?? "http://localhost:3000";
|
||||
const url = process.env.NEXT_PUBLIC_SUPABASE_URL;
|
||||
const ref = new URL(url).hostname.split(".")[0];
|
||||
const admin = createClient(url, process.env.SUPABASE_SERVICE_ROLE_KEY, { auth: { persistSession: false } });
|
||||
|
||||
const email = `e2e-${Date.now()}@broke.test`;
|
||||
const password = randomBytes(18).toString("base64url");
|
||||
const { data: created, error: ce } = await admin.auth.admin.createUser({ email, password, email_confirm: true });
|
||||
if (ce) throw ce;
|
||||
const uid = created.user.id;
|
||||
|
||||
try {
|
||||
const anon = createClient(url, process.env.NEXT_PUBLIC_SUPABASE_PUBLISHABLE_KEY, { auth: { persistSession: false } });
|
||||
const { data: s, error: se } = await anon.auth.signInWithPassword({ email, password });
|
||||
if (se) throw se;
|
||||
const cookie = `sb-${ref}-auth-token=base64-${Buffer.from(JSON.stringify(s.session)).toString("base64url")}`;
|
||||
const get = (p, init = {}) => fetch(BASE + p, { ...init, redirect: "manual", headers: { cookie, ...(init.headers ?? {}) } });
|
||||
|
||||
const link = await get("/api/plaid/sandbox", { method: "POST" });
|
||||
console.log("sandbox link:", link.status, await link.text());
|
||||
|
||||
// RLS check: this user must not be able to read the Plaid access token column.
|
||||
const authed = createClient(url, process.env.NEXT_PUBLIC_SUPABASE_PUBLISHABLE_KEY, {
|
||||
global: { headers: { Authorization: `Bearer ${s.session.access_token}` } },
|
||||
auth: { persistSession: false },
|
||||
});
|
||||
const tok = await authed.from("plaid_items").select("access_token");
|
||||
console.log("user can read access_token:", tok.error ? `no (${tok.error.code})` : "YES - LEAK");
|
||||
const own = await authed.from("transactions").select("id", { count: "exact", head: true });
|
||||
console.log("user sees own transactions:", own.count);
|
||||
|
||||
for (const p of ["/", "/transactions", "/spending", "/recurring", "/accounts"]) {
|
||||
const r = await get(p);
|
||||
const html = await r.text();
|
||||
console.log(p, r.status, /Application error|Unhandled Runtime Error|Internal Server Error/.test(html) ? "ERROR IN PAGE" : "ok");
|
||||
}
|
||||
} finally {
|
||||
await admin.auth.admin.deleteUser(uid); // cascades to the user's rows
|
||||
console.log("test user deleted");
|
||||
}
|
||||
@@ -0,0 +1,71 @@
|
||||
// Hover-state screenshots: spend chart crosshair, a month bar, a donut slice, a transaction row.
|
||||
// Usage: node --env-file=.env scripts/hover-shots.mjs <outdir>
|
||||
import { createClient } from "@supabase/supabase-js";
|
||||
import puppeteer from "puppeteer-core";
|
||||
import { randomBytes } from "node:crypto";
|
||||
|
||||
const BASE = "http://localhost:3000", OUT = process.argv[2] ?? "hover";
|
||||
const url = process.env.NEXT_PUBLIC_SUPABASE_URL, ref = new URL(url).hostname.split(".")[0];
|
||||
const admin = createClient(url, process.env.SUPABASE_SERVICE_ROLE_KEY, { auth: { persistSession: false } });
|
||||
const email = `hover-${Date.now()}@broke.test`, password = randomBytes(18).toString("base64url");
|
||||
const { data: c } = await admin.auth.admin.createUser({ email, password, email_confirm: true });
|
||||
const browser = await puppeteer.launch({ executablePath: "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome", headless: true });
|
||||
const wait = (ms) => new Promise((r) => setTimeout(r, ms));
|
||||
try {
|
||||
const anon = createClient(url, process.env.NEXT_PUBLIC_SUPABASE_PUBLISHABLE_KEY, { auth: { persistSession: false } });
|
||||
const { data: s } = await anon.auth.signInWithPassword({ email, password });
|
||||
const page = await browser.newPage();
|
||||
await page.setViewport({ width: 1440, height: 1000, deviceScaleFactor: 2 });
|
||||
await browser.setCookie({ name: `sb-${ref}-auth-token`, value: `base64-${Buffer.from(JSON.stringify(s.session)).toString("base64url")}`, domain: "localhost", path: "/" });
|
||||
await page.goto(BASE + "/");
|
||||
await page.evaluate(() => fetch("/api/plaid/sandbox", { method: "POST" }).then((r) => r.text()));
|
||||
|
||||
await page.goto(BASE + "/", { waitUntil: "networkidle0" }); await wait(1500);
|
||||
const chart = await page.$("svg[aria-label^='Cumulative']");
|
||||
const box = await chart.boundingBox();
|
||||
await page.mouse.move(box.x + box.width * 0.45, box.y + box.height * 0.5); await wait(300);
|
||||
await (await chart.evaluateHandle((n) => n.closest(".card"))).asElement().screenshot({ path: `${OUT}/chart-hover.png` });
|
||||
const row = await page.$("a.row-hover"); await row.hover(); await wait(300);
|
||||
await (await row.evaluateHandle((n) => n.closest(".card"))).asElement().screenshot({ path: `${OUT}/row-hover.png` });
|
||||
|
||||
await page.goto(BASE + "/spending", { waitUntil: "networkidle0" }); await wait(1500);
|
||||
const bars = await page.$$("a[aria-label*=': $']"); await bars[3].hover(); await wait(300);
|
||||
await (await bars[3].evaluateHandle((n) => n.closest(".card"))).asElement().screenshot({ path: `${OUT}/bars-hover.png` });
|
||||
const slice = await page.$("[data-slice]"); await slice.hover(); await wait(500);
|
||||
await (await slice.evaluateHandle((n) => n.closest(".card"))).asElement().screenshot({ path: `${OUT}/donut-hover.png` });
|
||||
await page.goto(BASE + "/transactions", { waitUntil: "networkidle0" }); await wait(800);
|
||||
await page.locator("button[aria-label='Categories']").click(); await wait(400);
|
||||
await page.keyboard.type("din"); await wait(300);
|
||||
await page.screenshot({ path: `${OUT}/dropdown.png`, clip: { x: 240, y: 60, width: 1200, height: 520 } });
|
||||
// Keyboard focus: tab into the page and capture the focus ring.
|
||||
await page.goto(BASE + "/", { waitUntil: "networkidle0" }); await wait(1200);
|
||||
for (let i = 0; i < 9; i++) await page.keyboard.press("Tab");
|
||||
await page.screenshot({ path: `${OUT}/focus.png`, clip: { x: 0, y: 0, width: 1440, height: 700 } });
|
||||
// Transaction row note editor open.
|
||||
await page.goto(BASE + "/transactions", { waitUntil: "networkidle0" }); await wait(800);
|
||||
await page.locator("button[title='Add a note']").click(); await wait(300);
|
||||
await page.screenshot({ path: `${OUT}/note.png`, clip: { x: 240, y: 60, width: 1200, height: 400 } });
|
||||
// Phone width: what can you do with a transaction?
|
||||
await page.setViewport({ width: 390, height: 844, deviceScaleFactor: 2 });
|
||||
await page.goto(BASE + "/transactions", { waitUntil: "networkidle0" }); await wait(800);
|
||||
await page.screenshot({ path: `${OUT}/txn-phone.png` });
|
||||
await page.locator("tbody tr").click(); await wait(400);
|
||||
await page.screenshot({ path: `${OUT}/sheet.png` });
|
||||
await page.locator("[role=dialog] button.btn").click(); await wait(600);
|
||||
await page.screenshot({ path: `${OUT}/toast.png` });
|
||||
await page.keyboard.press("Escape"); await wait(200);
|
||||
await page.goto(BASE + "/transactions", { waitUntil: "networkidle0" }); await wait(800);
|
||||
await page.locator("button[aria-label='Accounts']").click(); await wait(400);
|
||||
await page.screenshot({ path: `${OUT}/dropdown-phone.png` });
|
||||
await page.goto(BASE + "/", { waitUntil: "networkidle0" }); await wait(1200);
|
||||
await page.screenshot({ path: `${OUT}/dash-phone.png` });
|
||||
await page.locator("nav[aria-label=Main] button[aria-expanded]").click(); await wait(300);
|
||||
await page.screenshot({ path: `${OUT}/more-phone.png` });
|
||||
await page.goto(BASE + "/accounts", { waitUntil: "networkidle0" }); await wait(800);
|
||||
await page.screenshot({ path: `${OUT}/accounts-phone.png` });
|
||||
await page.goto(BASE + "/login", { waitUntil: "networkidle0" }); await wait(500);
|
||||
await page.screenshot({ path: `${OUT}/login-phone.png` });
|
||||
} finally {
|
||||
await browser.close();
|
||||
await admin.auth.admin.deleteUser(c.user.id);
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
// Applies pending database migrations. Usage: npm run migrate (reads SUPABASE_DB_URL from .env).
|
||||
import { migrate } from "../src/lib/migrate.ts";
|
||||
|
||||
const r = await migrate();
|
||||
if (!r.configured) {
|
||||
console.log("SUPABASE_DB_URL is not set in .env. Open http://localhost:3000/setup for where to find it.");
|
||||
process.exit(1);
|
||||
}
|
||||
if (r.error) {
|
||||
console.error(r.error);
|
||||
process.exit(1);
|
||||
}
|
||||
console.log(r.applied.length ? `Applied: ${r.applied.join(", ")}` : `Database is up to date (${r.total} migrations).`);
|
||||
@@ -0,0 +1,136 @@
|
||||
// End to end check of "AI and your data", as a throwaway sandbox user. Usage: node --env-file=.env scripts/privacy-e2e.mjs
|
||||
// Summary only: asks the chat through Claude Code and captures what broke's MCP tools handed the model, by pointing
|
||||
// the CLI's callback at a logging proxy on :3999 (the app picks the callback port from the request's Host).
|
||||
// Off: the chat is refused and no CLI starts. Also checks no Claude Code transcript is written. Deletes the user in finally.
|
||||
import { createClient } from "@supabase/supabase-js";
|
||||
import { cleanName } from "../src/lib/format.ts";
|
||||
import { bankEvent } from "../src/lib/privacy.ts";
|
||||
import http from "node:http";
|
||||
import { execSync } from "node:child_process";
|
||||
import { randomBytes } from "node:crypto";
|
||||
import { readdirSync } from "node:fs";
|
||||
import { homedir } from "node:os";
|
||||
import { join } from "node:path";
|
||||
|
||||
// The dev server (:3001) by default; BROKE_PORT=3000 for the production build.
|
||||
const APP = Number(process.env.BROKE_PORT ?? 3001), PROXY = 3999;
|
||||
const url = process.env.NEXT_PUBLIC_SUPABASE_URL, ref = new URL(url).hostname.split(".")[0];
|
||||
const admin = createClient(url, process.env.SUPABASE_SERVICE_ROLE_KEY, { auth: { persistSession: false } });
|
||||
const email = `privacy-${Date.now()}@broke.test`, password = randomBytes(18).toString("base64url");
|
||||
// Claude Code keeps transcripts per folder, named after the folder path (~/.broke/agent).
|
||||
const TRANSCRIPTS = join(homedir(), ".claude", "projects", join(homedir(), ".broke", "agent").replace(/[/.]/g, "-"));
|
||||
const count = () => { try { return readdirSync(TRANSCRIPTS).length; } catch { return 0; } };
|
||||
|
||||
const captured = []; // every /api/agent/tools exchange: { name, input, text }
|
||||
const forward = (req, body, headers = req.headers) =>
|
||||
new Promise((resolve, reject) => {
|
||||
const r = http.request({ host: "127.0.0.1", port: APP, path: req.url, method: req.method, headers: { ...headers, host: `127.0.0.1:${APP}` } }, (res) => {
|
||||
const chunks = [];
|
||||
res.on("data", (c) => chunks.push(c));
|
||||
res.on("end", () => resolve({ status: res.statusCode, headers: res.headers, body: Buffer.concat(chunks) }));
|
||||
});
|
||||
r.on("error", reject);
|
||||
r.end(body);
|
||||
});
|
||||
const proxy = http.createServer((req, res) => {
|
||||
const chunks = [];
|
||||
req.on("data", (c) => chunks.push(c));
|
||||
req.on("end", async () => {
|
||||
const body = Buffer.concat(chunks);
|
||||
const out = await forward(req, body);
|
||||
if (req.url.startsWith("/api/agent/tools") && req.method === "POST") {
|
||||
const sent = JSON.parse(body.toString() || "{}");
|
||||
captured.push({ name: sent.name, input: sent.input, status: out.status, text: JSON.parse(out.body.toString() || "{}").text });
|
||||
}
|
||||
res.writeHead(out.status, { "content-type": out.headers["content-type"] ?? "application/json" });
|
||||
res.end(out.body);
|
||||
});
|
||||
});
|
||||
await new Promise((r) => proxy.listen(PROXY, "127.0.0.1", r));
|
||||
|
||||
// Chat as the browser does, but with Host :3999 so the MCP callback goes through the proxy.
|
||||
const chat = (cookie, q) =>
|
||||
new Promise((resolve, reject) => {
|
||||
const r = http.request({ host: "127.0.0.1", port: APP, path: "/api/assistant", method: "POST", headers: { host: `127.0.0.1:${PROXY}`, cookie, "content-type": "application/json" } }, (res) => {
|
||||
let text = "";
|
||||
res.on("data", (c) => (text += c));
|
||||
res.on("end", () => resolve({ status: res.statusCode, text }));
|
||||
});
|
||||
r.on("error", reject);
|
||||
r.end(JSON.stringify({ provider: "claude", messages: [{ role: "user", content: q }] }));
|
||||
});
|
||||
const claudeProcs = () => Number(execSync("pgrep -f 'no-session-persistence' | wc -l").toString().trim() || 0);
|
||||
|
||||
const { data: c, error: ce } = await admin.auth.admin.createUser({ email, password, email_confirm: true, user_metadata: { profile: { country: "US", notes: "my secret note about rent" } } });
|
||||
if (ce) throw ce;
|
||||
const uid = c.user.id;
|
||||
let failed = false;
|
||||
const check = (ok, what) => (console.log(`${ok ? "ok " : "FAIL"} ${what}`), ok || (failed = true));
|
||||
try {
|
||||
const anon = createClient(url, process.env.NEXT_PUBLIC_SUPABASE_PUBLISHABLE_KEY, { auth: { persistSession: false } });
|
||||
const { data: s } = await anon.auth.signInWithPassword({ email, password });
|
||||
const cookie = `sb-${ref}-auth-token=base64-${Buffer.from(JSON.stringify(s.session)).toString("base64url")}`;
|
||||
const link = await fetch(`http://127.0.0.1:${APP}/api/plaid/sandbox`, { method: "POST", headers: { cookie } });
|
||||
console.log("sandbox bank:", link.status);
|
||||
for (let i = 0; i < 30; i++) {
|
||||
const { count: n } = await admin.from("transactions").select("id", { count: "exact", head: true }).eq("user_id", uid);
|
||||
const { count: r } = await admin.from("recurring").select("id", { count: "exact", head: true }).eq("user_id", uid);
|
||||
if (n > 20 && r > 0) break;
|
||||
await new Promise((r) => setTimeout(r, 2000));
|
||||
}
|
||||
|
||||
// What must never reach the model.
|
||||
const [{ data: txns }, { data: accts }, { data: recur }] = await Promise.all([
|
||||
admin.from("transactions").select("name, merchant_name, amount, date").eq("user_id", uid),
|
||||
admin.from("accounts").select("name, custom_name, mask").eq("user_id", uid),
|
||||
admin.from("recurring").select("merchant_name").eq("user_id", uid),
|
||||
]);
|
||||
const merchants = new Set([...txns.flatMap((t) => [t.merchant_name, cleanName(t.name)]), ...recur.map((r) => r.merchant_name)].filter((n) => n && n.length >= 4));
|
||||
const masks = new Set(accts.map((a) => a.mask).filter(Boolean));
|
||||
const acctNames = new Set(accts.flatMap((a) => [a.name, a.custom_name]).filter((n) => n && n.length >= 4));
|
||||
const exact = new Set(txns.map((t) => Math.abs(Number(t.amount))).filter((n) => !Number.isInteger(n)).map((n) => n.toFixed(2)));
|
||||
console.log(`user has ${txns.length} transactions, ${merchants.size} merchant names, ${masks.size} masks, ${exact.size} amounts with cents`);
|
||||
|
||||
// 1. Summary only (the default) through Claude Code.
|
||||
const before = count();
|
||||
const q = "Which merchants did I spend the most at in the last two months, and which recurring charges do I have? Name them.";
|
||||
const reply = await chat(cookie, q);
|
||||
console.log("\n--- reply shown to the user ---\n" + reply.text.replace(/\u001e/g, "> ") + "\n--- end reply ---\n");
|
||||
console.log(`--- ${captured.length} MCP tool results the model got ---`);
|
||||
for (const t of captured) console.log(`# ${t.name} ${JSON.stringify(t.input)}\n${t.text}\n`);
|
||||
const all = captured.map((t) => t.text ?? "").join("\n");
|
||||
const lower = all.toLowerCase();
|
||||
check(reply.status === 200, "chat answered in summary mode");
|
||||
check(captured.length > 0, "the model called broke's tools");
|
||||
// Bank events ("Interest", "Payment") go to the model as what they are ("card or loan interest"), by design.
|
||||
const leakedNames = [...[...merchants].filter((n) => !bankEvent(n)), ...acctNames].filter((n) => lower.includes(n.toLowerCase()));
|
||||
check(!leakedNames.length, `no merchant or account names in tool results${leakedNames.length ? `: ${leakedNames.join(", ")}` : ""}`);
|
||||
// A mask would be a string ("1111", "••1111"); rounded totals are bare numbers and can look the same.
|
||||
const leakedMasks = [...masks].filter((m) => new RegExp(`["•*x]${m}"|mask`).test(all));
|
||||
check(!leakedMasks.length, `no account masks${leakedMasks.length ? `: ${leakedMasks.join(", ")}` : ""}`);
|
||||
const leakedAmounts = [...exact].filter((a) => all.includes(a));
|
||||
check(!leakedAmounts.length, `no exact amounts${leakedAmounts.length ? `: ${leakedAmounts.slice(0, 5).join(", ")}` : ""}`);
|
||||
check(!/\b\d{4}-\d{2}-\d{2}\b/.test(all), "no day-level dates");
|
||||
check(!/secret note/.test(all), "no profile notes");
|
||||
const placeholders = [...new Set(all.match(/⟨[MSIAHL]\d+⟩/g) ?? [])];
|
||||
check(placeholders.length > 0, `tool results used placeholders (${placeholders.slice(0, 6).join(", ")})`);
|
||||
check(!/⟨[^⟩]*⟩|\b(?:Merchant [A-Z]{1,2}|Subscriptions? \d+)\b/.test(reply.text), "reply has no placeholders left");
|
||||
const shown = [...merchants].filter((n) => reply.text.toLowerCase().includes(n.toLowerCase()));
|
||||
check(shown.length > 0, `reply names real merchants, swapped back on this Mac (${shown.slice(0, 5).join(", ")})`);
|
||||
check(count() === before, `no Claude Code transcript written (${count()} files before and after)`);
|
||||
|
||||
// 2. Off: refused before any CLI starts.
|
||||
await admin.auth.admin.updateUserById(uid, { user_metadata: { ...c.user.user_metadata, ai_mode: "off" } });
|
||||
captured.length = 0;
|
||||
const procs = claudeProcs();
|
||||
const off = await chat(cookie, "How much did I spend?");
|
||||
check(off.status === 403, `Off: chat refused (${off.status} ${off.text})`);
|
||||
check(captured.length === 0 && claudeProcs() <= procs, "Off: no CLI started and no tool called");
|
||||
const ci = await fetch(`http://127.0.0.1:${APP}/api/checkins`, { method: "POST", headers: { cookie, "content-type": "application/json" }, body: JSON.stringify({ refresh: true }) }).then((r) => r.json());
|
||||
check(ci.summary === null && ci.provider === null, "Off: check-in written from plain facts, no model");
|
||||
} finally {
|
||||
await admin.auth.admin.deleteUser(uid);
|
||||
proxy.close();
|
||||
console.log(failed ? "\nprivacy e2e: FAILED" : "\nprivacy e2e: ok");
|
||||
process.exitCode = failed ? 1 : 0;
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
// Screenshots of "AI and your data" as a throwaway sandbox user: the Settings card, the "What Claude sees" modal and
|
||||
// the chat panel line, light and dark, 1440 and 390 wide, at 2x. Usage: node --env-file=.env scripts/privacy-shots.mjs <outdir>
|
||||
import { createClient } from "@supabase/supabase-js";
|
||||
import puppeteer from "puppeteer-core";
|
||||
import { mkdirSync } from "node:fs";
|
||||
import { randomBytes } from "node:crypto";
|
||||
|
||||
const BASE = "http://localhost:3000", OUT = process.argv[2] ?? ".context/privacy";
|
||||
mkdirSync(OUT, { recursive: true });
|
||||
const url = process.env.NEXT_PUBLIC_SUPABASE_URL, ref = new URL(url).hostname.split(".")[0];
|
||||
const admin = createClient(url, process.env.SUPABASE_SERVICE_ROLE_KEY, { auth: { persistSession: false } });
|
||||
const email = `shots-${Date.now()}@broke.test`, password = randomBytes(18).toString("base64url");
|
||||
const { data: c } = await admin.auth.admin.createUser({ email, password, email_confirm: true, user_metadata: { profile: { country: "US" } } });
|
||||
const browser = await puppeteer.launch({ executablePath: "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome", headless: true });
|
||||
const wait = (ms) => new Promise((r) => setTimeout(r, ms));
|
||||
try {
|
||||
const anon = createClient(url, process.env.NEXT_PUBLIC_SUPABASE_PUBLISHABLE_KEY, { auth: { persistSession: false } });
|
||||
const { data: s } = await anon.auth.signInWithPassword({ email, password });
|
||||
await browser.setCookie({ name: `sb-${ref}-auth-token`, value: `base64-${Buffer.from(JSON.stringify(s.session)).toString("base64url")}`, domain: "localhost", path: "/" });
|
||||
const page = await browser.newPage();
|
||||
page.on("pageerror", (e) => console.log("page error:", String(e).slice(0, 300)));
|
||||
await page.goto(BASE + "/");
|
||||
await page.evaluate(() => fetch("/api/plaid/sandbox", { method: "POST" }).then((r) => r.text()));
|
||||
await wait(8000); // let the sync land so the summary has data
|
||||
|
||||
for (const width of [1440, 390])
|
||||
for (const theme of ["light", "dark"]) {
|
||||
const tag = `${width}-${theme}`;
|
||||
await page.setViewport({ width, height: width > 500 ? 1000 : 844, deviceScaleFactor: 2 });
|
||||
await page.emulateMediaFeatures([{ name: "prefers-color-scheme", value: theme }]);
|
||||
await page.goto(BASE + "/settings#ai", { waitUntil: "networkidle0" });
|
||||
await page.evaluate((t) => document.documentElement.setAttribute("data-theme", t), theme);
|
||||
await wait(1200);
|
||||
// The phone tab bar is fixed over the bottom of the page: hide it so the card and its button show.
|
||||
await page.evaluate(() => document.querySelectorAll("body *").forEach((e) => getComputedStyle(e).position === "fixed" && e.tagName !== "DIALOG" && (e.style.visibility = "hidden")));
|
||||
const card = await page.waitForSelector("::-p-xpath(//section[.//h3[text()='AI and your data']])");
|
||||
await card.screenshot({ path: `${OUT}/settings-card-${tag}.png` });
|
||||
|
||||
await page.locator("::-p-text(What Claude sees)").click();
|
||||
await page.waitForSelector("dialog[open] pre", { timeout: 30000 });
|
||||
await wait(500);
|
||||
const modal = await page.$("dialog[open] > div");
|
||||
await modal.screenshot({ path: `${OUT}/what-claude-sees-${tag}.png` });
|
||||
await page.keyboard.press("Escape");
|
||||
await wait(300);
|
||||
|
||||
await page.goto(BASE + "/", { waitUntil: "networkidle0" });
|
||||
await page.evaluate((t) => document.documentElement.setAttribute("data-theme", t), theme);
|
||||
await page.evaluate(() => [...document.querySelectorAll("button")].find((b) => /ask broke|broke ai|ask ai/i.test(b.textContent ?? "") && b.offsetParent)?.click());
|
||||
await page.waitForSelector('dialog[aria-label="broke ai chat"] header');
|
||||
await wait(800);
|
||||
const panel = await page.$('dialog[aria-label="broke ai chat"] > div');
|
||||
const height = await page.evaluate(() => {
|
||||
const h = document.querySelector('dialog[aria-label="broke ai chat"] header');
|
||||
return h.nextElementSibling.getBoundingClientRect().bottom - h.getBoundingClientRect().top + 24;
|
||||
});
|
||||
const { width: w } = await panel.boundingBox();
|
||||
await panel.screenshot({ path: `${OUT}/chat-line-${tag}.png`, clip: { x: 0, y: 0, width: w, height } });
|
||||
}
|
||||
} finally {
|
||||
await browser.close();
|
||||
await admin.auth.admin.deleteUser(c.user.id);
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
// Screenshots each page as a throwaway sandbox user. Usage: node --env-file=.env scripts/screens.mjs <outdir>
|
||||
import { createClient } from "@supabase/supabase-js";
|
||||
import puppeteer from "puppeteer-core";
|
||||
import { randomBytes } from "node:crypto";
|
||||
|
||||
const BASE = "http://localhost:3000", OUT = process.argv[2] ?? "screens";
|
||||
const url = process.env.NEXT_PUBLIC_SUPABASE_URL, ref = new URL(url).hostname.split(".")[0];
|
||||
const admin = createClient(url, process.env.SUPABASE_SERVICE_ROLE_KEY, { auth: { persistSession: false } });
|
||||
const email = `shots-${Date.now()}@broke.test`, password = randomBytes(18).toString("base64url");
|
||||
const { data: c } = await admin.auth.admin.createUser({ email, password, email_confirm: true, user_metadata: { profile: { country: "US" } } });
|
||||
const browser = await puppeteer.launch({ executablePath: "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome", headless: true });
|
||||
try {
|
||||
const anon = createClient(url, process.env.NEXT_PUBLIC_SUPABASE_PUBLISHABLE_KEY, { auth: { persistSession: false } });
|
||||
const { data: s } = await anon.auth.signInWithPassword({ email, password });
|
||||
const value = `base64-${Buffer.from(JSON.stringify(s.session)).toString("base64url")}`;
|
||||
const page = await browser.newPage();
|
||||
// Surface client errors (the dev overlay's "Issue" badge) in the run output.
|
||||
page.on("console", (m) => m.type() === "error" && console.log("console error:", page.url(), m.text().slice(0, 1500)));
|
||||
page.on("response", (r) => r.status() >= 400 && console.log("http", r.status(), r.url().replace(/\?.*/, "")));
|
||||
page.on("pageerror", (e) => console.log("page error:", page.url(), String(e).slice(0, 300)));
|
||||
await page.setViewport({ width: Number(process.env.WIDTH ?? 1440), height: 1000, deviceScaleFactor: 1 });
|
||||
await browser.setCookie({ name: `sb-${ref}-auth-token`, value, domain: "localhost", path: "/" });
|
||||
await page.goto(BASE + "/");
|
||||
if (!process.env.EMPTY) await page.evaluate(() => fetch("/api/plaid/sandbox", { method: "POST" }).then((r) => r.text())); // EMPTY=1: a brand-new user with no bank
|
||||
for (const p of (process.env.PAGES ? process.env.PAGES.split(",") : ["/", "/spending", "/transactions", "/recurring", "/accounts", "/optimize", "/insights", "/budgets"])) {
|
||||
await page.goto(BASE + p, { waitUntil: "networkidle0" });
|
||||
await new Promise((r) => setTimeout(r, 1200)); // let entrance animations finish
|
||||
await page.screenshot({ path: `${OUT}/${p === "/" ? "dashboard" : p.slice(1)}.png`, fullPage: true });
|
||||
}
|
||||
await page.goto(BASE + "/", { waitUntil: "networkidle0" });
|
||||
await page.locator("::-p-text(Ask broke)").click();
|
||||
await page.waitForSelector("dialog textarea");
|
||||
await page.screenshot({ path: `${OUT}/assistant-panel.png` });
|
||||
} finally {
|
||||
await browser.close();
|
||||
await admin.auth.admin.deleteUser(c.user.id);
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
#!/usr/bin/env node
|
||||
// Starts broke on this computer and opens it. Before the keys are in, it runs in development mode: the setup page saves
|
||||
// keys and the server picks them up without a restart. After that it runs the faster production build.
|
||||
import { spawn, spawnSync } from "node:child_process";
|
||||
import { existsSync, readFileSync } from "node:fs";
|
||||
import { dirname, join } from "node:path";
|
||||
import { fileURLToPath } from "node:url";
|
||||
|
||||
const root = join(dirname(fileURLToPath(import.meta.url)), "..");
|
||||
process.chdir(root);
|
||||
if (Number(process.versions.node.split(".")[0]) < 20) {
|
||||
console.error(`broke needs Node.js 20 or newer (this is ${process.version}). Get it from https://nodejs.org`);
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
const win = process.platform === "win32";
|
||||
const npm = (...args) => spawnSync("npm", args, { stdio: "inherit", shell: win }).status === 0;
|
||||
if (!existsSync("node_modules") && !npm("install")) process.exit(1);
|
||||
|
||||
const env = {};
|
||||
for (const f of [".env", ".env.local"]) {
|
||||
if (!existsSync(f)) continue;
|
||||
for (const m of readFileSync(f, "utf8").matchAll(/^([A-Z0-9_]+)=(.*)$/gm)) env[m[1]] = m[2].trim();
|
||||
}
|
||||
const isSet = (v) => !!v && !/^your[_-]|your-project|YOUR-PASSWORD/.test(v); // same rule as lib/setup.ts
|
||||
const ready = ["NEXT_PUBLIC_SUPABASE_URL", "NEXT_PUBLIC_SUPABASE_PUBLISHABLE_KEY", "SUPABASE_SERVICE_ROLE_KEY"].every((k) => isSet(env[k]));
|
||||
|
||||
const port = process.env.PORT || "3000";
|
||||
const url = `http://localhost:${port}${ready ? "" : "/setup"}`;
|
||||
const openIt = () => { if (!process.env.BROKE_NO_OPEN) spawn(win ? "cmd" : process.platform === "darwin" ? "open" : "xdg-open", win ? ["/c", "start", url] : [url], { stdio: "ignore", detached: true }).on("error", () => {}).unref(); };
|
||||
// Started twice: open the one already running instead of failing on a busy port.
|
||||
if (await fetch(url, { redirect: "manual" }).then(() => true, () => false)) {
|
||||
console.log(`broke is already running at ${url}.`);
|
||||
openIt();
|
||||
process.exit(0);
|
||||
}
|
||||
if (ready && !npm("run", "build")) process.exit(1);
|
||||
const next = join("node_modules", ".bin", win ? "next.cmd" : "next");
|
||||
// Listens on this computer only, which is what makes saving keys from the page safe (writeGate checks the rest).
|
||||
const args = ready ? ["start", "-H", "127.0.0.1", "-p", port] : ["dev", "--turbopack", "-H", "127.0.0.1", "-p", port];
|
||||
const server = spawn(next, args, { stdio: "inherit", shell: win, env: { ...process.env, ALLOW_SETUP_WRITES: "1" } });
|
||||
server.on("exit", (code) => process.exit(code ?? 0));
|
||||
process.on("SIGINT", () => server.kill("SIGINT"));
|
||||
|
||||
for (let i = 0; i < 60; i++) {
|
||||
await new Promise((r) => setTimeout(r, 1000));
|
||||
const up = await fetch(url, { redirect: "manual" }).then(() => true, () => false);
|
||||
if (!up) continue;
|
||||
console.log(`\nbroke is running at ${url}. Press Ctrl+C to stop it.\n`);
|
||||
openIt();
|
||||
break;
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
#!/usr/bin/env node
|
||||
// Brings in the latest broke, keeping your own changes. Your data and keys aren't touched.
|
||||
// A copy made by Vercel's deploy button starts with a new history, so git can't see it came from broke. The first update
|
||||
// finds the broke commit it was copied from and joins the two, so only real differences get merged.
|
||||
import { spawnSync } from "node:child_process";
|
||||
|
||||
const UPSTREAM = process.env.BROKE_REPO || "https://github.com/nextwork-projects/broke.git";
|
||||
const ci = process.argv.includes("--ci"); // GitHub's update button: it pushes, and Vercel does the install
|
||||
const inherit = { stdio: "inherit", shell: process.platform === "win32" };
|
||||
const run = (...args) => spawnSync("git", args, inherit).status === 0;
|
||||
const out = (...args) => spawnSync("git", args, { encoding: "utf8" }).stdout.trim();
|
||||
const fail = (m) => { console.error(`\n${m}`); process.exit(1); };
|
||||
|
||||
if (out("status", "--porcelain")) fail("You have changes that aren't committed. Commit them first: git add -A && git commit -m \"My changes\"");
|
||||
if (!run("fetch", "--quiet", UPSTREAM, "main")) fail("Couldn't reach broke's repo. Check your connection and try again.");
|
||||
const theirs = out("rev-parse", "FETCH_HEAD");
|
||||
if (!out("merge-base", "HEAD", theirs)) {
|
||||
const start = out("rev-list", "--max-parents=0", "HEAD").split("\n")[0];
|
||||
const tree = out("rev-parse", `${start}^{tree}`);
|
||||
const from = out("log", "--format=%H %T", theirs).split("\n").map((l) => l.split(" ")).find(([, t]) => t === tree)?.[0];
|
||||
if (!from) fail("Couldn't tell which version of broke this copy started from. Run `claude` here and ask it to merge " + UPSTREAM);
|
||||
const joined = out("commit-tree", "HEAD^{tree}", "-p", "HEAD", "-p", from, "-m", "Join this copy to broke's history");
|
||||
if (!run("merge", "--quiet", "--ff-only", joined)) fail("Couldn't join this copy to broke's history.");
|
||||
}
|
||||
if (!run("merge", "--no-edit", theirs)) fail("Your changes and the update touch the same lines. Run `claude` here and ask it to resolve the merge.");
|
||||
if (!ci && spawnSync("npm", ["install"], inherit).status !== 0) process.exit(1);
|
||||
console.log(ci ? "\nUpdated." : "\nUpdated. Start broke again to use it. New database changes apply when it starts.");
|
||||
@@ -0,0 +1,30 @@
|
||||
import Link from "next/link";
|
||||
import { AddAccounts } from "@/components/AddAccounts";
|
||||
import { LinkedNow } from "@/components/LinkedNow";
|
||||
import { countryOf, wantsAkahu } from "@/lib/countries";
|
||||
import { getUser } from "@/lib/data";
|
||||
import { addChoices } from "@/lib/providers";
|
||||
|
||||
// A page, not a modal: Plaid Link draws its own overlay, and an open <dialog> would make it inert.
|
||||
export default async function AddAccountsPage({ searchParams }: { searchParams: Promise<{ connect?: string }> }) {
|
||||
const { supabase, user } = await getUser();
|
||||
const { connect } = await searchParams;
|
||||
const country = countryOf(user?.user_metadata?.profile?.country);
|
||||
const choices = addChoices(country.code, wantsAkahu(user?.user_metadata?.profile));
|
||||
const { data: manual } = await supabase.from("accounts").select("id, name, custom_name, mask").eq("manual", true).eq("user_id", user!.id);
|
||||
const accounts = (manual ?? []).map((a) => ({ id: a.id, label: `${a.custom_name || a.name}${a.mask ? ` ··${a.mask}` : ""}` }));
|
||||
return (
|
||||
<div className="space-y-6 max-w-4xl">
|
||||
<Link href="/accounts" className="inline-block text-sm text-muted hover:text-ink px-1">Back to accounts</Link>
|
||||
<LinkedNow userId={user!.id} profile={user?.user_metadata?.profile} />
|
||||
{connect === "done" && <p className="card px-5 py-3 text-sm" role="status">Your bank is connected. Its transactions are on the way.</p>}
|
||||
{connect === "cancelled" && <p className="card px-5 py-3 text-sm" role="status">The connection was cancelled. Nothing changed.</p>}
|
||||
{connect === "failed" && <p className="card px-5 py-3 text-sm text-bad" role="alert">That bank didn't connect. Try again, or import a statement instead.</p>}
|
||||
{!choices.bank && !choices.feeds.length && !choices.akahuMissing && !choices.alsoAkahu && <p className="text-sm text-muted px-1">Automatic bank linking isn't available in {country.name} yet. Import a statement from your bank instead: it takes a minute and works with any bank.</p>}
|
||||
<AddAccounts choices={choices} accounts={accounts} locale={country.locale} currency={country.currency} country={country.code} />
|
||||
{choices.akahuMissing && (
|
||||
<p className="text-sm text-muted px-1">To sync NZ banks automatically, add Akahu keys on the <a href="/setup" className="underline underline-offset-2">Setup page</a>. Until then, import a statement from your bank.</p>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,185 @@
|
||||
import { Banknote, BarChart3, Bitcoin, Car, CreditCard, Gem, HandCoins, House, Landmark, type LucideIcon } from "lucide-react";
|
||||
import Link from "next/link";
|
||||
import { AccountToggle } from "@/components/AccountToggle";
|
||||
import { HoldingFee } from "@/components/HoldingFee";
|
||||
import { CardArt } from "@/components/CardArt";
|
||||
import { Merchant } from "@/components/Merchant";
|
||||
import { ownedCards } from "@/lib/cards";
|
||||
import { ConnectionActions, SyncButton } from "@/components/PlaidButtons";
|
||||
import { getUser } from "@/lib/data";
|
||||
import { money, money0, plural } from "@/lib/format";
|
||||
|
||||
type Holding = { id: string; name: string | null; ticker: string | null; type: string | null; quantity: number | null; value: number | null; cost_basis: number | null };
|
||||
type Account = { id: string; name: string; official_name?: string | null; custom_name: string | null; mask: string | null; type: string; subtype: string | null; current_balance: number | null; currency: string | null; home: number | null; included: boolean; holdings: Holding[] };
|
||||
type Item = {
|
||||
id: string;
|
||||
institution_name: string | null;
|
||||
institution_logo: string | null;
|
||||
institution_color: string | null;
|
||||
last_synced_at: string | null;
|
||||
status?: string;
|
||||
error?: string | null;
|
||||
provider?: string;
|
||||
accounts: Account[];
|
||||
};
|
||||
|
||||
const GROUPS: { type: string; label: string; icon: LucideIcon; debt: boolean }[] = [
|
||||
{ type: "depository", label: "Cash", icon: Landmark, debt: false },
|
||||
{ type: "investment", label: "Investments", icon: BarChart3, debt: false },
|
||||
{ type: "other", label: "Property and other", icon: Gem, debt: false }, // manual cars, homes, valuables (Add accounts)
|
||||
{ type: "credit", label: "Credit cards", icon: CreditCard, debt: true },
|
||||
{ type: "loan", label: "Loans", icon: HandCoins, debt: true },
|
||||
];
|
||||
|
||||
// Plaid subtypes are lowercase codes ("hsa", "401k", "roth"); everything else just gets capitalised.
|
||||
const SUBTYPES: Record<string, string> = { hsa: "HSA", "401k": "401(k)", "403b": "403(b)", "457b": "457(b)", ira: "IRA", roth: "Roth IRA", "roth 401k": "Roth 401(k)", "529": "529", sep: "SEP IRA", "simple ira": "SIMPLE IRA", brokerage: "Brokerage", cd: "CD" };
|
||||
// Manual accounts keep the kind picked on Add accounts as their subtype.
|
||||
const MANUAL_ICON: Record<string, LucideIcon> = { vehicle: Car, property: House, crypto: Bitcoin, cash: Banknote, other: Gem };
|
||||
// Plaid's cash position inside a brokerage ("CUR:USD U S Dollar").
|
||||
const isCash = (h: Holding) => h.type === "cash" || /^(CASH|CUR:)/.test(h.ticker ?? "");
|
||||
// What a connection holds, so two from the same bank read apart: "Cash, credit cards and loans".
|
||||
const holds = (accounts: Account[]) => {
|
||||
const ls = GROUPS.filter((g) => accounts.some((a) => a.type === g.type)).map((g, i) => (i ? g.label.toLowerCase() : g.label));
|
||||
return ls.length > 1 ? `${ls.slice(0, -1).join(", ")} and ${ls.at(-1)}` : ls[0] ?? "";
|
||||
};
|
||||
const subtypeLabel = (s: string) => SUBTYPES[s] ?? s.charAt(0).toUpperCase() + s.slice(1);
|
||||
|
||||
const ago = (iso: string) => {
|
||||
const m = Math.round((Date.now() - new Date(iso).getTime()) / 60000);
|
||||
return m < 1 ? "just now" : m < 60 ? `${m} min ago` : m < 1440 ? `${Math.round(m / 60)} h ago` : `${Math.round(m / 1440)} d ago`;
|
||||
};
|
||||
|
||||
export default async function Accounts() {
|
||||
const { supabase, user } = await getUser();
|
||||
// Manual accounts (from "Add transaction") have no Plaid item; balance (migration 0014) is the starting balance less what went out.
|
||||
const [{ data }, { data: manual }] = await Promise.all([
|
||||
supabase
|
||||
.from("plaid_items")
|
||||
.select("id, institution_name, institution_logo, institution_color, last_synced_at, status, error, provider, accounts(id, name, official_name, custom_name, mask, type, subtype, current_balance, currency, home:home_balance, included, holdings(id, name, ticker, type, quantity, value, cost_basis))")
|
||||
.order("created_at"),
|
||||
supabase.from("accounts").select("id, name, custom_name, mask, type, subtype, current_balance:balance, currency, home:home_balance, included").eq("manual", true).eq("user_id", user!.id),
|
||||
]);
|
||||
const items = (data ?? []) as unknown as Item[];
|
||||
const manualItem = { id: "manual", institution_name: "Added by you", institution_logo: null, institution_color: null, last_synced_at: null, accounts: [] };
|
||||
const all = [
|
||||
...items.flatMap((i) => i.accounts.map((a) => ({ ...a, item: i }))),
|
||||
...((manual ?? []) as unknown as Account[]).map((a) => ({ ...a, holdings: [], item: manualItem })),
|
||||
];
|
||||
const sum = (debt: boolean) =>
|
||||
all.filter((a) => a.included && GROUPS.find((g) => g.type === a.type)?.debt === debt).reduce((s, a) => s + Number(a.home ?? 0), 0);
|
||||
const assets = sum(false);
|
||||
const debts = sum(true);
|
||||
|
||||
return (
|
||||
<div className="space-y-6 max-w-4xl">
|
||||
<div className="flex gap-2 items-start flex-wrap">
|
||||
<Link href="/accounts/add" className="btn-primary">Add account</Link>
|
||||
{!!items.length && <SyncButton />}
|
||||
</div>
|
||||
|
||||
{!!all.length && (
|
||||
<section className="card grid grid-cols-1 @md:grid-cols-3 divide-y @md:divide-y-0 @md:divide-x divide-line">
|
||||
{[
|
||||
["Assets", assets, ""],
|
||||
["Debts", debts, "text-bad"],
|
||||
["Net worth", assets - debts, ""],
|
||||
].map(([label, v, cls]) => (
|
||||
<div key={label as string} className="px-6 py-4 @md:py-6">
|
||||
<div className="section-label">{label}</div>
|
||||
<div className={`text-2xl font-semibold tracking-[-0.02em] tabular mt-1 ${cls}`}>{money0(v as number)}</div>
|
||||
</div>
|
||||
))}
|
||||
</section>
|
||||
)}
|
||||
|
||||
{GROUPS.map(({ type, label, icon: Icon, debt }) => {
|
||||
const rows = all.filter((a) => a.type === type);
|
||||
if (!rows.length) return null;
|
||||
const total = rows.filter((a) => a.included).reduce((s, a) => s + Number(a.home ?? 0), 0);
|
||||
return (
|
||||
<div key={type} className="space-y-3">
|
||||
<div className="flex justify-between px-1">
|
||||
<span className="section-label">{label}</span>
|
||||
<span className={`text-sm tabular font-medium ${debt ? "text-bad" : ""}`}>{money(total)}</span>
|
||||
</div>
|
||||
<section className="card overflow-hidden">
|
||||
{rows.map((a) => (
|
||||
<div key={a.id} className={`border-b border-line last:border-0 ${a.included ? "" : "opacity-50"}`}>
|
||||
<div className="row-hover flex items-center gap-4 px-6 py-4">
|
||||
{(() => {
|
||||
const card = a.type === "credit" ? ownedCards([a])[0] : undefined;
|
||||
if (card) return <CardArt card={card} w="w-14" />;
|
||||
const RowIcon = (a.item.id === "manual" && a.subtype && MANUAL_ICON[a.subtype]) || Icon;
|
||||
return <span className="size-9 rounded-full bg-canvas grid place-items-center shrink-0"><RowIcon size={17} strokeWidth={1.6} aria-hidden /></span>;
|
||||
})()}
|
||||
<div className="flex-1 min-w-0">
|
||||
<div className="truncate">{a.custom_name || a.name} <span className="text-muted">{a.mask ? `··${a.mask}` : ""}</span></div>
|
||||
<div className="text-xs text-muted">{a.item.institution_name}{a.subtype ? ` · ${subtypeLabel(a.subtype)}` : ""}</div>
|
||||
</div>
|
||||
<span className="tabular font-medium">{money(a.current_balance, a.currency)}</span>
|
||||
<AccountToggle id={a.id} included={a.included} name={a.custom_name || a.name} />
|
||||
</div>
|
||||
{!!a.holdings?.length && (
|
||||
<ul className="pl-6 @md:pl-[4.75rem] pr-6 pb-3 space-y-2.5">
|
||||
{[...a.holdings].sort((x, y) => Number(y.value ?? 0) - Number(x.value ?? 0)).map((h) => {
|
||||
const cash = isCash(h);
|
||||
const gain = !cash && h.cost_basis != null && h.value != null ? Number(h.value) - Number(h.cost_basis) : null;
|
||||
return (
|
||||
<li key={h.id} className="text-sm">
|
||||
<div className="flex items-baseline gap-3">
|
||||
<span className="w-14 shrink-0 text-xs font-medium tabular text-muted truncate">{cash ? "" : h.ticker ?? ""}</span>
|
||||
<span className="flex-1 min-w-0 truncate">{cash ? "Cash" : h.name}</span>
|
||||
<span className="shrink-0 text-right tabular">{money(h.value, a.currency)}</span>
|
||||
</div>
|
||||
{!cash && (
|
||||
<div className="pl-[4.25rem] flex flex-wrap gap-x-3 text-xs text-muted tabular">
|
||||
{gain != null && <span className={gain < 0 ? "text-bad" : ""}>{gain < 0 ? "down " : "up "}{money0(Math.abs(gain), a.currency)}</span>}
|
||||
<HoldingFee ticker={h.ticker} type={h.type} value={h.value} />
|
||||
</div>
|
||||
)}
|
||||
</li>
|
||||
);
|
||||
})}
|
||||
</ul>
|
||||
)}
|
||||
</div>
|
||||
))}
|
||||
</section>
|
||||
</div>
|
||||
);
|
||||
})}
|
||||
|
||||
{!!items.length && (
|
||||
<div className="space-y-3">
|
||||
<div className="section-label px-1">Connections</div>
|
||||
<section className="card overflow-hidden">
|
||||
{items.map((item) => (
|
||||
<div key={item.id} className="flex flex-wrap items-center gap-4 px-6 py-4 border-b border-line last:border-0">
|
||||
<Merchant name={item.institution_name ?? "Bank"} logo={item.institution_logo} color={item.institution_color} />
|
||||
<div className="flex-1 min-w-0">
|
||||
<div className="flex items-center gap-2">
|
||||
{item.institution_name ?? "Bank"}
|
||||
{item.status && item.status !== "ok" && <span className="text-xs font-medium text-bad border border-bad rounded-full px-2 py-0.5">Needs attention</span>}
|
||||
</div>
|
||||
<div className="text-xs text-muted">
|
||||
{item.status && item.status !== "ok"
|
||||
? item.status === "ITEM_LOGIN_REQUIRED" ? "Sign in to your bank again to keep syncing." : (item.error ?? "This connection stopped syncing.")
|
||||
: `${holds(item.accounts) ? `${holds(item.accounts)} · ` : ""}${plural(item.accounts.length, "account")} · synced ${item.last_synced_at ? ago(item.last_synced_at) : "never"}`}
|
||||
</div>
|
||||
</div>
|
||||
<ConnectionActions itemId={item.id} broken={item.provider === "plaid" && !!item.status && item.status !== "ok"} name={item.institution_name ?? "this bank"} />
|
||||
</div>
|
||||
))}
|
||||
</section>
|
||||
</div>
|
||||
)}
|
||||
|
||||
{!all.length && (
|
||||
<section className="card p-10 text-center space-y-2">
|
||||
<div className="card-title">No accounts yet</div>
|
||||
<p className="text-sm text-muted">Link a bank to see balances, transactions and recurring charges, and a brokerage, 401(k) or HSA to see what you hold.</p>
|
||||
</section>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,116 @@
|
||||
import { Check, CircleHelp, X } from "lucide-react";
|
||||
import Link from "next/link";
|
||||
import { Merchant } from "@/components/Merchant";
|
||||
import { KIND_LABEL, type Match, type OfferKind, type Verdict } from "@/lib/bonuses";
|
||||
import { myBonuses } from "@/lib/bonuses-data";
|
||||
|
||||
const MARK: Record<Verdict, { icon: typeof Check; label: string; tone: string }> = {
|
||||
yes: { icon: Check, label: "You qualify", tone: "text-good" },
|
||||
maybe: { icon: CircleHelp, label: "Check first", tone: "text-muted" },
|
||||
no: { icon: X, label: "Not for you now", tone: "text-muted" },
|
||||
};
|
||||
|
||||
function Row({ name, by, logo, bonus, net, verdict, why, notes, need, href, cta }: { name: string; by: string; logo?: string; bonus: string; net: string; verdict: Verdict; why: string[]; notes: string[]; need: string; href: string; cta: string }) {
|
||||
const m = MARK[verdict], Icon = m.icon;
|
||||
return (
|
||||
<li className={`p-5 flex flex-col @md:flex-row gap-4 @md:items-start ${verdict === "no" ? "opacity-60" : ""}`}>
|
||||
<Merchant name={logo ?? by} />
|
||||
<div className="flex-1 min-w-0 space-y-1.5">
|
||||
<div className="flex flex-wrap items-baseline gap-x-2">
|
||||
<span className="font-medium">{name}</span>
|
||||
<span className="text-sm text-muted">{by}</span>
|
||||
</div>
|
||||
<p className="text-sm">{need}</p>
|
||||
<p className={`text-sm flex items-center gap-1.5 ${m.tone}`}><Icon size={14} className="shrink-0" />{m.label}</p>
|
||||
<ul className="text-sm text-muted space-y-0.5">{why.map((w) => <li key={w}>{w}</li>)}</ul>
|
||||
{!!notes.length && (
|
||||
<details className="text-sm text-muted">
|
||||
<summary className="cursor-pointer hover:text-ink w-fit">Fees and fine print</summary>
|
||||
<ul className="space-y-0.5 pt-1">{notes.map((w) => <li key={w}>{w}</li>)}</ul>
|
||||
</details>
|
||||
)}
|
||||
</div>
|
||||
<div className="flex @md:flex-col items-center @md:items-end justify-between gap-3 shrink-0">
|
||||
<div className="@md:text-right">
|
||||
<div className="text-lg font-semibold tabular">{bonus}</div>
|
||||
{net !== bonus && <div className="text-xs text-muted tabular">You keep about {net}</div>}
|
||||
</div>
|
||||
<a href={href} target="_blank" rel="noopener noreferrer" className={verdict === "yes" ? "btn-primary" : "btn"}>{cta}</a>
|
||||
</div>
|
||||
</li>
|
||||
);
|
||||
}
|
||||
|
||||
// Offers that fit (or might) first; the ones that don't fold away under one line.
|
||||
function Section({ title, sub, fits, rest, empty }: { title: string; sub: string; fits: React.ReactNode[]; rest: React.ReactNode[]; empty: string }) {
|
||||
return (
|
||||
<section className="card overflow-hidden">
|
||||
<div className="p-5 pb-3">
|
||||
<div className="card-title">{title}</div>
|
||||
<p className="text-sm text-muted mt-0.5">{sub}</p>
|
||||
</div>
|
||||
{fits.length ? <ul className="divide-y divide-line border-t border-line">{fits}</ul> : <p className="px-5 pb-4 text-sm text-muted">{empty}</p>}
|
||||
{!!rest.length && (
|
||||
<details className="border-t border-line">
|
||||
<summary className="px-5 py-3.5 text-sm text-muted cursor-pointer hover:text-ink">{rest.length} more that don't fit you now</summary>
|
||||
<ul className="divide-y divide-line border-t border-line">{rest}</ul>
|
||||
</details>
|
||||
)}
|
||||
</section>
|
||||
);
|
||||
}
|
||||
|
||||
const split = <T extends { verdict: Verdict }>(rows: T[], row: (r: T) => React.ReactNode) => ({ fits: rows.filter((r) => r.verdict !== "no").map(row), rest: rows.filter((r) => r.verdict === "no").map(row) });
|
||||
|
||||
export default async function Bonuses() {
|
||||
const b = await myBonuses();
|
||||
const count = (ms: { verdict: Verdict }[]) => ms.filter((m) => m.verdict === "yes").length;
|
||||
const kinds = (["checking", "savings", "brokerage"] as OfferKind[]).map((k) => ({ k, rows: b.accounts.filter((m) => m.offer.kind === k) }));
|
||||
const accountRow = (m: Match) => (
|
||||
<Row key={m.offer.id} name={m.offer.product} by={m.offer.institution} bonus={b.money(m.bonus)} net={b.money(m.net)} verdict={m.verdict} why={m.why} notes={m.notes}
|
||||
need={`${m.offer.requirement}${m.offer.expires ? ` Ends ${new Date(m.offer.expires + "T12:00:00Z").toLocaleDateString("en-US", { month: "short", day: "numeric", year: "numeric", timeZone: "UTC" })}.` : ""}`}
|
||||
href={m.offer.url} cta="See the offer" />
|
||||
);
|
||||
const noOffers = !b.accounts.length && !b.cards?.length;
|
||||
|
||||
return (
|
||||
<div className="space-y-6 max-w-4xl">
|
||||
<section className="card p-6 space-y-2">
|
||||
<div className="text-sm text-muted">Sign-up bonuses you could get now</div>
|
||||
<div className="figure">{b.money(b.total)}</div>
|
||||
<p className="text-sm text-muted">
|
||||
{noOffers
|
||||
? `broke has no bonus list for ${b.country.name} yet.`
|
||||
: `From ${count(b.accounts) + count(b.cards ?? [])} offers you qualify for today, after fees${b.country.code === "US" ? " and federal tax" : ""}. Open one at a time and finish its steps before the next.`}
|
||||
</p>
|
||||
{b.later > b.total && <p className="text-sm">Up to <span className="font-semibold tabular">{b.money(b.later)}</span> once the first steps of your plan are done.</p>}
|
||||
{(b.who.carrying || !b.who.cushion) && !noOffers && (
|
||||
<p className="text-sm">
|
||||
{b.who.carrying ? "You're paying card interest, so bonuses wait until that's paid off." : "Bonuses wait until your starter emergency fund is built."}{" "}
|
||||
<Link href="/plan" className="underline underline-offset-2">See your plan</Link>
|
||||
</p>
|
||||
)}
|
||||
</section>
|
||||
|
||||
{b.cards && (
|
||||
<Section title="Credit cards" sub="Bonuses for spending you already do. Only cards inside your credit range." empty="No card bonuses fit you right now."
|
||||
{...split(b.cards, (c) => (
|
||||
<Row key={c.fit.card.id} name={c.fit.card.name} by={c.fit.card.issuer} bonus={b.money(c.fit.bonus!)} net={b.money(c.net)} verdict={c.verdict} why={c.why} notes={c.notes}
|
||||
need={`Spend ${b.money(c.fit.card.bonus!.minSpend)} in the first ${c.fit.card.bonus!.months} months.`} href={c.fit.card.referral ?? c.fit.card.url} cta="Apply" />
|
||||
))} />
|
||||
)}
|
||||
{kinds.filter((x) => x.rows.length).map(({ k, rows }) => (
|
||||
<Section key={k} title={KIND_LABEL[k]} sub={k === "brokerage" ? "Bonuses for opening or moving investments. Moving money in may have its own fees." : "Bonuses for opening an account and moving money or your pay into it."}
|
||||
empty="None of these fit you right now." {...split(rows, accountRow)} />
|
||||
))}
|
||||
|
||||
<div className="text-xs text-muted px-1 leading-relaxed space-y-2">
|
||||
<p>
|
||||
broke checks each offer on the bank's own page and shows the date it did. Offers change often: read the terms on their page before you open anything.
|
||||
{b.country.code === "US" ? " US bank and investing bonuses count as taxable income. Opening many bank accounts can show up on your ChexSystems report." : ""} This is not financial advice.
|
||||
</p>
|
||||
{b.cards?.some((c) => c.fit.card.referral) && <p>Some Apply buttons are referral links. The person who shared them may earn points or cash.</p>}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||