Log your spending in seconds with short text snippets. Powered by Rust, Cloudflare Workers and Svelte.

Overview

FastSpend

Log your daily spending lightning fast with short text snippets! FastSpend is a tool to log your spending in seconds, powered by a lightning fast API written in Rust.

FastSpend aims to be service-agnostic, so you can log your spending to multiple sinks. Currently, it is implemented for the You Need A Budget API (YNAB API). Soon, we may offer plugins for logging to Airtable, Firebase, Plain Text, etc.

FastSpend also aims to provide various frontends to log your spending. Currently, we offer a Svelte-powered progressive web app. Soon, we may implement a Rust-powered CLI, Raycast Extension and a chatbot,

Syntax

  • Use keywords to add spending quickly

    • Example: 100f
    • The keyword can either represent a category (e.g. f is food), or a payee (e.g. kfc is Kentucky Fried Chicken)
  • Use the exclamation mark (!) to add modifiers:

    • Example: 100f!t
    • Outflow Modifiers:
      • credit card: !c (default payment method)
      • bank transfer: !t
      • debit card: !d
    • Inflow Modifiers:
      • income: !i
      • refund or reimbursement: !r
  • Use the colon (:) sign to associate a payee. This is useful when the payee does not yet have a keyword alias.

    • Example: 400s : Starbucks associates the transaction with the Starbucks payee.
  • Use the hyphen sign (-) to add a memo, so you can remember what the transaction is for.

    • Example: 100f - ice cream truck
    • You can use it with the payee syntax: 400s : Starbucks - venti caramel macchiato
  • Use the at sign (@) in conjunction with the colon sign (:) to register a new payee alias

    • Example: 100f@sb : Starbucks associates the sb keyword with the Starbucks payee, and utilizes the "Food" (f) category
  • Batch add multiple transactions with the comma sign (,):

    • Example: 780kfc, 550kfc, 110s registers 3 transactions at once, with different amount and keywords.
    • Spaces are optional

Inspiration

The initial inspiration is from @dtinth's excellent talk on "Let’s build a personal assistant and level-up your coding skills!". In this talk, Thai creates a LINE chatbot to log his spending and do various things.

I'm using the You Need a Budget (YNAB) app to manage my budgets, but their app takes 4 - 5 taps to register one transaction - I'm way too lazy to do that.

Technology

  • The frontend is built with Svelte and TypeScript as a PWA (Progressive Web Application).
  • The API is built with Rust and Cloudflare Workers.

Roadmap

  • Setup Cloudflare Workers locally
  • Deploy Cloudflare Workers to production for personal usage
  • Maintain database of keywords (budget, payee)
  • Use a parser generator to parse our syntax, e.g. with Pest, Tree-sitter, or just plain 'ol Regex!
  • Write some unit tests in Rust as a starting point
  • Extract controller to it's own testable unit, with unit tests
    • Create a standalone Rust library for parsing commands and invoking event handlers given the configuration
  • Let's try TDD! (test-driven development)
  • Host the configuration data in Durable Objects or KV
  • Allow configuring different YNAB Token and Budget ID
    • Generate personal access token for each FastSpend users

Frontends

  • Raycast Command
  • Rust-powered CLI to call the API, built with Rust. e.g. sf 1000sb
  • Chatbot Integration - Messenger or LINE?
  • PWA to add and modify keyword mapping dynamically; should export as JSON for configuration.
  • iOS widget or application, powered by Swift?

Syntax Support

  • Batch transactions with ,
  • Use colons (:) to add payee name
  • Use hyphen (-) to add a memo
  • Use ! to add modifier: !t for transfer, !r for refund/reimburse, !d for debit, !i for income
  • Keyword can be either budget or payee.
  • Use $ to add tags, e.g. $5 is 5 star rating
  • Use emojis as keyword - e.g. ☕️ for Starbucks
  • Command to register budget categories - e.g. !c f Food, 1689063412
  • Command to register payee - e.g. !p fc Factory Coffee $ Drinks

Logging Sources

  • YNAB API (You Need A Budget API)
  • Airtable
  • Firebase

Webapp Features

  • Implement Syntax Highlighting in PWA
  • Implement Autocompletion in PWA
  • Implement standard PWA features (e.g. offline-first support, manifest)

Write-up

  • Write a Blog on this

Features Ideas

  • Automatically log spending from notification interception or web scraping, automatically sync and match
  • Pre-populated widget UI with spending behaviour, use previous transaction data or logged widget/spending group. One-tap to log spending from history.
  • Multiple logging backends as Rust plugin: YNAB API, Airtable, Plain Text, Firebase. Should be able to write unit test
  • Natural language input instead of command-based input
You might also like...
CLI to create redirections in CloudFlare to Zoom meetings.
CLI to create redirections in CloudFlare to Zoom meetings.

boteco boteco is a CLI to create redirections in CloudFlare to Zoom meetings. Requirements CloudFlare page rules In the domain you want to use, you ne

CFD is a tool that allows you to check one or more domains to see if they are protected by CloudFlare or not.
CFD is a tool that allows you to check one or more domains to see if they are protected by CloudFlare or not.

CFD is a tool that allows you to check one or more domains to see if they are protected by CloudFlare or not. The check is carried out based on five criteria: 3 headers in the HTTP response, IP, and SSL certificate issuer. The check result can be displayed on the screen or saved to a file.

Pass cloudflare IUAM using headless chrome without hassle.
Pass cloudflare IUAM using headless chrome without hassle.

FlarelessHeadlessChrome Pass cloudflare turnstile challenge using patched chrome binary (Windows/Linux x64). How it works Currently, with new headless

🦀 CLI for Cloudflare API 🦀
🦀 CLI for Cloudflare API 🦀

🛠 CLI️ to interact with Cloudflare APIs 🥳 An excuse to write some Rust 👷 Under heavy development Setup Install Rust 📝 curl --proto '=https' --tlsv

Scan all IP nodes of CloudFlare to find the fastest IP node.
Scan all IP nodes of CloudFlare to find the fastest IP node.

中文版 | English 📖 Introduction Scan all IP nodes of CloudFlare to find the fastest IP node. ⚡️ Get Started 🔨️ Build git clone https://github.com/golan

🦜 A hassle-free, highly performant, host it yourself Discord music bot built with Serenity in Rust. Powered by youtube-dl and Genius.

🦜 A hassle-free, highly performant and fast evolving Discord music bot built with Serenity in Rust. Deployment Usage Just create a bot account, copy

A Robo Lawyer Slack bot, powered by ChatGPT
A Robo Lawyer Slack bot, powered by ChatGPT

Robo Lawyer for your slack channel, powered by ChatGPT Deploy this function on flows.network, and you will get a Slack bot that uses ChatGPT to respon

mdzk is a plain text Zettelkasten system that is based on the mdBook API.

mdzk A lovingly designed system and static publishing tool for your plain text Zettelkasten mdzk is a plain text Zettelkasten system that is based on

A stupid macro that compiles and executes Rust and spits the output directly into your Rust code

inline-rust This is a stupid macro inspired by inline-python that compiles and executes Rust and spits the output directly into your Rust code. There

Owner
Phoomparin Mano
Loves TypeScript and Terminal. VP of Engineering at BRIKL. Learning Rust, Kotlin, Clojure and Elixir.
Phoomparin Mano
A pure-Rust serverless discord chatbot hosted on Cloudflare Workers.

About A pure-Rust serverless discord chatbot hosted on Cloudflare Workers. With a free account you have up to 100k requests per day. For storing state

Mike Dallas 31 Nov 21, 2022
Telegram Bot Template with Cloudflare Workers

cf-workers-telegram-bot-template Usage This template starts you off with a src/lib.rs file, acting as an entrypoint for requests hitting your Worker.

Lee Taehoon 2 Sep 23, 2021
A template for kick starting a Cloudflare worker project using workers-rs.

Getting Started A template for kick starting a Cloudflare worker project using workers-rs. This template is designed for compiling Rust to WebAssembly

Abid Omar 1 Oct 13, 2021
Blueboat is an open-source alternative to Cloudflare Workers. The monolithic engine for serverless web apps.

Blueboat Blueboat is an open-source alternative to Cloudflare Workers. Blueboat aims to be a developer-friendly, multi-tenant platform for serverless

Heyang Zhou 1.8k Jan 9, 2023
Verify Discord interactions on Cloudflare Workers with Twilight

twilight-cloudflare-workers Verify Discord interactions on Cloudflare Workers with Twilight. API The primary function in the API is process. It takes

Zeyla 5 Jun 6, 2022
Edgelord is a library for Cloudflare Workers. You can scaffold a basic bot for discord, slack, etc.

Edge Computing + chūnibyō = Edgelord ✨ ?? Edgelord Edgelord is now working. You can contribute for it. Edgelord is a Rust library for cloudflare worke

null 23 Dec 26, 2022
Vue, React, Solid, Angular, Svelte, and Liquid From JS Objects.

Vue, React, Solid, Angular, Svelte, and Liquid From JS Objects.

JSX One 11 Sep 21, 2022
Temp repo to document problems with workers-rs

This is a temporarily repo to share some worker-rs code that is giving me problems. See also: https://github.com/cloudflare/workers-rs/issues/94 Versi

Andrew Chin 0 Dec 6, 2021
Rust bindings to Cloudflare Worker KV Stores using wasm-bindgen and js-sys.

worker-kv Rust bindings to Cloudflare Worker KV Stores using wasm-bindgen and js-sys

Zeb Piasecki 39 Dec 4, 2022
Cloudflare worker for embedding polls anywhere.

poll.fizzy.wtf Cloudflare worker for embedding polls anywhere. ?? Pineapple on pizza? ?? Yes ?? No ?? Total Features Unlimited polls and unlimited opt

Valentin Berlier 39 Dec 10, 2022