{"slug": "how-i-built-a-serverless-ai-accounting-app-with-ai-assistant-and-saved-my-family", "title": "How I Built a Serverless AI Accounting App with AI assistant and Saved My Family from Spreadsheet Chaos", "summary": "A data engineer built a serverless AI accounting app for his family, replacing a Google Sheet with a Django-based system that uses a star schema database and a hybrid AI assistant powered by Groq and Azure OpenAI. The assistant classifies user intents and generates SQL queries, with embeddings optimized to 512 dimensions for speed. The project demonstrates a practical application of AI in personal finance management.", "body_md": "As a data engineer, I spend my days designing clean, optimized data structures. But at home, I face a much tougher crowd: my family.\n\nWe manage our shared finances together to optimize our budget, and because of where we live and work, we have to do this in several different currencies (like USD, EUR, CZK, and UAH)\n\nLike any developer, I first tried to find a ready-made app to solve this. But I ran into a classic problem: they were either bloated with a million features we didn’t care about, or they were missing the exact features we actually needed.\n\nSo, we did what any desperate family does: we opened a **Google Sheet**. We tracked our money there for a while, not because it was perfect, but because it helped us figure out what we actually needed from a real application. It was our \"living schema design\" before I wrote a single line of code.\n\nIn this article, I want to show you how I looked at this problem from two sides—as a frustrated user who just wants to log expenses, and as a data engineer obsessed with clean database design. Here is the story of how I built our custom home accounting server.\n\nBy 2025, I was ready to replace our Google Sheet. My main programming language is Python, so I had three realistic choices: FastAPI, Flask, or Django.\n\nAs a data engineer, I didn’t want a messy database. I decided to use a **Star Schema**, which is usually used in big data warehouses, but is actually perfect for transaction bookkeeping.\n\nThink of it like this: the central table is the star of the show, and everything else just adds context.\n\n`Transaction`\n\n):`User`\n\n, `Family`\n\n, `Currency`\n\n, `Account`\n\n, and `Category`\n\n. By late 2025, I had built the database, a simple web UI, an API, tests, and manuals. I packaged it into two Django apps—`members`\n\nand `transactions`\n\n—and hosted it locally on an Ubuntu server running **Gunicorn**. It worked beautifully, but I was not done yet.\n\nIn 2026, I looked at the 10-page text manuals I had written for my family. Let's be honest: nobody—especially your family—wants to read a dry technical guide just to find out how to log a credit card transfer.\n\nI decided to do two things: make the app **Serverless** and replace the boring manuals with a **friendly, conversational AI assistant**. To do this, I built a third Django app called `assistant`\n\n.\n\nBut I didn't want a generic chatbot that just parroted generic answers. I wanted a smart assistant that knew exactly what the user wanted. So, I designed it to instantly classify user messages into **four distinct intents**:\n\nAI can be slow and expensive if you aren't careful. To make sure my family didn't have to wait 10 seconds for a response, I built a hybrid pipeline using two different cloud providers: **Groq** and **Azure OpenAI**.\n\n`gpt-oss-20b`\n\n(for lightning-fast intent classification) and `gpt-oss-120b`\n\n(for generating replies and SQL queries).`text-embedding-3-small`\n\nmodel and did something sneaky: I configured it to generate embeddings with only By reducing the dimensions to 512, the embeddings generated **much faster**, and the size of my vector database shrank dramatically. Best of all, we didn't notice any drop in search quality. The result? The AI assistant responds instantly, without any visible lag.\n\nTo keep the AI's knowledge base updated, I wrote a custom **Django management command**. Whenever I edit our markdown spec files, I just run this command.\n\n```\n# Ingest general information\npython family_acc/manage.py ingest_docs documentation/general_info.md --category general\n```\n\nIt automatically parses the markdown layout, slices it into clean chunks, generates 512-dimension vectors, and uploads them to our hosted PostgreSQL database (with the `pgvector`\n\nextension) on **neon.tech**. The whole process takes only a few seconds.\n\nLetting an AI write raw SQL queries against your personal database is like letting a toddler run around with a permanent marker—they mean well, but they might delete something important.\n\nTo prevent SQL injections or accidental data deletion, the database connection used by the Text-to-SQL engine is strictly restricted to read-only ** SELECT** statements. The AI can read our data to answer questions, but it can never edit, modify, or delete a single row of transactions.\n\nAfter testing everything locally in Docker containers, it was time to put it in the cloud. Thanks to my experience with Azure, AWS, and Google Cloud, deploying the container to **Google Cloud Run** was surprisingly smooth.\n\nThe app immediately connected to our cloud database on neon.tech and the Groq/Azure AI APIs without a single hiccup, working perfectly on the very first try.\n\nIn a production deployment, you never want to expose API keys or database passwords. Here is how I set up secure DevOps:\n\n`DATABASE_URL`\n\nand API keys) in Building this application taught me that the best coding projects are the ones that solve real-world problems in your own life. Here is what I learned:\n\nThis project is a perfect proof of concept showing that you don't need a massive team to build a secure, modern, AI-powered system in the cloud. You just need a clear plan, a bit of data engineering, and a family that is tired of manual spreadsheets.", "url": "https://wpnews.pro/news/how-i-built-a-serverless-ai-accounting-app-with-ai-assistant-and-saved-my-family", "canonical_source": "https://dev.to/dmytroy/how-i-built-a-serverless-ai-accounting-app-with-ai-assistant-and-saved-my-family-from-spreadsheet-4hcc", "published_at": "2026-08-26 18:28:34+00:00", "updated_at": "2026-08-26 18:44:37.750840+00:00", "lang": "en", "topics": ["artificial-intelligence", "large-language-models", "ai-products", "developer-tools"], "entities": ["Django", "Groq", "Azure OpenAI", "OpenAI", "pgvector", "neon.tech", "Gunicorn", "Google Sheet"], "alternates": {"html": "https://wpnews.pro/news/how-i-built-a-serverless-ai-accounting-app-with-ai-assistant-and-saved-my-family", "markdown": "https://wpnews.pro/news/how-i-built-a-serverless-ai-accounting-app-with-ai-assistant-and-saved-my-family.md", "text": "https://wpnews.pro/news/how-i-built-a-serverless-ai-accounting-app-with-ai-assistant-and-saved-my-family.txt", "jsonld": "https://wpnews.pro/news/how-i-built-a-serverless-ai-accounting-app-with-ai-assistant-and-saved-my-family.jsonld"}}