Skip to content

FurqanAhmadKhan/Omnia

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

21 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ€– Omnia - AI Chatbot Platform

Version License Node Python React MongoDB

Fast, Accurate & Free AI Chatbot - Complete MERN Stack Platform

Live Demo β€’ Features β€’ Installation β€’ Documentation β€’ API Docs


πŸ“‹ Overview

Omnia is a comprehensive AI chatbot platform that provides access to 13+ powerful AI models through multiple interfaces:

  • 🌐 Web Application - Modern React-based landing page with user registration
  • πŸ’» CLI Application - Beautiful Python terminal interface for developers
  • πŸ”Œ REST API - Complete backend API built with Node.js and Express
  • πŸ—„οΈ Database - MongoDB for user management and chat history

✨ Key Highlights

  • πŸ†“ Completely Free - No hidden costs or subscriptions
  • πŸš€ 13+ AI Models - GPT, Gemini, DeepSeek, Llama, and more
  • πŸ” Secure Authentication - JWT tokens with OTP verification
  • πŸ’¬ Context-Aware - Maintains conversation history
  • πŸ“Š Analytics - Track usage and chat statistics
  • 🎨 Beautiful UI - Modern web interface with scroll animations
  • ⚑ Fast & Reliable - Optimized performance with rate limiting

🎯 Features

🌐 Web Application (Client)

  • Modern landing page with scroll animations
  • User registration with 3-step OTP verification
  • Responsive design for all devices
  • API documentation showcase
  • Feature highlights and model listings

πŸ’» CLI Application

  • Interactive terminal interface with colors
  • 13+ AI model selection
  • Chat history management
  • Session persistence
  • Profile management
  • Multi-chat support
  • Statistics dashboard

πŸ”Œ Backend API (Server)

  • RESTful API architecture
  • JWT authentication
  • OTP email verification
  • Rate limiting (150 req/day)
  • Chat management
  • User profile operations
  • Conversation history
  • MongoDB integration

πŸ› οΈ Tech Stack

Frontend (Client)

Technology Purpose
React 19.1.0 UI library
Vite 7.0.4 Build tool
Framer Motion Animations
React Icons Icon components

Backend (Server)

Technology Purpose
Node.js Runtime environment
Express.js Web framework
MongoDB Database
Mongoose ODM
JWT Authentication
Bcrypt Password hashing
Nodemailer Email service
Axios HTTP client

CLI Application

Technology Purpose
Python 3.7+ Programming language
Requests HTTP client
Colorama Terminal colors
Termcolor Text styling
Pyfiglet ASCII art
Curses Interactive menus

πŸ“¦ Installation

Prerequisites

  • Node.js (v14 or higher)
  • Python 3.7+
  • MongoDB (local or Atlas)
  • Gmail account (for OTP emails)
  • npm or yarn

Quick Start

  1. Clone the repository

    git clone https://github.com/FurqanAhmadKhan/Omnia.git
    cd Omnia
  2. Setup Backend Server

    cd server
    npm install
    
    # Create .env file
    cp .env.example .env
    # Edit .env with your configuration
    
    # Start server
    node index.js
  3. Setup Web Client

    cd ../client
    npm install
    
    # Start development server
    npm run dev
  4. Setup CLI Application

    cd ../application
    pip install -r requirements.txt
    
    # Run CLI
    python main.py

πŸ“ Project Structure

Omnia/
β”œβ”€β”€ client/                 # React web application
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ App.jsx        # Main component
β”‚   β”‚   β”œβ”€β”€ App.css        # Styles
β”‚   β”‚   └── main.jsx       # Entry point
β”‚   β”œβ”€β”€ package.json
β”‚   └── README.md
β”‚
β”œβ”€β”€ server/                 # Node.js backend API
β”‚   β”œβ”€β”€ config/
β”‚   β”‚   └── db.js          # Database config
β”‚   β”œβ”€β”€ controllers/
β”‚   β”‚   β”œβ”€β”€ userControllers.js
β”‚   β”‚   └── chatController.js
β”‚   β”œβ”€β”€ middlewares/
β”‚   β”‚   └── auth.js        # JWT middleware
β”‚   β”œβ”€β”€ models/
β”‚   β”‚   β”œβ”€β”€ userModel.js
β”‚   β”‚   └── chatModel.js
β”‚   β”œβ”€β”€ routes/
β”‚   β”‚   β”œβ”€β”€ userRoutes.js
β”‚   β”‚   └── chatRoutes.js
β”‚   β”œβ”€β”€ utils/
β”‚   β”‚   β”œβ”€β”€ otp.js
β”‚   β”‚   └── aiService.js
β”‚   β”œβ”€β”€ index.js           # Entry point
β”‚   β”œβ”€β”€ package.json
β”‚   └── README.md
β”‚
β”œβ”€β”€ application/            # Python CLI application
β”‚   β”œβ”€β”€ main.py            # CLI entry point
β”‚   β”œβ”€β”€ requirements.txt
β”‚   β”œβ”€β”€ OmniaCLI.spec      # PyInstaller spec
β”‚   └── README.md
β”‚
β”œβ”€β”€ .gitignore
└── README.md              # This file

πŸš€ Usage

Web Application

  1. Visit the website
  2. Navigate to the registration section
  3. Enter your email and receive OTP
  4. Complete registration
  5. Use credentials in CLI or API

CLI Application

python main.py

Available Commands:

  • --new - Create new chat
  • --model - Change AI model
  • --history - View chat history
  • --stats - Show statistics
  • --list - List all chats
  • --continue - Continue existing chat
  • --rename - Rename current chat
  • --delete - Delete current chat
  • --profile - View profile
  • --help - Show help
  • --exit - Exit application

API Usage

Base URL: https://omnia-cli-server.vercel.app/api

Example: Register User

const response = await fetch('https://omnia-cli-server.vercel.app/api/user/register', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({
    name: 'John Doe',
    email: '[email protected]',
    password: 'SecurePass123',
    otp: '123456'
  })
});

πŸ“š Documentation

Client Documentation

See client/README.md for:

  • Web application features
  • Customization guide
  • Deployment instructions
  • Animation details

Server Documentation

See server/README.md for:

  • Complete API reference
  • Authentication flow
  • Rate limiting details
  • Error handling
  • Database schema

CLI Documentation

See application/README.md for:

  • CLI commands
  • Model selection
  • Chat management
  • Building executables

πŸ”Œ API Documentation

User Endpoints

Method Endpoint Description
POST /api/user/send-otp Send OTP for registration
POST /api/user/register Register new user
POST /api/user/login User login
GET /api/user/profile Get user profile
PUT /api/user/profile Update profile
POST /api/user/change-password Change password
POST /api/user/forgot-password Request password reset
POST /api/user/reset-password Reset password with OTP
DELETE /api/user/profile Delete account

Chat Endpoints

Method Endpoint Description
POST /api/chat/create Create new chat
POST /api/chat/message Send message to AI
GET /api/chat/list Get all user chats
GET /api/chat/:id/history Get chat history
PATCH /api/chat/:id/title Update chat title
GET /api/chat/stats Get chat statistics
DELETE /api/chat/:id Delete specific chat
DELETE /api/chat/all Delete all chats

πŸ€– Available AI Models

  1. Standard - Default balanced model
  2. Online - Web-connected model
  3. DeepSeek V3.2 - Advanced reasoning
  4. Gemini 2.5 Flash Lite - Fast Google AI
  5. GPT-4.1 Nano - Compact GPT variant
  6. GPT OSS 120B - Open-source GPT
  7. Gemma 3 12B - Google's Gemma
  8. Qwen3 30B - Alibaba's model
  9. GPT-5 Nano - Next-gen compact
  10. Llama 3.3 70B Instruct - Meta's flagship
  11. Llama 3.1 8B Instant - Fast Llama
  12. Llama 4 Scout - Latest Meta model
  13. Gemma2 9B - Updated Gemma

βš™οΈ Configuration

Server Environment Variables

Create server/.env:

# Server
PORT=3000
NODE_ENV=development

# Database
MONGODB_URI=mongodb://127.0.0.1:27017/Omnia

# JWT
JWT_SECRET=your_jwt_secret_key

# Email (Gmail)
GMAIL_USER=[email protected]
GMAIL_APP_PASSWORD=your_gmail_app_password

# CORS
CORS_ORIGIN=http://localhost:3000
FRONTEND_URL=http://localhost:5173

# Rate Limiting
ADMIN_IPS=127.0.0.1,::1

Client Configuration

Update API endpoint in client/src/App.jsx:

const BASE_URL = 'https://omnia-cli-server.vercel.app/api';

CLI Configuration

API endpoint is set in application/main.py:

BASE_URL = "https://omnia-cli-server.vercel.app/api"

πŸ”’ Security Features

  • βœ… JWT-based authentication
  • βœ… Password hashing with bcrypt
  • βœ… OTP email verification
  • βœ… Rate limiting (150 requests/day)
  • βœ… Input validation
  • βœ… CORS protection
  • βœ… Admin IP whitelisting
  • βœ… Secure session management

🌐 Deployment

Backend (Vercel)

  1. Push code to GitHub
  2. Import project in Vercel
  3. Set environment variables
  4. Deploy

Frontend (Vercel/Netlify)

cd client
npm run build
# Deploy 'dist' folder

CLI (Executable)

cd application
pyinstaller OmniaCLI.spec
# Executable in 'dist' folder

πŸ“Š Rate Limiting

Daily Limit

  • 150 requests per 24 hours for all API routes
  • Admin IPs are exempt

User Routes Limit

  • 100 requests per 15 minutes for /api/user/*
  • Excludes GET profile endpoint

🀝 Contributing

Contributions are welcome! Please follow these steps:

  1. Fork the repository
  2. Create a feature branch
    git checkout -b feature/AmazingFeature
  3. Commit your changes
    git commit -m 'Add some AmazingFeature'
  4. Push to the branch
    git push origin feature/AmazingFeature
  5. Open a Pull Request

Development Guidelines

  • Follow existing code style
  • Write clear commit messages
  • Update documentation
  • Test thoroughly before submitting
  • Add comments for complex logic

πŸ› Troubleshooting

Common Issues

MongoDB Connection Failed

# Check if MongoDB is running
mongod --version

# Start MongoDB service
# Windows: net start MongoDB
# Linux: sudo systemctl start mongod
# Mac: brew services start mongodb-community

Port Already in Use

# Change PORT in server/.env
PORT=3001

OTP Not Received

  • Check Gmail credentials in .env
  • Enable "Less secure app access" or use App Password
  • Check spam folder

CLI Import Errors

pip install -r requirements.txt --upgrade

πŸ“ License

This project is licensed under the ISC License.


πŸ‘¨β€πŸ’» Author

Furqan Ahmad Khan


πŸ™ Acknowledgments

  • React team for the amazing library
  • Vite for the blazing-fast build tool
  • Framer Motion for smooth animations
  • Express.js community
  • MongoDB team
  • Python community
  • All open-source contributors

πŸ“ž Support

For issues, questions, or contributions:


πŸ—ΊοΈ Roadmap

  • Mobile application (React Native)
  • Real-time chat with WebSockets
  • Voice input/output
  • Image generation support
  • Team collaboration features
  • Custom model training
  • Plugin system
  • Multi-language support

πŸ“ˆ Stats

  • 13+ AI Models available
  • 3 Platforms (Web, CLI, API)
  • 100% Free forever
  • Open Source MIT licensed

Made with ❀️ by Furqan Ahmad Khan

⭐ Star this repo if you find it helpful!

Website β€’ Documentation β€’ API Docs β€’ Support

About

Omnia is a fast and accurate AI chatbot for the command line. It is completely free to use, requiring only a quick signup to get started. Enjoy AI assistance directly on your computer.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors