A progressive Node.js framework for building efficient and scalable server-side applications.
Nest framework TypeScript starter repository.
$ npm install# development
$ npm run start
# watch mode
$ npm run start:dev
# production mode
$ npm run start:prod# unit tests
$ npm run test
# e2e tests
$ npm run test:e2e
# test coverage
$ npm run test:covWhen you're ready to deploy your NestJS application to production, there are some key steps you can take to ensure it runs as efficiently as possible. Check out the deployment documentation for more information.
If you are looking for a cloud-based platform to deploy your NestJS application, check out Mau, our official platform for deploying NestJS applications on AWS. Mau makes deployment straightforward and fast, requiring just a few simple steps:
$ npm install -g @nestjs/mau
$ mau deployWith Mau, you can deploy your application in just a few clicks, allowing you to focus on building features rather than managing infrastructure.
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.
- Author - Kamil MyΕliwiec
- Website - https://nestjs.com
- Twitter - @nestframework
Nest is MIT licensed.
DukAnI is an intelligent WhatsApp concierge bot that helps users with travel, dining, and shopping recommendations using AI-powered search and personalized user profiles.
The application follows a modular NestJS architecture with the following components:
- Bot Module: Handles WhatsApp messaging using
whatsapp-web.js - Agent Module: Processes messages using LangChain-style tool orchestration
- Groq Module: Integrates with Groq API for LLaMA 3 completions
- Tavily Module: Provides search capabilities for hotels, flights, restaurants, and products
- Profile Module: Manages user memory and preferences with JSON-based storage
- Node.js 20+
- npm or yarn
- WhatsApp account for QR code scanning
npm installCreate a .env file in the root directory:
# API Keys
GROQ_API_KEY=your_groq_api_key_here
TAVILY_API_KEY=your_tavily_api_key_here
# App Configuration
PORT=3000
NODE_ENV=development
# WhatsApp Web Configuration
WA_SESSION_PATH=./wa-session
WA_CHROME_ARGS=--no-sandbox,--disable-setuid-sandbox- Groq API Key: Sign up at https://console.groq.com
- Tavily API Key: Sign up at https://tavily.com
# Development mode
npm run start:dev
# Production mode
npm run build
npm run start:prod- When the app starts, a QR code will be displayed in the terminal
- Open WhatsApp on your phone β Linked Devices β Link a Device
- Scan the QR code with your phone
- The bot will be ready to receive messages!
WhatsApp Message β Bot Service β Agent Service β Tools (Tavily/Profile) β Groq LLM β Response
Hotel Search:
User: "Find me a hotel in Mombasa for next weekend"
Bot: π¨ Here are some great hotels in Mombasa for your weekend trip:
1. Serena Beach Resort & Spa - Luxury beachfront resort
2. Voyager Beach Resort - Family-friendly with great amenities
3. Bamburi Beach Hotel - Budget-friendly option
Would you like me to help you with booking details?
Restaurant Recommendations:
User: "I want Italian food in Nairobi"
Bot: π Here are top Italian restaurants in Nairobi:
1. Mediterraneo - Authentic Italian cuisine
2. About Thyme - Modern Italian with local twist
3. Artcaffe - Casual Italian favorites
Based on your previous preferences, I'd recommend About Thyme!
The bot exposes several admin endpoints:
GET /api/bot/status- Check WhatsApp connection statusGET /api/bot/info- Get connected WhatsApp account infoPOST /api/bot/restart- Restart WhatsApp clientPOST /api/bot/send- Send message to specific phone numberGET /api/bot/test- Health check endpoint
src/
βββ bot/ # WhatsApp client and message handling
βββ agent/ # AI agent with tool orchestration
βββ groq/ # Groq API service for LLM
βββ tavily/ # Search service integration
βββ profile/ # User memory and preferences
βββ app.module.ts # Main application module
βββ main.ts # Application entry point
To add a new tool to the agent:
- Create the tool in
agent.service.ts:
this.tools.set('newTool', {
name: 'newTool',
description: 'Description of what the tool does',
parameters: { /* tool schema */ },
execute: this.executeNewTool.bind(this),
});- Implement the execution method:
private async executeNewTool(params: any, context: AgentContext): Promise<any> {
// Tool implementation
}# Unit tests
npm run test
# E2E tests
npm run test:e2e
# Test coverage
npm run test:covThe bot automatically creates and maintains user profiles with:
- Personal Info: Name, location, budget preferences
- Preferences: Cuisine types, hotel preferences, travel class
- Favorites: Saved restaurants, hotels, destinations
- Conversation History: Recent interactions for context
Profiles are stored as JSON files in data/profiles/.
- Keep API keys secure and never commit them to version control
- The bot currently works only in private chats (group messages are ignored)
- WhatsApp session data is stored locally in the configured session path
- Database integration (PostgreSQL/MongoDB)
- Advanced conversation memory
- Multi-language support
- Voice message handling
- Booking integration APIs
- Admin dashboard
- Analytics and metrics
This project is licensed under the UNLICENSED license.
- Fork the repository
- Create your feature branch
- Follow TypeScript and NestJS best practices
- Add tests for new functionality
- Submit a pull request
For support, please check the bot status endpoint or review the application logs for debugging information.
Kindly to test the AI bot, send a message to +254111225035 on WhatsApp.