Skip to content

IcedMonk/evo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

5 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Evolution API SAAS Platform

A comprehensive, production-ready Software as a Service (SAAS) platform for managing Evolution API instances with a modern, animated UI and full API functionality.

๐Ÿš€ Features

Core Functionality

  • Instance Management: Create, manage, and monitor multiple WhatsApp instances
  • Message Management: Send text messages, media files, and template messages
  • Webhook Management: Configure and manage webhooks for real-time events
  • User Authentication: Secure user registration, login, and profile management
  • Subscription Management: Multiple pricing tiers with usage tracking
  • Real-time Updates: Socket.IO integration for live updates

UI/UX Features

  • Modern Design: Clean, responsive interface with Tailwind CSS
  • Smooth Animations: Framer Motion animations throughout the application
  • Interactive Components: Custom UI components with hover effects and transitions
  • Mobile Responsive: Optimized for all device sizes
  • Dark/Light Mode Ready: Prepared for theme switching

Technical Features

  • TypeScript: Full type safety across frontend and backend
  • API Integration: Complete Evolution API integration
  • Real-time Communication: Socket.IO for live updates
  • Form Validation: Zod schema validation
  • Error Handling: Comprehensive error handling and user feedback
  • Security: JWT authentication, rate limiting, and input validation

๐Ÿ›  Tech Stack

Frontend

  • Next.js 14: React framework with App Router
  • TypeScript: Type-safe development
  • Tailwind CSS: Utility-first CSS framework
  • Framer Motion: Animation library
  • React Hook Form: Form management
  • Zod: Schema validation
  • Axios: HTTP client
  • Lucide React: Icon library

Backend

  • Node.js: JavaScript runtime
  • Express.js: Web framework
  • TypeScript: Type-safe development
  • MongoDB: Database with Mongoose ODM
  • Socket.IO: Real-time communication
  • JWT: Authentication
  • bcryptjs: Password hashing
  • Express Rate Limit: Rate limiting
  • Helmet: Security headers

๐Ÿ“ฆ Installation

Prerequisites

Quick Start

  1. Clone the repository

    git clone <repository-url>
    cd evolution-api-saas
  2. Install dependencies

    npm run install:all
  3. Set up environment variables

    # Backend
    cp backend/.env.example backend/.env
    # Edit backend/.env with your configuration
    
    # Frontend
    cp frontend/.env.local.example frontend/.env.local
    # Edit frontend/.env.local with your configuration
  4. Start the development servers

    npm run dev

    This will start both frontend (http://localhost:3000) and backend (http://localhost:5000) servers.

๐Ÿ”ง Configuration

Backend Configuration (.env)

# Server Configuration
PORT=5000
NODE_ENV=development

# Database
MONGODB_URI=mongodb://localhost:27017/evolution-api-saas

# JWT
JWT_SECRET=your-super-secret-jwt-key
JWT_EXPIRE=7d

# Evolution API
EVOLUTION_API_URL=https://evo.wcpilot.me
EVOLUTION_API_KEY=your-evolution-api-key

# Frontend URL
FRONTEND_URL=http://localhost:3000

Frontend Configuration (.env.local)

NEXT_PUBLIC_API_URL=http://localhost:5000/api
NEXT_PUBLIC_APP_NAME=Evolution API SAAS
NEXT_PUBLIC_APP_URL=http://localhost:3000

๐Ÿ“ฑ Usage

1. User Registration & Authentication

  • Register a new account at /auth/register
  • Sign in at /auth/login
  • Access the dashboard at /dashboard

2. Instance Management

  • Create new WhatsApp instances
  • Connect instances using QR codes
  • Monitor instance status
  • Update instance settings

3. Message Management

  • Send text messages to phone numbers
  • Send media files (images, videos, documents)
  • Send template messages
  • View message history

4. Webhook Management

  • Configure webhook endpoints
  • Select events to monitor
  • Test webhook connections

5. Billing & Subscriptions

  • View current plan and usage
  • Upgrade/downgrade plans
  • Manage payment methods
  • View billing history

๐Ÿ— Project Structure

evolution-api-saas/
โ”œโ”€โ”€ frontend/                 # Next.js frontend application
โ”‚   โ”œโ”€โ”€ src/
โ”‚   โ”‚   โ”œโ”€โ”€ app/             # App Router pages
โ”‚   โ”‚   โ”œโ”€โ”€ components/      # Reusable UI components
โ”‚   โ”‚   โ”œโ”€โ”€ contexts/        # React contexts
โ”‚   โ”‚   โ”œโ”€โ”€ lib/            # Utilities and API client
โ”‚   โ”‚   โ””โ”€โ”€ types/          # TypeScript type definitions
โ”‚   โ””โ”€โ”€ package.json
โ”œโ”€โ”€ backend/                 # Node.js backend application
โ”‚   โ”œโ”€โ”€ src/
โ”‚   โ”‚   โ”œโ”€โ”€ controllers/    # Route controllers
โ”‚   โ”‚   โ”œโ”€โ”€ middleware/     # Express middleware
โ”‚   โ”‚   โ”œโ”€โ”€ models/         # MongoDB models
โ”‚   โ”‚   โ”œโ”€โ”€ routes/         # API routes
โ”‚   โ”‚   โ”œโ”€โ”€ services/       # Business logic services
โ”‚   โ”‚   โ””โ”€โ”€ utils/          # Utility functions
โ”‚   โ””โ”€โ”€ package.json
โ””โ”€โ”€ package.json            # Root package.json with scripts

๐Ÿ”Œ API Endpoints

Authentication

  • POST /api/auth/register - User registration
  • POST /api/auth/login - User login
  • GET /api/auth/me - Get current user
  • POST /api/auth/forgot-password - Password reset request
  • PUT /api/auth/reset-password - Password reset

Instances

  • POST /api/instances - Create new instance
  • GET /api/instances - Get all instances
  • GET /api/instances/:name - Get specific instance
  • GET /api/instances/:name/qr - Get QR code
  • PUT /api/instances/:name - Update instance
  • DELETE /api/instances/:name - Delete instance

Messages

  • POST /api/messages/send-text - Send text message
  • POST /api/messages/send-media - Send media message
  • POST /api/messages/send-template - Send template message
  • GET /api/messages/:instance/chats - Get chats
  • GET /api/messages/:instance/chat/:jid - Get messages

Webhooks

  • POST /api/webhooks/:instance - Set webhook
  • GET /api/webhooks/:instance - Get webhook
  • DELETE /api/webhooks/:instance - Delete webhook

Billing

  • GET /api/billing/plans - Get available plans
  • GET /api/billing/subscription - Get current subscription
  • PUT /api/billing/subscription - Update subscription
  • POST /api/billing/create-checkout-session - Create checkout session

๐Ÿš€ Deployment

Production Build

npm run build
npm start

Docker Deployment

# Build and run with Docker Compose
docker-compose up -d

Environment Variables for Production

  • Set NODE_ENV=production
  • Use a production MongoDB instance
  • Configure proper JWT secrets
  • Set up SSL certificates
  • Configure production Evolution API URL

๐Ÿ”’ Security Features

  • JWT Authentication: Secure token-based authentication
  • Password Hashing: bcryptjs for password security
  • Rate Limiting: Prevent API abuse
  • Input Validation: Comprehensive input validation
  • CORS Configuration: Proper cross-origin resource sharing
  • Helmet Security: Security headers
  • Environment Variables: Sensitive data protection

๐Ÿ“Š Subscription Plans

Free Plan

  • 1 WhatsApp instance
  • 100 messages/month
  • Basic support
  • Standard templates

Basic Plan ($29/month)

  • 3 WhatsApp instances
  • 1,000 messages/month
  • Priority support
  • Custom templates
  • Webhooks

Pro Plan ($99/month)

  • 10 WhatsApp instances
  • 10,000 messages/month
  • 24/7 support
  • Advanced templates
  • Advanced analytics

Enterprise Plan ($299/month)

  • 50 WhatsApp instances
  • 100,000 messages/month
  • Dedicated support
  • Custom integrations
  • Custom branding

๐Ÿค Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests if applicable
  5. Submit a pull request

๐Ÿ“„ License

This project is licensed under the MIT License.

๐Ÿ†˜ Support

For support and questions:

  • Check the documentation
  • Create an issue on GitHub
  • Contact the development team

๐Ÿ”ฎ Future Enhancements

  • Advanced analytics dashboard
  • Template message builder
  • Bulk message sending
  • Contact management
  • Group management
  • Multi-language support
  • Mobile app
  • API rate limiting per user
  • Advanced webhook filtering
  • Message scheduling
  • Automated responses
  • Integration marketplace

Built with โค๏ธ using modern web technologies for professional WhatsApp API management.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages