π€ Telegram Bot: [@NexusAiProbot](https://t.me/NexusAiProbot) | π Web App: [GitHub Pages](https://denxvil.github.io/NexusAi/)
Created by βΖΡΠΈΞ½ΞΉβ
A cutting-edge AI-powered Telegram bot platform featuring sequential AI provider chain with Perplexity β Gemini β HuggingFace automatic fallback for maximum reliability.
π± Telegram Bot: @NexusAiProbot
- π Sequential AI Provider Chain - Perplexity β Gemini β HuggingFace with automatic fallback
- β Response Verification - Perfect, powerful, and accurate AI responses
- π― Smart Fallback System - Ensures reliable responses every time
- π€ Advanced Telegram Bot - Streamlined chat experience with multi-AI integration
- π Secure API Management - Environment-based API key configuration
- π€ Multi-AI Integration - Sequential provider chain for maximum reliability
- π¬ Advanced Telegram Bot - Core chat experience with intelligent AI routing
- β‘ Real-time Processing - Fast response times with intelligent routing
- π Secure Backend - Express.js API server with comprehensive security
- π MongoDB Integration - Persistent data storage and user management
- π Cross-Platform Support - Works seamlessly across all Telegram clients
nexus-ai/
βββ π Frontend (React + TypeScript)
β βββ frontend/ # React web application
β β βββ src/
β β β βββ components/ # React components
β β β βββ context/ # React context providers
β β β βββ services/ # API services
β β β βββ types/ # TypeScript types
β β β βββ utils/ # Utility functions
β β βββ dist/ # Built frontend assets
βββ π§ Backend (Node.js + TypeScript)
β βββ server/ # Express.js API server
β β βββ src/
β β β βββ controllers/ # API controllers
β β β βββ models/ # MongoDB models
β β β βββ routes/ # API routes
β β β βββ services/ # Business logic
β β β βββ bot/ # Telegram bot integration
β β βββ dist/ # Compiled JavaScript
βββ π Deployment
βββ Dockerfile # Docker configuration
βββ docker-compose.yml # Multi-container setup
βββ render.yaml # Render deployment config
- React 19 - Modern React with latest features
- TypeScript - Type-safe development
- Vite - Fast build tool and dev server
- Tailwind CSS - Utility-first CSS framework
- React Markdown - Markdown rendering
- Lucide React - Beautiful icon library
- Axios - HTTP client for API communication
- Node.js - Runtime environment
- Express.js - Web framework
- TypeScript - Type safety and modern JavaScript
- Socket.io - Real-time communication
- MongoDB - Database for user data and chat history
- Telegram Bot API - Bot integration
- Google Gemini - Advanced language model
- Perplexity AI - Research-focused AI
- HuggingFace - Open-source AI models
- Node.js 18.x or higher
- MongoDB database
- Telegram Bot Token (from @BotFather)
- Clone the repository:
git clone https://github.com/DenxVil/NexusAi.git
cd NexusAi- Install all dependencies:
npm run install-all- Configure environment variables:
Backend Configuration:
# Copy example environment file
cp server/.env.example server/.env
# Edit with your configuration
nano server/.envFrontend Configuration:
# Copy example environment file
cp frontend/.env.example frontend/.env.local
# Edit with your configuration
nano frontend/.env.localAdd your API keys and configuration:
Backend (.env):
# Database Configuration
MONGODB_URI=mongodb://localhost:27017/nexus-ai
# AI Service API Keys
GEMINI_API_KEY=your_gemini_key_here
PERPLEXITY_API_KEY=your_perplexity_key_here
HUGGINGFACE_API_KEY=your_huggingface_key_here
# Telegram Bot Configuration
TELEGRAM_BOT_TOKEN=your_telegram_bot_token_here
# Server Configuration
PORT=5000
NODE_ENV=developmentFrontend (.env.local):
VITE_API_BASE_URL=http://localhost:5000
VITE_AI_API_KEY=your_api_key_here
VITE_APP_NAME=NEXUS AI- Start the development servers:
Start both frontend and backend:
npm run dev:allOr start individually:
# Start backend only
npm run dev
# Start frontend only (in another terminal)
npm run dev:frontendThe services will be available at:
- Web Interface: http://localhost:3000/NexusAi/
- API Server: http://localhost:5000
-
Create a Telegram bot:
- Message @BotFather on Telegram
- Use
/newbotcommand to create your bot - Save the bot token
-
Configure the bot:
- Add your bot token to the
.envfile in the server directory - Start the server:
cd server && npm run dev - Your bot will automatically be available for interactions
- Add your bot token to the
-
Bot Commands:
/start- Initialize the bot/help- Show available commands/clear- Clear chat history- Simply send a message to chat with AI
- Open your browser and navigate to http://localhost:3000/NexusAi/
- Start chatting with the AI assistant
- Use the suggestion buttons for quick prompts
- View real-time AI responses with markdown formatting
- Find your bot on Telegram using the username you created
- Send
/startto begin - Chat naturally - the bot will respond using your configured AI services
- Use
/helpfor additional commands
- Visit Google AI Studio
- Create a new API key
- Add to your environment variables or settings panel
- Go to Perplexity Settings
- Generate an API key
- Add to your configuration
- Visit HuggingFace Tokens
- Create a new token with read permissions
- Add to your configuration in the server's
.envfile
The frontend is automatically deployed to GitHub Pages:
- Configure GitHub repository secrets:
AI_API_KEY- Your AI service API key
- Push changes to main branch:
- Frontend deployment triggers automatically
- Access your deployed app:
- URL:
https://denxvil.github.io/NexusAi/
- URL:
β Current Status: GitHub Pages deployment is working correctly. The site loads properly with all CSS and JavaScript assets.
- Prepare for deployment:
# Backend is configured for Render deployment
# See render.yaml for configuration- Set environment variables in Render:
# Configure in Render dashboard
TELEGRAM_BOT_TOKEN=your_token_here
GEMINI_API_KEY=your_key_here
MONGODB_URI=your_mongodb_connection_string
# Add other environment variables as needed- Deploy:
- Connect repository to Render
- Backend deploys automatically from main branch
Run the deployment verification script to check configuration:
./verify-deployment.sh- Railway - Alternative backend deployment option
- Render - Backend deployment (see
render.yamlconfiguration)
Need help? Reach out through our support channels:
- Telegram: @xDenvil_bot
- Email: [email protected]
We welcome contributions! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- AI Service Providers - Google, Perplexity, HuggingFace for powerful AI capabilities
- Open Source Community - For the amazing libraries and tools
- Telegram - For providing an excellent bot platform
- Contributors - Everyone who helps make Nexus Ai better
Made with β€οΈ by βΖΡΠΈΞ½ΞΉβ
Nexus Ai - Where artificial intelligence meets exceptional user experience