Paste your Nigerian bank alerts. Ask your money questions in plain English.
Most Nigerians already have a complete record of their spending. It sits in hundreds of debit and credit alerts from GTBank, Access, Zenith, OPay, Moniepoint and the rest, and nobody can search it. Alert Ledger turns those alerts into a structured ledger and lets you ask things like:
- How much did I spend on fuel in September?
- Show transfers to Emeka
- How many times did I buy suya?
Runs on Android, iOS and the web from one Flutter codebase, with a landing page at / and the web app at /app/.
Built solo for the Appwrite Databases Hackathon (Oct 19–31, 2026).
| Screen | What it does |
|---|---|
| Home | Greeting with an illustration, a Getting started guide (add alerts → ask a question → teach it one merchant) that ticks itself off as you go, a month summary with a month switcher, a one-line insight ("Fuel took 41% of your spending"), category bars you can tap, and recent transactions. |
| Activity | Every transaction grouped by day. Filter by money in/out and by category, or by name, merchant or bank. |
| Ask | Plain-English questions. Each answer shows the total, how the question was understood, and the transactions behind it, with a match score for meaning-based hits. |
| Add alerts | Paste one or many alerts. Directions for copying an alert on Android, iPhone and email, with your platform listed first. Sample alerts for a quick try. It reports what was saved, what was a duplicate, and what couldn't be read. |
| Transaction sheet | Fix the category (the app learns from it), see the original alert, delete. |
The layout adapts: bottom navigation on phones, a navigation rail with centred content on tablets and the web. Light and dark themes. Illustrations are drawn in code, so there are no image assets to ship and they follow the theme.
Two database types, each doing the job it's best at:
| TablesDB: the ledger of record | VectorsDB: the meaning layer | |
|---|---|---|
| Holds | One row per transaction: amount (kobo, integer), direction, date, category, how it was categorised, bank, counterparty, original alert | tx_vectors: one 768-dim embedding per transaction + metadata (userId, date, direction, category) |
| Also holds | category_seeds: labelled examples (built-in ones, plus each user's own corrections) that teach the app what unknown merchants mean |
|
| Answers | Exact filters and sums: fuel in September | Fuzzy matches: Emeka → NIP/MONIEPOINT/EMEKA OKAFOR, suya → OBONG SUYA SPOT EWET |
| Indexes | userId+txDate, userId+direction+txDate, userId+category+txDate |
HNSW cosine on embeddings |
Why both: totals must be exact, so money is never summed from a vector search result alone. Vectors find which rows match; TablesDB supplies the numbers.
Paste alerts ─▶ Function /ingest
1. parse amount, direction, date, bank, counterparty (regex, no AI)
2. category: keyword rules ─▶ else nearest-neighbour vote over category_seeds
(built-in examples + this user's corrections, which count double)
3. embed "money spent · POS PURCHASE OBONG SUYA SPOT · to OBONG SUYA SPOT · food"
4. TablesDB.createRow + VectorsDB.createDocument (same id → trivial join)
Ask a question ─▶ Function /ask
1. parse intent, direction, date range, category, topic (deterministic)
2. category? → TablesDB rows filtered by category column
3. topic? → embed topic → VectorsDB vectorCosine + metadata filters (user, dates, direction)
4. fetch matched rows from TablesDB, sum in kobo, return answer + rows + how each matched
Fix a category ─▶ Function /recategorize
1. update the row (categorySource = "user") and re-store its vector
2. save the merchant as a personal seed in category_seeds
3. report other rows from the same counterparty; "Move all" fixes them too
Delete ─▶ Function /delete: removes the row, its vector and any seed it taught
Embeddings come from Appwrite's built-in Embeddings service (nomic-embed-text), so there is no outside AI provider.
Privacy. Every row, vector and personal seed carries Permission.read(Role.user(userId)). Every vector query is filtered by metadata.userId. The function checks ownership before changing or deleting a row. One user's corrections never change another user's categories (there's a test for this).
Onboarding progress is stored in Appwrite account preferences, so the guide remembers where you are on every device.
landing/index.html Landing page (static, no build step)
app/ Flutter app for Android, iOS and web
lib/app_shell.dart Responsive navigation
lib/screens/ Home, Activity, Ask, Add alerts
lib/widgets/ Getting-started guide, transaction tile and sheet, illustrations
lib/state/ App state (plain ChangeNotifier)
lib/services/ Appwrite calls
functions/ledger/ Appwrite Function (Node 22)
src/parser.js alert → transaction (pure, tested)
src/question.js question → intent / dates / category / topic (pure, tested)
src/categories.js keyword rules + built-in seed examples
src/vector.js VectorsDB + Embeddings calls
src/main.js /ingest, /ask, /recategorize, /delete
scripts/setup.mjs provisions both databases, indexes and seeds (idempotent)
test/ parser tests + end-to-end tests against in-memory fakes
scripts/build_site.sh Landing page + web app → one static site
.github/workflows/ Builds Android, web and iOS, runs backend tests
- Appwrite project. Create one on Appwrite Cloud. Under Auth → Settings, enable Anonymous sessions. Add platforms:
- Android: package
app.alertledger.alert_ledger - iOS: bundle ID
app.alertledger.alertLedger - Web: your site's hostname (and
localhostfor development)
- Android: package
- API key with scopes for databases, tables, columns, indexes, rows, collections, documents and
embeddings.write. - Provision databases:
cd functions/ledger && npm install APPWRITE_ENDPOINT=https://<REGION>.cloud.appwrite.io/v1 \ APPWRITE_PROJECT_ID=<id> APPWRITE_API_KEY=<key> npm run setup
- Deploy the function. This is a monorepo: set the Appwrite Git deployment's
Root directory to
functions/ledgerso the build runs where the function'spackage.jsonlives. Use function IDledger, runtime Node 22, entrypointsrc/main.js, and build commandnpm install. Execute access: Users. Give its dynamic key: rows read/write, documents read/write,embeddings.write. - Run the app. The endpoint, project name and project ID are configured in
lib/config.dart. Launch the app and tap Ping Appwrite on Home to check connectivity, then:Tap Add alerts → Load sample alerts → Save, then follow the guide on Home.cd app flutter create . --platforms=android,ios,web --project-name alert_ledger --org app.alertledger flutter pub upgrade --major-versions flutter run -d chrome # or an Android/iOS device
- Publish the site.
./scripts/build_site.shproducessite/with the landing page at/and the web app at/app/. Deploy that folder to Appwrite Sites and add the domain as a Web platform. Attach the APK from the CI build to a GitHub release so the landing page's Android button works.
cd functions/ledger && npm test # 15 testsThe end-to-end tests run every route against in-memory fakes of TablesDB, VectorsDB and Embeddings. They cover isolation between users, learning from corrections, and deletion removing data from both databases.
Every push runs .github/workflows/build.yml: backend tests, flutter analyze, a web build, a release APK (both uploaded as artifacts), and an unsigned iOS build on macOS.
Flutter (Android, iOS, web) · appwrite Flutter SDK · google_fonts (Bricolage Grotesque, Figtree) · intl · Appwrite Auth (anonymous, account prefs) · Appwrite TablesDB · Appwrite VectorsDB · Appwrite Embeddings (nomic-embed-text) · Appwrite Functions (Node 22, node-appwrite) · Appwrite Sites · GitHub Actions
- Idea and innovation: a very local problem (Nigerian alert formats, naira, kobo) with a universal pattern, and an app that learns each user's merchants.
- Technical execution: parsing is deterministic and tested, money is summed from TablesDB and never guessed by a model, and CI builds for three platforms.
- Design and experience: paste → ask. A guided first run, plain-language insights, illustrations, responsive from phone to desktop, light and dark.
- Usage of Appwrite Databases: two database types used for what each does best, built-in Embeddings, HNSW index, metadata-filtered vector search, per-user seed vectors that change future results, row-level security, account prefs, and an idempotent setup script.