https://github.com/ktcotz/splitlier
Splitlier - backend for Splitly
https://github.com/ktcotz/splitlier
Last synced: 11 months ago
JSON representation
Splitlier - backend for Splitly
- Host: GitHub
- URL: https://github.com/ktcotz/splitlier
- Owner: ktcotz
- License: other
- Created: 2025-07-15T18:58:06.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2025-08-15T08:56:49.000Z (11 months ago)
- Last Synced: 2025-08-15T10:27:13.798Z (11 months ago)
- Language: TypeScript
- Homepage:
- Size: 372 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Splitlier Backend
Backend API for the Splitlier mobile application, built with [NestJS](https://nestjs.com/).
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.
---
## ๐ Features
- **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
---
## ๐ Tech Stack
- **Backend Framework:** [NestJS](https://nestjs.com/) (Node.js + TypeScript)
- **Database:** PostgreSQL (via [Prisma](https://www.prisma.io/))
- **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
---
## ๐ฆ Requirements
- Node.js 18+
- npm or yarn
- PostgreSQL database
---
## โ๏ธ Installation
```bash
git clone https://github.com//splitlier-backend.git
cd splitlier-backend
npm install
```
## ๐ง Configuration
Copy .env.example to .env and set the environment variables
```bash
NODE_ENV=development
PORT=3000
DATABASE_URL=postgresql://user:pass@localhost:5432/splitlier
JWT_SECRET=super_secret_key
JWT_EXPIRATION=1h
```
## โถ๏ธ Running the App
- Development
```bash
npm run start:dev
```
- Production
```bash
npm run build
npm run start:prod
```
## ๐งช Testing
```bash
npm run test
```