- Node.js v18+ installed
- MongoDB Atlas account (free tier)
- Go to https://www.mongodb.com/cloud/atlas/register
- Create a free account and cluster
- Click Database Access → Add New Database User
- Create username and password (save these!)
- Click Network Access → Add IP Address → Allow Access from Anywhere (0.0.0.0/0)
- Click Database → Connect → Connect your application
- Copy the connection string (looks like:
mongodb+srv://...)
# Navigate to backend
cd backend
# Install dependencies
npm install
# Configure MongoDB
# Edit .env file and replace with your actual MongoDB URI:
# MONGODB_URI=mongodb+srv://<username>:<password>@cluster0.xxxxx.mongodb.net/utangph?retryWrites=true&w=majority
# Start the backend server
npm run devBackend should now be running on http://localhost:5000
# Navigate to frontend
cd frontend
# Install dependencies
npm install
# Start the development server
npm run devFrontend should now be running on http://localhost:5173
- Open http://localhost:5173 in your browser
- Add members in the Members section
- Add items for each member
- View the expense table and settlement summary
- Check MongoDB URI: Make sure your
.envfile has the correct connection string - Check password: Special characters in password might need URL encoding
- Check IP whitelist: Ensure 0.0.0.0/0 is added in MongoDB Network Access
- Make sure backend is running on port 5000
- Check browser console for CORS errors
- Verify the API URL in frontend components is
http://localhost:5000
- Run
npm installagain in the respective folder - Delete
node_modulesandpackage-lock.json, then runnpm install
UtangPH/
├── backend/
│ ├── config/
│ │ └── db.js # MongoDB connection
│ ├── models/
│ │ ├── Member.js # Member schema
│ │ └── Expense.js # Expense schema
│ ├── routes/
│ │ ├── memberRoutes.js # Member API endpoints
│ │ └── expenseRoutes.js # Expense API endpoints
│ ├── .env # Environment variables (MongoDB URI)
│ ├── server.js # Express server
│ └── package.json
│
└── frontend/
├── src/
│ ├── components/
│ │ ├── ExpenseForm.jsx # Member-specific item forms
│ │ ├── ExpenseList.jsx # Centralized expense table
│ │ ├── MemberManagement.jsx # Add/remove members
│ │ └── SettlementSummary.jsx # Who owes whom
│ ├── App.jsx # Main app component
│ └── App.css # Styling
├── index.html
├── vite.config.js
└── package.json
## Features
✅ Member management with chip-based UI
✅ Member-specific expense forms (each member can add their items)
✅ Centralized table view showing all expenses
✅ Automatic split calculation (splits among all members)
✅ Settlement summary with optimized payment plan
✅ Individual balance tracking
✅ Responsive design
## Technologies Used
- **Frontend**: React 18 + Vite
- **Backend**: Node.js + Express
- **Database**: MongoDB Atlas
- **Styling**: Pure CSS3