Welcome to ZeroCard Infra, the backbone of a revolutionary platform enabling users to spend cryptocurrency with the ease of traditional fiat. We provide a robust, secure, and scalable backend system for a frictionless crypto-to-fiat spending experience.
This is a sophisticated financial infrastructure, not just another crypto project, built for reliability and real-world usability.
- 🛡️ Security First: Advanced cryptography, Privy for secure authentication, and ZeroDev for Smart Wallet security.
- ⚙️ Robust & Scalable Architecture: Modular NestJS design for high availability and growth.
- 🔗 Seamless Blockchain Integration: Real-time monitoring, transaction processing, and smart contract interaction, enhanced by BlockRadar for advanced chain analytics and security monitoring.
- 💳 Innovative Card Engine: Manages the lifecycle of virtual and physical cards, linking them to crypto wallets.
The ZeroCard infrastructure is modular, ensuring scalability and separation of concerns.
graph TD
A[User Mobile/Web App] --> B{ZeroCard API Gateway (NestJS)};
B --> C[Auth Module (Privy)];
B --> D[User Management Module];
B --> E[Card Engine Module];
B --> F[Transaction Processing Module];
B --> G[KYC Module];
B --> H[Notification Module];
E --> I[External Card Issuers/Processors API];
F --> J[Blockchain Interaction Layer (BlockRadar, ZeroDev)];
J --> K[Supported Blockchains (e.g., Ethereum, Polygon)];
J --> L[Smart Wallet Infrastructure (@zerodev/sdk)];
M[Database (PostgreSQL)] <--> C;
M <--> D;
M <--> E;
M <--> F;
M <--> G;
M <--> H;
Flow: Client apps interact with the NestJS API Gateway. Requests are routed to specialized modules (Auth via Privy, User Management, Card Engine, Transactions with BlockRadar insights, KYC). The system connects to external card issuers, blockchain networks (leveraging ZeroDev Smart Accounts), and a PostgreSQL database. Notifications and real-time updates are handled via Pusher.
Our infrastructure delivers comprehensive capabilities:
- User & Auth Management: Secure user onboarding, authentication (Privy), and profile management.
- Card Lifecycle & Spending: Full management of virtual/physical cards via our Card Engine, including creation, activation, and spending limits.
- Blockchain Operations & Transaction Processing: Secure interaction with blockchains, smart account management (ZeroDev), transaction execution, and advanced monitoring/analytics with BlockRadar.
- Compliance & Notifications: KYC processes and timely user notifications for important events.
- Framework: NestJS (TypeScript)
- Database: PostgreSQL (TypeORM)
- Authentication: Privy (
@privy-io/server-auth) - Blockchain: Ethers.js, Viem,
@zerodev/sdk, BlockRadar - API Documentation: Swagger
- Testing: Jest
- Real-time Updates: Pusher
- Node.js (>=20.0.0), Yarn
- PostgreSQL, Privy Account, Pusher Account
- Clone & Install:
git clone <your-repository-url> && cd zerocard-infra yarn install
- Configure Environment:
Copy
.env.exampleto.envand fill in your credentials (DB, Privy, Pusher, JWT secrets, etc.). - Database Migrations:
yarn migration:run
- Run Application:
- Development:
yarn start:dev(API onhttp://localhost:<PORT>/api) - Production:
yarn build && yarn start:prod - Debug:
yarn start:debug
- Development:
- Run all tests:
yarn test - Coverage:
yarn test:cov - E2E tests:
yarn test:e2e
- Lint & Fix:
yarn lint - Format:
yarn format
Building the future of finance, where crypto meets everyday spending.