Project

PaydayCompass

This page is an architecture walkthrough of a real, deployed product. There is no live demo here, and security is described at a high level on purpose.

PaydayCompass is a serverless personal finance app: accounts, budgets, recurring bills, and a payday calculator that shows what a paycheck covers before it lands. It also supports shared accounts, AI auto-categorizing, and free and paid plans. This page shows how the pieces fit together, then walks through four of its flows.

The Big Picture

How the Pieces Fit Together

A React app is served from S3 through CloudFront. Calls to /api go through API Gateway, which checks the Cognito sign-in token before any code runs, then to one Lambda function per feature area. They share one library for the rules that must never drift apart, such as moving money and resolving sharing permissions. DynamoDB holds the data. Scheduled jobs run the daily work, and CloudWatch alarms watch the jobs nobody is watching.

Feature Flows

Four Flows, Up Close

Each diagram follows one feature from the first request to the last write. The numbers match the steps in the text. Click any diagram to expand it.

Payday calculator

Before a paycheck lands, the Payday Lambda looks across every account for the income due and every recurring bill due before the next payday, then adds budgeted set-asides and planned expenses. The customer adjusts the amounts and submits once. Everything posts in a single batch, and each bill's next due date moves forward so the daily job never posts it twice. Money for budget categories and planned expenses moves through the same shared transfer code as a manual transfer. The payday is saved to a history that expires on its own, so it can be reversed, and people the customer shares money with can be told, but only if they agreed to that.

Daily recurring processor

Recurring income and expenses (weekly, biweekly, semimonthly, monthly, annual, custom intervals, or the "nth weekday" of a month) post themselves. An EventBridge rule starts a Lambda every morning. It finds every template that is due, backfills any days that were missed, writes the transactions, updates balances, and moves the next due date forward. Each template runs on its own, so one bad record never blocks anyone else. If an item fails, the customer is emailed the same day, and the run is flagged so a CloudWatch alarm emails the owner too.

AI auto-categorize

When a transaction arrives with no category and no saved rule matches, a shared library asks Amazon Bedrock to pick one. Claude Haiku 4.5 goes first, and Claude Sonnet 4.6 only sees the transactions Haiku was unsure about. It is suggest-only: the category is applied so budgets stay accurate, but the row is marked as automatic until the customer accepts or changes it, and those corrections become examples for next time. Only the description (with long number runs masked), the amount, and the direction leave the database. It is a fraction of a cent per transaction, is limited by plan, and can be switched off.

Sign-in, sharing, and peer alerts

Customers sign up and sign in with Amazon Cognito, with email verification and authenticator-app MFA. API Gateway validates the token on every request, and one shared access check then decides whether the caller owns the account or has an accepted share, and at what permission level. Sharing is invite-based and set per kind of data. Alerts about money moving between people use a separate, mutual agreement, so sharing an account never implies being notified about payments.

Design Decisions

Why I Designed It This Way

The choices that keep a money app predictable as it grows.

One path for moving money

Transfers and division balances each have exactly one shared implementation, used by manual actions and by Payday's automatic ones. A second path is how balances drift apart, so there isn't one.

One Lambda per feature, one shared library

Each area (accounts, budgets, payday, sharing and so on) is its own function, and anything two of them need lives in a shared layer. Features stay small and independently deployable without copying rules between them.

Unattended jobs fail loudly, and safely

Scheduled work isolates each item, tells the affected customer the same day, keeps failed runs in a dead-letter queue, and raises an alarm. User-facing functions surface their own errors instead.

AI that suggests, with the least data possible

The model never creates categories or changes anything final, and it sees only a masked description, an amount, and a direction. Cheap model first, stronger model only when needed.

Pay-per-request data, separate environments

DynamoDB runs pay-per-request, so there is no capacity to plan, and production data has point-in-time recovery. Dev, beta, and production are separate stacks from one CDK app, each with its own data.

Security

Security at a High Level

A finance app has to earn trust. These are the principles it is built on. I deliberately don't publish more detail than this.

Strong sign-in

Email-verified accounts, strong password rules, and authenticator-app MFA.

Every request is checked

The gateway validates the caller before any application code runs, and each request is then checked against what that person owns or has been shared.

Least privilege

Each function is granted only the data it needs, and sharing is limited to the kinds of data an owner chooses.

Protected data

Traffic is encrypted in transit and data is encrypted at rest. Production data has point-in-time recovery. Payments are handled by Stripe.

Privacy in AI features

Models receive the minimum needed, and the help bot runs behind a guardrail that also blocks financial identifiers.

Watched and recoverable

Alarms cover the jobs that run unattended, and the site itself ships with strict browser security headers.

Next Iteration

What I'd Change Next

The gaps I know about: what I'd add before the next stage of growth.

Automated tests

Correctness is checked today with a written pre-commit checklist (syntax, imports, synthesizing both environments, hand-traced date math), not an automated suite. Money and date rules are exactly what tests should guard.

Split the main stack

The main CloudFormation stack is close to its resource limit, which is why receipts already live in their own stack. I'd split the rest by feature area so each can grow and deploy independently.

Alarms and tracing beyond the scheduled jobs

Alarms watch the unattended jobs, while user-facing functions rely on their own error handling. I'd add alarms on error rates and latency for the main paths, plus request tracing.

One source for help content

Help text is kept in sync by hand across the app's help topics, the chatbot's knowledge, the setup wizards, and page tooltips. A single source would remove the chance of them disagreeing.