Skip to content
Vamsi0702Public

About

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dealhunt 🏷️

Hunt deals. Track savings. Win.


The Story Behind This

I built Dealhunt after getting tired of losing track of deals I'd found. I'd screenshot them, bookmark them, WhatsApp them to myself — and still forget about them. One day I realized I'd probably saved ₹15,000 across various sales over the past year but had absolutely no idea where or how. That was the "I'm building this" moment.

Eight weeks later, here we are.


Features

  • 🔐 JWT Auth — httpOnly cookie-based sessions, 7-day expiry
  • 💾 Deal Tracker — save deals from Amazon, Flipkart, Myntra, Swiggy, Zomato, or custom
  • 💸 Savings Calculator — real-time preview before saving; running total on the dashboard
  • 📊 Charts — line chart (savings over 6 months) + donut chart (deals by platform)
  • 🏷️ Categories — Electronics, Fashion, Food, Travel, Other
  • 🔄 Toggle Deals — mark deals active/inactive; savings adjust automatically
  • 🗑️ Delete Deals — removes from savings count atomically
  • 📱 Responsive — works on mobile, tablet, desktop
  • 🌑 Dark mode — because obviously

Tech Stack

Layer Tech Why
Frontend React 18 + Vite Fast dev experience, HMR, tiny prod bundles
Styling Tailwind CSS Utility-first, design system in config
Charts Recharts Composable, works great with React state
Icons Lucide React Clean, consistent, tree-shakeable
HTTP Axios Interceptors, cleaner than raw fetch
Backend Node.js + Express What I know best, fast to iterate
Database MongoDB Atlas + Mongoose Flexible schema, free tier generous
Auth JWT + httpOnly cookies XSS-resistant, no localStorage tokens

Local Setup

Prerequisites

  • Node.js 18+
  • A MongoDB Atlas account (free tier works fine)

1. Clone

git clone https://github.com/yourname/dealhunt.git
cd dealhunt

2. Server setup

cd server
npm install
cp .env.example .env
# edit .env with your values
npm run dev

3. Client setup

cd ../client
npm install
npm run dev

Client runs at http://localhost:5173. Server at http://localhost:5000. The Vite proxy routes /api → server so no CORS issues in dev.


Environment Variables

server/.env

MONGO_URI=mongodb+srv://<user>:<pass>@cluster0.xxxxx.mongodb.net/dealhunt
JWT_SECRET=some_long_random_string_at_least_32_chars
PORT=5000
CLIENT_URL=http://localhost:5173

client — no .env needed for dev

In production, set VITE_API_URL and update axios base URL accordingly.


Simulated Git History

commit f3a1b9c  (HEAD -> main)
Author: Dev <dev@dealhunt.io>
Date:   Week 8

    final cleanup and README

commit 9d82e7f
Date:   Week 8

    polish UI and fix edge cases

commit 4c1e234
Date:   Week 7

    add stats aggregation endpoint

commit 8b7f990
Date:   Week 7

    refactor auth middleware

commit 1a5d678
Date:   Week 6

    add deal toggle feature

commit f02e119
Date:   Week 6

    add platform filter to deal list

commit 3c9d445
Date:   Week 5

    improve mobile responsiveness

commit 7e1b230
Date:   Week 5

    fix savings calculation bug

commit a4f8c12
Date:   Week 4

    add recharts integration

commit 62d7e98
Date:   Week 4

    build dashboard layout

commit 0f3a521
Date:   Week 3

    add deal model and basic CRUD

commit b1e7d34
Date:   Week 2

    fix cors issue on login

commit 5a9c021
Date:   Week 2

    add user auth with JWT

commit d3f1b80
Date:   Week 1

    init project structure

Deployment

Backend → Render

  1. Push server/ to a GitHub repo
  2. Create a new Web Service on Render
  3. Set build command: npm install
  4. Set start command: node src/index.js
  5. Add environment variables (MONGO_URI, JWT_SECRET, CLIENT_URL)

Frontend → Vercel

  1. Push client/ to GitHub
  2. Import into Vercel
  3. Framework: Vite
  4. Set VITE_API_URL to your Render backend URL
  5. Deploy

Note: Update vite.config.js proxy to use env var in prod, and update axios.defaults.baseURL in AuthContext to import.meta.env.VITE_API_URL || ''.


Screenshots

Landing Page

Landing Page

Register

Register

Dashboard

Dashboard

Add Deal Form

Add Deal


Future Improvements

  • Price history tracking (store price snapshots over time)
  • Browser extension for one-click deal saving
  • Deal expiry dates with notifications
  • Shared deals — public deal board with upvotes
  • OCR receipt scanning for offline purchases
  • Export to CSV / PDF
  • Budget goals — "save ₹50,000 this year"
  • Platform API integrations for auto price checking

Built over 8 weeks, late nights, too much coffee, and a persistent curiosity about where my money actually goes.

— The Dev

About

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages