A comprehensive Express.js application simulating banking APIs for educational purposes, covering API Banking Services syllabus.
- REST API: Full CRUD operations for accounts
- SOAP API: WSDL-based service for account retrieval
- GraphQL API: Query accounts and transactions
- WebSocket: Real-time balance updates
- Authentication: JWT token-based auth
- Security: Rate limiting, CORS, Helmet
- Documentation: Swagger/OpenAPI docs
- Monitoring: Logging with Morgan
- Clone the repository
- Run
npm install - Run
npm start - Access API at
http://localhost:8000 - Docs at
http://localhost:8000/api-docs - GraphQL at
http://localhost:8000/graphql
POST /api/v1/auth/login- User login to get JWT tokenPOST /api/v1/auth/token- OAuth 2.0 Client Credentials for TPPsPOST /api/v1/auth/consent-token- Generate consent token
GET /api/v1/accounts- List accounts (with ETag caching)GET /api/v1/accounts/:id- Get account by IDPOST /api/v1/accounts- Create account (auth required)PUT /api/v1/accounts/:id- Update account (auth required)DELETE /api/v1/accounts/:id- Delete account (auth required)
GET /api/v1/customers- List customers (auth required)GET /api/v1/customers/:id- Get customer by ID (auth required)POST /api/v1/customers- Onboard new customer (KYC-lite)PUT /api/v1/customers/:id- Update customer KYC status (auth required)
POST /api/v1/payments- Initiate fund transfer (auth required)
GET /api/v1/consents- List consents (auth required)POST /api/v1/consents- Grant consent (auth required)PUT /api/v1/consents/:id- Revoke consent (auth required)
GET /api/v1/transactions- List transactions with pagination/filtering (consent required)
POST /api/v1/webhooks- Register webhook subscription
POST /soap/account- Get account via SOAP
POST /graphql- Query accounts
- Connect to
ws://localhost:8000for real-time updates
- Explore REST endpoints with Postman
- Test SOAP call
- Visualize GraphQL queries
- Test OAuth 2.0 flows
- Onboard customers and create accounts
- Use Swagger docs
- Mock APIs with Postman
- Run tests with Newman
- Test consent flows
- Implement webhooks
- Test pagination and filtering on transactions
- Test ETag caching on accounts
- Test WebSocket real-time updates
- Monitor logs and metrics
- Simulate Open Banking use cases
- Node.js, Express
- GraphQL, SOAP
- WebSocket
- JWT, Swagger
- Morgan, Helmet
ISC