A simple and extendable microservices-based product catalog project. Users can manage products through a REST API or Telegram Bot. Product descriptions are generated automatically using a free AI model.
- Node.js + TypeScript
- Fastify — REST API
- Telegraf — Telegram Bot
- Drizzle ORM — PostgreSQL integration
- PostgreSQL — Product storage
- Redis — Caching layer
- NATS — Message broker for microservice communication
- Turborepo — Monorepo structure
- OpenRouter + Mistral AI — Free model for generating product descriptions
Acts as the gateway for clients via REST & Telegram
- Handles validation and NATS messaging
- Sends product operations to
product-crud - Responds back to client (Postman or Bot)
Handles all business logic and database access
- Listens to NATS messages for CRUD operations
- Reads/writes from PostgreSQL
- Uses Redis for caching reads
User-facing Telegram bot
- Accepts
/start,/products,/product,/create,/update,/deletecommands - Sends operations to
product-api - Uses AI to generate product descriptions automatically based on the name
git clone https://github.com/Xayrulloh/ATEX.git && cd ATEXYou can obtain your API key from OpenRouter
You can obtain your bot token from Telegram
docker compose up --build- Go to your bot
- Available commands:
/start,/products,/product <id>,/create <name>,/update <id> <name>,/delete <id>
When creating a product, the bot will automatically generate a description using AI.
- telegram-bot interacts with users and forwards everything to product-api
- product-api sends NATS request like product.create
- product-crud receives the message, handles DB, and returns result
- AI description is generated using Mistral-7B-Instruct model from OpenRouter
- All tokens and keys are hardcoded for simplicity in this test task
- No external configuration needed

