A progressive Node.js framework for building efficient and scalable server-side applications.
A NestJS-based API service for handling TMS (Transaction Management System) operations.
This service provides endpoints for managing TMS transactions with features including:
- Authentication using Keycloak
- TMS transaction creation and management
- Swagger API documentation
- Structured logging and error handling
- Docker support
- Node.js (v20 or later)
- Yarn package manager
- Docker (optional, for containerized deployment)
Create a .env file in the root directory with the following variables:
PORT=3000
JWT_SECRET=your_jwt_secret
JWT_EXPIRES_IN=1h
KEYCLOAK_BASE_URL=your_keycloak_url
KEYCLOAK_TENANT=your_tenant
KEYCLOAK_REDIRECT_URI=your_redirect_uri
TMS_CLIENT_ID=your_client_id
TMS_CLIENT_SECRET=your_client_secret$ yarn install# Development mode
$ yarn start
# Watch mode
$ yarn start:dev
# Production mode
$ yarn start:prodBuild and run the application using Docker:
# Build the Docker image
$ docker build -t my-tms-api .
# Run the container
$ docker-compose upOnce the application is running, you can access the Swagger API documentation at:
http://localhost:3000/swagger
src/
├── auth/ # Authentication related files
├── common/ # Shared decorators, filters, and interceptors
├── config/ # Configuration modules and services
├── tms/ # TMS module implementation
└── main.ts # Application entry point
- Authentication: JWT-based authentication using Keycloak
- TMS Operations:
- Start TMS transaction
- Get TMS transaction status
- Security:
- JWT guard protection
- Request validation
- CORS support
- Logging: Structured logging with request/response tracking
- Error Handling: Global exception filter with standardized error responses
The API uses several security measures:
- JWT-based authentication
- Request validation using class-validator
- CORS configuration
- HTTP exception handling
- Non-root user in Docker
- Create a new branch for your feature
- Make your changes
- Write or update tests as needed
- Submit a pull request
Check out a few resources that may come in handy when working with NestJS:
- Visit the NestJS Documentation to learn more about the framework.
- For questions and support, please visit our Discord channel.
- To dive deeper and get more hands-on experience, check out our official video courses.
- Deploy your application to AWS with the help of NestJS Mau in just a few clicks.
- Visualize your application graph and interact with the NestJS application in real-time using NestJS Devtools.
- Need help with your project (part-time to full-time)? Check out our official enterprise support.
- To stay in the loop and get updates, follow us on X and LinkedIn.
- Looking for a job, or have a job to offer? Check out our official Jobs board.
Nest is an MIT-licensed open source project. It can grow thanks to the sponsors and support by the amazing backers. If you'd like to join them, please read more here.
Nest is MIT licensed.