{"id":34719217,"url":"https://github.com/mohankumar01012005/expense-splitter-challenge-medable","last_synced_at":"2026-04-08T16:01:39.514Z","repository":{"id":327176581,"uuid":"1108164042","full_name":"mohankumar01012005/expense-splitter-challenge-Medable","owner":"mohankumar01012005","description":"Expense Splitter is a clean, responsive, and production-ready group expense management app built with React and TypeScript. It helps users track shared expenses, calculate real-time balances, and simplify debts with accurate, integer-based calculations for financial reliability. Designed with a modern UI, centralized state management","archived":false,"fork":false,"pushed_at":"2025-12-02T09:57:17.000Z","size":1447,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-12-26T12:48:00.667Z","etag":null,"topics":["css","jest","react","reactcontext","reacttestinglibrary","state-management","tailwindcss","toast","typescript","vite"],"latest_commit_sha":null,"homepage":"https://expense-splitter-challenge.vercel.app","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/mohankumar01012005.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-12-02T05:30:33.000Z","updated_at":"2025-12-02T09:57:22.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/mohankumar01012005/expense-splitter-challenge-Medable","commit_stats":null,"previous_names":["mohankumar01012005/expense-splitter-challenge-medable"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mohankumar01012005/expense-splitter-challenge-Medable","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mohankumar01012005%2Fexpense-splitter-challenge-Medable","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mohankumar01012005%2Fexpense-splitter-challenge-Medable/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mohankumar01012005%2Fexpense-splitter-challenge-Medable/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mohankumar01012005%2Fexpense-splitter-challenge-Medable/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mohankumar01012005","download_url":"https://codeload.github.com/mohankumar01012005/expense-splitter-challenge-Medable/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mohankumar01012005%2Fexpense-splitter-challenge-Medable/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31562697,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-08T14:31:17.711Z","status":"ssl_error","status_checked_at":"2026-04-08T14:31:17.202Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":["css","jest","react","reactcontext","reacttestinglibrary","state-management","tailwindcss","toast","typescript","vite"],"created_at":"2025-12-25T01:30:07.860Z","updated_at":"2026-04-08T16:01:39.508Z","avatar_url":"https://github.com/mohankumar01012005.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 💰 Expense Splitter — React + TypeScript (Production-Ready)\n\nA clean, responsive, and fully functional group expense management application built using React + TypeScript, featuring shared state management, real-time balance calculations, debt simplification, toast notifications, and a production-quality UI/UX.\n\nThis application helps groups (friends, roommates, travel groups, teams) record expenses and instantly see who owes whom.\n\n\n### Live : https://expense-splitter-challenge.vercel.app\n\n\n### ✨ Features\n### 👥 People Management\n\n- **Add people to the group**\n\n- **Remove people with data-integrity checks**\n\n- **Toast notifications for feedback**\n\n- **Validations to prevent accidental actions**\n\n### 💸 Expense Management\n\n### Add expenses with:\n\n- **Description**\n\n- **Amount**\n\n- **Date**\n\n- **Paid by**\n\n- **Split between**\n\n- **Equal or custom splits**\n\n- **Delete expenses**\n\n- **Real-time UI updates after every mutation**\n\n- **Production-style toast messages using react-hot-toast**\n\n### 📊 Live Balance Calculation\n\n### Total group spending\n\n### Per-person:\n\n- **Total paid**\n\n- **Total owed**\n\n- **Net balance**\n\n‘- **Owes’ vs ‘Is owed’ UI states**\n\n- **Zero balance detection (Settled Up)**\n\n### 🔄 Debt Simplification\n\n- **Minimizes number of transactions**\n\n- **Shows suggested settlements (who pays whom)**\n\n- **Integer-based calculations to avoid floating-point errors**\n\n### 🎨 Modern UI \u0026 UX\n\n- **Fully responsive**\n\n- **Modern card-based layout**\n\n- **Smooth hover / elevation states**\n\n- **Clean forms with validations**\n\n- **Expandable expense items**\n\n- **Subtle micro-interactions**\n\n### 💾 Centralized State Management\n\n- **Custom reducer + context API**\n\n- **Predictable, testable state updates**\n\n- **Actions, selectors \u0026 utilities for clean architecture**\n\n### 🧪 Unit Tests\n\n- **Vitest test environment**\n\n- **Component-level and function-level tests**\n\n- **Utility logic thoroughly validated**\n\n### 🛠️ Tech Stack\n\n### Frontend\n\n- **React**\n\n- **TypeScript**\n\n- **Vite**\n\n- **CSS + Tailwind-like utility classes**\n\n- **State Management**\n\n- **Custom reducer + React Context**\n\n- **Clean action definitions \u0026 selectors**\n\n- **Utilities**\n\n- **Custom calculation engine:**\n\n- **calculateTotals.ts**\n\n- **simplifyDebts.ts**\n\n- **format.ts**\n\n- **Notifications**\n\n- **react-hot-toast — production-grade toast notifications**\n\n- **Testing**\n\n- **Vitest**\n\n- **React Testing Library**\n\n### 📁 Project Structure\n\nsrc/\n├── components/\n│   ├── PeopleManager.tsx\n│   ├── ExpenseForm.tsx\n│   ├── ExpenseList.tsx\n│   └── BalanceView.tsx\n│\n├── state/\n│   ├── actions.ts\n│   ├── reducer.ts\n│   ├── selectors.ts\n│   └── index.tsx\n│\n├── utils/\n│   ├── calcBalances.ts\n│   ├── simplifyDebts.ts\n│   └── format.ts\n│\n├── App.tsx\n├── main.tsx\n└── initialData.ts\n\n\n\n\n### 🚀 Getting Started\n- **1️⃣ Install dependencies**\n- **npm install**\n\n### 2️⃣ Start development server\n- **npm run dev**\n\n### 3️⃣ Run unit tests\n- **npm test**\n\n### 🧩 Core Logic Overview\n- **✔ calculateTotals.ts**\n\n- **Uses integer-based cents to avoid floating-point issues**\n\n### Handles:\n\n- **Equal split**\n\n- **Custom split**\n\n- **Missing or partial custom amounts**\n\n- **Remaining differences assigned deterministically**\n\n### Produces:\n\n- **Per-person paid, owed, net**\n\n- **Group totals**\n\n- **✔ simplifyDebts.ts**\n\n- **Converts net balances into minimal transactions**\n\n- **Greedy algorithm matching debtors → creditors**\n\n- **Ensures no unmatched amounts remain**\n\n### 🛡️ Data Integrity Rules\n\n- **People cannot be removed if referenced in an expense**\n\n- **Expenses require at least one participant**\n\n- **Custom split amounts must match total (or require confirmation)**\n\n- **Every action validated with toast messages**\n\n\n\n### 📦 Production Build\n- **npm run build**\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmohankumar01012005%2Fexpense-splitter-challenge-medable","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmohankumar01012005%2Fexpense-splitter-challenge-medable","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmohankumar01012005%2Fexpense-splitter-challenge-medable/lists"}