Skip to content

Latest commit

 

History

History
683 lines (533 loc) · 16.4 KB

File metadata and controls

683 lines (533 loc) · 16.4 KB

SOHAM - Free AI Chat with 35+ Models

SOHAM

Free AI chat platform with Groq, Gemini, Cerebras, DeepSeek - No signup required

Build Status License PRs Welcome Made with Love

Live Demo (Netlify)Live Demo (Vercel)DocumentationReport BugRequest Feature


🌟 About SOHAM

SOHAM is a 100% free AI chat platform featuring 35+ models from leading providers: Groq (Llama 3.3 70B), Google Gemini 2.5, Cerebras (Qwen 3 235B), DeepSeek R1, and more. Chat, code, solve math, analyze PDFs - all without signup.

🎯 Mission

"Making powerful AI accessible to everyone, everywhere, for free."

📊 Platform Stats

  • 🤖 35+ AI Models across 4 providers
  • 👥 1,00+ Daily Users worldwide
  • 🌍 100+ Countries reached
  • 99.9% Uptime reliability
  • 📝 50,000+ Lines of Code
  • 🎨 200+ Components
  • 🚀 Lighthouse Score 95+

✨ Features

🤖 AI Models (35+)

Groq (Lightning Fast)

  • Llama 3.1 8B Instant
  • Llama 3.1 70B Versatile
  • Llama 3.3 70B Versatile
  • Mixtral 8x7B
  • Gemma 2 9B

Google Gemini (Advanced)

  • Gemini 2.5 Flash (1M context)
  • Gemini 2.5 Flash-8B
  • Gemini 2.0 Flash Experimental

Cerebras (Ultra Fast)

  • Llama 3.1 8B
  • Llama 3.3 70B
  • Qwen 3 235B Instruct
  • Qwen 3 32B
  • GLM 4.7
  • GPT-OSS

Hugging Face (Specialized)

  • DeepSeek R1
  • DeepSeek R1 Distill Llama 70B
  • RNJ-1
  • And more...

🎨 Core Features

💬 AI Chat

  • Real-time streaming responses
  • 35+ model selection
  • Smart auto-routing
  • Context-aware conversations
  • Code syntax highlighting
  • Math equation rendering (KaTeX)

🔍 Web Search

  • Privacy-first search integration
  • AI-powered answer synthesis
  • Source citations
  • Real-time results

📄 PDF Analysis

  • Upload PDFs up to 5MB
  • Intelligent document Q&A
  • Text extraction
  • Summary generation

🖼️ Image Equation Solver

  • Upload images up to 5MB
  • Mathematical equation recognition
  • Step-by-step solutions
  • Visual problem solving

🎤 Voice Features

  • Text-to-Speech (Edge TTS)
  • Multiple voice options
  • Browser TTS fallback
  • Symbol filtering for natural speech

📝 Smart Notes

  • AI-powered note-taking
  • Six Souls workflow
  • Automatic organization
  • Export capabilities

🎯 Advanced Features

  • Share & Export (TXT, MD, PDF)
  • Regenerate responses
  • Copy to clipboard
  • Dark/Light theme
  • Mobile-optimized PWA
  • Offline support
  • Real-time thinking animation

🚀 Quick Start

Prerequisites

  • Node.js 18+ or higher
  • npm or yarn
  • Git

Installation

  1. Clone the repository

    git clone https://github.com/heoster/codeex-ai.git
    cd codeex-ai
  2. Install dependencies

    npm install
  3. Set up environment variables

    cp .env.example .env.local
  4. Configure your API keys (see API Keys Setup)

  5. Run development server

    npm run dev
  6. Open your browser

    http://localhost:3000
    

🔑 API Keys Setup

Required API Keys (All FREE)

1. Groq API (Required)

  • Visit: https://console.groq.com/keys
  • Create account (free)
  • Generate API key
  • Add to .env.local:
    GROQ_API_KEY=gsk_your_key_here
  • Free Tier: 14,400 requests/day

2. Google Gemini API (Required)

3. Hugging Face API (Required)

4. Cerebras API (Optional)

5. Firebase (Required for Auth)

  • Visit: https://console.firebase.google.com
  • Create new project (free)
  • Enable Authentication & Firestore
  • Get configuration from Project Settings
  • Add to .env.local:
    NEXT_PUBLIC_FIREBASE_API_KEY=your_key
    NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN=your_domain
    NEXT_PUBLIC_FIREBASE_PROJECT_ID=your_project_id
    NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET=your_bucket
    NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID=your_sender_id
    NEXT_PUBLIC_FIREBASE_APP_ID=your_app_id

6. EmailJS (Optional for Contact Form)

  • Visit: https://www.emailjs.com
  • Create account (free)
  • Set up email service
  • Add to .env.local:
    NEXT_PUBLIC_EMAILJS_SERVICE_ID=your_service_id
    NEXT_PUBLIC_EMAILJS_TEMPLATE_ID=your_template_id
    NEXT_PUBLIC_EMAILJS_PUBLIC_KEY=your_public_key

Environment Variables Template

See .env.example for complete template with all required variables.


🛠️ Tech Stack

Frontend

  • Framework: Next.js 14 (App Router)
  • Language: TypeScript
  • Styling: Tailwind CSS
  • UI Components: shadcn/ui
  • Icons: Lucide React
  • Animations: Framer Motion
  • Math Rendering: KaTeX
  • Markdown: react-markdown

Backend

  • Runtime: Node.js
  • API Routes: Next.js API Routes
  • Database: Firebase Firestore
  • Authentication: Firebase Auth
  • File Storage: Firebase Storage

AI Integration

  • Groq: Lightning-fast inference
  • Google Gemini: Advanced reasoning
  • Cerebras: Ultra-fast processing
  • Hugging Face: Specialized models
  • Custom Adapters: Multi-provider architecture

DevOps

  • Deployment: Netlify
  • Version Control: Git/GitHub
  • CI/CD: Netlify Auto-deploy
  • Monitoring: Built-in error tracking

📱 Progressive Web App (PWA)

SOHAM is a fully-featured PWA that works on all devices:

Installation

📱 iPhone/iPad

  1. Open in Safari
  2. Tap Share button
  3. Select "Add to Home Screen"
  4. Tap "Add"

🤖 Android

  1. Open in Chrome
  2. Tap install banner
  3. Or: Menu → "Install app"

💻 Windows/Mac

  1. Open in Chrome/Edge
  2. Click install icon in address bar
  3. Or: Menu → "Install SOHAM"

PWA Benefits

  • 10-15x faster repeat loads
  • 📶 Works offline with cached content
  • 🎯 Fullscreen experience (no browser UI)
  • 🔄 Auto-updates in background
  • 🏠 Home screen icon
  • ⌨️ App shortcuts for quick actions

PWA Documentation

Complete PWA guides available in /docs/:


🏗️ Project Structure

codeex-ai/
├── src/
│   ├── app/                    # Next.js app router
│   │   ├── api/               # API routes
│   │   ├── chat/              # Chat interface
│   │   ├── documentation/     # Docs pages
│   │   └── ...
│   ├── components/            # React components
│   │   ├── chat/             # Chat components
│   │   ├── ui/               # UI components (shadcn)
│   │   └── ...
│   ├── lib/                   # Utilities & configs
│   │   ├── ai/               # AI adapters
│   │   ├── models-config.json # Model definitions
│   │   └── ...
│   ├── hooks/                 # Custom React hooks
│   └── styles/                # Global styles
├── public/                    # Static assets
│   ├── icons/                # PWA icons
│   ├── manifest.json         # PWA manifest
│   └── sw.js                 # Service worker
├── docs/                      # Documentation
├── .env.example              # Environment template
├── next.config.js            # Next.js config
├── tailwind.config.ts        # Tailwind config
└── package.json              # Dependencies

🧪 Development

Available Scripts

# Development
npm run dev              # Start dev server (localhost:3000)
npm run build           # Build for production
npm run start           # Start production server
npm run lint            # Run ESLint
npm run typecheck       # TypeScript type checking

# Testing
npm test                # Run tests
npm run test:watch      # Watch mode
npm run test:coverage   # Coverage report

# Utilities
npm run clean           # Clean build artifacts
npm run format          # Format code with Prettier

Code Quality

  • TypeScript: Full type safety
  • ESLint: Code linting
  • Prettier: Code formatting
  • Husky: Git hooks (optional)

🚀 Deployment

Netlify (Recommended)

  1. Connect Repository

    • Go to Netlify
    • Click "New site from Git"
    • Connect your GitHub repository
  2. Configure Build

    Build command: npm run build
    Publish directory: .next
    
  3. Add Environment Variables

    • Go to Site settings → Environment variables
    • Add all variables from .env.local
  4. Deploy

    • Click "Deploy site"
    • Automatic deployments on git push

Vercel

  1. Import Project

    • Go to Vercel
    • Click "Import Project"
    • Connect GitHub repository
  2. Configure

    • Framework: Next.js
    • Add environment variables
  3. Deploy

    • Automatic deployment

Custom Server

# Build
npm run build

# Start
npm run start

# Or use PM2
pm2 start npm --name "codeex-ai" -- start

📊 Performance

Lighthouse Scores

  • Performance: 95+
  • Accessibility: 100
  • Best Practices: 100
  • SEO: 100
  • PWA: ✓ Installable

Metrics

  • First Contentful Paint: <1.5s
  • Time to Interactive: <2.5s
  • Largest Contentful Paint: <2.5s
  • Cumulative Layout Shift: <0.1
  • Total Bundle Size: <200KB gzipped

Optimizations

  • Code splitting
  • Image optimization
  • Font optimization
  • Service worker caching
  • Edge function deployment
  • CDN distribution

🔒 Security

Best Practices

  • ✅ All API keys server-side only
  • ✅ Input validation & sanitization
  • ✅ Rate limiting on API routes
  • ✅ HTTPS only (enforced)
  • ✅ Content Security Policy
  • ✅ XSS protection
  • ✅ CSRF protection
  • ✅ Secure headers

Firebase Security

  • Firestore security rules
  • Authentication required
  • Role-based access control

🤝 Contributing

We welcome contributions! Here's how:

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

Contribution Guidelines

  • Follow TypeScript best practices
  • Add tests for new features
  • Update documentation
  • Follow existing code style
  • Write clear commit messages

👨‍💻 About the Developer

Heoster

  • REAL NAME: Harsh
  • Age: 16 years old
  • Location: Khatauli, Uttar Pradesh, India
  • Education: Class 12 PCM with Computer science, Maples Academy Khatauli
  • Role: Founder & Lead Developer, SOHAM

Vision

"To democratize AI education in India and make advanced technology accessible to every student, regardless of their background or resources."

Achievements

  • Built SOHAM with 35+ models at age 16
  • 50,000+ lines of code written
  • 200+ components developed
  • 1,00+ daily users worldwide
  • 100+ countries reached
  • 99.9% uptime maintained

Connect


📚 Documentation

Main Docs

PWA Docs

Platform Specific


🐛 Troubleshooting

Common Issues

Build Errors

# Clear cache and rebuild
rm -rf .next node_modules
npm install
npm run build

API Key Issues

  • Verify all keys in .env.local
  • Check key format (no quotes needed)
  • Ensure keys are active

Firebase Issues

  • Check Firebase project settings
  • Verify Firestore rules
  • Enable required services

PWA Not Installing

  • Must be served over HTTPS
  • Check manifest.json
  • Verify service worker registration

Getting Help


📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

MIT License Summary

  • ✅ Commercial use
  • ✅ Modification
  • ✅ Distribution
  • ✅ Private use
  • ❌ Liability
  • ❌ Warranty

🙏 Acknowledgments

AI Providers

Technologies

Community

  • All contributors and testers
  • Open source community
  • Early adopters and users
  • Friends who provided feedback

🌟 Star History

If you find SOHAM useful, please consider giving it a star ⭐

Star History Chart


📈 Roadmap

Current (v2.0)

  • ✅ 35+ AI models
  • ✅ Multi-provider architecture
  • ✅ PWA support
  • ✅ Voice synthesis
  • ✅ PDF analysis
  • ✅ Image solver

Upcoming (v2.1)

  • 🔄 Native mobile apps (iOS/Android)
  • 🔄 Advanced voice features
  • 🔄 Collaborative features
  • 🔄 API marketplace
  • 🔄 Plugin system

Future (v3.0)

  • 📋 AI model training
  • 📋 Custom model fine-tuning
  • 📋 Enterprise features
  • 📋 White-label solution
  • 📋 Educational curriculum

💖 Support the Project

Ways to Support

  • ⭐ Star the repository
  • 🐛 Report bugs
  • 💡 Suggest features
  • 📝 Improve documentation
  • 🔀 Submit pull requests
  • 📢 Share with others
  • 💬 Join discussions

Spread the Word

  • Share on social media
  • Write blog posts
  • Create tutorials
  • Make videos
  • Give talks

Built with ❤️ by a 16-year-old for the AI community

NetlifyVercelGitHubLinkedInTwitter

© 2024-2026 SOHAM. All rights reserved.

Made in 🇮🇳 India with passion for democratizing AI education