NexAI is an advanced AI assistant platform designed to empower businesses and developers to build intelligent, conversational AI employees. Leveraging modern technologies and built for scalability, NexAI delivers a comprehensive solution to seamlessly integrate AI capabilities into your applications.
Beyond serving your own business needs, NexAI enables you to create and manage a service-based business. Provide smart AI support solutions to other companies, offer flexible monthly or annual subscription plans, and expand your AI-powered SaaS venture. NexAI equips you with all the essential tools and integrations to thrive in todayβs AI automation landscape.
Project Information
- Last Update: March 3, 2026
- Version: 3.3
- Frontend: React.js v19.1 + TypeScript
- Backend: Node.js v22.17.0 + Express.js
- Build Tool: Vite
- Real-time: Socket.io v4.x
- LangChain: RAG
- AI Integration: OpenAI API + MCP v2025-03-26
- Composeio: @composio/core
- Payment: Stripe , PayPal, PayStack, RazorPay
- Author: mernsolution
π§± System Architecture & User Roles
NexAI follows the MVC (Model-View-Controller) architecture for better code separation, maintainability, and scalability. This makes it easier for developers to extend and manage the platform over time.
It also includes a flexible Role-Based Access Control (RBAC) system with 4 distinct user roles:
- π§ Public: Anyone visiting the platform or integrated widget (e.g., customers)
- π€ Private: Authenticated business owners with access to personal/business tools
- π οΈ Admin: Manages users, data settings, and support configurations
This layered access model ensures both security and control across all levels of the application.
π Project Structure
Installation & Setup
Step-by-Step Installation
-
Download Node.js
Download and install Node.js from the official website. -
Extract Project Files
Extract the downloaded NexAI project files to your desired location. -
Min Folder Structure
π nexAI (version-3.2 -client or similar)
π client
π server
π widget
π documentation -
Install Frontend Dependencies
Navigate to the client folder and install dependencies:cd client
npm install -
Install Backend Dependencies
Navigate to the server folder and install backend dependencies:cd server
npm install
DB Configuration
-
Create MongoDB atlas acount
Create an account at MongoDB
copy your mondoDB URL and past in .env file
API Configuration
-
Openroute Account Setup
Create an account at openroute and generate your API key. -
Configure API
Open the admin dashboard page and add your OpenAI API key:
Setup Composio Integration
Step-by-Step Toolkit Integration
-
Step 1: Login & Create a Project
Go to composio.dev, sign in, and create a new project.
-
Step 2: Copy Your API Key
Once youβve enabled all required tools, go to project settings, copy the generated API key, and paste it into your.envfile in your NexAI project.
-
Step 3: Enable the Tools You Need
After logging in, search for the tools you want (e.g., Gmail, Google Docs, Jira, Facebook, Twitter, etc.) and enable them for your project.
Run in Localhost
Development Setup
-
No Need Configure client and server connection
but if need then Openclient/src/utils/baseUrl.tsandclient/src/utils/apiConfig.tsxand update the backend URL: Client section
Server section
You also need to define your frontend URL and server deployment URL in the corsMiddleware file, making sure it matches exactly the same demo of NextAI backend and frontend URLs.
-
Start Frontend Development Server
cd clientThe frontend will be available at
npm run devhttp://localhost:5173/ -
Start Backend Server
Open a new terminal and navigate to the server folder:cd server
npm install
npm start
npm run build in
the client folder.
Run with Docker
NexAI can be run using Docker and Docker Compose. This is the recommended way for production-like setups and avoids installing Node.js directly on the host.
Prerequisites
- Docker β Install Docker on your machine.
- Docker Compose β Usually included with Docker Desktop, or install separately for Linux.
Step 1: Prepare environment file
- Copy the example env file in the server folder:
server/.env.exampletoserver/.env(or createserver/.envwith the required variables). - Set at least:
JWT_SECRET,WIDGET_SECRET,DATABASE_URL,PORT,FRONTEND_URL,BACKEND_URL. Use a real MongoDB connection string (e.g. MongoDB Atlas) forDATABASE_URL.
Step 2: Run with Docker Compose
- Open a terminal in the project root (where
docker-compose.ymlis located). - Start only the server (uses your
DATABASE_URLfor MongoDB):docker compose up -d - The API will be available at
http://localhost:4000(or thePORTyou set inserver/.env).
Optional: Full stack with MongoDB and Redis
To run MongoDB and Redis in Docker as well (e.g. for local development):
- Start all services including MongoDB and Redis:
docker compose --profile full up -d
- In
server/.env, setDATABASE_URL=mongodb://mongodb:27017/nexaiand optionallyREDIS_URL=redis://redis:6379for rate limiting. - MongoDB will be on port
27017, Redis on6379.
Useful commands
- Stop containers:
docker compose down - View logs:
docker compose logs -f server - Rebuild after code change:
docker compose up -d --build
npm run dev in client/ and widget/, or build and serve the client via your own web server. The Docker setup runs the NexAI backend API only.
How This API Works
NexAI utilizes OpenAI's powerful language models to create intelligent AI employees that can understand and respond to user queries in natural language. The system is built with a modular architecture that allows for easy customization and scaling.
Architecture Overview
- Frontend: React.js with TypeScript for type safety and better development experience
- Backend: Node.js with Express.js for API endpoints and business logic
- Real-time Communication: Socket.io for instant messaging capabilities
- AI Integration: OpenAI API with Model Context Protocol (MCP) for advanced AI capabilities
Authentication Setup
Google OAuth 2.0 Integration
-
Create Google Cloud Project
Visit the Google Cloud Console and create a new project. -
Enable Google+ API
Enable the Google+ API for your project and create OAuth 2.0 credentials. -
Configure Client ID
Add your Google OAuth Client ID tosrc/app.jsx:const GOOGLE_CLIENT_ID = 'your_google_client_id_here';
Payment Integration
NexAI supports Stripe, PayPal,PayStack and RazorPay for seamless payment processing. Configure your payment gateways through the admin dashboard.
Supported Payment Methods
π MCP Setup
Model context protocol Visit the
-
Create Google Cloud Project
Visit the Google Cloud Storage and create account. See if need Video Tutorial -
Download Json file
This file upload in nexai mcp setting page -
Create google doc or Excel sheet for store you business data
There add your all business data you can edit any time widget will read real time this update data -
Now pick & save ID from doc url
You can add multiple google doc or Excel Sheet or data scorchhttps://docs.google.com/document/d/[*************************]/edit?tab=t.0';
Widget Setup
-
Step 3: Domain Binding
Each chatbot is linked to a unique domain. One chatbot = one domain or subdomain. If you have multiple domains, you can create and train multiple chatbots. -
Step 4: Platform Integration
πΉ WordPress:
Go toWordPress β Plugins β Add New β Upload Plugin.
Upload the downloaded.zipfile.
Click Activate.
πΉ Shopify / Wix / Custom JS Website:
After downloading, you'll get an embed item (script/snippet).
Open your website'sindex.html.
Paste the embed code before the closing</body>tag.
Save and publish your site. -
π‘ No Coding Required
Just download β configure β paste β go live.
No API key, no backend setup, no complicated configs.
Admin Widget Setup
- Deploy your site on any hosting platform.
- Copy this widget's live URL along with the main server's live URL and save both in the Admin Widget Settings.
AI Chat Bots (SMART BOTS)
SMART BOTS is NexAI's intelligent chat interface for data-driven conversations. It combines AI chat with CRM/DB connections, voice input, chart generation, and report creation.
Key Features
- AI Model Selector: Choose from OpenAI, Claude, Gemini via OpenRouter
- Voice Chat: Click mic β speak β auto-send when you pause (GPT-style voice mode)
- CRM Connection: HubSpot, Salesforce, Pipedrive, custom β connect via API
- DB Connection: MySQL, PostgreSQL, REST API, Website
- Chart Templates: Bar, Line, Pie, Area, 3D, Geographic, Diagrams β select before sending
- File Attachment: PDF, DOC, images, TXT, CSV, Excel β attach and send
- Download Chat: Full chat export as PDF, DOC, DOCX, TXT, RTF, MD
- Per-Message Actions: Copy, download individual AI replies in multiple formats
How to Use
- Navigate: Dashboard β SMART BOTS β AI Chat Bots
- Connect CRM/DB: Click CRM or DB tab below the input, add connection details
- Chat: Type a message or use voice (mic icon) β no send click needed in voice mode
- Charts: Click chart icon to select a template, then send for data visualization
- Download: Use "Download" in header for full chat, or 3-dot menu on each AI reply
Client & Server Paths
- Client:
client/src/pages/dashboardPages/AIChatBotsPage.tsx - Server:
server/Controller/SmartBotsChatController.js - Routes:
POST /v3/ai-chat-bots/chat,GET/POST /v3/ai-chat-bots/connections
Configuring AI Employees
AI Employees are the core of NexAI. Each employee can be customized with specific training, personality, and expertise areas.
Training Parameter
The training parameter defines the AI employee's personality, expertise, and communication style:
Customize Widget
Customize the widget according to your preferences, such as logo, badge color, text color, brand name, and chat icon.
API Models
Supported Chat Models
NexAI dynamically supports all available OpenAI models β including chat, image, and audio models. You can choose any model based on your use case.
- gpt-3.5-turbo: Fast and efficient for general text conversations
- gpt-4: High-level reasoning and understanding
- gpt-4-turbo: Faster and cheaper alternative to GPT-4
- gpt-4.5-turbo: Enhanced speed and performance
- gpt-4o (Omni): Latest multimodal model supporting text, images, and audio input/output
- DALL-E 3: Latest model with improved quality and understanding
- Image Input: Upload images and get analysis or answers (supported by
gpt-4o) - Audio Input: Use Whisper API for speech-to-text or send audio to
gpt-4o - Audio Output: Text-to-speech (TTS) supported for spoken responses
Model Configuration
You can configure or switch models anytime from src/components/ChatComponent.jsx:
model: "gpt-4o",
temperature: 0.7,
max_tokens: 1000
};
Image Generation
NexAI includes powerful image generation capabilities using OpenAI's DALL-E models.
Supported Models
- DALL-E 3: Latest model with improved quality and understanding
- DALL-E 2: Reliable model for standard image generation
Image Generation Parameters
model: "dall-e-3",
size: "1024x1024",
quality: "standard",
n: 1
};
Important Parameters
Temperature
Controls creativity and randomness in AI responses. Range: 0.0 to 2.0
- 0.0-0.3: Deterministic, focused responses
- 0.4-0.7: Balanced creativity and consistency
- 0.8-1.0: Creative and varied responses
Frequency Penalty
Reduces repetition of words and phrases. Range: -2.0 to 2.0
- Positive values: Discourage repetition
- Negative values: Encourage repetition
Presence Penalty
Encourages the model to talk about new topics. Range: -2.0 to 2.0
Max Tokens
Maximum number of tokens in the response. For GPT-3.5-turbo: up to 4096 tokens
Admin Setting
π Secret Admin Registration Guide
β οΈ Critical Security Information: Follow these steps carefully to secure your admin panel.
π Complete Admin Setup Process
1 Create Admin Account (Backend)
Location: server/createAdmin.js
Set Your Admin Credentials:
const ADMIN_EMAIL = "demoadmin@gmail.com"; // βοΈ Change this const ADMIN_PASSWORD = "admindemo1234"; // βοΈ Change this const ADMIN_NAME = "Admin00"; // βοΈ Change this const ADMIN_USERNAME = "admin12"; // βοΈ Change this
Run Command:
$ npm run create-admin
β MongoDB connected β Admin account created successfully! π§ Email: your-email@gmail.com π Password: your-password
2 π Change Admin Login Route (Security)
Location: client/src/routes/AppRouter.tsx
β οΈ Default Route (Public - Not Secure):
{/* β Default Admin Route */} <Route path="/admin-login" element={<PublicLayout><AdminLogin/></PublicLayout>} />
β Change to Secret Route:
{/* β Your Secret Admin Route */} <Route path="/rubelxyz" π Change this to anything element={<PublicLayout><AdminLogin/></PublicLayout>} />
/my-secret-admin-2024/dashboard-xyz-private/admin-control-panel-secure/your-custom-secret-path
β οΈ Remember: Don't share this route with anyone!
3 π Access Your Secret Admin Login
Your Secret URL:
http://localhost:5173/your-secret-route
π Login with your credentials:
- π§ Email:
demoadmin@gmail.com(or your changed email) - π Password:
admindemo1234(or your changed password)
π‘οΈ Security Best Practices
- β
Always change default credentials in
createAdmin.js - β
Use a unique, unpredictable route for admin login (not
/adminor/admin-login) - β Keep your secret route private - don't share it publicly
- β Use strong passwords with letters, numbers, and special characters
- β Never commit sensitive credentials to version control (use .env files)
- β Change routes periodically for enhanced security
π Quick Reference Summary
Admin Dashboard
The Admin Dashboard provides an overview of your application's performance and user engagement. You can custom-design and manage settings routes.
Deployment Guide
Deploy on cPanel, VPS, AWS, or any Node.js-supported hosting
This MERN stack project is flexible and can be deployed on any server or hosting provider that supports Node.js β including cPanel shared hosting, VPS, cloud servers like AWS, or dedicated servers.
The setup process includes uploading the project, configuring environment variables, installing dependencies, and starting the server using your hostingβs control panel or command line interface.
All steps are thoroughly explained in the video tutorial linked below.
Pro Label & AI Usage Instructions
Pro Label Disclosure
NexAI is an AI-assisted project. The following components use AI or AI-powered services:
- OpenAI API: GPT models, DALL-E, Whisper, TTS for chat, image, audio, and voice features
- OpenRouter: Multi-model access (Claude, Gemini, etc.) for AI Chat Bots
- LangChain: RAG (Retrieval-Augmented Generation) for training data and document Q&A
- Composio: Tool integrations for CRM, email, and third-party apps
- MCP (Model Context Protocol): Document and widget chat context
How to Use This AI Project
- API Keys Required: Configure OpenAI (or OpenRouter) API key in Admin β API Settings. Without a valid key, AI features will not work.
- Environment Variables: Set
OPENAI_API_KEY,OPENROUTER_API_KEY(optional),MONGODB_URI, and other vars inserver/.env. See.env.examplefor the full list. - Package Limits: AI usage is tied to user packages. Configure limits in Admin β Packages and ensure users have sufficient quota.
- Customization: AI prompts, training parameters, and model selection can be adjusted in the respective controllers and components. No AI code is obfuscated.
- Support: For issues, refer to the video tutorials linked in this documentation or contact support.
Project Structure at a Glance
- client/ β React 19 + TypeScript + Vite. Dashboard, AI tools, widget management.
- server/ β Node.js + Express. REST API, MongoDB, OpenAI, MCP, Socket.io.
- widget/ β Embeddable chatbot. React + MCP.
Quick Start
1. Install dependencies: npm install in both client/ and server/.
2. Create server/.env with MongoDB URI and API keys.
3. Run npm run create-admin in server to create admin account.
4. Start server: cd server && npm start.
5. Start client: cd client && npm run dev.
Social Media Marketing
Social Media Marketing lets users connect Facebook, Instagram, LinkedIn, X (Twitter), TikTok, and Pinterest to schedule and publish posts directly from nexAI.
How to Add Social Media (Setup Flow)
http://localhost:8000) and Frontend Redirect URL (e.g.http://localhost:5173/social-integration).{callbackBaseUrl}/v3/social/oauth/PLATFORM/callback.Dashboard Pages (User Sidebar)
Client & Server Paths
client/src/pages/dashboardPages/SocialMedia/β SocialIntegration, SocialPublishing, SocialCalendar, SocialSchedule, SocialDraftSchedule, SocialHistory, SocialAnalyticsclient/src/pages/adminPage/APISettingPages/SocialOAuthSetting.tsxserver/Controller/(social media routes under/v3/social/)/social-integration,/social-publishing,/social-calendar,/social-schedule,/social-draft-schedule,/social-history,/social-analytics