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.
- Host: GitHub
- URL: https://github.com/yashab-cyber/zeo
- Owner: yashab-cyber
- Created: 2025-07-13T18:48:50.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2025-07-25T14:59:12.000Z (11 months ago)
- Last Synced: 2025-07-25T20:53:07.332Z (11 months ago)
- Topics: ai, artificial-intelligence, ethicalhacking, python, python3
- Language: Python
- Homepage: https://zehrasec.com
- Size: 101 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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.