A modern, intelligent bill management solution that uses OCR technology to automatically extract and validate bill information.
- Beautiful Design: Modern gradient-based design with smooth animations
- Responsive Layout: Works perfectly on desktop, tablet, and mobile
- Interactive Elements: Hover effects, transitions, and visual feedback
- Glass Morphism: Modern glass-effect components with backdrop blur
- Advanced Text Extraction: Uses Tesseract OCR for accurate text recognition
- Intelligent Parsing: Automatically extracts:
- Store name and details
- Bill amount and tax information
- GSTIN (Goods and Services Tax Identification Number)
- Bill date and number
- Individual line items
- GST Validation: Built-in GST number validation
- Error Handling: Comprehensive error handling with user-friendly messages
- Real-time Statistics: Total bills, expenses, average amounts
- GST Validation Tracking: Monitor valid vs invalid GST numbers
- Recent Bills: Quick access to recently scanned bills
- Quick Actions: Easy navigation to key features
- React 18 with Vite for fast development
- Tailwind CSS for modern styling
- Lucide React for beautiful icons
- React Router for navigation
- Axios for API communication
- React Dropzone for file uploads
- React Hot Toast for notifications
- Spring Boot 3 with Java 17+
- Spring Data JPA for database operations
- H2 Database (in-memory for development)
- Tesseract OCR for image text extraction
- Maven for dependency management
- Node.js 18+ and npm
- Java 17+ and Maven
- Tesseract OCR installed on your system
-
Clone the repository
git clone <repository-url> cd billsnap
-
Install Tesseract OCR
# macOS brew install tesseract # Ubuntu/Debian sudo apt-get install tesseract-ocr # Windows # Download from https://github.com/UB-Mannheim/tesseract/wiki
-
Start the Backend
cd billsnap-backend mvn spring-boot:runThe backend will start on
http://localhost:8080/api -
Start the Frontend
cd billsnap-frontend npm install npm run devThe frontend will start on
http://localhost:3000
- Visit
http://localhost:3000 - You'll see the beautiful new dashboard with:
- Welcome section with gradient background
- Statistics cards with hover effects
- Quick action buttons with animations
- Recent bills section
- Click "Scan Bill" or navigate to
/scan - Upload the SLEEK BILL image you provided
- The system will:
- Show upload progress with animations
- Extract text using OCR
- Parse and display extracted information
- Allow GST validation
- Enable saving the bill
Based on your SLEEK BILL image, the system should extract:
- Store Name: "SLEEK BILL"
- Amount: βΉ968.00
- GSTIN: 27AAFCV2449G1Z7
- Date: 23 - Jan - 2025
- Tax Amount: Calculated from IGST breakdown
The application uses the following default settings in application.properties:
# OCR Configuration
tesseract.datapath=/opt/homebrew/share/tessdata/ # macOS
tesseract.language=eng
# Server Configuration
server.port=8080
server.servlet.context-path=/api
# File Upload
spring.servlet.multipart.max-file-size=10MBThe frontend is configured to connect to the backend at http://localhost:8080/api.
- Gradient Backgrounds: Beautiful blue-to-purple gradients
- Glass Morphism: Translucent components with backdrop blur
- Rounded Corners: Modern 2xl border radius throughout
- Shadow Effects: Layered shadows for depth
- Hover Animations: Cards lift and scale on hover
- Smooth Transitions: 300ms transitions for all interactions
- Loading States: Animated spinners with gradient backgrounds
- Success States: Green checkmarks and confirmation messages
- Inter Font: Modern, readable font family
- Gradient Text: Brand text uses gradient colors
- Proper Hierarchy: Clear heading and text sizes
- Text Shadows: Subtle shadows for better readability
- Mobile-First: Optimized for all screen sizes
- Flexible Grid: CSS Grid and Flexbox layouts
- Touch-Friendly: Large touch targets for mobile
- Adaptive Navigation: Collapsible mobile menu
- Better Pattern Matching: Improved regex patterns for Indian bills
- Multiple Fallbacks: Multiple extraction strategies
- Debug Logging: Comprehensive logging for troubleshooting
- GSTIN Recognition: Handles Indian GST numbers with spaces
- Currency Support: Proper βΉ symbol handling
- Date Formats: Supports Indian date formats
- Tax Breakdown: Extracts IGST, CGST, SGST amounts
- Graceful Degradation: Falls back to defaults when extraction fails
- User Feedback: Clear error messages and loading states
- Validation: Built-in data validation
-
OCR Not Working
- Ensure Tesseract is installed:
tesseract --version - Check the data path in
application.properties - Verify image quality (clear, high-resolution images work best)
- Ensure Tesseract is installed:
-
Frontend Not Connecting to Backend
- Ensure both servers are running
- Check CORS configuration
- Verify API endpoints match
-
Image Upload Issues
- Check file size (max 10MB)
- Ensure supported formats: JPG, PNG, GIF, BMP
- Clear browser cache if needed
The backend includes comprehensive logging. Check the console output for:
- Extracted text from OCR
- Parsed bill details
- API request/response logs
cd billsnap-frontend
npm run build
# Deploy the dist/ folder to your hosting servicecd billsnap-backend
mvn clean package
# Deploy the generated JAR filePOST /api/bills/upload- Upload and process bill imageGET /api/bills- Get all billsPOST /api/bills/validate-gstin- Validate GST numberGET /api/bills/statistics/*- Get various statistics
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
This project is licensed under the MIT License.
Note: This is a development version. For production use, consider:
- Using a production database (PostgreSQL, MySQL)
- Implementing proper authentication
- Adding rate limiting
- Using cloud storage for images
- Setting up proper monitoring and logging