This project is a TypeScript-based backend application that processes a list of products, validates them based on predefined rules, and automatically creates Jira tickets for invalid products.
This project is a TypeScript-based backend application that processes a list of products, validates them based on predefined rules, and automatically creates Jira tickets for invalid products.
It simulates a real-world Content-Tech / Data Processing workflow, where product data is:
- Retrieved or defined
- Validated against business rules
- Logged if valid ✅
- Sent to Jira as an issue if invalid ❌
- ✅ Product validation logic
- 🔄 Iterative processing of multiple products
- 🐞 Automatic Jira ticket creation for invalid products
⚠️ Error handling for failed API requests- 📜 Console-based logging for tracking workflow
Typescript-project-Basic/
│
├── src/
│ ├── index.ts # Main entry point
│ ├── validator.ts # Product validation logic
│ ├── jira.ts # Jira API integration
│
├── package.json
├── tsconfig.json
└── README.md
git clone https://github.com/your-username/typescript-product-validation.git
cd typescript-product-validationnpm installnpx ts-node src/index.tsProduct 1 is valid
Creating Jira Ticket for product 2
Error Creating Jira ticket: Request failed with status code 400
Product 3 is valid
Creating Jira Ticket for product 4
Error Creating Jira ticket: Request failed with status code 400
...
- A list of products is iterated one by one.
- Each product is checked against validation rules.
- Valid products → Logged in console
- Invalid products → Sent for Jira ticket creation
- API call is made to create a Jira issue.
- If the request fails (e.g., status code 400), an error is logged.
Possible reasons:
- Invalid payload format
- Missing required fields
- Incorrect API credentials
- Wrong Jira endpoint
- ✅ Add environment variables for API keys
- ✅ Improve validation rules
- ✅ Add retry mechanism for failed Jira requests
- ✅ Store logs in a file instead of console
- ✅ Add unit tests using Jest
This project helps you understand:
- TypeScript fundamentals
- API integration (Jira)
- Error handling in async operations
- Real-world backend workflows
- Data validation patterns
Feel free to fork this repository and improve it. Contributions are welcome!
This project is open-source and available under the MIT License.
Karthikeyan
- 💼 Aspiring Backend Developer / Data Engineer
- 🌐 Focused on TypeScript, APIs, and Data Processing