Project Name: Payment Gateway Backend

Project Overview:

This project is a payment gateway system built using NestJS, TypeScript, Express, gRPC, Redis, PostgreSQL, and GraphQL. It provides a modular and scalable architecture to handle user authentication, authorization, fraud detection, currency conversion, payment methods, and communication via Kafka.

Tech Stack:

  1. NestJS: A progressive Node.js framework for building scalable and maintainable server-side applications.

  2. TypeScript: A superset of JavaScript that adds static types to the language, enhancing code readability and maintainability.

  3. Express: A fast, unopinionated, minimalist web framework for Node.js, used as the underlying web server in NestJS.

  4. gRPC: A high-performance RPC (Remote Procedure Call) framework that enables efficient communication between microservices.

  5. Redis: An in-memory data structure store used as a caching layer for quick data retrieval.

  6. PostgreSQL: A powerful open-source relational database management system, chosen for persisting user and payment data.

  7. GraphQL: A query language and runtime for APIs, providing a flexible and efficient alternative to traditional REST APIs.

  8. Docker: A platform for developing, shipping, and running applications in containers, ensuring consistent deployment across different environments.

  9. Kafka: A distributed event streaming platform used for asynchronous communication between different parts of the application.

  10. RabbitMQ: A message broker that enables communication between microservices and supports different messaging patterns.

  11. Passport: A middleware for handling user authentication strategies in Node.js applications.

  12. Bcrypt: A library for hashing and salting passwords, enhancing security for user authentication.

  13. JWT (JSON Web Tokens): A compact, URL-safe means of representing claims to be transferred between two parties, commonly used for authentication.

Project Structure:

  • /src: Main source code directory.

    • /auth: User authentication and authorization module.
    • /fraud: Fraud detection module.
    • /currency: Currency conversion module.
    • /payment-method: Payment method module.
    • /user: User-related functionality (entity, service, controller).
    • /payment: Payment processing functionality (entity, service, controller).
    • /kafka: Kafka service for event-driven communication.
    • /oauth: OAuth module for external authentication.
    • /common: Shared configurations and utilities.
  • /graphql: GraphQL-related files and modules.

  • /grpc: gRPC-related files and modules.

  • /docker: Docker configuration files.

Usage:

  1. Clone the repository:

    git clone https://github.com/your-username/nestjs-payment-gateway.git
  2. Install dependencies:

    cd nestjs-payment-gateway
    npm install
  3. Set up environment variables:

    Create a .env file with necessary configuration details (e.g., database connection, Kafka/RabbitMQ details, OAuth credentials).

  4. Start the application:

    npm run start

Contribution Guidelines:

  1. Fork the repository.
  2. Create a new branch for your feature or bug fix.
  3. Make changes and submit a pull request.
  4. Ensure proper documentation and code quality.

License:

This project is licensed under the MIT License - see the LICENSE.md file for details.

Contributors:

  • Your Name (@SQLSorcerer)

payment-gateway