Project Date: 2024-2025
Role: Solo developer
Website: Spentry App
Project Background
The Spentry App was built out of a need to understand the true revenue of a local grocery store, Kibandani Grocery, whose Shopify app I'd built a couple of years prior. Price fluctuations of produce due to various unavoidable circumstances make it necessary to track product costs on a near daily basis. Unfortunately, Shopify currently doesn't support making daily purchases of this nature that reflect the current cost of goods. Not only that, but most local stores do not understand the accounting terminology required to use most available POS software. Spentry was created to solve these problems.
Project Goals
- Enable small businesses to track fluctuating product costs without complex accounting knowledge.
- Help Shopify merchants understand real revenue by integrating raw cost tracking into daily workflows.
- Build a clear, intuitive interface for non-technical staff to input purchases and expenses.
- Ensure support for multi-user access with role-based permissions and audit-friendly data.
- Make it scalable enough for future release as a paid app on the Shopify App Store.
Implementation
Spentry started as a sidecar app to an existing Shopify storefront, but quickly evolved into a full-fledged expense tracking solution for Kibandani Grocery. Built using Next.js App Router, Prisma, PostgreSQL, and Auth.js (with both magic link and Shopify OAuth), the app supports multi-tenant stores, role-based access, and clean CRUD interfaces for daily cost entries.
One of the key features is the ability to input real-time product costs with no accounting jargon — simply raw input of what was bought, quantity, how much it cost, and optional notes. A separate expenses module allows tracking of fixed and variable business costs like rent, salaries, or delivery fuel. The system auto-calculates total spend and provides visual dashboards showing revenue vs. cost, both daily and monthly.
To keep things lean, the MVP avoids a traditional accounting ledger and instead uses domain-specific terms that make sense to the user. Internally, every cost entry item is normalized with a unique internal ID to allow granular editing and cost tracking. Shopify product and variant data is pulled in and searchable through a custom dropdown component built with HeroUI Autocomplete.
Challenges
Implementing Shopify OAuth and billing from scratch — without Shopify’s managed billing flow or preferred Remix setup — was one of the toughest parts of building Spentry. Documentation was sparse to nonexistent for Next.js App Router, so I had to reverse-engineer flows for handling both admin-initiated logins from the Shopify dashboard and magic link logins from users, ensuring sessions stayed in sync and secure. The billing system needed to support custom pricing tiers, free trials, and reactivation without relying on their UI, which meant building and verifying everything manually — including webhook handling for uninstalls and plan downgrades. Shopify's ecosystem leans hard toward Remix, so adapting their tooling to work with Next.js, server actions, and Prisma required a lot of trial, error, and reading SDK source code. It was a test of stubbornness and skill, but one that leveled up my understanding of auth flows, billing systems, and Shopify's entire app architecture.
Outcome
Spentry has already transformed the way Kibandani Grocery operates. Daily cost entry data is now reliably tracked by staff, making it possible to detect trends like overspending on low-margin produce or gaps between high-revenue days and low-profit outcomes. Store owners can now make informed pricing decisions based on actual input costs.
The app is now preparing for broader use, with four other businesses already lined up to test it. Feedback from non-technical users has been overwhelmingly positive, especially regarding the intuitive interface and plain language approach to financial tracking. Spentry is now positioned to become a paid Shopify app aimed at small-to-medium merchants in dynamic-cost industries.
Technologies
- Nextjs
- TypeScript
- Prisma
- Tailwind
- Hero UI
- React Email
- Shopify API
- Nodemailer
- Vercel
- GraphQL
Industry
E-commerce