akargi/orionpay-api

Hybrid backend combining **NestJS** and **Python AI Engine**. Supports multi-chain payments, AI fraud detection, bulk payments and voice-initiated transactions.

โ˜… 0Forks 0GitHub โ†—Compare

README

๐ŸŒŒ OrionPay Backend

AI-Powered Multi-Chain Payment Infrastructure

OrionPay Backend is a hybrid backend platform that combines NestJS microservices with a Python AI Engine to deliver intelligent, secure, and scalable payment infrastructure for modern financial applications.


โœจ Features

  • Multi-chain payment processing
  • Bulk payment execution
  • Voice-initiated transactions
  • AI-powered fraud detection
  • AI price analysis and routing
  • Payment modules marketplace
  • Smart transaction monitoring
  • Wallet and account management

๐Ÿ—๏ธ Architecture

Frontend Applications
          โ”‚
          โ–ผ
      NestJS API
          โ”‚
          โ–ผ
     Python AI Engine

๐Ÿ› ๏ธ Tech Stack

Technology Purpose
NestJS API and business logic
Python AI and machine learning services
FastAPI AI service APIs
PostgreSQL Primary database
Redis Caching and queues
Docker Containerization
Blockchain SDKs Multi-chain integrations

๐Ÿ“‚ Project Structure

orionpay-api/
โ”‚
โ”œโ”€โ”€ services/                 # Microservices
โ”‚   โ”œโ”€โ”€ api/                  # NestJS API service
โ”‚   โ”‚   โ”œโ”€โ”€ src/              # API source code
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ app.controller.ts
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ app.service.ts
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ app.module.ts
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ main.ts
โ”‚   โ”‚   โ”œโ”€โ”€ test/             # API E2E tests
โ”‚   โ”‚   โ”œโ”€โ”€ dist/             # Compiled API output
โ”‚   โ”‚   โ”œโ”€โ”€ package.json      # API dependencies
โ”‚   โ”‚   โ”œโ”€โ”€ tsconfig.json     # TypeScript configuration
โ”‚   โ”‚   โ””โ”€โ”€ nest-cli.json     # NestJS CLI configuration
โ”‚   โ”‚
โ”‚   โ””โ”€โ”€ ai/                   # Python AI Engine service
โ”‚       โ”œโ”€โ”€ main.py           # FastAPI entry point
โ”‚       โ”œโ”€โ”€ models/           # AI/ML models
โ”‚       โ”œโ”€โ”€ services/         # AI services (fraud detection, routing)
โ”‚       โ””โ”€โ”€ requirements.txt  # Python dependencies
โ”‚
โ”œโ”€โ”€ docker/                   # Docker configuration files
โ”‚   โ”œโ”€โ”€ api.Dockerfile
โ”‚   โ””โ”€โ”€ ai.Dockerfile
โ”œโ”€โ”€ docs/                     # Documentation
โ”œโ”€โ”€ scripts/                  # Utility scripts
โ”œโ”€โ”€ docker-compose.yml        # Docker compose configuration
โ”œโ”€โ”€ .env                      # Root environment variables
โ”œโ”€โ”€ .env.example              # Example environment variables
โ””โ”€โ”€ README.md

๐Ÿš€ Getting Started

Prerequisites

  • Node.js 20+
  • Python 3.11+
  • Docker
  • Docker Compose

Installation

git clone <repository-url>

cd orionpay-backend

docker-compose up --build

โš™๏ธ Environment Variables

Create a .env file:

DATABASE_URL=
REDIS_URL=
JWT_SECRET=
OPENAI_API_KEY=
BLOCKCHAIN_RPC_URL=

๐Ÿณ Running with Docker

docker-compose up

Run in detached mode:

docker-compose up -d

๐Ÿงช Testing

npm run test

npm run test:e2e

๐Ÿ“– API Documentation

API documentation is available through Swagger:

http://localhost:3000/api/docs

๐Ÿ”’ Security Features

  • JWT authentication
  • Rate limiting
  • Fraud detection engine
  • Transaction monitoring
  • Role-based access control

๐Ÿ“„ License

MIT License

Contributors

DevMuhdishaqmemplethee-labykargeee-bit

Issues