A smart grocery shopping app for Israeli supermarkets. Compare prices across chains, manage shopping lists in real-time with family members, and track spending.
Live: https://smartcartapp.net
- Email verification & JWT auth (access + refresh tokens)
- Product search and price comparison across Israeli supermarket chains
- Shopping lists with real-time collaboration (Socket.IO)
- Family accounts (parent/child) with shared lists
- Price history charts
- List templates with scheduled recurring lists
- Invite links to share lists
- Dark/Light theme support
- PWA — installable on mobile
- Rate limiting and input validation
| Layer | Technology |
|---|---|
| Frontend | React 19, Vite, React Router 7 |
| Backend | Express 5, Node.js |
| Database | PostgreSQL (Neon) |
| Real-time | Socket.IO |
| Auth | JWT access/refresh tokens + HTTP-only cookies |
| Resend (HTTP API) | |
| Hosting | Vercel (frontend) + Railway (backend) |
smartcart/
├── frontend/ # React + Vite app
│ ├── src/
│ │ ├── pages/ # Login, Register, Home, MyLists, ListDetail, Store, Profile, etc.
│ │ ├── components/ # NavBar, BarcodeScanner, PriceHistoryChart, ListItemRow, etc.
│ │ ├── context/ # AuthContext, ThemeContext
│ │ ├── api.js # Axios client with token refresh interceptor
│ │ └── socket.js # Socket.IO client
│ ├── public/ # PWA manifest, service worker, icons
│ └── vercel.json # SPA rewrite rules
├── server/ # Express.js API
│ ├── routes/ # auth.js, lists.js, family.js, simplified_products.js
│ ├── middleware/ # JWT auth, rate limiter, validators
│ ├── utils/ # Logger (Winston), price snapshots
│ └── db/ # Migrations, parser, exports
├── init.sql/ # Database schema (app + app2 schemas)
└── railway.json # Railway deployment config
- Node.js >= 22
- PostgreSQL database
-
Clone the repo:
git clone https://github.com/rdiol12/smartcart.git cd smartcart -
Set up the database:
psql <your-connection-string> < init.sql/init.sql
-
Start the backend:
cd server npm install cp .env.example .env # then fill in your values node server.js
-
Start the frontend:
cd frontend npm install npm run dev
Backend (server/.env):
| Variable | Description |
|---|---|
DATABASE_URL |
PostgreSQL connection string |
JWT_SECRET |
Secret for access tokens |
JWT_REFRESH_SECRET |
Secret for refresh tokens |
CORS_ORIGIN |
Frontend URL(s), comma-separated |
FRONTEND_URL |
Frontend URL for email redirects |
BASE_URL |
Backend public URL (for verify-email links) |
RESEND_API_KEY |
Resend.com API key for emails |
EMAIL_FROM |
Sender email (e.g. register@smartcartapp.net) |
PORT |
Server port (default: 3000) |
Frontend (VITE_ env vars in Vercel or .env):
| Variable | Description |
|---|---|
VITE_API_URL |
Backend API URL |
The app is deployed across three services:
for the scraper i used https://github.com/OpenIsraeliSupermarkets/israeli-supermarket-scarpers