Envelo
An AI envelope-budgeting app. Describe your month in plain words and it builds your envelope budget; before you buy something, Spend Check tells you whether your budget can take it.
The problem
Budgets usually fail at the moment of spending: by the time a banking app shows the damage, the money is gone. Setting up a proper budget is also tedious enough that many people never start.
Envelo turns a plain-language description of someone's month into an envelope budget, then answers "can I afford this?" before a purchase rather than after it. There's no bank linking; users describe their money themselves.
What I built
- AI Plan Builder
- Type something like "I earn ₦450k, rent is ₦150k, saving for December" and Envelo returns envelopes with amounts and kinds (essential, flexible, savings or debt), flags shortfalls, and opens the plan in an editor so you can change anything before saving.
- Spend Check
- Ask "Can I afford a ₦40,000 dinner?" and get a yes, careful, no or unclear verdict, the envelope it should come from, reasoning that uses the budget's own numbers, and a suggestion.
- The Gemini key never reaches the browser
- AI requests go to a Netlify Function. It verifies the user's Firebase ID token against Google's public keys with jose before calling Gemini, so only signed-in users can use the AI and the key stays server-side.
- Budgets and accounts
- Firebase Authentication and Firestore, with a rich-text editor, search, sorting, a dashboard, light and dark themes and a mobile layout.
Technical decisions
- 01
Constrain the model, then check its output
Gemini returns JSON that must match a schema, and the server still cleans and clamps every field (amounts, envelope kinds, currency codes, lengths) before anything reaches the app.
- 02
Treat user text as data
Both prompts tell the model to treat the user's description and budget only as data, never as instructions, and requests are length-limited on the server.
- 03
Honest answers over confident ones
Spend Check can answer "unclear" when the numbers aren't there, and says when it matters that it can't see what's already been spent this month.
- 04
Resilient AI calls
Each request has a deadline, retries respect Google's retry-delay hints, and an optional fallback model takes over when the primary one is overloaded.