Co-authored-by: aider (openai/unsloth/Qwen3-Coder-Next) <aider@aider.chat>
Grocery Receipt Tracker
A database application to track your grocery receipts (PDF/email format) and monitor price evolution over time.
Overview
This project helps you:
- Import and store your grocery receipts from email attachments or PDF files
- Extract item details and prices from receipt images/PDFs
- Track price changes for the same items across different stores and over time
- Analyze spending patterns and identify price trends
- Compare costs to find the best deals and optimize your shopping habits
Features
- Import receipts from email attachments or PDF files
- Extract item details and prices using OCR technology
- Store receipt details (date, store, items, prices, total)
- Track price evolution for the same items over time
- Compare prices for the same items across different stores
- Visualize price changes with charts and graphs
- Generate reports on spending patterns and savings opportunities
Storage Options
When storing your grocery receipt data, you have several options:
CSV Files
Advantages:
- Simple, human-readable format
- Easy to share and import into other tools (Excel, Google Sheets)
- No database software required
- Good for small datasets
Disadvantages:
- No data validation or constraints
- Difficult to query across multiple files
- Performance degrades with large datasets
- No built-in concurrency support
- Not ideal for tracking relationships between data (e.g., items to receipts)
SQLite Database
Advantages:
- Lightweight, serverless database engine
- Single file storage (easy to backup and transfer)
- Supports SQL queries for complex analysis
- ACID compliant for data integrity
- No separate database server required
- Excellent for desktop/local applications
Disadvantages:
- Limited concurrent write access
- Not suitable for multi-user web applications
- Database size can grow with large datasets
PostgreSQL/MySQL Database
Advantages:
- Robust, enterprise-grade database systems
- Excellent for multi-user applications
- Advanced querying capabilities
- Strong concurrency support
- Scalable for large datasets
Disadvantages:
- Requires separate database server setup
- More complex configuration
- Overkill for personal/local use cases
Recommendation for This Project
For tracking personal grocery receipts with price comparison features, SQLite is the recommended option. It provides the benefits of a proper database (structured queries, data integrity, relationships) while remaining simple to set up and maintain as a single file.
Getting Started
- Clone this repository
- Install dependencies:
pip install -r requirements.txt - Set up the SQLite database:
python manage.py migrate - Start the application:
python manage.py runserver - Import your first receipt by uploading a PDF or forwarding an email receipt
The application will create a db.sqlite3 file in the project directory to store your receipt data.
Usage
- Upload your grocery receipts (PDF or email attachments)
- The system will extract item details and prices using OCR
- View your receipt history and price tracking dashboard
- Use the comparison tools to analyze price changes over time
- Export reports for analysis or sharing
Contributing
We welcome contributions! Please read our contributing guidelines before submitting pull requests.
License
This project is licensed under the MIT License - see the LICENSE file for details.