{"id":35105369,"url":"https://github.com/deaneeth/splitsmart-ai","last_synced_at":"2026-05-21T03:32:47.672Z","repository":{"id":325494209,"uuid":"1101394172","full_name":"deaneeth/splitsmart-ai","owner":"deaneeth","description":"Intelligent bill splitting powered by Google Gemini. Parse receipts via OCR, assign items using natural language chat, and automatically calculate tax/tip splits. Built with React, TypeScript, \u0026 Tailwind CSS.","archived":false,"fork":false,"pushed_at":"2025-11-21T20:19:29.000Z","size":135,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-12-29T12:43:53.157Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/deaneeth.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-11-21T15:59:29.000Z","updated_at":"2025-11-21T20:19:32.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/deaneeth/splitsmart-ai","commit_stats":null,"previous_names":["deaneeth/splitsmart-ai"],"tags_count":0,"template":false,"template_full_name":"google-gemini/aistudio-repository-template","purl":"pkg:github/deaneeth/splitsmart-ai","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deaneeth%2Fsplitsmart-ai","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deaneeth%2Fsplitsmart-ai/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deaneeth%2Fsplitsmart-ai/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deaneeth%2Fsplitsmart-ai/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/deaneeth","download_url":"https://codeload.github.com/deaneeth/splitsmart-ai/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deaneeth%2Fsplitsmart-ai/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33287459,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-21T02:57:32.698Z","status":"ssl_error","status_checked_at":"2026-05-21T02:57:31.990Z","response_time":62,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-12-27T18:05:09.257Z","updated_at":"2026-05-21T03:32:47.662Z","avatar_url":"https://github.com/deaneeth.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SplitSmart AI 🧾🤖\n\n![React](https://img.shields.io/badge/react-%2320232a.svg?style=for-the-badge\u0026logo=react\u0026logoColor=%2361DAFB)\n![TailwindCSS](https://img.shields.io/badge/tailwindcss-%2338B2AC.svg?style=for-the-badge\u0026logo=tailwind-css\u0026logoColor=white)\n![Google Gemini](https://img.shields.io/badge/Google%20Gemini-8E75B2?style=for-the-badge\u0026logo=google%20bard\u0026logoColor=white)\n![TypeScript](https://img.shields.io/badge/typescript-%23007ACC.svg?style=for-the-badge\u0026logo=typescript\u0026logoColor=white)\n\n**SplitSmart AI** is an intelligent bill-splitting web application that revolutionizes how groups share costs. By leveraging Google's **Gemini API**, it turns static receipt images into interactive, assignable lists, allowing users to split bills using natural language, drag-and-drop, or manual controls.\n\n---\n\n## ✨ Key Features\n\n### 🧠 AI-Powered Parsing\n*   **Instant Digitization**: Upload a photo of your receipt, and Gemini 3 Pro extracts all items, prices, tax, and tip data with high precision.\n*   **Visual Grounding**: Hover over items to see a **cropped zoom** of the original receipt line, ensuring you know exactly what you're assigning.\n\n### 💬 Natural Language Assignments\n*   **Chat Assistant**: Just type \"Tom and Jerry shared the pizza\" or \"Alice had the salad,\" and the AI updates the bill in real-time.\n*   **Context Aware**: The AI understands context and handles complex splitting logic effortlessly.\n\n### ⚖️ Advanced Splitting Logic\n*   **Weighted Splits**: Assign items unevenly (e.g., \"Bob ate 3 slices, Alice ate 1\"). The math handles the ratios automatically.\n*   **Equal Split Mode**: Toggle between itemized breakdowns and a simple \"even split\" for the whole table.\n*   **Dynamic Tax \u0026 Tip**: Automatically distributes tax and tip proportionally based on individual sub-totals.\n\n### 🥗 Smart \u0026 Fun Extras\n*   **Dietary Analysis**: One-click analysis to tag items as 🌱 Vegan, 🌾 Gluten-Free, 🌶️ Spicy, 🍷 Alcohol, etc.\n*   **Roast Mode**: Need a laugh? The AI analyzes spending habits and generates a witty \"roast\" of your group (e.g., mocking the big spender).\n\n### 🛠️ Modern UX/UI\n*   **Drag-and-Drop**: (Desktop) Drag friends from your \"Frequent Friends\" sidebar directly onto items.\n*   **Dark Mode**: Fully responsive design with automatic dark mode support.\n*   **Session History**: Auto-saves your receipts locally so you never lose track of a bill.\n*   **Export**: Copy the summary to clipboard or download it as an image to share in group chats.\n\n---\n\n## 🚀 Getting Started\n\n### Prerequisites\n*   **Node.js** (v16+)\n*   **Google Gemini API Key** (Get one at [Google AI Studio](https://aistudio.google.com/))\n\n### Installation\n\n1.  **Clone the repository**\n    ```bash\n    git clone https://github.com/yourusername/splitsmart-ai.git\n    cd splitsmart-ai\n    ```\n\n2.  **Install dependencies**\n    ```bash\n    npm install\n    ```\n\n3.  **Set up Environment Variables**\n    Create a `.env` file in the root directory and add your API key:\n    ```env\n    API_KEY=your_google_gemini_api_key_here\n    ```\n\n4.  **Run the application**\n    ```bash\n    npm start\n    ```\n    Open [http://localhost:3000](http://localhost:3000) to view it in the browser.\n\n---\n\n## 📖 Usage Guide\n\n### 1. Upload Receipt\nDrag and drop an image file or click to use your camera. The app supports standard image formats (JPG, PNG). Wait a moment for Gemini to process the image.\n\n### 2. Assign Items\n*   **Click**: Tap an item to open the assignment popup. Select names from the list or add new ones.\n*   **Chat**: Type commands like \"Add Sarah to the Burger\" in the chat box.\n*   **Drag (Desktop)**: Drag a user avatar from the right sidebar onto a row.\n*   **Weights**: In the assignment popup, use `+` / `-` to adjust shares (e.g., User A pays for 2/3, User B for 1/3).\n\n### 3. Analyze \u0026 Roast\n*   Click the **Leaf Icon** (🌿) to identify dietary restrictions.\n*   In the Summary tab, click the **Flame Icon** (🔥) to generate a funny roast of the bill.\n\n### 4. Settle Up\nGo to the **Summary** tab to view the final breakdown.\n*   Adjust tax and tip if needed.\n*   Click **Copy** to paste the text into WhatsApp/Messenger.\n*   Click **Download** to save a receipt image.\n\n---\n\n## 🏗️ Architecture\n\nThe project is built with a clean, component-based architecture:\n\n*   **`App.tsx`**: Main state manager handling sessions, receipt data, and global UI state.\n*   **`services/geminiService.ts`**: Handles all interactions with the Google GenAI SDK.\n    *   `parseReceiptImage`: Vision-to-JSON extraction.\n    *   `processChatCommand`: NLP for assignment logic.\n    *   `identifyDietaryRestrictions`: Classification task.\n    *   `generateRoast`: Creative text generation.\n*   **`components/`**:\n    *   `ReceiptPane.tsx`: The core list view with complex interactions (drag-n-drop, editing, overlays).\n    *   `ChatInterface.tsx`: Chat UI for natural language commands.\n    *   `Summary.tsx`: Calculation engine and result visualization.\n    *   `FileUploader.tsx`: Drag-and-drop file input with visual feedback.\n    *   `Sidebar.tsx`: Session history management.\n*   **`types.ts`**: TypeScript definitions for type safety across the app.\n\n---\n\n## 🔧 Tech Stack Details\n\n*   **Frontend**: React 18 with TypeScript.\n*   **Styling**: Tailwind CSS for utility-first, responsive styling.\n*   **AI Integration**: `@google/genai` SDK.\n*   **Models Used**:\n    *   `gemini-3-pro-preview`: Complex vision tasks (parsing) and creative writing (roasting).\n    *   `gemini-flash-lite-latest` or `gemini-2.5-flash`: Fast, low-latency tasks (chat commands, dietary analysis).\n*   **Icons**: `lucide-react`.\n*   **Utils**: `html2canvas` for image export.\n\n---\n\n## 📄 License\n\nThis project is open source and available under the **MIT License**.\n\n---\n\n*Built with ❤️ and 🤖 by Deaneeth*\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeaneeth%2Fsplitsmart-ai","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdeaneeth%2Fsplitsmart-ai","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeaneeth%2Fsplitsmart-ai/lists"}