A beautiful, mobile-first expense sharing app for roommates built with React, TypeScript, Tailwind CSS, Firebase, and OpenAI.
- 📸 Receipt Scanning: Upload receipt photos and get AI-powered itemization
- 💰 Smart Splitting: Assign items to specific people or split evenly
- 📊 Balance Tracking: Real-time balance calculation between roommates
- 💳 Payment Integration: Venmo and Zelle integration for easy payments
- 📱 Mobile-First Design: Optimized for mobile use with responsive design
- 📜 History Tracking: View all past receipts and payment history
- Frontend: React 19 + TypeScript + Tailwind CSS
- Backend: Vercel Serverless Functions
- Database: Firebase Firestore
- Storage: Firebase Storage
- AI: OpenAI GPT-4 Vision for receipt analysis
- Icons: Lucide React
npm install- Create a new Firebase project at Firebase Console
- Enable Firestore Database and Storage
- Copy your Firebase config and update
src/firebase/config.ts
Create a .env.local file in the root directory:
# Firebase Configuration
REACT_APP_FIREBASE_API_KEY=your-api-key-here
REACT_APP_FIREBASE_AUTH_DOMAIN=your-project.firebaseapp.com
REACT_APP_FIREBASE_PROJECT_ID=your-project-id
REACT_APP_FIREBASE_STORAGE_BUCKET=your-project.appspot.com
REACT_APP_FIREBASE_MESSAGING_SENDER_ID=123456789
REACT_APP_FIREBASE_APP_ID=your-app-id
# OpenAI Configuration (for Vercel deployment)
OPENAI_API_KEY=your-openai-api-key-here- Get an OpenAI API key from OpenAI Platform
- Add it to your environment variables
- The API endpoint is configured to use GPT-4 Vision for receipt analysis
npm startOpen http://localhost:3000 to view the app.
- Push your code to GitHub
- Connect your repository to Vercel
- Add environment variables in Vercel dashboard
- Deploy!
The app includes Vercel serverless functions for OpenAI integration.
- Scan Receipt: Take a photo of your receipt and let AI extract the items
- Split Expenses: Assign items to yourself, your roommate, or split evenly
- View Balance: See who owes what and settle up easily
- Track History: View all past receipts and payments
The app is hardcoded for two roommates: "Yuen Ler" and "Haoming". To customize:
- Update the types in
src/types/index.ts - Update the UI components to use your names
- Update the balance calculation logic if needed
src/
├── components/ # Reusable UI components
├── firebase/ # Firebase configuration and services
├── pages/ # Main app pages
├── types/ # TypeScript type definitions
├── utils/ # Utility functions
└── App.tsx # Main app component
api/ # Vercel serverless functions
├── analyze-receipt.ts # OpenAI receipt analysis endpoint
This is a personal expense sharing app, but feel free to fork and customize for your own use!