Skip to content

erickarugu/anchorpay-be

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AnchorPay Backend

A robust payment infrastructure backend built with NestJS, TypeScript, and PostgreSQL.

📚 Documentation

🚀 Quick Start

Prerequisites

  • Node.js 24.x (see .nvmrc)
  • pnpm 9.x
  • Docker & Docker Compose (optional, for containerized development)

Installation

# Use correct Node version
nvm use

# Install dependencies
pnpm install

# Setup environment
cp .env.example .env

Development

# Start with Docker (includes PostgreSQL + Redis)
pnpm run docker:dev

# Or run locally
pnpm run start:dev

The application will be available at http://localhost:3002/api/v1

Available Scripts

# Development
pnpm run start:dev      # Start with hot-reload
pnpm run start:debug    # Start in debug mode

# Building
pnpm run build          # Build for production

# Testing
pnpm run test           # Run unit tests
pnpm run test:watch     # Run tests in watch mode
pnpm run test:e2e       # Run e2e tests
pnpm run test:cov       # Generate coverage report

# Code Quality
pnpm run lint           # Lint and fix code
pnpm run format         # Format code with Prettier

# Commits
pnpm run commit         # Interactive commit with conventional commits

# Docker
pnpm run docker:dev           # Start dev environment
pnpm run docker:dev:build     # Build and start dev environment
pnpm run docker:dev:down      # Stop dev environment
pnpm run docker:dev:logs      # View app logs

🏗️ Project Structure

apps/
  anchorpay/          # Main application
    src/
      health/         # Health check module
      main.ts         # Application entry point
      app.module.ts   # Root module

libs/
  auth/              # Authentication library
  core/              # Core functionality
  database/          # Database configuration & migrations
  shared/            # Shared utilities and constants

docs/                # Documentation
.github/             # GitHub workflows and templates
.husky/              # Git hooks

🛠️ Tech Stack

  • Framework: NestJS 11
  • Language: TypeScript 5.7
  • Database: PostgreSQL (via TypeORM)
  • Cache: Redis
  • Validation: class-validator, zod
  • Logging: Pino
  • API Docs: Swagger/OpenAPI
  • Testing: Jest

🔒 Security

  • Helmet middleware for HTTP headers
  • CORS configuration
  • Input validation and sanitization
  • No console.log in production (enforced by ESLint)

📋 API Documentation

When running locally, visit:

  • Swagger UI: http://localhost:3002/api/v1/docs
  • Health Check: http://localhost:3002/api/v1/health

🤝 Contributing

Please read our Contributing Guide for details on:

  • Development workflow
  • Branch naming conventions
  • Commit message format
  • Code quality standards
  • Pull request process

📝 License

UNLICENSED - This is a private/proprietary project.

🔗 Links

About

OSS AnchorPay Wallet as a Service Backend

Resources

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors