A contemporary web application designed for dividing bills and receipts among companions, utilizing AI-driven receipt analysis. Constructed utilizing Next.js, Prisma, SQLite, and OpenAI GPT-4o Vision.
- 📸 Receipt Upload - Submit images or PDFs of receipts
- 🤖 AI Parsing - Automated extraction of items and prices utilizing OpenAI GPT-4o Vision
- 👥 Friend Management - Add and organize friends with persistent data storage
- 🏷️ Smart Tagging - Assign friends to specific items using removable tags
- 💰 Settlement Calculation - Automatically determine the debt obligations between parties - 📱 Mobile Optimized
- Responsive design compatible with all devices - 📄 Local Database — SQLite database for durable data storagepatterns
- Clone the repository:
git clone <your-repo-url>
cd moneymanager- Install dependencies:
npm install- Set up environment variables:
- Open
.envfile - Replace
your-openai-api-key-herewith your actual OpenAI API key:
- Open
OPENAI_API_KEY=your-actual-api-key-here
- Run database migrations:
npx prisma generate
npx prisma migrate dev- Start the development server:
npm run dev- Open http://localhost:3000 in your browser
- Add individuals with whom you regularly share expenses - Contacts are stored locally and remain available across sessions
- Enter the name of the payer (the individual who settled the bill) - Select the companions involved in sharing the expense - Click on "Create Session"
- The AI will automatically extract items and prices
- Multiple invoices may be uploaded within a single session
- Click once more to remove them (tags are removable)
- Distribute items among any selection of peers
- Click "View Summary" to display the details of the amounts owed between parties. Review the overall total and detailed itemizations.
- Obtain a comprehensive, itemized breakdown
moneymanager/
├── app/
│ ├── api/ # API routes
│ │ ├── friends/ # Friend CRUD operations
│ │ ├── sessions/ # Session management
│ │ ├── receipts/ # Receipt upload & parsing
│ │ └── items/ # Item split management
│ ├── friends/ # Friends management page
│ ├── sessions/ # Session pages
│ │ ├── new/ # Create new session
│ │ └── [id]/ # Session detail & summary
│ ├── layout.tsx # Root layout
│ ├── page.tsx # Home page
│ └── globals.css # Global styles
├── components/
│ └── ui/ # Reusable UI components
├── lib/
│ ├── prisma.ts # Prisma client
│ ├── settlements.ts # Settlement calculation logic
│ └── utils.ts # Utility functions
├── prisma/
│ └── schema.prisma # Database schema
└── public/
└── uploads/ # Uploaded receipt images
- Friend - Store friend information
- Session - Splitting sessions with payer info
- SessionParticipant - Link sessions to friends
- Receipt - Uploaded receipts with parsed data
- Item - Individual items from receipts
- ItemSplit - Track which friends share which items
GET/POST /api/friends- List/create friendsGET/PUT/DELETE /api/friends/[id]- Get/update/delete friendGET/POST /api/sessions- List/create sessionsGET/DELETE /api/sessions/[id]- Get/delete sessionPOST /api/receipts- Upload receiptPOST /api/receipts/parse- Parse receipt with AIPOST/DELETE /api/items/[id]/splits- Add/remove friend from item
# Run development server
npm run dev
# Build for production
npm run build
# Start production server
npm start
# Run linter
npm run lint
# Access Prisma Studio (database GUI)
npx prisma studio