Backend API for the Splitlier mobile application, built with NestJS.
Splitlier helps groups easily track and share expenses, settle debts, and have fun while doing it.
Users can create groups, add expenses, scan receipts, and send humorous GIFs to remind friends who owe money.
- Authentication & Authorization
- Secure JWT-based authentication
- Role-based access control for users and admins
- User Management
- Create, read, update, and delete user accounts
- Retrieve user profiles with activity history
- Group Expense Sharing
- Create and join groups
- Add and split expenses among group members
- Track balances in real-time
- Receipt Scanning
- OCR-based receipt scanning for automatic expense creation
- Debt Reminders
- Send fun GIFs to group members who owe money
- Security
- Helmet for secure HTTP headers
- Throttler for API rate limiting
- Environment-based configuration for production & development
- Developer Friendly
- Centralized exception handling
- Validation pipes for request payloads
- CORS support for mobile applications
- Backend Framework: NestJS (Node.js + TypeScript)
- Database: PostgreSQL (via Prisma)
- Authentication: JWT with refresh tokens
- Security: Helmet, Throttler, ValidationPipe, CORS
- Receipt Scanning: OCR integration (Tesseract.js / external API)
- Testing: Cucumber + Gherkin
- Deployment Ready: Environment-driven config for cloud or on-prem
- Node.js 18+
- npm or yarn
- PostgreSQL database
git clone https://github.com/<your-repo>/splitlier-backend.git
cd splitlier-backend
npm installCopy .env.example to .env and set the environment variables
NODE_ENV=development
PORT=3000
DATABASE_URL=postgresql://user:pass@localhost:5432/splitlier
JWT_SECRET=super_secret_key
JWT_EXPIRATION=1h- Development
npm run start:dev- Production
npm run build
npm run start:prod npm run test