An open API service indexing awesome lists of open source software.

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

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
```