https://github.com/trytrench/trench
Open source fraud and abuse prevention tools
https://github.com/trytrench/trench
fraud-prevention rule-engine typescript
Last synced: 11 months ago
JSON representation
Open source fraud and abuse prevention tools
- Host: GitHub
- URL: https://github.com/trytrench/trench
- Owner: trytrench
- License: agpl-3.0
- Created: 2023-06-07T16:42:24.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2024-04-26T20:23:25.000Z (about 2 years ago)
- Last Synced: 2024-11-30T00:33:43.871Z (over 1 year ago)
- Topics: fraud-prevention, rule-engine, typescript
- Language: TypeScript
- Homepage: https://trytrench.com
- Size: 3.64 MB
- Stars: 202
- Watchers: 2
- Forks: 16
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README

## Getting started
🚧 This project is currently under development 🚧
Trench is a tool for monitoring and preventing fraud and abuse. It helps you collect data on users, identify bad actors, and take action on them (e.g. blocking a payment).
[Live demo](https://play.trytrench.com)
## Documentation
Check out the full documentation [here](https://trench.mintlify.app).
## Deploying Trench
- Install Docker Engine and Docker Compose
- Clone the repository: `git clone https://github.com/trytrench/trench.git && cd trench`
- Run Trench: `docker-compose up`
## Sending data to Trench
You can send user events to Trench via the REST API or using the Javascript SDK.
```
curl \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer YOUR_API_KEY' \
'YOUR_TRENCH_URL/api/event' \
-d '
{
"type": "payment",
"data": {
"card": {
"fingerprint": "f2xvb823k",
"brand": "visa",
"country": "US",
"last4": "4242",
},
"user": {
"id": "45912",
"name": "John Doe",
"email": "john@email.com"
},
...
}
```
## Design Philosophy
- **Full customization.** You know your product and user interactions better than anyone else. To be effective, you should have full control over the data you collect and integrate.
- **Full access to your data.** You shouldn’t be limited to dashboards and reports. Full access to your data is needed to properly understand your fraud.
## Local development
1. Clone the repository: `git clone https://github.com/trytrench/trench.git && cd trench`
2. Install dependencies: `pnpm install`
3. Run the development server: `pnpm dev`
## Join our community
Join the Trench community in [Discord](https://discord.gg/cSYC47MXTR) if you need support or have anything you'd like to ask. We'd love to chat!