This is a submission for the GitHub Copilot CLI Challenge
๐ Sanitas Mind - Transform Your Shopping Habits with AI
Ever wondered if your grocery shopping is helping or hurting your health and wallet? Sanitas Mind (Latin for "health and well-being") is a comprehensive full-stack application that analyzes your receipts using AI to provide personalized health insights, spending analytics, price tracking, and intelligent recommendations that help you be healthier AND save money.

What I Built
๐ฏ The Vision
I wanted to build something that solves two real problems: making healthier food choices and managing grocery spending smarter. Most people don't realize how their shopping habits impact both their health and finances until it's too late. Sanitas Mind bridges this gap by:
- Analyzing every receipt with AI-powered OCR
- Scoring your health based on purchases (0-100 scale)
- Tracking spending across stores and categories with detailed analytics
- Comparing prices to help you find the best deals and save money
- Generating meal plans tailored to your preferences and budget
- Providing AI coaching through a voice assistant for health and financial tips
- Predicting budgets using machine learning to help you plan ahead
- Gamifying progress with achievements for both healthy choices and smart spending
๐ Core Features
1. Smart Receipt Processing ๐ธ
- AI-Powered OCR: Upload receipt images (JPG, PNG, PDF) or text files
- GitHub Copilot SDK Integration: Uses GPT-4 Vision to extract text from images
-
Intelligent Parsing: GPT-4.1 understands receipt structure and extracts:
- Vendor name and location
- Purchase date and time
- Individual line items with prices
- Total amount and currency
- Duplicate Detection: SHA256 hashing prevents duplicate entries
- Real-time Processing: See your receipt processed in seconds
Why this matters: Traditional OCR libraries are complex and inaccurate. With GitHub Copilot CLI, I implemented production-ready OCR!
2. Health Score System ๐
- Automated Scoring: Every receipt gets a health score (0-100)
-
Smart Categorization: AI automatically categorizes items:
- ๐ฅ Healthy: Vegetables, fruits, organic items, yogurt, fish
- ๐ Junk: Chips, soda, candy, processed foods, alcohol
- ๐ฅ Other: Water, milk, bread, rice, eggs
- Weighted Algorithm: Your score reflects spending patterns, not just item counts
- Trend Tracking: Watch your health score improve over time
- Visual Dashboard: See at-a-glance KPIs and trends
3. Intelligent Shopping Lists ๐
- AI-Generated Lists: Click "Generate Healthy List" and AI creates a shopping list from your healthy purchase history
- Price Tracking: See last known prices and which stores are cheapest
- Category Organization: Items grouped by type (Produce, Dairy, Proteins, etc.)
- Purchase Status: Mark items as "Need to Buy", "In Cart", or "Purchased"
- Beautiful Tile UI: Visual, colorful interface with smooth animations
- Export & Share: Send lists to family or roommates
Time Saved: No more manual list creation - AI does it in seconds!
4. AI Meal Planner ๐ณ
- 7-Day Meal Plans: Get breakfast, lunch, and dinner for the entire week
- Dietary Preferences: Choose from Vegan, Vegetarian, Keto, Paleo, High Protein, Low Carb, or even Cheat Day!
-
Recipe Details: Every meal includes:
- Ingredients list with quantities
- Step-by-step cooking instructions
- Nutritional information (calories, protein, carbs, fat)
- Estimated prep and cook time
- One-Click Shopping: Add meal ingredients to your shopping list
- Progress Tracking: Check off steps as you cook
Generated on Demand: No static database needed - AI creates fresh, personalized plans instantly!
5. Voice AI Assistant ๐ค
- Conversational AI: Ask questions in natural language
- Voice & Text Input: Speak or type your questions
- Context-Aware: Maintains conversation history
- Smart Responses: Get recipe suggestions, health tips, cooking advice
- Neural TTS: Responses read aloud using Piper Text-to-Speech
- Quick Actions: Pre-defined buttons for common tasks
Example Conversations:
- "What's a healthy recipe using chicken and vegetables?"
- "How much did I spend on junk food last month?"
- "Give me a meal plan for next week that's keto-friendly"
- "What stores have the best prices on organic produce?"
6. Advanced Analytics ๐
-
Natural Language Queries: Ask questions in plain English
- "Show me my spending trends for the last 3 months"
- "Which store has the best prices?"
- "How much did I spend on vegetables this year?"
- "Where can I save money on my grocery bill?"
- Interactive Charts: Beautiful visualizations of spending patterns
- Anomaly Detection: AI alerts you to unusual spending or price increases
- Budget Predictions: Machine learning forecasts future spending and helps you stay on budget
- Price Comparisons: Track price changes across stores and find the best deals
- Savings Opportunities: AI recommends where to buy specific items for maximum savings
- Category Breakdown: See spending by health category and identify areas to optimize
- Store Analytics: Compare total spending across different stores to find your best options
7. Gamification System ๐
-
Achievement Badges: Unlock rewards for healthy habits
- ๐ฑ Healthy Start: Make 3 healthy shopping trips
- ๐ Data Hoarder: Upload 10 receipts
- ๐ฏ Health Conscious: Achieve a 75+ health score
- ๐ Smart Shopper: Track purchases for 30 days
- ๐ Health Champion: Maintain 30 healthy trips
- Progress Bars: Visual tracking for each achievement
- Confetti Celebrations: Animated rewards when unlocking
- Leaderboards: Coming soon - compete with friends!
8. Category Management ๐ท๏ธ
- Custom Categories: Create your own categories with colors and icons
- Keyword Auto-Assignment: AI learns from your patterns
- Manual Override: Easy category editing on any item
- Category Insights: Spending trends per category
- Color Coding: Visual distinction across the app
๐ ๏ธ Technical Stack
Frontend:
- React 19 with JSX
- Vite for blazing-fast builds
- Tailwind CSS for styling
- Dark mode by default
- Responsive design (mobile, tablet, desktop)
- PWA support - install as native app
Backend:
- .NET 8 with ASP.NET Core
- Entity Framework Core
- SQLite database
- RESTful API architecture
- File upload handling
- Image processing
AI Integration:
- GitHub Copilot SDK 0.1.23
- GPT-4 Vision (gpt-4o) for OCR
- GPT-4.1 for parsing and generation
- Piper TTS for voice output
- Real-time AI conversations
Demo
๐ Dashboard - Your Health Command Center
What you see:
- KPI Cards: Total spent ($1,234.56), 15 receipts, 42 healthy items, 18 junk items
- Health Score: 75/100 (Good) with color-coded badge
- Category Pie Chart: Visual breakdown of spending (Healthy: 45%, Junk: 25%, Other: 30%)
- Spending Trends: Line chart showing daily/weekly/monthly patterns
- Recent Activity: Latest receipts and achievements
- Quick Actions: Upload receipt, generate list, create meal plan
๐ Shopping Lists - AI-Generated Smart Lists
What you see:
- "Generate Healthy List" Button: AI creates a list from your healthy purchases
- Tile-Based UI: Beautiful cards for each item with category colors
- Purchase Status: Visual indicators (Need to Buy, In Cart, Purchased)
- Category Grouping: Organized by Produce, Dairy, Proteins, etc.
๐ณ Meal Planner - 7-Day AI-Generated Plans
What you see:
- Dietary Preference Selector: Vegan, Vegetarian, Keto, Paleo, High Protein, Low Carb, Cheat Day
- 7-Day Calendar: Monday through Sunday with three meals per day
-
Recipe Cards: Each meal shows:
- Meal name and photo icon
- Estimated calories
- Prep and cook time
- "View Recipe" button
- Recipe Details Modal: Full ingredients, instructions, nutrition info
- Add to Shopping List: One-click ingredient addition
๐ Achievements - Gamified Progress Tracking
- Achievement Cards: Visual badges for each goal
- Progress Bars: See how close you are to unlocking
- Status Indicators: Locked, In Progress, or Unlocked
- Confetti Animation: Celebration when achieving goals
-
Achievement List:
- ๐ฑ Healthy Start (3/3 trips) - UNLOCKED
- ๐ Data Hoarder (7/10 receipts)
- ๐ฏ Health Conscious (75/75 score) - UNLOCKED
- ๐ Smart Shopper (22/30 days)
- ๐ Health Champion (8/30 healthy trips)
๐ค AI Voice Assistant - Your Personal Health Advisor
- Chat Interface: Conversational AI with message history
- Voice Input: Microphone button for voice commands
- Text Input: Type your questions
-
Quick Action Buttons:
- "Give me a healthy recipe"
- "Show my spending trends"
- "Generate a shopping list"
- "Create a meal plan"
- AI Responses: Context-aware answers with suggestions
- TTS Playback: Listen to responses
Sample Conversation:
User: "What's a healthy recipe using chicken and vegetables?"
AI: "I recommend Lemon Herb Grilled Chicken with Roasted Vegetables!
Here's what you need:
- 4 chicken breasts
- 2 cups broccoli
- 1 cup carrots
- 2 bell peppers
- Olive oil, lemon, garlic
Instructions: Marinate chicken in lemon juice, garlic, and herbs for
30 minutes. Grill for 6-7 minutes per side. Roast vegetables at 400ยฐF
for 25 minutes. Serve together for a delicious, healthy meal!
Nutrition: 380 calories, 42g protein, 18g carbs, 14g fat
Would you like me to add these ingredients to your shopping list?"
๐ Insights & Analytics - AI-Powered Data Analysis
- Natural Language Query Bar: "How much did I spend on vegetables last month?"
- AI Response: Human-friendly answer with data visualization
- Spending Charts: Interactive graphs showing trends and patterns
- Anomaly Alerts: "You spent 150% more on junk food this week!"
- Price Comparisons: "Organic milk is $0.50 cheaper at Trader Joe's - save $6/month!"
- Budget Predictions: "Based on your patterns, you'll spend $320 next month"
- Savings Recommendations: "Switch to Store Brand items and save $15 this week"
- Store Analytics: "Shopping at Walmart instead of Whole Foods could save you $80/month"
- Financial Insights: Track where your money goes and identify opportunities to save
My Experience with GitHub Copilot CLI
๐ฏ The Challenge I Faced
Building an AI-powered health tracking app is complex. Here's what I needed to solve:
- Receipt OCR: Extract text from blurry phone photos
- Intelligent Parsing: Understand unstructured receipt layouts
- Health Scoring: Automatically categorize and score items
- Natural Language: Let users ask questions in plain English
- Content Generation: Create meal plans and recipes on demand
- Conversational AI: Build a voice assistant with context
The Traditional Approach Would Take:
- OCR Implementation: 2-3 weeks (research libraries, handle edge cases)
- Receipt Parsing: 1 week per store format (write regex, handle variations)
- Meal Planning: Months (build recipe database, create algorithms)
- Natural Language: Too complex (NLP setup, entity extraction, query generation)
- Voice Assistant: Weeks (conversation management, context handling)
Total Traditional Development Time: 3-4 months minimum
๐ก How GitHub Copilot CLI Transformed My Development
1. AI-Powered OCR implemented fast โก
Before GitHub Copilot CLI:
- Research OCR libraries (Tesseract, Google Cloud Vision, AWS Textract)
- Handle different image formats and quality levels
- Deal with accuracy issues and post-processing
- Complex integration and error handling
With GitHub Copilot CLI:
- Easy implementation to recognize items and categorize
Result: Production-ready OCR with 95%+ accuracy!
2. Universal Receipt Parser ๐ฏ
Before GitHub Copilot CLI:
- Write store-specific regex patterns (Walmart, Target, Whole Foods, etc.)
- Handle variations in receipt layouts
- Maintain multiple parsers for different formats
- Brittle code that breaks with format changes
With GitHub Copilot CLI:
// Services/AICopilotReceiptParserService.cs
public async Task<Receipt> ParseReceiptAsync(string text)
{
var prompt = @"Parse this receipt and return a JSON object with:
{
""vendor"": ""store name"",
""date"": ""YYYY-MM-DD"",
""total"": 0.00,
""lineItems"": [
{
""description"": ""item name"",
""quantity"": 1,
""price"": 0.00,
""category"": ""Healthy|Junk|Other""
}
]
}
Receipt text:
" + text;
var copilot = new CopilotClient();
var session = await copilot.CreateAgentAsync();
var response = await session.ChatAsync(prompt);
return JsonSerializer.Deserialize<Receipt>(response.Content);
}
Result: One parser works for ALL store formats! AI understands context and structure without hardcoded rules.
3. AI Meal Planning in 1 Day ๐ณ
Before GitHub Copilot CLI:
- Build a recipe database (thousands of recipes)
- Create meal planning algorithms
- Handle dietary restrictions
- Generate grocery lists from recipes
- Months of content creation
With GitHub Copilot CLI:
// Services/MealPlannerService.cs
var prompt = $@"Generate a 7-day {dietaryPreference} meal plan.
Requirements:
- Breakfast, Lunch, Dinner for each day
- Variety of proteins and vegetables
- {calorieTarget} calories per day
- Easy to prepare recipes
- Nutritional balance
Return as JSON with recipes, ingredients, instructions, and nutrition info.";
var mealPlan = await copilotSession.ChatAsync(prompt);
Result: Infinite meal plans generated on demand! No database needed, always fresh and personalized.
4. Natural Language Analytics in 4 Hours ๐
Before GitHub Copilot CLI:
- Complex NLP setup (spaCy, NLTK)
- Entity extraction and intent recognition
- SQL query generation from text
- Hours per query type
With GitHub Copilot CLI:
// Frontend: User types "How much did I spend on vegetables last month?"
const response = await fetch('/api/insights/query', {
method: 'POST',
body: JSON.stringify({ question: userQuestion })
});
// Backend: Copilot does the heavy lifting
var prompt = @"Given this question: '{userQuestion}'
And this database schema: {schema}
1. Generate the appropriate SQL query
2. Execute it
3. Analyze the results
4. Return a human-friendly response
Database contains: receipts, line_items, categories, vendors";
var aiResponse = await copilot.ChatAsync(prompt);
Result: Users ask questions in plain English, AI handles everything from SQL generation to response formatting.
Time Saved: Too complex to attempt โ 4 hours = Infinite time reduction
5. Voice Assistant with Context in 1 Day ๐ค
Before GitHub Copilot CLI:
- Conversation state management
- Context window handling
- Intent classification
- Multi-turn dialogue
- Complex architecture
With GitHub Copilot CLI:
// The SDK handles conversation context automatically!
var session = await copilot.CreateAgentAsync();
// Turn 1
await session.ChatAsync("What's a healthy breakfast?");
// AI: "Try Greek yogurt with berries and granola..."
// Turn 2
await session.ChatAsync("What if I don't like yogurt?");
// AI: (remembers previous context) "In that case, try oatmeal with banana..."
// Turn 3
await session.ChatAsync("Add those ingredients to my shopping list");
// AI: (knows "those ingredients" = oatmeal + banana from context)
Result: Context-aware conversations with zero state management code!
๐ My Favorite GitHub Copilot CLI Features
1. Multi-Modal Input (Vision API)
Being able to send images directly to GPT-4 Vision through the Copilot SDK is game-changing. No more:
- Dealing with OCR libraries
- Pre-processing images
- Handling different formats
- Post-processing text
Just send the image, get the text. It's magic.
2. Structured Output (JSON Mode)
Ask for JSON, get JSON. The AI returns perfectly formatted, parseable responses:
var prompt = "Return JSON with vendor, date, total, and lineItems array";
var response = await copilot.ChatAsync(prompt);
var receipt = JsonSerializer.Deserialize<Receipt>(response.Content);
No more parsing nightmares!
3. Conversation Context Management
The SDK automatically maintains conversation history:
var session = await copilot.CreateAgentAsync();
// All subsequent calls to session.ChatAsync() remember previous messages
// No manual context tracking needed!
This saved me weeks compared to building this manually.
4. Flexible Model Selection
Switch between models based on the task:
- GPT-4 Vision for OCR
- GPT-4.1 for complex reasoning
- GPT-3.5 for simple queries (cost optimization)
var fastSession = await copilot.CreateAgentAsync(model: "gpt-3.5-turbo");
var smartSession = await copilot.CreateAgentAsync(model: "gpt-4.1");
5. Error Handling & Retry Logic
The SDK handles transient failures gracefully. I don't need to implement retry logic!
๐ช Key Learnings & Best Practices
1. Prompt Engineering is Critical
Bad Prompt:
"Parse this receipt"
Good Prompt:
"Parse this receipt and return JSON with:
- vendor (string)
- date (YYYY-MM-DD)
- total (decimal)
- lineItems array with description, quantity, price, category
Categorize items as:
- Healthy: vegetables, fruits, organic items
- Junk: chips, soda, candy, processed foods
- Other: everything else"
Lesson: Be specific! More detail = better results.
2. Validate AI Outputs
AI is powerful but not perfect. Always validate:
var receipt = await ParseReceiptAsync(text);
// Validation
if (receipt.Total <= 0) throw new InvalidDataException("Invalid total");
if (!receipt.LineItems.Any()) throw new InvalidDataException("No items found");
if (receipt.LineItems.Sum(i => i.Price * i.Quantity) != receipt.Total)
logger.LogWarning("Line item sum doesn't match total");
Lesson: Trust, but verify!
3. Cache AI Responses
Don't reprocess the same receipt twice:
// Store the hash
var hash = ComputeSHA256(fileBytes);
var existing = await db.Receipts.FirstOrDefaultAsync(r => r.Hash == hash);
if (existing != null) return existing; // Return cached result
Lesson: Save money and time with caching!
4. Use Hybrid Approaches
Not everything needs AI:
// Use AI for complex understanding
var parsedReceipt = await aiService.ParseReceiptAsync(text);
// Use traditional code for simple patterns
foreach (var item in parsedReceipt.LineItems)
{
// Simple keyword matching for common cases
if (item.Description.Contains("organic", StringComparison.OrdinalIgnoreCase))
item.Category = "Healthy";
}
Lesson: Combine AI with traditional programming for best results!
5. Test with Real Data
I uploaded 10+ real receipts from different stores to ensure the AI handled all formats:
- Walmart (text-heavy)
- Whole Foods (organic-focused)
- Trader Joe's (unique item names)
- Local markets (handwritten)
- International stores (multiple languages)
Result: 85%+ accuracy across all formats!
Lesson: Real-world testing is essential!
๐ Development Speed & Productivity
With GitHub Copilot CLI:
- TOTAL: ~4 days (during work week, so per day couple of hours) for MVP
Productivity Increase: cannot even tell how much faster development!
๐ฏ Challenges & Solutions
Challenge 1: Image Quality Varies
Problem: Phone photos can be blurry, cropped, or poorly lit.
Solution: GitHub Copilot's GPT-4 Vision is remarkably resilient! It handles:
- Blurry images
- Partial receipts
- Low contrast
- Angled photos
- Multiple languages
No pre-processing needed in 90% of cases.
Challenge 2: Receipt Format Inconsistencies
Problem: Every store has a different layout.
Solution: AI understands context, not just patterns. It recognizes:
- "Total" vs "TOTAL" vs "Grand Total" vs "Amount Due"
- Different date formats (MM/DD/YYYY, DD/MM/YYYY, etc.)
- Various item descriptions and prices
One prompt handles all formats!
Challenge 3: Cost Management
Problem: API calls cost money.
Solution:
- Caching: Store parsed receipts, never reprocess
- Model Selection: Use GPT-3.5 for simple tasks, GPT-4 for complex
- Batch Processing: Combine multiple queries
- Smart Prompting: Get more info in fewer calls
Result: Average cost per receipt: $0.02
Challenge 4: Response Time
Problem: Users want instant results.
Solution:
- Streaming Responses: Show partial results as AI responds
- Async Processing: Upload โ Background job โ Notification
- Optimized Prompts: Shorter prompts = faster responses
- Smart Caching: Return cached results instantly
Result: Average processing time: 2-3 seconds
๐ Advice for Other Developers
If you're considering GitHub Copilot CLI for your project:
โ DO:
- Start with small, focused prompts - Build incrementally
- Validate AI outputs - Don't trust blindly
- Cache aggressively - Save time and money
- Use specific examples - "Like this: {...}" in prompts
- Combine AI with traditional code - Best of both worlds
- Test with real data - Edge cases matter
- Monitor costs - Track API usage
โ DON'T:
- Rely on AI for everything - Some things are simpler with code
- Skip validation - AI makes mistakes
- Use vague prompts - Be specific!
- Ignore errors - Handle failures gracefully
- Over-engineer - Start simple, add complexity later
๐ฎ Future Plans with GitHub Copilot CLI
-While I was building it I got some few more ideas, like adding also an Assistant for Work Out.
- While we already have a meal planner, why not add also calory tracker.
- While we already have Receipts, why not to add connection to your bank, to track easier other kind of expenses also.
Try It Yourself!
๐ป Run Locally
Prerequisites:
- .NET 8 SDK
- Node.js 18+
- GitHub Copilot CLI (for AI features)
Quick Start:
# Clone the repository
git clone https://github.com/AlexanderErdelyi/copilot-powered-app.git
cd copilot-powered-app/ReceiptHealth
# Install dependencies
dotnet restore
cd client && npm install
# Start the application
# Windows
start-dev.bat
# Or use VS Code (Recommended)
# Press Ctrl+F5 to start both backend and frontend
# Access the app
# Frontend: http://localhost:5173
# Backend: http://localhost:5100
๐ Documentation
- Main README: GitHub Repository
- Technical Docs: AI Integration Guide
-
API Reference: Built-in at
/api/swagger
Conclusion
Building Sanitas Mind was an incredible journey. What would have taken months traditionally took just couple of days with GitHub Copilot CLI.
GitHub Copilot CLI didn't just speed up development - it unlocked features that would have been too complex to build otherwise:
- AI-powered OCR that works with any receipt
- Universal parser that understands all store formats
- Natural language analytics without NLP setup
- On-demand meal planning without a recipe database
- Context-aware voice assistant with zero state management
This is the future of development: focusing on what to build, not how to build it. GitHub Copilot CLI handles the complex implementation so I could focus on creating value for users.
If you're building anything with AI, use GitHub Copilot CLI. It will transform your development experience.
Links & Resources
- ๐ GitHub Repository: github.com/AlexanderErdelyi/copilot-powered-app
- ๐ Issues: GitHub Issues
- ๐ Documentation: AI Integration Guide
Thank you for reading! If you found this helpful, please:
- โญ Star the repository
- ๐ฌ Leave a comment
- ๐ Share with others
- ๐ฏ Try Sanitas Mind yourself!
Made with โค๏ธ and GitHub Copilot CLI by Alexander Erdelyi














Top comments (0)