A fast and simple web application to compare prices of Finnish supermarket goods across multiple stores and track price changes over time.
- π Price Comparison - Compare prices across 6 major Finnish supermarkets
- π Price History - Track and visualize price changes over time
- π Smart Filtering - Search by product name and filter by category
- π± Responsive Design - Works seamlessly on desktop and mobile
- β‘ Fast Performance - Minimal dependencies, optimized for speed
- πΎ Historical Data - Store and analyze price progression throughout the year
- S-Market
- Prisma
- K-Citymarket
- K-Supermarket
- Lidl
- Alepa
- Backend: Node.js + Express
- Database: PostgreSQL (Vercel Postgres)
- Frontend: Vanilla JavaScript, HTML5, CSS3
- Charts: Chart.js (only external library for visualizations)
- Click the button above or go to vercel.com/new
- Import this repository
- Add Vercel Postgres database (Storage β Create β Postgres)
- Deploy!
- Run
node seed.jsto populate the database (see VERCEL_DEPLOY.md)
See VERCEL_DEPLOY.md for complete deployment guide.
- Go to Replit
- Click "Create Repl" β "Import from GitHub"
- Paste this repository URL
- Click "Run"
- Your app is live!
See DEPLOY.md for Replit deployment instructions.
- Clone the repository
git clone <repository-url>
cd soexpensive- Install dependencies
npm install- Seed the database with sample data
node seed.js- Start the server
npm start- Open your browser and navigate to
http://localhost:3000
- Browse all products in the main table
- See which store has the best price (highlighted in green)
- Compare prices across all stores at a glance
- Search: Type product name in the search box
- Category Filter: Select a category from the dropdown
- Sort Options:
- By name (alphabetical)
- By category
- By price (low to high, high to low)
- By price variance (biggest price differences)
- Click the "π History" button next to any product
- View an interactive chart showing price changes over time
- Compare price trends across different stores
products
- id, name, category, unit, created_at
stores
- id, name, created_at
prices
- id, product_id, store_id, price, recorded_at
Returns all products with their latest prices
Returns price history for a specific product
Returns all stores
Add a new price entry
{
"product_id": 1,
"store_id": 1,
"price": 2.99
}Get details for a specific product
To add new products or update prices, you can:
- Use the API endpoints
- Modify the
seed.jsfile and re-run it - Directly insert into the SQLite database
Example using the API:
fetch('http://localhost:3000/api/prices', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
product_id: 1,
store_id: 1,
price: 2.99
})
});soexpensive/
βββ package.json # Dependencies and scripts
βββ server.js # Express server
βββ db.js # Database operations
βββ seed.js # Sample data seeder
βββ prices.db # SQLite database (created after seeding)
βββ public/ # Frontend files
β βββ index.html # Main HTML
β βββ styles.css # Styling
β βββ app.js # Frontend JavaScript
βββ README.md # This file
The application is designed to be simple and fast:
- No build process required
- No heavy frameworks
- Minimal dependencies (only Express, better-sqlite3, and Chart.js)
- Pure vanilla JavaScript on the frontend
- Fast page loads (< 100ms)
- Efficient database queries with indexing
- Lazy loading of price history data
- Responsive UI with debounced search
Potential features to add:
- Real API integration with actual Finnish supermarket data
- User accounts and shopping lists
- Price alerts and notifications
- Export data to CSV/Excel
- Mobile app version
- Barcode scanning
MIT
Created as a simple, useful tool for comparing Finnish supermarket prices.