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.
-
NestJS: A progressive Node.js framework for building scalable and maintainable server-side applications.
-
TypeScript: A superset of JavaScript that adds static types to the language, enhancing code readability and maintainability.
-
Express: A fast, unopinionated, minimalist web framework for Node.js, used as the underlying web server in NestJS.
-
gRPC: A high-performance RPC (Remote Procedure Call) framework that enables efficient communication between microservices.
-
Redis: An in-memory data structure store used as a caching layer for quick data retrieval.
-
PostgreSQL: A powerful open-source relational database management system, chosen for persisting user and payment data.
-
GraphQL: A query language and runtime for APIs, providing a flexible and efficient alternative to traditional REST APIs.
-
Docker: A platform for developing, shipping, and running applications in containers, ensuring consistent deployment across different environments.
-
Kafka: A distributed event streaming platform used for asynchronous communication between different parts of the application.
-
RabbitMQ: A message broker that enables communication between microservices and supports different messaging patterns.
-
Passport: A middleware for handling user authentication strategies in Node.js applications.
-
Bcrypt: A library for hashing and salting passwords, enhancing security for user authentication.
-
JWT (JSON Web Tokens): A compact, URL-safe means of representing claims to be transferred between two parties, commonly used for authentication.
-
/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.
-
Clone the repository:
git clone https://github.com/your-username/nestjs-payment-gateway.git
-
Install dependencies:
cd nestjs-payment-gateway npm install
-
Set up environment variables:
Create a
.env
file with necessary configuration details (e.g., database connection, Kafka/RabbitMQ details, OAuth credentials). -
Start the application:
npm run start
- Fork the repository.
- Create a new branch for your feature or bug fix.
- Make changes and submit a pull request.
- Ensure proper documentation and code quality.
This project is licensed under the MIT License - see the LICENSE.md file for details.
- Your Name (@SQLSorcerer)