About Sentaku AI

I built Sentaku AI because I wanted to stop impulse buying and stop overthinking every purchase. Late-night carts and “flash deals” were costing me money and mental energy. I needed a tool that asks smarter questions, factors in my real finances, and gives me a straightforward answer: buy it or skip it—with reasons I can trust.

I was inspired by Jia Chen on X. She’s won a lot of hackathons by shipping fast and building things that actually help people. I wanted to do the same: build something practical that helps people make better money decisions—and, yes, try to win while doing it.

What I built

Sentaku AI is a decision assistant for purchases:

  • It asks a few thoughtful questions about the item and your context.
  • It understands your financial baseline from onboarding (monthly income, savings, expenses) so you don’t retype the same info.
  • It analyzes the trade-offs and returns a clear recommendation with a confidence score.
  • It keeps a private history so you can reflect on patterns and progress.

The goal is to reduce buyer’s remorse and the mental load around everyday purchases.

How I built it

  • Frontend: React (Vite + TypeScript) with Tailwind and shadcn UI for a clean, fast UI. -** Auth + DB:** Supabase for email/password and Google sign-in, row-level security (RLS), and Postgres tables:
    • profiles: stores financial baseline from onboarding
    • purchase_history: stores past evaluations and AI recommendations
  • Data fetching: TanStack Query for caching and smooth loading states.
  • **AI analysis: Google’s generative AI to turn answers into a structured recommendation.

Under the hood, the “should I buy this?” recommendation uses a simple score that blends your budget headroom, necessity, and impulse risk. A simplified version:

  • Budget headroom: $$H = \text{income}{\text{monthly}} - \text{expenses}{\text{monthly}} - \text{price}$$

  • Decision score: $$S = \sigma\big(\alpha \cdot \frac{H}{\text{income}_{\text{monthly}}} + \beta \cdot \text{necessity} - \gamma \cdot \text{impulse}\big)$$

Where:

  • σ is the sigmoid function
  • necessity and impulse are normalized signals derived from your answers
  • α, β, γ are weights tuned to keep the model conservative when money is tight

The AI writes a human explanation (pros/cons, trade-offs), but the score gives a numeric backbone to the recommendation.

What I learned

  • Authentication UX matters: adding email verification + Google sign-in made onboarding smoother but required careful state handling.
  • Row-Level Security in Supabase is powerful. I learned to write precise policies so users can only access their own profiles and history.
  • Prompt design: making the AI return consistent, structured output is half engineering, half writing. Small wording changes produce big differences.
  • Product > features: removing friction (like re-entering finances each time) changed the feel of the app more than any fancy feature.

Challenges I faced

  • Balancing “just enough” AI with predictable logic. I didn’t want pure vibes; adding a transparent score helped.
  • Handling edge cases around auth (email confirmation, session states) while keeping the UI snappy.
  • Getting consistent JSON back from the model and handling failures gracefully.
  • Avoiding feature creep: the hardest part was saying no to extra toggles and keeping it simple.

Why it’s relatable

I built Sentaku AI for the exact moments that trip me up: the 2 a.m. “deal ends in 10 minutes” or the fifth “productivity” gadget of the month. It doesn’t judge; it just shows the trade-offs, reminds me of my real budget, and helps me walk away—or buy with confidence.

What’s next

  • Smarter insights from history: trends, categories, “biggest regret savers”
  • Budget envelopes and goal tracking
  • Multi-currency support and local cost-of-living hints
  • PWA mode for quick capture on mobile

Shout out to Jia Chen for the inspiration: ship fast, be useful, and build for real people. That’s the spirit of Sentaku AI.

Built With

  • ai
  • date-fns
  • gemini
  • generative
  • google
  • google-sign-in-(oauth)
  • lucide-icons
  • postgres-with-rls)
  • radix-ui
  • react-18
  • react-hook-form
  • react-router
  • recharts
  • shadcn/ui
  • sonner-(toasts)
  • supabase-(auth
  • tailwind-css
  • tanstack-react-query
  • typescript
  • vite-(swc)
  • zod
Share this project:

Updates