An open API service indexing awesome lists of open source software.

https://github.com/yashab-cyber/zeo

A complete AI-powered client acquisition and engagement system built for ZehraSec, a cybersecurity company. This system includes lead generation, client engagement (chatbot), product recommendation, CRM, analytics dashboard, and email automation.
https://github.com/yashab-cyber/zeo

ai artificial-intelligence ethicalhacking python python3

Last synced: 3 months ago
JSON representation

A complete AI-powered client acquisition and engagement system built for ZehraSec, a cybersecurity company. This system includes lead generation, client engagement (chatbot), product recommendation, CRM, analytics dashboard, and email automation.

Awesome Lists containing this project

README

          

# ZehraSec AI-Powered Client Acquisition System

A complete AI-powered client acquisition and engagement system built for ZehraSec, a cybersecurity company. This system includes lead generation, client engagement (chatbot), product recommendation, CRM, analytics dashboard, and email automation.

## ๐Ÿš€ Features

### Core Features
- **AI-Powered Chatbot**: Intelligent conversation handling with OpenAI integration
- **Lead Generation**: Automated lead capture and scoring system
- **CRM Integration**: Complete customer relationship management
- **Email Automation**: Automated email campaigns and nurture sequences
- **Analytics Dashboard**: Real-time insights and performance metrics
- **Product Recommendations**: AI-driven product suggestions
- **Appointment Scheduling**: Integrated booking system
- **Real-time Chat**: WebSocket-based live communication

### Technical Features
- **Flask Backend**: RESTful API with comprehensive endpoints
- **SQLite Database**: Local storage with ORM-like data models
- **WebSocket Support**: Real-time communication with Socket.IO
- **Modern UI**: Bootstrap-based responsive design
- **Admin Dashboard**: Complete management interface
- **Export Functionality**: CSV/PDF export capabilities
- **Search & Filtering**: Advanced search and filtering options

## ๐Ÿ› ๏ธ Technology Stack

### Backend
- **Python 3.8+**
- **Flask 2.3.3** - Web framework
- **SQLite** - Database
- **OpenAI API** - AI integration
- **Socket.IO** - Real-time communication
- **Pandas** - Data processing
- **Scikit-learn** - Machine learning

### Frontend
- **HTML5/CSS3/JavaScript**
- **Bootstrap 5.1.3** - UI framework
- **Chart.js** - Data visualization
- **Font Awesome** - Icons
- **Socket.IO Client** - Real-time communication

### Dependencies
- Flask-SQLAlchemy
- Flask-CORS
- Flask-SocketIO
- OpenAI
- Requests
- Schedule
- APScheduler
- And more (see requirements.txt)

## ๐Ÿ“ Project Structure

```
zeo/
โ”œโ”€โ”€ app.py # Main Flask application
โ”œโ”€โ”€ config.py # Configuration settings
โ”œโ”€โ”€ models.py # Database models and ORM
โ”œโ”€โ”€ requirements.txt # Python dependencies
โ”œโ”€โ”€ routes/
โ”‚ โ”œโ”€โ”€ api_routes.py # REST API endpoints
โ”‚ โ”œโ”€โ”€ chat_routes.py # Chat functionality
โ”‚ โ””โ”€โ”€ dashboard_routes.py # Admin dashboard
โ”œโ”€โ”€ services/
โ”‚ โ”œโ”€โ”€ ai_service.py # AI and OpenAI integration
โ”‚ โ”œโ”€โ”€ analytics_service.py # Analytics and reporting
โ”‚ โ”œโ”€โ”€ crm_service.py # CRM functionality
โ”‚ โ”œโ”€โ”€ email_service.py # Email automation
โ”‚ โ””โ”€โ”€ lead_service.py # Lead management
โ”œโ”€โ”€ templates/
โ”‚ โ”œโ”€โ”€ index.html # Main website
โ”‚ โ”œโ”€โ”€ chat.html # Chat interface
โ”‚ โ””โ”€โ”€ admin/
โ”‚ โ”œโ”€โ”€ dashboard.html # Admin dashboard
โ”‚ โ”œโ”€โ”€ leads.html # Lead management
โ”‚ โ”œโ”€โ”€ analytics.html # Analytics page
โ”‚ โ””โ”€โ”€ campaigns.html # Email campaigns
โ””โ”€โ”€ static/
โ”œโ”€โ”€ css/
โ”‚ โ”œโ”€โ”€ style.css # Main website styles
โ”‚ โ””โ”€โ”€ admin.css # Admin dashboard styles
โ””โ”€โ”€ js/
โ”œโ”€โ”€ main.js # Main website scripts
โ””โ”€โ”€ admin.js # Admin dashboard scripts
```

## ๐Ÿ”ง Installation & Setup

### Prerequisites
- Python 3.8 or higher
- pip (Python package manager)
- OpenAI API key (optional, for AI features)

### 1. Clone the Repository
```bash
git clone
cd zeo
```

### 2. Create Virtual Environment
```bash
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
```

### 3. Install Dependencies
```bash
pip install -r requirements.txt
```

### 4. Configure Environment Variables
Create a `.env` file in the root directory:
```env
SECRET_KEY=your-secret-key-here
OPENAI_API_KEY=your-openai-api-key
DATABASE_URL=sqlite:///zehrasec.db
EMAIL_HOST=smtp.gmail.com
EMAIL_PORT=587
EMAIL_USER=your-email@gmail.com
EMAIL_PASSWORD=your-email-password
```

### 5. Initialize Database
```bash
python -c "from models import init_db; init_db()"
```

### 6. Run the Application
```bash
python app.py
```

The application will be available at `http://localhost:5000`

## ๐Ÿ“Š Usage

### Main Website
- Visit `http://localhost:5000` for the main website
- Use the chat widget in the bottom-right corner to start conversations
- Fill out contact forms to generate leads

### Admin Dashboard
- Visit `http://localhost:5000/admin/dashboard` for the admin interface
- Manage leads, view analytics, and create email campaigns
- Monitor real-time chat activity and system performance

### API Endpoints
The system provides comprehensive REST API endpoints:

#### Lead Management
- `GET /api/leads` - Get all leads
- `POST /api/leads` - Create new lead
- `PUT /api/leads/` - Update lead
- `DELETE /api/leads/` - Delete lead

#### Chat System
- `POST /api/chat/start` - Start new conversation
- `POST /api/chat/message` - Send message
- `GET /api/chat/history` - Get chat history

#### Analytics
- `GET /api/analytics` - Get analytics data
- `GET /api/dashboard/stats` - Get dashboard statistics

#### Email Campaigns
- `GET /api/campaigns` - Get all campaigns
- `POST /api/campaigns` - Create new campaign
- `PUT /api/campaigns/` - Update campaign

## ๐ŸŽฏ Key Features Detail

### AI-Powered Chatbot
- Intent recognition and response generation
- Context-aware conversations
- Product recommendations based on user needs
- Fallback handling for complex queries

### Lead Scoring System
- Automatic lead scoring based on multiple factors
- Lead qualification and prioritization
- Engagement tracking and analytics

### Email Automation
- Automated welcome sequences
- Nurture campaigns based on lead behavior
- Personalized product recommendations
- A/B testing capabilities

### Analytics Dashboard
- Real-time performance metrics
- Lead generation trends
- Conversion funnel analysis
- Email campaign performance

## ๐Ÿ”’ Security Features

- Input validation and sanitization
- SQL injection prevention
- Cross-site scripting (XSS) protection
- CORS configuration
- Rate limiting (configurable)

## ๐Ÿ“ˆ Performance Optimization

- Database indexing for faster queries
- Caching for frequently accessed data
- Optimized API responses
- Efficient WebSocket handling
- Static file optimization

## ๐Ÿงช Testing

### Running Tests
```bash
python -m pytest tests/
```

### Test Coverage
- Unit tests for all services
- Integration tests for API endpoints
- Frontend functionality tests

## ๐Ÿ“š API Documentation

### Authentication
Currently, the system uses session-based authentication. API keys can be implemented for programmatic access.

### Response Format
All API responses follow this format:
```json
{
"success": true,
"data": {...},
"message": "Success message",
"timestamp": "2025-01-13T10:30:00Z"
}
```

### Error Handling
Errors are returned with appropriate HTTP status codes:
```json
{
"success": false,
"error": "Error message",
"code": "ERROR_CODE",
"timestamp": "2025-01-13T10:30:00Z"
}
```

## ๐Ÿ”„ Deployment

### Production Deployment
1. Set up production environment variables
2. Configure production database (PostgreSQL recommended)
3. Set up email service (SendGrid, AWS SES, etc.)
4. Configure web server (Nginx + Gunicorn)
5. Set up SSL certificates
6. Configure monitoring and logging

### Docker Deployment
```bash
# Build the image
docker build -t zehrasec-app .

# Run the container
docker run -p 5000:5000 zehrasec-app
```

## ๐Ÿ“ Configuration

### Environment Variables
- `SECRET_KEY`: Flask secret key
- `OPENAI_API_KEY`: OpenAI API key for AI features
- `DATABASE_URL`: Database connection string
- `EMAIL_HOST`: SMTP server host
- `EMAIL_PORT`: SMTP server port
- `EMAIL_USER`: Email username
- `EMAIL_PASSWORD`: Email password

### Application Settings
Configure in `config.py`:
- Database settings
- Email settings
- AI service settings
- Product information
- Company information

## ๐Ÿค Contributing

1. Fork the repository
2. Create a feature branch
3. Make your changes
4. Write tests for new functionality
5. Submit a pull request

## ๐Ÿ“„ License

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

## ๐Ÿ’ก Future Enhancements

- [ ] User authentication and role-based access
- [ ] Advanced analytics and reporting
- [ ] Integration with popular CRM systems
- [ ] Mobile app for iOS and Android
- [ ] Advanced AI features (sentiment analysis, etc.)
- [ ] Multi-language support
- [ ] Advanced email templates
- [ ] Integration with social media platforms
- [ ] Video chat capabilities
- [ ] Advanced security features

## ๐Ÿ†˜ Support

For support and questions:
- Email: support@zehrasec.com
- Documentation: [Link to documentation]
- Issues: [GitHub Issues](https://github.com/username/zehrasec/issues)

## ๐Ÿ™ Acknowledgments

- OpenAI for AI capabilities
- Flask community for the excellent framework
- Bootstrap for UI components
- All contributors and testers

---

**ZehraSec AI-Powered Client Acquisition System** - Building the future of cybersecurity sales and engagement.