An intelligent expense tracking application that automatically processes receipt images using AWS services and displays spending analytics through interactive charts.
πΈ Screenshots
π Web Application Interface
![]()
β‘ AWS Lambda Functions Backend
![]()
βοΈ Cloud S3 Bucket Storage
![]()
graph TD
A[User] --> B[Web Interface]
B --> C[File Upload]
C --> D[API Gateway]
D --> E[Lambda: Get Presigned URL]
E --> F[S3 Bucket]
F --> G[S3 Event Trigger]
G --> H[Lambda: Process Receipt]
H --> I[AWS Textract]
H --> J[DynamoDB]
B --> K[API Gateway: Summary]
K --> L[Lambda: Get Summary]
L --> J
J --> M[Chart.js Visualization]
M --> B
style A fill:#e1f5fe, color:#111
style B fill:#f3e5f5, color:#111
style F fill:#fff3e0, color:#111
style I fill:#e8f5e8, color:#111
style J fill:#fce4ec, color:#111
- HTML5 - Structure and layout
- CSS3 - Modern styling with CSS Grid/Flexbox
- JavaScript - Interactive functionality
- Chart.js - Data visualization (Radar & Pie charts)
- AWS Lambda - Serverless functions
- AWS API Gateway - API endpoints
- AWS S3 - Receipt image storage
- AWS Textract - OCR text extraction
- AWS DynamoDB - NoSQL database
- AWS IAM - Permission management
- AWS EC2 - Web hosting
- Apache - Web server
expense-tracker/
βββ FrontEnd
β βββ index.html # Main web interface
β βββ styles.css
β βββ app.js # Frontend JavaScript logic
βββ π lambda-functions/
β βββ Pre-signed_url.py # S3 upload URLs
β βββ process_receipt_upload.py # Receipt processing
β βββ get_summary.py # Data aggregation
βββ img
βββ π README.md
- Receipt Upload - Drag & drop or browse file upload
- AI Text Extraction - Automatic OCR using AWS Textract
- Smart Categorization - Auto-categorizes expenses (Food, Clothes, Travel, Medical)
- Amount Detection - Extracts total amounts from receipts
- Interactive Charts - Toggle between Radar and Pie chart views
- Real-time Storage - Instant data persistence in DynamoDB
- Data Labels - View exact amounts directly on charts
- Responsive Design - Works on desktop and mobile
- Scalable Architecture - Scalable and cost-effective
- Secure Upload - Pre-signed URLs for direct S3 uploads
- AWS Account with appropriate permissions
- EC2 instance for hosting (optional)
- Modern web browser
git clone https://github.com/harshnilve28/AWS-Expense-Tracker.git
cd expense-tracker- Create S3 Bucket for receipt storage
- Set up DynamoDB table with the provided schema
- Deploy Lambda functions using the provided Python files
- Configure API Gateway with the endpoints
- Set up IAM roles with required permissions
Update the API endpoints in app.js:
const PRESIGN_URL = "https://your-api-gateway-url/presign";
const SUMMARY_URL = "https://your-api-gateway-url/summary";- Upload files to your web server
- Ensure proper file permissions
- Test the application
Generates pre-signed S3 upload URLs
{
"url": "https://bucket.s3.amazonaws.com/",
"fields": { ... }
}Returns expense totals by category
{
"Food": 15420,
"Clothes": 8965,
"Travel": 3240,
"Medical": 1250
}{
"id": "uuid",
"category": "Food|Clothes|Travel|Medical",
"amount": "decimal",
"timestamp": "ISO-8601",
"raw_text": "extracted text",
"s3_key": "receipt file path"
}Test the system with various receipt formats:
- Restaurant bills (Food category)
- Shopping receipts (Clothes category)
- Travel bookings (Travel category)
- Medical prescriptions (Medical category)
- Images: JPG, JPEG, PNG
- Documents: PDF (async processing)
- File Size: Up to 10MB per receipt
- Pre-signed URLs - Secure direct S3 uploads
- IAM Roles - Least privilege access
- API Gateway - Rate limiting and authentication ready
- Input Validation - File type and size restrictions
- Upload Speed: < 3 seconds for typical receipts
- Processing Time: 1-2 seconds for text extraction
- Chart Rendering: < 500ms for data visualization
- Storage Cost: ~$0.02 per month for 100 receipts
Harsh - Harsh Nilve
- AWS for comprehensive cloud services
- Chart.js for beautiful data visualizations
- The open-source community for inspiration
β Star this repository if it helped you! β